• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

any hints for this SCEAJ question?

 
walter wang
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does a client locate an EJB instance?(choose one)
1) through JNDI
2) through RMI
3) through a home interface
4) through a remote interface
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right off we can rule out 2 and 4.
That leaves us with 1)JNDI and 3)Home inteface.
Using JNDI we can retrieve the home interface. Is the home interface an EJB instance? No.
Therefore the answer must be 3)home interface. Though you can always make the argument that the JNDI lookup is a necessary step in retrieving an EJB instance.
 
Paul Newton
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes - but the Home interface is itself a remote interface. And remote interfaces are part of the RMI framework.
So...you could answer 1,2,3,4 for this question.
paul.
 
Rajeev Gupta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the question is how does a client "locate" EJB Instance. I would say that the locating part is by JNDI, and mainly by setting up the InitialContext (along with the url, and accessor like protocol://url ort). The underlying app server / container implementation could use any flavour of protocol (rmi, iiop, t3, etc), while the interface to locating them is always JNDI.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rajeev Gupta:
Well the question is how does a client "locate" EJB Instance. I would say that the locating part is by JNDI, and mainly by setting up the InitialContext (along with the url, and accessor like protocol://url ort).

This merely locates the home interface, which is not an EJB instance by definition.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Newton:
Yes - but the Home interface is itself a remote interface. And remote interfaces are part of the RMI framework.
So...you could answer 1,2,3,4 for this question.
paul.

I see where you are going with that... it just goes to show how poorly worded this question was. It is definitely not representative of the questions that are on the actual SCEA exam (from my experiences).
 
jusheng jiang
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(non-English content deleted)
posts must be in English, thanks.
[ November 12, 2002: Message edited by: Marilyn de Queiroz ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic