-
1. Re: Problems with JNDI Context
adrian.brock Apr 2, 2003 5:46 PM (in response to nort)The snippet you posted should be in a
jboss.xml alongside the ejb-jar.xml
Try checking it against the dtd.
If you can't figure it out post the full content.
Regards,
Adrian -
2. Re: Problems with JNDI Context
nort Apr 3, 2003 3:23 AM (in response to nort)hmmm XMLSPY say all is okay.
Here my content of my jboss.xml (generated my xdoclet):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
<enterprise-beans>
<!--
To add beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called jboss-beans.xml that contains
the , and <message-driven></message-driven>
markup for those beans.
-->
<ejb-name>TestEJB</ejb-name>
<jndi-name>ejb/Test</jndi-name>
<local-jndi-name>ejb/LocalTest</local-jndi-name>
</enterprise-beans>
<resource-managers></resource-managers>
and the ejb-jar.xml (generated by xdoclet):
<?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>
<![CDATA[No Description.]]>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<![CDATA[]]>
<ejb-name>TestEJB</ejb-name>
com.test.TestEJBHome
com.test.TestEJBRemote
<local-home>com.test.TestEJBLocalHome</local-home>
com.test.TestEJB
<ejb-class>com.test.TestEJBBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called session-beans.xml that contains
the markup for those beans.
-->
<!-- Entity Beans -->
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called entity-beans.xml that contains
the markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor>
<!--
To add additional assembly descriptor info here, add a file to your
XDoclet merge directory called assembly-descriptor.xml that contains
the <assembly-descriptor></assembly-descriptor> markup.
-->
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar>
Can you see something?
Thank you
Juraj -
3. Re: Problems with JNDI Context
nort Apr 3, 2003 3:24 AM (in response to nort)hmmm XMLSPY say all is okay.
Here my content of my jboss.xml (generated my xdoclet):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
<enterprise-beans>
<!--
To add beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called jboss-beans.xml that contains
the , and <message-driven></message-driven>
markup for those beans.
-->
<ejb-name>TestEJB</ejb-name>
<jndi-name>ejb/Test</jndi-name>
<local-jndi-name>ejb/LocalTest</local-jndi-name>
</enterprise-beans>
<resource-managers></resource-managers>
and the ejb-jar.xml (generated by xdoclet):
<?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>
<![CDATA[No Description.]]>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<![CDATA[]]>
<ejb-name>TestEJB</ejb-name>
com.test.TestEJBHome
com.test.TestEJBRemote
<local-home>com.test.TestEJBLocalHome</local-home>
com.test.TestEJB
<ejb-class>com.test.TestEJBBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called session-beans.xml that contains
the markup for those beans.
-->
<!-- Entity Beans -->
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called entity-beans.xml that contains
the markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor>
<!--
To add additional assembly descriptor info here, add a file to your
XDoclet merge directory called assembly-descriptor.xml that contains
the <assembly-descriptor></assembly-descriptor> markup.
-->
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar>
Can you see something?
Thank you
Juraj -
4. Re: Problems with JNDI Context
adrian.brock Apr 3, 2003 11:57 AM (in response to nort)It looks ok to me,
it should be bound at ejb/Test in global jndi
Can you post the jar or a cutdown version
that demonstrates the problem.
Regards,
Adrian -
5. Re: Problems with JNDI Context
nort Apr 7, 2003 2:44 AM (in response to nort)Client:
InitialContext context = getContext();
Object ref = context.lookup("ejb/TestEJB");
javax.naming.NameNotFoundException: TestEJB not bound
==================
Object ref = context.lookup("TestEJB");
hallo
Client and EAR attached below -
-
7. Re: Problems with JNDI Context
haraldgliebe Apr 13, 2003 3:35 PM (in response to nort)You have to put the jboss.xml in the META-INF directory of the bean.jar next to the ejb-jar.xml, not in the META-INF of the ear.
Without the jboss.xml file JBoss uses the ejb-name as default jndi-name. -
8. Re: Problems with JNDI Context
haraldgliebe Apr 13, 2003 3:40 PM (in response to nort)You need to put the jboss.xml file in the META-INF directory of the jar containing the EJBs, next to ejb-jar.xml, not in the META-INF directory of the EAR.
Without a jboss.xml JBoss uses the ejb-name as default jndi-name -
9. Re: Problems with JNDI Context
haraldgliebe Apr 13, 2003 3:43 PM (in response to nort)You need to put the jboss.xml file in the META-INF directory of the jar containing the EJBs, next to ejb-jar.xml, not in the META-INF directory of the EAR.
Without a jboss.xml JBoss uses the ejb-name as default jndi-name. -
10. Re: Problems with JNDI Context
dhinojosa Apr 13, 2003 5:16 PM (in response to nort)I didn't think you can access a local bean from a client app. Create a remote reference and you got your app.