Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the meaning of this sentence?

 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"A client can pass a local home object reference to another application through its local interface. "
Here what is the local interface? ,is it the local interface of the client? or the local EJBobject reference interface .
can somebody explain the scenario preferably with an example.
thanks
Pradeep
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Imagine two bean types T1 and T2, each deployed to have local component interfaces C1 and C2, respectively.
The statement means you could have a method on C1 like
public void doStuff(C2 localObj);
The thing to understand is that you can pass local EJB object references as arguments to local component interface methods. You can also pass remote EJB object references to remote *and* local interface methods. But you can't ever pass a local EJB object reference to a remote interface method.
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I'd have to say that phrase "to another application..." strikes me as surprising. I can understand passing references to beans in the same application, but I find it hard to imagine what it means to pass local references between different deployed applications. I haven't researched the issue in the spec, don't know if this is just a case of unfortunate wording in a book, or an actual required feature of EJB containers.
 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Reid,
this phrase is from Mikalai Zakin's guide
i understood what u said,and now my new question is? can objects from one application be shipped to another....if so what about the security & other things? it means the other application can start calling methods on the shipped objects interface!!!right?and as far as i know each appliction has only one jar->each jar has only one DD.is it possisible?

Pradeep
[ March 12, 2004: Message edited by: pradeep arum ]
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remote objects can be shipped around (remember handles? they are another mechanism for passing around remote objects).
With a remote object reference, the caller is just a client - the application servicing the remote object doesn't care what kind of client it is (i.e. it doesn't matter if the client is a bean in the same application, a bean in another application, a non-bean client program somewhere in the universe, etc.).
Security is handled like it always is. If the bean with the method being accessed is configured to care about security, then the caller's use of the bean will cause the usual caller principal stuff, etc., to be passed around. Typically some JAAS mechanism will kick in - the user will be required to authenticate in the way the application (the one servicing the bean on the EJB server) demands. Passing around object references and handles doesn't bypass security.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic