You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2004/09/10 15:45:28 UTC

What's missing for Tomcat integration?

Hi,
After a bit of talking with Geir regarding the 1.0 M2 release still not
supporting Tomcat, I thought I'd jump in and ask: what's missing for
Tomcat integration, and how can I help?

I've gone over the archives, but there's nothing significant on this
matter since I raised this issue last March (thread titled "Does
Geronimo use tomcat?" in the archives).  Incidentally, in that thread N.
Alex Rupp also said he was working on articles in this area
(http://marc.theaimsgroup.com/?l=geronimo-dev&m=108015237832228&w=2).
I've yet to see them: have they been published somewhere?  I've read his
articles/blogs on the MVC pattern, the servlet antipattern, and how
Tomcat is similar to the Irish Elk, but I haven't seen anything
addressing what the problems were in integrating Tomcat into Geronimo.

Anyways, since then I see Geronimo has evolved, getting closer to a
release.  So has Tomcat, including the (presumably) relevant area of JMX
and JSR77 compliance.  So I'd like an updated list of what's missing,
what needs to be done, in order for Geronimo to accept Tomcat as
easily/natively as it does Jetty.  

That should be a good start, and it's a pretty good time as far as
Tomcat is concerned to make some tweaks, with the 5.5 branch still in
very active development.

By the way, this is no slight of offense to Jetty or any of its
developers.  It's a good product and I have no problems with it.  I'm
looking to improve both Tomcat and Geronimo with this effort.

And a good weekend to all ;)

Yoav Shapira
Millennium Research Informatics





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.


Re: What's missing for Tomcat integration?

Posted by Jacek Laskowski <jl...@apache.org>.
Shapira, Yoav wrote:

> Hi,
> After a bit of talking with Geir regarding the 1.0 M2 release still not
> supporting Tomcat, I thought I'd jump in and ask: what's missing for
> Tomcat integration, and how can I help?

I sometimes see people who complain on Jetty integration in Geronimo, so 
I think there're a lot of obstacles you'll need to go thru until you 
reach the end. No need to worry though! I'm working on enabling a 
functionality in Geronimo, that Dain said, may be easy to implement, 
thus it may be me who sees toubles where they aren't ;) Anyway, I was 
also wondering what is to be done to have Tomcat working in Geronimo. My 
basic understanding of Geronimo architecture allows me to say it's a 
matter of creating GBean with some dependencies/references and voila it 
ought to be working well.

> I've gone over the archives, but there's nothing significant on this
> matter since I raised this issue last March (thread titled "Does
> Geronimo use tomcat?" in the archives).  Incidentally, in that thread N.
> Alex Rupp also said he was working on articles in this area
> (http://marc.theaimsgroup.com/?l=geronimo-dev&m=108015237832228&w=2).
> I've yet to see them: have they been published somewhere?  I've read his
> articles/blogs on the MVC pattern, the servlet antipattern, and how
> Tomcat is similar to the Irish Elk, but I haven't seen anything
> addressing what the problems were in integrating Tomcat into Geronimo.

I also haven't ever seen any takers of the subject. How come it was 
overlooked? It might've been waiting for the brave soul like you :)

> Anyways, since then I see Geronimo has evolved, getting closer to a
> release.  So has Tomcat, including the (presumably) relevant area of JMX
> and JSR77 compliance.  So I'd like an updated list of what's missing,
> what needs to be done, in order for Geronimo to accept Tomcat as
> easily/natively as it does Jetty.  
> 
> That should be a good start, and it's a pretty good time as far as
> Tomcat is concerned to make some tweaks, with the 5.5 branch still in
> very active development.
> 
> By the way, this is no slight of offense to Jetty or any of its
> developers.  It's a good product and I have no problems with it.  I'm
> looking to improve both Tomcat and Geronimo with this effort.
> 
> And a good weekend to all ;)

Definitelly! However, it's the best time to finally sit down and program 
stuff for Geronimo (like TomcatGBean). It'd be fun. Hmmm, gotta think 
about it ;)

> Yoav Shapira

Jacek


Re: What's missing for Tomcat integration?

Posted by Dain Sundstrom <ds...@gluecode.com>.
On Sep 10, 2004, at 11:25 AM, Jeremy Boynes wrote:

> Shapira, Yoav wrote:
>
>> Hi,
>> After a bit of talking with Geir regarding the 1.0 M2 release still 
>> not
>> supporting Tomcat, I thought I'd jump in and ask: what's missing for
>> Tomcat integration, and how can I help?
>
> Just getting it running would be a good place to start. That should be 
> a fairly simple GBean that starts an embedded server within Geronimo.

N. Alex sent me a simple version a long time ago.  It simply had an 
unpacked version of tomcat and started it in the same vm a geronimo.  I 
started to work on a closer integration because I really dislike the 
idea of shipping an entire unpacked version of tomcat (since it is 12 
MB), but got busy.  Anyway, the code is at the end of this message (not 
it is very old and may not even compile).

-dain


package org.apache.geronimo.tomcat;

import org.apache.catalina.startup.Catalina;
import org.apache.geronimo.gbean.GAttributeInfo;
import org.apache.geronimo.gbean.GBean;
import org.apache.geronimo.gbean.GBeanContext;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoFactory;
import org.apache.geronimo.gbean.GConstructorInfo;
import org.apache.geronimo.gbean.GReferenceInfo;
import org.apache.geronimo.system.serverinfo.ServerInfo;

public class TomcatService implements GBean {
     /**
      * Reference to the org.apache.catalina.startup.Catalina shell
      * Right now we're just wrapping up the shell, but we'll be 
replacing it
      * with our own GBean shell for ease of management.
      */
     private Catalina shell;

     /**
      * Reference to the ServerInfo object.  This is recieved through the
      * constructor, and can be used to get information about the 
Server, most
      * notably including the location of the server installation 
directory
      * (and thus the Tomcat base dir).
      *
      */
     private final ServerInfo serverInfo;

     private String catalinaHome;
     private String catalinaBase;

     /**
      * Reference to the Catalina shell, to which calls are delegated.
      *
      * The catalina shell relies on the "catalina.home" and 
"catalina.base"
      * System properties.  Presumably, these could be added in a simple 
properties
      * file, but I'm going to work under the assumption that we'll want 
them as
      * persistent attributes in a server configuration.  This will make 
them more
      * easily manageable (in theory--we'll see)
      */
     public TomcatService(ServerInfo serverInfo, String catalinaHome, 
String catalinaBase) {
         this.serverInfo = serverInfo;
         this.catalinaHome = catalinaHome;
         this.catalinaBase = catalinaBase;
     }

     public void doFail() {
         doStop();
     }

     public void doStart() {
         System.setProperty("catalina.home", 
serverInfo.resolvePath(catalinaHome));
         System.setProperty("catalina.base", 
serverInfo.resolvePath(catalinaBase));
         if (shell == null) {
             shell = new Catalina();
         }
         shell.start();
     }

     public void doStop() {
         if (shell != null) {
             shell.stop();
             shell = null;
         }
     }

     public void setGBeanContext(GBeanContext ctx) {
     }

     public static final GBeanInfo GBEAN_INFO;

     static {
         GBeanInfoFactory infoFactory = new 
GBeanInfoFactory(TomcatService.class.getName());

         infoFactory.setConstructor(new String[]{"ServerInfo", 
"CatalinaHome", "CatalinaBase"});

         infoFactory.addReference(new GReferenceInfo("ServerInfo", 
ServerInfo.class.getName()));
         infoFactory.addAttribute("CatalinaHome", String.class, true);
         infoFactory.addAttribute("CatalinaBase", String.class, true);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

     public static GBeanInfo getGBeanInfo() {
         return GBEAN_INFO;
     }
}


Re: What's missing for Tomcat integration?

Posted by Jeremy Boynes <jb...@gluecode.com>.
Shapira, Yoav wrote:

> Hi,
> After a bit of talking with Geir regarding the 1.0 M2 release still not
> supporting Tomcat, I thought I'd jump in and ask: what's missing for
> Tomcat integration, and how can I help?
> 

Just getting it running would be a good place to start. That should be a 
fairly simple GBean that starts an embedded server within Geronimo.

 From there we can move on to closer integration. The main areas I can 
think off off the top of my head are:
* ENC integration
* Transaction context
* JAAS Authentication
* JACC
* JSR77
* Deployment

> 
> That should be a good start, and it's a pretty good time as far as
> Tomcat is concerned to make some tweaks, with the 5.5 branch still in
> very active development.
> 

AIUI TC5.5 requires JDK1.5 whereas we are targeting 1.4.2 based systems. 
so that would be an issue using that branch. We are also targeting a 
production release soon - my hunch would be that we would be better 
integrating with the 5.0 branch as that is currently available. I'd like 
to suggest we start there for a "stable" version and then work with the 
Tomcat community on the 5.5 branch for new or "experimental" features.

> By the way, this is no slight of offense to Jetty or any of its
> developers.  It's a good product and I have no problems with it.  I'm
> looking to improve both Tomcat and Geronimo with this effort.

I would echo that - we've have always wanted to work with Tomcat bu 
tjust never got around to it. I'd like to welcome you to our community 
and look forward to getting this going.

--
Jeremy



Re: What's missing for Tomcat integration?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Sep 10, 2004, at 9:45 AM, Shapira, Yoav wrote:

>
> Hi,
> After a bit of talking with Geir regarding the 1.0 M2 release still not
> supporting Tomcat, I thought I'd jump in and ask: what's missing for
> Tomcat integration, and how can I help?

Yoav - thanks for coming!

>
> I've gone over the archives, but there's nothing significant on this
> matter since I raised this issue last March (thread titled "Does
> Geronimo use tomcat?" in the archives).  Incidentally, in that thread 
> N.
> Alex Rupp also said he was working on articles in this area
> (http://marc.theaimsgroup.com/?l=geronimo-dev&m=108015237832228&w=2).
> I've yet to see them: have they been published somewhere?  I've read 
> his
> articles/blogs on the MVC pattern, the servlet antipattern, and how
> Tomcat is similar to the Irish Elk, but I haven't seen anything
> addressing what the problems were in integrating Tomcat into Geronimo.
>
> Anyways, since then I see Geronimo has evolved, getting closer to a
> release.  So has Tomcat, including the (presumably) relevant area of 
> JMX
> and JSR77 compliance.  So I'd like an updated list of what's missing,
> what needs to be done, in order for Geronimo to accept Tomcat as
> easily/natively as it does Jetty.
>
> That should be a good start, and it's a pretty good time as far as
> Tomcat is concerned to make some tweaks, with the 5.5 branch still in
> very active development.
>

THis is great.  I think that while our goal is perfect integration, I 
think getting it working - not perfectly integrated, but working - is 
an excellent first step.  It will give us feedback about what we need 
in Geronimo to help Tomcat integrate, and what Tomcat needs to do to 
become more integratable. (integrable?)

geir

> By the way, this is no slight of offense to Jetty or any of its
> developers.  It's a good product and I have no problems with it.  I'm
> looking to improve both Tomcat and Geronimo with this effort.
>
> And a good weekend to all ;)
>
> Yoav Shapira
> Millennium Research Informatics
>
>
>
>
>
> This e-mail, including any attachments, is a confidential business 
> communication, and may contain information that is confidential, 
> proprietary and/or privileged.  This e-mail is intended only for the 
> individual(s) to whom it is addressed, and may not be saved, copied, 
> printed, disclosed or used by anyone else.  If you are not the(an) 
> intended recipient, please immediately delete this e-mail from your 
> computer system and notify the sender.  Thank you.
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geir@4quarters.com