I'm implementing a Discussion Forum application for my company intranet.I'm having EJB for the Business tear & servlets as clients( 10 - 15 servlets).I deployed all the EJB's (stateless session beans) in J2EE server & they work fine.But I'm struggling to access them from the servlets (they cannot talk to the EJB via the JNDI name).I don't want to deploy the servlets in the J2EE server.What I want is to deploy the servlet in another box on tomcat.Please let me know the procedures I should follow. Thanks in advance.
If you can give me some more details about the kind of error that you get??? . I have implemented exactly the same thing. Weblogic Appserver : EJB - mainly Stateless Session Beans and helper Java Beans Tomcat : JSP Pages and Client Side Java Beans Apache : Web Server that forwards JSP and Servlet request to Tomcat I have arranged Tomcat and Apache on the same machine Vivek
The important thing is that they need to be using the same JNDI context. Make sure that both the EJB container and the Servlet container are configured to use the same JNDI repository, the the servlet container should be able to locate and invoke any beans it needs.
Hi, Thank you so much for your responses , Vevek & Frank .Sorry I'm not arround yesterday b'cos I was bit bussy with my project. Frank , at the moment I'm using the Servletrunner as a servlet container( Hope to use topcat later ).So in this case how could I make sure that the servletrunner configured to use the same JNDI repository ( Do I have to code the client servlets with any specific way to find the Host & the EJB's ?) .I was struggling to find any documentations regarding this.If you could give me a example for it I would be so please. Thanks in advance , Regards Shan Karawita