[jboss-user] [EJB 3.0 Development] - Wrong JNDI context returned from EJB

Richard Opalka do-not-reply at jboss.com
Fri Apr 2 08:23:20 EDT 2010


Richard Opalka [http://community.jboss.org/people/richard.opalka%40jboss.com] created the discussion

"Wrong JNDI context returned from EJB"

To view the discussion, visit: http://community.jboss.org/message/535366#535366

--------------------------------------------------------------
Hi EJB team,

   This is related to issue:  https://jira.jboss.org/jira/browse/JBAS-7888 https://jira.jboss.org/jira/browse/JBAS-7888

   I'm analyzing this failure:
 http://jbossws.jboss.org:8180/hudson/job/AS-TESTS-AS-6.0.1/113/testReport/ http://jbossws.jboss.org:8180/hudson/job/AS-TESTS-AS-6.0.1/113/testReport/

To reproduce the problem, just type:
cd jbossas/trunk/testsuite
./build.sh clean main
./build.sh -Dtest=org.jboss.test.ws.jaxws.ejb3Integration.injection.InjectionTestCase one-test

I found it started to fail since:
 http://jbossws.jboss.org:8180/hudson/job/AS-6.0.1/109/ http://jbossws.jboss.org:8180/hudson/job/AS-6.0.1/109/
I think it might be related to:
 https://jira.jboss.org/jira/browse/JBAS-7854 https://jira.jboss.org/jira/browse/JBAS-7854

Here are my investigations:

Our archive structure is:
jbossas/trunk/testsuite/output/lib]>jar -tvf jaxws-injection.ear
     0 Fri Apr 02 12:20:46 CEST 2010 META-INF/
   102 Fri Apr 02 12:20:44 CEST 2010 META-INF/MANIFEST.MF
   602 Fri Apr 02 12:20:46 CEST 2010 META-INF/application.xml
  7367 Fri Apr 02 12:20:46 CEST 2010 jaxws-injection-ejb3.jar
  9000 Fri Apr 02 12:20:46 CEST 2010 jaxws-injection-pojo.war
  2323 Fri Apr 02 13:54:46 CEST 2010 jaxws-injection.jar

Relevant JNDI trees are (from JMX console):

java:comp namespace of the component jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection.jar,name=BeanImpl,service=EJB3 :

  +- EJBContext (class: javax.ejb.EJBContext)
  +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
  +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
  +- env (class: org.jnp.interfaces.NamingContext)
  +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)


java:comp namespace of the component jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection-ejb3.jar,name=EJB3Bean,service=EJB3 :

  +- EJBContext (class: javax.ejb.EJBContext)
  +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
  +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- org.jboss.test.ws.jaxws.ejb3Integration.injection.webservice.AbstractEndpointImpl (class: org.jnp.interfaces.NamingContext)
  |   |   +- testBean2[link -> jaxws-injection/BeanImpl/local-org.jboss.test.ws.jaxws.ejb3Integration.injection.shared.BeanIface] (class: javax.naming.LinkRef)
  |   |   +- bean[link -> jaxws-injection/BeanImpl/local-org.jboss.test.ws.jaxws.ejb3Integration.injection.shared.BeanIface] (class: javax.naming.LinkRef)
  |   +- boolean1 (class: java.lang.Boolean)
  +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)

In our JBossWS AS Integration layer we're lookuping the JNDI context as:

public Context getJNDIContext(final Endpoint ep) throws NamingException
{
      final EJBContainer ejb3Container = (EJBContainer)getEjb3Container("jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection-ejb3.jar,name=EJB3Bean,service=EJB3");
      return (Context)ejb3Container.getEnc().lookup("java:env/");
}

This call used to return proper JNDI tree associated with
jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection-ejb3.jar,name=EJB3Bean,service=EJB3.
Unfortunately these days in AS trunk it returns the JNDI tree associated with
jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection.jar,name=BeanImpl,service=EJB3

IMHO this is a bug in EJB code base.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/535366#535366]

Start a new discussion in EJB 3.0 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100402/7a1826b0/attachment.html 


More information about the jboss-user mailing list