|
Can someone fill me in on how to use the
jboss-web.xml file, or why I'm getting this error? I'm just trying to do a
lookup from a Servlet to a session bean.
[Auto deploy] Linking ejb-ref: DBaseFetch to JNDI
name: null
[Auto deploy] javax.naming.NamingException: ejb-ref: DBaseFetch, expected jndi-name in jboss-web.xml Any help much appreciated.
--- MyServlet.java
------------------------------------
...
Object result =
ctx.lookup("java:comp/env/ejb/DBaseFetchHome");
DBaseFetchHome home =
(DBaseFetchHome)
javax.rmi.PortableRemoteObject.narrow(result, DBaseFetchHome.class); --- jboss-web.xml
-------------------------------------
<?xml version="1.0"
encoding="UTF-8"?>
<jboss-web>
<ejb-ref>
<ejb-ref-name>DBaseFetch</ejb-ref-name> <jndi-name>ejb/DBaseFetchHome</jndi-name> </ejb-ref> </jboss-web>
--- web.xml
--------------------------------------------
...
<ejb-ref>
<ejb-ref-name>DBaseFetch</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome</home> <remote>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch</remote> </ejb-ref> --- ejb-jar.xml
-----------------------------------------
...
<session>
<ejb-name>DBaseFetch</ejb-name> <ejb-class>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchBean</ejb-class> <home>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome</home> <remote>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch</remote> <session-type>Stateful</session-type> <transaction-type>Container</transaction-type> </session> |
- Re: [JBoss-user] servlet to ejb lookup G.L. Grobe
- Re: [JBoss-user] servlet to ejb lookup Vinay Menon
- Re: [JBoss-user] servlet to ejb lookup danch
- Re: [JBoss-user] servlet to ejb lookup G.L. Grobe
