dev@glassfish.java.net

Re: Dumb Question - Tomcat and GlassFish

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 01 Sep 2006 12:00:15 -0700

Jeanfrancois Arcand wrote On 09/01/06 11:45,:

>
>
> Jim Driscoll wrote:
>
>> OK, I've been asked a question that I don't know the answer to:
>>
>> Is it possible to integrate an existing Tomcat implementation into
>> GlassFish? Yes, I know that the web container implementation is
>> based on Tomcat, but for some reason that I've yet to determine, they
>> want to use an existing Tomcat.
>>
>> So - is it possible?
>
>
> Not 100% sure...all the functionalities will not work. I doubt it will
> works because we have added new API in the glue code
> (com.sun.enterprise.web.*)
>
> If so, how? If not, what work would be required
>
>> to make it happen?
>
>
> Not simple. You need to build Tomcat 5|6, and replace all the
> org.apache.tomcat, org.apache.catalina, org.apache.coyote,
> org.apache.jakarta, in glassfish.home/lib/appserv-rt.jar with the
> Tomcat 5|6 implementation.
>
> I really doubt it will works.....


I agree.

Normally, when you embed Tomcat (as GlassFish does), you instantiate
an instance of org.apache.catalina.startup.Embedded, through which you
set up your Tomcat object hierarchy (engines, connectors, virtual
servers, contexts, etc.).

In GlassFish, we've extended org.apache.catalina.startup.Embedded by
this class: com.sun.enterprise.web.EmbeddedWebContainer, which is
our window into our version of Tomcat.

As Jeanfrancois mentioned, we've extended Tomcat left and right, so
embedding an out-of-the-box Tomcat into GlassFish will be difficult if
not impossible.


Jan

>
> -- Jeanfrancois
>
>
>>
>> Jim
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>