aspose file tools*
The moose likes BEA/Weblogic and the fly likes Can servlet use local interface to call ejb 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 » Products » BEA/Weblogic
Bookmark "Can servlet use local interface to call ejb" Watch "Can servlet use local interface to call ejb" New topic
Author

Can servlet use local interface to call ejb

Elizabeth King
Ranch Hand

Joined: Jul 11, 2002
Posts: 191
Can or how a servlet/JSP call an EJB using
local interfaces or directly to the bean class?
I think it is impossible
because servlets/JSPs are in web container
while EJBs are in EJB container. They are in
different JVMs. Someone
said weblogic6.1 uses classload to do the
work, but what about the transaction?
Please advise. Thanks.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Yes. As long as the Servlet/JSP is in the same JVM as the ejb, they can use Local Interfaces. Otherwise, Local Interfaces would be pointless.
Elizabeth King
Ranch Hand

Joined: Jul 11, 2002
Posts: 191
Are WLS6.1's web container and ejb container
in same JVM?
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Mary King:
Are WLS6.1's web container and ejb container
in same JVM?

Yes. See the following link for a detailed description of classloading in WebLogic: Packaging WebLogic Server J2EE Applications.
Elizabeth King
Ranch Hand

Joined: Jul 11, 2002
Posts: 191
There are no containers in Weblogic Servers,
logically and conceptually. Everything is
running in one application server within
one JVM. This is different from SUN's view
of application server.
Correct me if I'm wrong.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Mary King:
There are no containers in Weblogic Servers,
logically and conceptually. Everything is
running in one application server within
one JVM. This is different from SUN's view
of application server.
Correct me if I'm wrong.

WebLogic does indeed have separate Web and EJB Containers. This allows BEA to license the Containers individually. Nothing in the J2EE specification even comes close to hinting that the Containers must run in separate JVMs. In fact, it does just the opposite with the idea of a EAR (Enterprise Application Resource). To comply with the specification an EAR must have the Web and EJB components residing in the same JVM to allow for Local calls between components.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can servlet use local interface to call ejb