aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Access remote EJB 3 with tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Access remote EJB 3 with tomcat" Watch "Access remote EJB 3 with tomcat" New topic
Author

Access remote EJB 3 with tomcat

Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 598

Hi all,

I'm struggling a bit with something...I'd like to access an ejb that is deployed in glassfish from a servlet that I have deployed in tomcat.
The only way I manage to access it is to have both of them deployed in glassfish.What is the correct way to make the ejb available to Tomcat?

I followed the tutorial at http://technology.amis.nl/blog/1368/connecting-to-an-ejb-30-remote-sessionbean-from-tomcat but the example was for Tomcat 5.5 and EJB2.x.I couldn't even find any lib OR shared/lib in my netbeans bundled install of tomcat.When I try to run it I get a javax.naming.NoInitialContextException.The exact same code(with and without lookup) works when I deploy both the servlet and the bean in glassfish.


===>SCJP 1.5(72%)<===
==>SCWCD1.5(76%)<===
David Blevins
Greenhorn

Joined: May 03, 2010
Posts: 18
Alternate approach would be to use Apache TomEE, which is a version of Tomcat with EJB support already added.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access remote EJB 3 with tomcat
 
Similar Threads
invoking remote ejb across network
web application
Accessing a Remote EJB in Glassfish from Tomcat
How can I access ServletContex from EJB Session bean
Calling an EJB from within a Servlet - problem with lookup()