Mantis - Resin
Viewing Issue Advanced Details
1342 minor always 09-12-06 08:33 11-30-06 16:24
vbavin  
sam  
normal  
closed 3.0.21  
fixed  
none    
none 3.1.0  
0001342: EAR: JNDI not rebind from web.xml
EAR: JNDI rebind from web.xml not working,
but still EJB looked up through their description in ejb-jar.xml.
Packed in one EAR.
ejb-jar.xml:
      <!-- Session Beans -->
      <session >
         <ejb-name>Jump</ejb-name>
         <local-home>vab.base.JumpLocalHome</local-home>
         <local>vab.base.JumpLocal</local>
         <ejb-class>vab.base.JumpSession</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>

web.xml:
   <ejb-local-ref >
      <ejb-ref-name>ejb/Link2LocalJump</ejb-ref-name>
...
      <ejb-link>Jump</ejb-link>
   </ejb-local-ref>

Servlet init:
InitialContext ic = new InitialContext();
ic.lookup("java:comp/env/ejb/Link2LocalJump");//object is null
ic.lookup("java:comp/env/ejb/Jump"));//object reference 2 ejb

All logging:

[2006.09.12 18:01:40.531] JNDI lookup `Link2LocalJump' -> null
[2006.09.12 18:01:40.531] JNDI rebind `Link2LocalJump' value: LinkProxy[name=null,foreign=Jump]
..
[2006.09.12 18:01:40.562] Servlet[caseServlet] starting
[2006.09.12 18:01:40.562] caseServlet: init
[2006.09.12 18:01:40.562] JNDI lookup `Jump' -> null
[2006.09.12 18:01:40.562] JNDI lookup `Link2LocalJump' -> null
[2006.09.12 18:01:40.562] JNDI lookup `java:comp/env/ejb/Link2LocalJump' -> null
[2006.09.12 18:01:40.562] JNDI lookup `Jump' -> _ejb.Jump.JumpSession__EJB$LocalHome@28305d
[2006.09.12 18:01:40.562] JNDI lookup `java:comp/env/ejb/Jump' -> _ejb.Jump.JumpSession__EJB$LocalHome@28305d

Notes
(0001517)
vbavin   
09-14-06 00:44   
And after Resin-3.0.s060216 in web.xml can't rebind to the same name as EJB name in ejb-jar.xml ( lookup=> null).
Before and Resin-3.0.s060216 this rebind work fine.
(0001597)
ferg   
11-20-06 12:10   
ejb/0g20
(0001629)
ferg   
11-30-06 16:24   
ejb/0g*