geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Genender <jgenen...@apache.org>
Subject Re: A Tomcat deployment question
Date Wed, 09 Feb 2005 18:33:24 GMT


anita kulshreshtha wrote:
> Jeff,
>     why do we need to use the TomcatModuleBuilder(TMB)
> in j2ee-deployer-plan.xml ? 

Actually, I just left it in there because A) There is a Jetty Webbuilder 
version in there, and also for the sake of consistency.  I haven't tried 
to remove it from the j2ee-deployer-plan.xml.  Its definately worth a 
try and see what happens. If any of the Jetty guys want to chime in on 
this, it would definately be appreciated.

> Are you actually able to run apps on Tomcat using the current TMB?

Simple apps should be fine.  When I mean simple, I mean with no security 
and are standard servlet/JSP applications. The Tomcat object integration 
now supports just about everything including root component contexts, 
geronimo user transactions, JACC, and JAAS, security/policy contexts, 
and custom geronimo web application contexts.  When I say object 
integration, I mean the code and objects to hook into Tomcat have been 
written and somewhat unit tested.

The major bridge for total integration is finishing the builder. The 
builder currently does not pass on the security objects.  The TMB needs 
alot of work yet to get this integrated.  I understand Jacek is 
currently working on this.

The following is missing and is left for Tomcat to be fully integrated 
for deployment:

1) The TMB needs to set up the appropriate objects.  A majority of the 
Jetty builder can be used.  However, a large stumbling block is getting 
access to the Tomcat web class loader to build up the component context. 
  Jetty creates this up front.  Tomcat creates this internally from its 
own StandardContext, so its done "after-the fact", far beyond the 
builder's execution.  Its actually done when registering the TWAC with 
the container.  Some hooks need to be implemented to retrieve this 
during the TomcatWebAppContext creation.  Its doable, but it needs to be 
carefully thought through.  The place to probably hook into this is in 
the TWAC.setContextProperties(), which was meant to catch the Tomcat's 
StandardContext after the container creates it, but before the web app 
accepts connections.

2) The concept of a server.xml file needs to be supported for the Tomcat 
container.  In order to allow people to run thier web apps, we must 
support custom Valves and Realms at the container, host, and context 
levels.  This is normally declared in a server.xml file, however, we 
could allow for this type of declaration to be implemented in the plans 
somehow.  We need to kick around the appropriate place for this.  In any 
case, this would eventually be a required add-on to the TMB.

3) It would be nice to have the servlets be GBeanized, like Jetty. 
Although this is not a requirement to get Tomcat integrated, it would be 
a nice-to-have for consistency sake.

IMHO, once we get that builder completed, Tomcat should be considered 
fully integrated.

Jeff

> 
> TIA
> Anita
> 
> --- Jeff Genender <jgenender@apache.org> wrote:
> 
> 
>>Anita,
>>
>>I think this is now rectified for you.
>>
>>First there was a bug in the TomcatModuleBuilder
>>that failed on schema 
>>validation.  I fixed that and the DebugConfig will
>>be built properly 
>>during the assembly build for tomcat.
>>
>>However, there is now an additional
>>comment/un-comment you must do 
>>before building assembly if you want to run Tomcat. 
>>You need to edit 
>>the j2ee-runtime-deployer-plan.xml as well as the
>>j2ee-deployer-plan.xml.
>>
>>I added a commented-out Tomcat section in the 
>>j2ee-runtime-deployer-plan.xml.  You need to
>>uncomment that, then 
>>comment out the WebBuilder for Jetty right below it.
>> I added a comment 
>>there describing this as well.
>>
>>I will try to get this in the Wiki shortly.
>>
>>After this, it should be alot less painful to get
>>Tomcat running.
>>
>>Let us know how this works for you.
>>
>>Jeff
>>
>>anita kulshreshtha wrote:
>>
>>>Hi,
>>>     I am doing the following -
>>>1. Do a regular build.
>>>2.start the server by starting DebugConsole,
>>>RuntimeDeployer and Tomcat.
>>>3. From another window modify the RuntimeDeployer
>>>configuration to accept TomcatModuleBuilder as
>>>WebBuilder using 
>>>java -jar bin\deployer.jar
>>>..\plan\j2ee-runtime-deployer-plan.xml
>>>4.  A ^C saves this RuntimeDeployer in the
>>
>>persistent
>>
>>>store in another location. 
>>>5  Now when I restart the server as in 2 , I can
>>
>>run
>>
>>>DebugConsole as well as deploy wars For tomcat
>>
>>using
>>
>>>java -jar bin\deployer.jar. I do this to test
>>>TomcatModuleBuilder. 
>>>    Is there a better way to accomplish this? 
>>>Jacek, How do you run TomcatModuleBuilder ? 
>>>
>>>TIA
>>>Anita
>>>
>>>
>>>		
>>>__________________________________ 
>>>Do you Yahoo!? 
>>>Yahoo! Mail - 250MB free storage. Do more. Manage
>>
>>less. 
>>
>>>http://info.mail.yahoo.com/mail_250
>>
>>-- 
>>Jeff Genender
>>http://geronimo.apache.org
>>
>>
> 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Helps protect you from nasty viruses. 
> http://promotions.yahoo.com/new_mail

-- 
Jeff Genender
http://geronimo.apache.org


Mime
View raw message