Hi
From R.M. Haefel's book on EJB I understand, that EJB clients that are EJB's themselfes, use a somewhat different (namingcontext-)lookup method than 'regular' clients.
But why ?
Why the <ejb-ref> tag in the deployment descriptor and why the 'java:comp/env' namespace ?
-
different EJB lookups ? why ? (2 messages)
- Posted by: J W
- Posted on: August 18 2000 20:30 EDT
Threaded Messages (2)
- different EJB lookups ? why ? by Mike Sprague on August 21 2000 00:49 EDT
- different EJB lookups ? why ? by Jean-Baptiste Nizet on August 21 2000 08:09 EDT
-
different EJB lookups ? why ?[ Go to top ]
- Posted by: Mike Sprague
- Posted on: August 21 2000 00:49 EDT
- in response to J W
When the client is in the same JVM you can use the
no-argument call to get the InitialContext. Otherwise,
you need to specify the context factory and URL.
InitialContext ic = new InitialContext();
-
different EJB lookups ? why ?[ Go to top ]
- Posted by: Jean-Baptiste Nizet
- Posted on: August 21 2000 08:09 EDT
- in response to Mike Sprague
This is not correct. See my answer in this thread.
I think the main idea behind ejb-ref was to allow beans in the same jar to be able to do a lookup without having to go to the naming service, and to optimize colocated calls. It's also useful because that way, the EJB provider can notify the application assembler or deployer that the bean needs the presence of another bean to work correctly.
JB.