Ajay,

Great question.  The loader will pull OpenEJB and the beans into the
system classpath, therefore the Servlets can see the EJBs but not vice
versa.  So, if the two of them share any libraries, the libraries will
have to be in the ejb's jar or in OpenEJB's lib directory.

This style of integrating OpenEJB into Tomcat is just one of many that
will be supported, but is the only possible approach for 0.8.3.  OpenEJB
has custom implementations of many of the pluggable aspects of the Java
Virtual Machine, such as a custom java.net.URLStreamHandler.  The issue
is that the VM only looks for these in the system classloader and cannot
see them if they are in any of the Tomcat classloaders.  OpenEJB
obviously relies on these custom implementations and without them, many
things do not work.

We are already working on OpenEJB + Tomcat integration that uses the
various Tomcat classloaders, but such a thing is many times harder as it
will require us to work around classloading limitations of the VM.

For now, the integration will work perfectly as long as all common or
shared libraries are in the openejb-0.8.3/lib directory or in the ejb
jar.

-David

> -----Original Message-----
> From: Ajay Upadhyaya [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, October 11, 2002 12:30 PM
> To: David Blevins
> Subject: RE: [OpenEJB-user] Tomcat & OpenEJB instructions and tools
> 
> 
> Can you explain about where the ejb classes will be loaded 
> w.r.t. Tomcat hierarchical classloaders. If there are other 
> classes needed by my EJBs, will they be visible to the EJBs 
> if I put them in CATALINA_HOME/common/lib and not in the EJB jar file.
> 
> Regards,
> Ajay
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of 
> David Blevins
> Sent: Wednesday, October 09, 2002 7:30 PM
> To: [EMAIL PROTECTED]
> Subject: [OpenEJB-user] Tomcat & OpenEJB instructions and tools
> 
> 
> All,
> 
> Give the following instructions and tools a try for an easy 
> Tomcat and OpenEJB integration.  This will setup Tomcat to 
> use the OpenEJB Local Server.  Basically, you copy the 
> attached openejb_loader-0.8.3.jar into 
> CATALINA_HOME/common/lib directory of a fresh Tomcat install. 
>  Then you set the JAVA_OPTS variable to 
> "-Dopenejb.home=$OPENEJB_HOME".
> 
> That's it.  Pretty much just two steps.
> 
> The instructions are with JDK 1.3.1, Tomcat 4.1.12, OpenEJB 
> 0.8.3, Windows 2000 with Cygwin 1.3.12.
> 
> Let us know how it goes.  I'd really like to workout any 
> issues now so we can release it with 0.8.4 and know that it 
> works well for everyone with all platforms, Tomcat versions, and JDKs.
> 
> -David
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
http://OpenEJB.sf.net
OpenEJB-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openejb-user

Reply via email to