[jboss-as7-dev] EJB 3 Proxies

Carlo de Wolf cdewolf at redhat.com
Mon Jan 17 05:18:18 EST 2011


The goal is to provide the functionality as outlined in EJB 3.1 FR 4.3.3 
getBusinessObject and getEJB* methods, plus 4.4 Global JNDI Access.

EJB Servitors provide an entry point InvocationDispatcher. Behind this 
entry point the local system interceptors are invoked. In essence an EJB 
Servitor is a 'singleton' ManagedBean

For the purpose of JNDI the distinction is made between JNDI objects and 
true proxies. JNDI objects can be proxies, LinkRef or ObjectFactory. A 
true proxy is either a direct link or a lazy link to the servitor via 
its InvocationDispatcher interface.

The JNDI names where the JNDI objects are bound are generated by an ejb3 
component. Who binds these objects is currently undecided.
The generation of JNDI objects is delegated out of ejb3 to another 
construct.

Within an EJB the user can call upon getBusinessObject for example. In 
this case a true proxy needs to be returned. Again ejb3 delegates out to 
another construct.

Possibly the JNDI object and proxy factories can be co-located within 
one component.

Note, there is a risk of overlap with remote invocation. Remote 
invocation is explicitly beyond scope of the EJB servitor dispatcher.

Remote proxies are special InvocationDispatchers which can have client- 
and server side interceptors. The client side interceptors prepare for 
marshaling of the current invocation context (transaction, security 
etc). The server side interceptors transform the marshaled context into 
the local context equivalent.

In short we need to design a way to bind the EJB views.

Do we really need a service per JNDI binding (as per [1])?

Carlo

[1] 
http://community.jboss.org/wiki/JavaEEImplementationTechnicalRequirements



More information about the jboss-as7-dev mailing list