Hi Naren,
That structure is perfectly fine. Just try the following example:
Create a
EJB project in Eclipse (or another
IDE) and call in LoggerEJB and create the following EJB
and
the ejb-jar.xml (in META-INF) will be empty like this:
Export this project (right-click on the project) to an EJB JAR file and call it LoggerEJB.jar (just put it in a temp directory or on your desktop for the mean time)
Create a Dynamic Web Project in Eclipse and call it WebLogger, and add the following files:
and a ejb-jar.xml in the WEB-INF directory like this:
Move your exported EJB JAR file (LoggerEJB.jar) into WEB-INF/lib.
Create a
Servlet called WebLoggerServlet into the nl.log.servlet package
and a web.xml like this:
Start your server and verify the JNDI names:
INFO: EJB5181:Portable JNDI names for EJB EchoBean: [java:global/WebLogger/EchoBean, java:global/WebLogger/EchoBean!nl.log.ejb.EchoBean]
INFO: EJB5181:Portable JNDI names for EJB LogBean: [java:global/WebLogger/LogBean, java:global/WebLogger/LogBean!nl.notes.ejb.Log]
Hit the following URL
http://localhost:8080/WebLogger/WebLoggerServlet
and verify on your web-page:
ECHO: echo from the WebLoggerServlet
and on your console:
INFO: logBean
Regards,
Frits