[jboss-user] [EJB 3.0] - Re: Binding / JNDI / EJB

jaikiran do-not-reply at jboss.com
Sun Dec 21 08:32:18 EST 2008


"ALRubinger" wrote : 
  | 
  | Jaikiran, mind opening a JIRA w/ some simple integration test for it?  

I could reproduce this issue. Created https://jira.jboss.org/jira/browse/EJBTHREE-1649 with a testcase attached.

"jaikiran" wrote : 
  | Instead of the jndi-name, try the mapped-name instead. And please post the entire console logs. Let us know how it goes.

>From what i tried while debugging this issue, the mapped-name is not going to work either. 

The issue occurs specifically, when you have the < remote> element in the ejb-jar.xml. So this does not work (does not matter if you have the ejb-jar_2_0.dtd declaration or not):

ejb-jar.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE ejb-jar PUBLIC 
  |   "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" 
  |   "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
  | <ejb-jar>
  |    <enterprise-beans>
  |       <session>
  |          <ejb-name>StatelessBeanOverridenJNDINameInXml</ejb-name>
  | 	<remote>org.jboss.ejb3.test.jndibinding.SimpleBean</remote>
  |          <ejb-class>org.jboss.ejb3.test.jndibinding.StatelessBeanOverridenJNDINameInXml</ejb-class>
  | 	<session-type>Stateless</session-type>
  | 			<transaction-type>Container</transaction-type>
  | 
  |       </session>
  |    </enterprise-beans>
  | </ejb-jar>
  | 

jboss.xml:

  | <?xml version="1.0"?>
  | <jboss>
  |        
  |    <enterprise-beans>
  |       <session>
  |          <ejb-name>StatelessBeanOverridenJNDINameInXml</ejb-name>
  |          <jndi-name>SomeJNDINameInXml</jndi-name>
  |       </session>
  |    </enterprise-beans>
  | </jboss>
  | 

The only way i could get this to work is by changing the ejb-jar.xml to use a business-remote (and obviously the ejb 3.0 xsd). No change required in jboss.xml.


  | <?xml version="1.0" encoding="UTF-8"?>
  | <ejb-jar
  |         xmlns="http://java.sun.com/xml/ns/javaee"
  |         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  |                             http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
  |         version="3.0">
  |    <enterprise-beans>
  |       <session>
  |          <ejb-name>StatelessBeanOverridenJNDINameInXml</ejb-name>
  | 	<business-remote>org.jboss.ejb3.test.jndibinding.SimpleBean</business-remote>
  |          <ejb-class>org.jboss.ejb3.test.jndibinding.StatelessBeanOverridenJNDINameInXml</ejb-class>
  | 	<session-type>Stateless</session-type>
  | 			<transaction-type>Container</transaction-type>
  | 
  |       </session>
  |    </enterprise-beans>
  | </ejb-jar>
  | 

>From the logs i can see where the problem is coming from. However, i need to spend some more time debugging this,  next week.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197853#4197853

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197853



More information about the jboss-user mailing list