<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Wrong JNDI context returned from EJB
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/richard.opalka%40jboss.com">Richard Opalka</a> in <i>EJB 3.0 Development</i> - <a href="http://community.jboss.org/message/535366#535366">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi EJB team,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>&#160;&#160; This is related to issue: </span><a class="jive-link-external-small" href="https://jira.jboss.org/jira/browse/JBAS-7888" target="_blank">https://jira.jboss.org/jira/browse/JBAS-7888</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160; I'm analyzing this failure:</p><p><a class="jive-link-external-small" href="http://jbossws.jboss.org:8180/hudson/job/AS-TESTS-AS-6.0.1/113/testReport/" target="_blank">http://jbossws.jboss.org:8180/hudson/job/AS-TESTS-AS-6.0.1/113/testReport/</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>To reproduce the problem, just type:</p><p>cd jbossas/trunk/testsuite</p><p>./build.sh clean main</p><p>./build.sh -Dtest=org.jboss.test.ws.jaxws.ejb3Integration.injection.InjectionTestCase one-test</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I found it started to fail since:</p><p><a class="jive-link-external-small" href="http://jbossws.jboss.org:8180/hudson/job/AS-6.0.1/109/" target="_blank">http://jbossws.jboss.org:8180/hudson/job/AS-6.0.1/109/</a></p><p>I think it might be related to:</p><p><a class="jive-link-external-small" href="https://jira.jboss.org/jira/browse/JBAS-7854" target="_blank">https://jira.jboss.org/jira/browse/JBAS-7854</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here are my investigations:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Our archive structure is:</p><p>jbossas/trunk/testsuite/output/lib]&gt;jar -tvf jaxws-injection.ear<br/>&#160;&#160;&#160;&#160; 0 Fri Apr 02 12:20:46 CEST 2010 META-INF/<br/>&#160;&#160; 102 Fri Apr 02 12:20:44 CEST 2010 META-INF/MANIFEST.MF<br/>&#160;&#160; 602 Fri Apr 02 12:20:46 CEST 2010 META-INF/application.xml<br/>&#160; 7367 Fri Apr 02 12:20:46 CEST 2010 jaxws-injection-ejb3.jar<br/>&#160; 9000 Fri Apr 02 12:20:46 CEST 2010 jaxws-injection-pojo.war<br/>&#160; 2323 Fri Apr 02 13:54:46 CEST 2010 jaxws-injection.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Relevant JNDI trees are (from JMX console):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java:comp namespace of the component jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection.jar,name=BeanImpl,service=EJB3 :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; +- EJBContext (class: javax.ejb.EJBContext)<br/>&#160; +- TransactionSynchronizationRegistry[link -&gt; java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)<br/>&#160; +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)<br/>&#160; +- env (class: org.jnp.interfaces.NamingContext)<br/>&#160; +- ORB[link -&gt; java:/JBossCorbaORB] (class: javax.naming.LinkRef)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>java:comp namespace of the component jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection-ejb3.jar,name=EJB3Bean,service=EJB3 :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; +- EJBContext (class: javax.ejb.EJBContext)<br/>&#160; +- TransactionSynchronizationRegistry[link -&gt; java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)<br/>&#160; +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)<br/>&#160; +- env (class: org.jnp.interfaces.NamingContext)<br/>&#160; |&#160;&#160; +- org.jboss.test.ws.jaxws.ejb3Integration.injection.webservice.AbstractEndpointImpl (class: org.jnp.interfaces.NamingContext)<br/>&#160; |&#160;&#160; |&#160;&#160; +- testBean2[link -&gt; jaxws-injection/BeanImpl/local-org.jboss.test.ws.jaxws.ejb3Integration.injection.shared.BeanIface] (class: javax.naming.LinkRef)<br/>&#160; |&#160;&#160; |&#160;&#160; +- bean[link -&gt; jaxws-injection/BeanImpl/local-org.jboss.test.ws.jaxws.ejb3Integration.injection.shared.BeanIface] (class: javax.naming.LinkRef)<br/>&#160; |&#160;&#160; +- boolean1 (class: java.lang.Boolean)<br/>&#160; +- ORB[link -&gt; java:/JBossCorbaORB] (class: javax.naming.LinkRef)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In our JBossWS AS Integration layer we're lookuping the JNDI context as:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>public Context getJNDIContext(final Endpoint ep) throws NamingException<br/>{<br/>&#160;&#160;&#160;&#160;&#160; final EJBContainer ejb3Container = (EJBContainer)getEjb3Container("jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection-ejb3.jar,name=EJB3Bean,service=EJB3");<br/>&#160;&#160;&#160;&#160;&#160; return (Context)ejb3Container.getEnc().lookup("java:env/");<br/>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This call used to return proper JNDI tree associated with</p><p>jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection-ejb3.jar,name=EJB3Bean,service=EJB3.</p><p>Unfortunately these days in AS trunk it returns the JNDI tree associated with</p><p>jboss.j2ee:ear=jaxws-injection.ear,jar=jaxws-injection.jar,name=BeanImpl,service=EJB3</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>IMHO this is a bug in EJB code base.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/535366#535366">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB 3.0 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>