Hi
I am new to ejb. I tried to run the code from the link
I created a jar with greetBean.class greetHome.class and greetRemote.class and put the ejb-jar.xml and jboss.xml in META-INF folded and created a jar and deployed in JBOSS5.
********* code of ejb-jar.xml ********
<?xml version="1.0"?>
<ejb-jar>
<enterprise-beans>]
<session>
<ejb-name>greetBean</ejb-name>
<home>greetHome</home>
<remote>greetRemote</remote>
<ejb-class>greetBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>
Container </transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
************* code of jboss.xml ********************/
<?xml version='1.0' ?>
<jboss>
<enterprise-beans>
<entity>
<ejb-name>greetBean</ejb-name>
<jndi-name>greetJndi</jndi-name>
</entity>
</enterprise-beans>
</jboss>
Now from Tomcat I am tring to access this bean. For this I created a servlet whose code is given below.
But I am getting the following error in the tomcat server screen
"javax.naming.NameNotFoundException: greetJndi not bound"
I am not getting this is the configuration eror or the directory structure of jar that I deploied in JBoss is wrong.
Any one can help to resolve the problem?
Thanks
I am new to ejb. I tried to run the code from the link
I created a jar with greetBean.class greetHome.class and greetRemote.class and put the ejb-jar.xml and jboss.xml in META-INF folded and created a jar and deployed in JBOSS5.
********* code of ejb-jar.xml ********
<?xml version="1.0"?>
<ejb-jar>
<enterprise-beans>]
<session>
<ejb-name>greetBean</ejb-name>
<home>greetHome</home>
<remote>greetRemote</remote>
<ejb-class>greetBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>
Container </transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
************* code of jboss.xml ********************/
<?xml version='1.0' ?>
<jboss>
<enterprise-beans>
<entity>
<ejb-name>greetBean</ejb-name>
<jndi-name>greetJndi</jndi-name>
</entity>
</enterprise-beans>
</jboss>
Now from Tomcat I am tring to access this bean. For this I created a servlet whose code is given below.
But I am getting the following error in the tomcat server screen
"javax.naming.NameNotFoundException: greetJndi not bound"
I am not getting this is the configuration eror or the directory structure of jar that I deploied in JBoss is wrong.
Any one can help to resolve the problem?
Thanks