• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Servlet Clients For EJB

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Shan Karawita
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic