Re: tomcat.sf

Steve Loughran <[email protected]> Fri, 06 Jul 2007 17:04:04 +0100
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Bill de hOra wrote:
> Hi,
> 
> is there a Tomcat .sf file I could look at? I've seen references to a 
> TomcatServer, but not the actual configuration itself.

Hmm. lets see what we have.

1. There is a components/tomcat tomcat component, but looking at it is 
half complete, which explains why we dont distribute it.

2. we do have the DeployByCopy components which can deploy webapps by 
copying them to a target dir, and then delete them when undeploying. 
This, in conjuction with a component extending Java to actually start 
JBoss is how we work with JBoss; Tomcat should take something similar.

http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/www/src/org/smartfrog/services/www/dbc/components.sf?view=markup

3. There is a cargo component, and cargo can start pretty much anything. 
Which I like. When it is working, it can deploy tomcat with good 
control. Going forward, apart from its dependency on ant1.6.x for 
utility classes, its a good generic way to start and stop webapps, one 
we should work with.

That said, there are three open bugreps saying it isn't working right 
now, and again, it isnt in todays 3.11.001beta

http://jira.smartfrog.org/jira/browse/SFOS-137
http://jira.smartfrog.org/jira/browse/SFOS-138
http://jira.smartfrog.org/jira/browse/SFOS-152

Cargo 0.8 was failing, and a move up to 0.9 implied effort and time that 
I didnt have to hand, so I filed them as todos for 3.12.x.

If you are interested in using this, we could bump it up the schedule 
and I could have a go at fixing it next week, target release 
3.11.002beta two weeks from today.

> 
> I'm asking because I'm just getting to grips with SmartFrog and I'm 
> assuming that something akin to the JettyServer needs to be written (ie 
> thre'll be a bit more to it that stopping and starting catalina.sh).
> 
> cheers
> Bill

The level of complexity really depends on what level of control you 
need. Personally I'd advocate taking the .sh file, looking at what it 
does and producing a template to match it, usually a Java is all you 
need. That gives you the best control; easy changing of system 
properties, etc, and the automatic termination of the Java process when 
you terminate the component.

We could work together on that very quickly; it shouldn't be that hard 
to use that + deploy-by-copy .

Incidentally. The nice thing about Jetty is that we can do very 
low-level stuff, at the level of configuring individual mime mappings, 
servlets, etc. with tomcat you are left creating web.xml files, and that 
is not something we have done anything with.

I heard claims at apachecon that tomcat 6 is now configurable outside 
the XML files, which would be very nice; we could actually start it in a 
SmartFrog process and then configure it directly. This is the most 
intimate and probably the most vulnerable to changes in the Tomcat 
configuration APIs.

-Steve


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/