-
1. Re: JNDI Lookup problem with Servlet
adrian.brock Aug 30, 2002 7:27 AM (in response to muradhak)In your web.xml add
<ejb-ref>
<ejb-ref-name>interest/Interest</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
org.jboss.docs.interest.Interest
org.jboss.docs.interest.InterestBean
</ejb-ref>
Then make a jboss-web.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web
PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
"http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">
<jboss-web>
<ejb-ref>
<ejb-ref-name>interest/Interest</ejb-ref-name>
<jndi-name>interest/Interest</jndi-name>
</ejb-ref>
</jboss-web>
You have now configured java:comp/env for the war
If you used an ear, you would just need the following
in your web.xml (link to the ejb-name)
<ejb-ref>
<ejb-ref-name>interest/Interest</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
org.jboss.docs.interest.Interest
org.jboss.docs.interest.InterestBean
<ejb-link>Interest</ejb-link>
</ejb-ref>
Regards,
Adrian