Stuart Bramley
2004-10-28 07:28:27 UTC
I am currently evaluating Weblogic 8.1 and am having problems with a simple session EJB that has both a local and remote interface. The remote interface seems to be fine, but the local interface does not seem to appear in JNDI correctly.
When I view the JNDI tree in the console, the remote EJB interface has a bound object that appears as follows:
Bound Object
Bind Name: BEARemote
Object Class: ejb.example.bean.BEA_umanf4_HomeImpl_812_WLStub
Object Hash Code: 8497786
Object To String: ClusterableRemoteRef(7028190383415656344S:10.43.137.128:[7001,7001,7002,7002,7001,7002,-1,0,0]:workshop:cgServer [7028190383415656344S:10.43.137.128:[7001,7001,7002,7002,7001,7002,-1,0,0]:workshop:cgServer/294])/294
However the local interface only has the following :
Bound Object
Bind Name: BEALocal
When I attempt to perform a JNDI lookup on "BEALocal" in a servlet, I get the following exception :
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: While trying to look up /app/ejb/beaejb.jar#BEA/local-home in /app/webapp/TestBEA/16449174.; remaining name '/app/ejb/beaejb/jar#BEA/local-home'
Because of the lack of detail on the bound object in JNDI I believe that this must be something to do with the definition of the interface - but I think that everything is correct.
The deployment descriptors are as follows :
ejb-jar.xml
<ejb-jar>
<enterprise-beans>
<session>
<display-name>BEA EJB</display-name>
<ejb-name>BEA</ejb-name>
<home>ejb.example.interfaces.BEARemoteHome</home>
<remote>ejb.example.interfaces.BEARemote</remote>
<local-home>ejb.example.interfaces.BEALocalHome</local-home>
<local>ejb.example.interfaces.BEALocal</local>
<ejb-class>ejb.example.bean.BEABean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
weblogic-ejb-jar.xml
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>BEA</ejb-name>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>BEARemote</jndi-name>
<local-jndi-name>BEALocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
application.xml
<application>
<display-name>BEA Example</display-name>
<description>BEA Example</description>
<module>
<ejb>beaejb.jar</ejb>
</module>
</application>
Does the evaluation version have some limitation that means it does not support local interfaces? Is it a bug in Weblogic, or is there something incorrect in the definition of the local home interface above? As mentioned above, the "BEALocal" object name definition appears in JNDI, but with no generated stub class.
When I view the JNDI tree in the console, the remote EJB interface has a bound object that appears as follows:
Bound Object
Bind Name: BEARemote
Object Class: ejb.example.bean.BEA_umanf4_HomeImpl_812_WLStub
Object Hash Code: 8497786
Object To String: ClusterableRemoteRef(7028190383415656344S:10.43.137.128:[7001,7001,7002,7002,7001,7002,-1,0,0]:workshop:cgServer [7028190383415656344S:10.43.137.128:[7001,7001,7002,7002,7001,7002,-1,0,0]:workshop:cgServer/294])/294
However the local interface only has the following :
Bound Object
Bind Name: BEALocal
When I attempt to perform a JNDI lookup on "BEALocal" in a servlet, I get the following exception :
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: While trying to look up /app/ejb/beaejb.jar#BEA/local-home in /app/webapp/TestBEA/16449174.; remaining name '/app/ejb/beaejb/jar#BEA/local-home'
Because of the lack of detail on the bound object in JNDI I believe that this must be something to do with the definition of the interface - but I think that everything is correct.
The deployment descriptors are as follows :
ejb-jar.xml
<ejb-jar>
<enterprise-beans>
<session>
<display-name>BEA EJB</display-name>
<ejb-name>BEA</ejb-name>
<home>ejb.example.interfaces.BEARemoteHome</home>
<remote>ejb.example.interfaces.BEARemote</remote>
<local-home>ejb.example.interfaces.BEALocalHome</local-home>
<local>ejb.example.interfaces.BEALocal</local>
<ejb-class>ejb.example.bean.BEABean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
weblogic-ejb-jar.xml
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>BEA</ejb-name>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>BEARemote</jndi-name>
<local-jndi-name>BEALocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
application.xml
<application>
<display-name>BEA Example</display-name>
<description>BEA Example</description>
<module>
<ejb>beaejb.jar</ejb>
</module>
</application>
Does the evaluation version have some limitation that means it does not support local interfaces? Is it a bug in Weblogic, or is there something incorrect in the definition of the local home interface above? As mentioned above, the "BEALocal" object name definition appears in JNDI, but with no generated stub class.