Forums Register Login

what is the meaning of this sentence?

+Pie Number of slices to send: Send
"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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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.
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 507 times.
Similar Threads
HFEJB C4 Pg 249/256 Q17 - Error
Session object�s local interface
Mock question from Headfirst EJB
SCBCD Mock Q's - Batch 2
Working example of persistent relationships in Remote-Local entity
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:59:19.