permaculture playing cards*
The moose likes EJB and other Java EE Technologies and the fly likes Servlet Clients For EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Servlet Clients For EJB" Watch "Servlet Clients For EJB" New topic
Author

Servlet Clients For EJB

Shan Karawita
Ranch Hand

Joined: Oct 13, 2000
Posts: 83
Hi Everyone,

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.

Regards,
Shan Karawita.
Vivek Viswanathan
Ranch Hand

Joined: Mar 03, 2001
Posts: 350
Hi

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


Vivek Viswanathan SCJP 1.2, SCJP 1.6,SCJD,SCEA,SCWCD,IBM-484,IBM-486,IBM-141,Ms.NET C# 70-316,SCMAD, LPIC-I
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
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.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Shan Karawita
Ranch Hand

Joined: Oct 13, 2000
Posts: 83
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Clients For EJB