tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Tomcat and Sun's Application server
Date Fri, 28 Jul 2006 17:17:10 GMT

> What I am trying to do is access an EJB from a Tomcat servlet which is
> what EJB's are designed for.

Sure, EJBs are designed to be used from servlets, but they can't really
leave their containers (as you have found). Since you need j2ee.jar
available to support the EJBs, there are all kinds of problems because
of the incompatibilities between libraries (servlet.jar and j2ee.jar,
for example).

> This way you only have to set up the logic once
> (in an EJB) and then any application (servlet, swing, jsp....) should be
> able to access it.

True. Although the remote application doesn't "host" the actual bean
(i.e. the real data lives on the EJB server), you still need the
endpoint portion of the bean to be supported by the EJB framework.

Perhaps I'm confusing the issues; of course EJBs should be able to be
used by, say, a client-side application that is not running within a
formal container (JBoss, websphere, etc.)

I think the problem is the incompatibilities between j2ee.jar and
servlet.jar. It may be possible to lobotomize Tomcat in order to get it
to do this, but perhaps it's not worth the trouble. What about using
another app server?

> That is the theory anyway, but it does not seem to be working with
> tomcat because I can access the EJB through console, swing, and most web
> based apps except for the ones on my Tomcat cluster :O(.

Those other webapps are running on something: what is it?


View raw message