[OEJB3.0] - Question about the specs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OEJB3.0] - Question about the specs

Mohammad Nour El-Din
Hi All...
I have two questions regarding the specs:
  1. If an EJB3.0 enterprise bean has defined both a local business interface and a 2.1 local component interface, and a client tries to look the bean up using the JNDI APIs, what should the container do? returns the LocalHome of the bean or the local business interface ? This happens also with the remote client.
  2. If we have a remote client that is not managed by the container, how dependency injection is applied? as the specs say that the dependency injection is applied by the container.
Thanks and best regards...
Mohammad Nour El-Din
Reply | Threaded
Open this post in threaded view
|

Re: [OEJB3.0] - Question about the specs

dblevins
Administrator
On Jul 9, 2006, at 5:54 PM, Mohammed Nour wrote:
> If an EJB3.0 enterprise bean has defined both a local business  
> interface and a 2.1 local component interface, and a client tries  
> to look the bean up using the JNDI APIs, what should the container  
> do? returns the LocalHome of the bean or the local business  
> interface ? This happens also with the remote client.

When declaring a reference to an EJB from another component, you have  
to specify which interface you want.

> If we have a remote client that is not managed by the container,  
> how dependency injection is applied? as the specs say that the  
> dependency injection is applied by the container.

The spec does not require dependency injection for anything other  
than a JEE Application Client, a Web App, or another EJB, all of  
which are managed by a container that will do the dependency  
injection.  For remote clients that are not JEE Application Clients,  
dependency injection is not supported and the way you get a reference  
to an EJB is unspecified.  In that case, we'd allow people to lookup  
an EJB via any of it's interfaces via JNDI using user defined or  
default names.

Hope this helps.

-David


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email