Mantis - Resin
Viewing Issue Advanced Details
3964 minor always 03-23-10 11:48 03-26-10 14:05
alex  
ferg  
normal  
closed 4.0.4  
fixed  
none    
none 4.0.6  
0003964: 3.1 to 4.0 EJB JNDI Lookup compatibility
rep. by Matthew Brew
I am currently trying to upgrade resin from version 3.1.9 to version 4.0.4. The method of deployment we use is an .ear file. We are having some problems with getting Stateless EJB's from the JNDI.

Previously this would work:

InitialContext ctx = (Context)new InitialContext();
ctx.lookup("java:comp/env/ejb/automation/" + className + "/local");

Matthew,

That behaviour is not standard and did not get ported to 4.0. We will be adding the capability as


I have also tried this:
ctx.lookup("java:comp/env/ejb/" + className );

and various other combinations but unfortunately they all fail. Following is an example of our annotations on the stateless EJB.


@Stateless
@Local({ITLDAgent.class})
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class TLDAgentImpl implements ITLDAgent
{

}
How can I retreive the EJB's from the JNDI?

Notes
(0004487)
ferg   
03-26-10 14:05   
ejb/3400, ejb/2090

In Resin 4.0.5, <ejb-server jndi-prefix="java:comp/env/ejb"/> gives the backward compatibility. You will need to add it to your resin.xml (usually in the <cluster> section.)

The fix for 4.0.6 was basic <ejb-ref> support. (Complete support isn't expected until 4.0.8, but the basic support will be in 4.0.6).