File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Calling an ejb from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Calling an ejb from a servlet" Watch "Calling an ejb from a servlet" New topic
Author

Calling an ejb from a servlet

John Gregory
Ranch Hand

Joined: Oct 05, 2006
Posts: 115
I've got a stateless session bean with a remote interface
deployed to a jboss 4.2.2 server. My client code to test
the bean works to perfection.

However, I decided to put it in a web app and use the bean.
My 1st question is if my webapp is deployed to the same
server, does my InitialContext environmentdiffer from that
in my client code?

My next question is What could cause a PortableRemoteObject exception
when I call narrow(). Could it be I need to have a Local interface
vice Remote?

Thanks,

John
Fabian Gutierrez
Greenhorn

Joined: Aug 15, 2004
Posts: 22
well, are you using ejb 2.x or 3.0, and how did you test your ejb

regards


SCJP 1.4, SCWCD 1.4, SCBCD 5, SCJD 5
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Calling an ejb from a servlet