On Sun, 21 Jul 2002 [EMAIL PROTECTED] wrote:

> Date: Sun, 21 Jul 2002 22:35:19 -0400 (EDT)
> From: [EMAIL PROTECTED]
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Embedding Tomcat 4
>
> I would like to embed Tomcat 4 in an existing application.
> Furthermore, I need to be able to specify a parent classloader
> for the "common" classloader other than the system classloader.
> I know how to achieve the first goal, but not the second (I
> believe the EmbededTomcat class could be used to specify the
> parent classloader for "common" in Tomcat 3).
>

The standard Catalina class loaders are only set up if you use the
org.apache.catalina.startup.Bootstrap startup class (as the usual shell
scripts do).  If you use some other mechanism (such as the
o.a.c.s.Embedded class), you can set up class loaders however you like --
but you have to set up your own.

Normally, the parent class loader of a webapp will be the shared class
loader.  However, you can set the parent class loader for a Context (or
for a Host or Engine) itself, by calling setParentClassLoader() before you
call start() on that object.  This should be sufficient to meet your
needs.  (The J2EE Reference Implementation, for example, uses this
technique in its own embedding of Tomcat.)

> Any help would be most appreciated.
>
> Thanks.
>
> --- Brandon E Taylor
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to