The ejb-jar.xml is the DD for EJB.  The web.xml is for your web app.  They know
nothing of each other.  There are means for linking EJB references into your
web.xml, for which see the DTD for web.xml (it's included in the JRun/lib dir).

Have you looked at sample9a in the samples directory?  That's a full example of
how to look up an EJB from a servlet.

Scott Stirling



> -----Original Message-----
> From: Jamie Orchard-Hays [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 21, 2000 12:01 PM
> To: [EMAIL PROTECTED]
> Subject: Looking Up an EJB
>
>
> I'm trying to get a session EJB going in JRun 3. I can't get it to work, so
> here are my questions:
>
> 1. context lookup is failing. Where do I define the JNDI name? Does it just
> use the <ejb-name> defined in the ejb-jar.xml file? Here's the error log
> info ("TestService" is the ejb-name and what I'm looking up):
>
> javax.naming.NameNotFoundException: TestService not found
>       at allaire.ejipt._NamingContext.lookup(_NamingContext.java:73)
>       at allaire.ejipt._LocalContext.lookup(_LocalContext.java:140)
>       at allaire.ejipt._NamingContext.lookup(_NamingContext.java:103)
>       at javax.naming.InitialContext.lookup(InitialContext.java:354)
>       at allaire.jrun.jndi.LocalContext.lookup(LocalContext.java:161)
>       at allaire.jrun.jndi.LocalContext.lookup(LocalContext.java:113)
>       at javax.naming.InitialContext.lookup(InitialContext.java:350)
>       at
> jrun__test_service2ejsp11._jspService(jrun__test_service2ejsp11.java:52)
>       at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
>       at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
>       at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
>       at
> allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
> )
>       at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:174)
>       at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
>       at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
>       at
> allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
> a:88)
>       at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
>       at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
>       at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
>       at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
>       at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
>
> 2. My EJB package is in a .jar file called testservice_ejb.jar. Even though
> it deployed properly, the import statement couldn't find it until I put the
> jar file in Web-Inf/classes. Is this right? Is this where it should go?
>
> Thanks,
>
> Jamie Orchard-Hays
> CommerceTone

------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to