This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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

Calling an ejb from a servlet

John Gregory
Ranch Hand

Joined: Oct 05, 2006
Posts: 118
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?


Fabian Gutierrez

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


SCJP 1.4, SCWCD 1.4, SCBCD 5, SCJD 5
I agree. Here's the link:
subject: Calling an ejb from a servlet
jQuery in Action, 3rd edition