geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsavardhana Reddy" <c1vams...@gmail.com>
Subject Re: Problem with defining custom Valve in config.xml
Date Fri, 21 Sep 2007 13:53:58 GMT
On 9/21/07, Paul McMahan <paulmcmahan@gmail.com> wrote:
>
> 1.) start geronimo 2.0.1
>
> 2.) undeploy the Tomcat component:
>       $G/bin/deploy.sh undeploy org.apache.geronimo.configs/
> tomcat6/2.0.1/car
>
> 3.) install your jar into the repository:
>       mkdir -p $G/repository/mygroup/myvalve/1.0/
>       cp myvalve-1.0.jar $G/repository/mygroup/myvalve/1.0/
>
> 4.) get a deployment plan for Geronimo's Tomcat component by building
> it from source
>      -- or --
>       http://people.apache.org/~pmcmahan/tomcat_plan.xml
>
> 5.) add a dependency on your jar to the deployment plan
>       <dependencies>
>          [...]
>          <dependency>
>            <groupId>mygroup</groupId>
>            <artifactId>myvalve</artifactId>
>            <version>1.0</version>
>            <type>jar</type>
>        </dependency>
>
> 6.) redeploy the tomcat component using the updated deployment plan
>       $G/bin/deploy.sh deploy $G/repository/org/apache/geronimo/
> modules/geronimo-tomcat6/2.0.1/geronimo-tomcat6-2.0.1.jar
> tomcat_plan.xml


I would suggest not to undeploy tomcat in step 2 and use deploy.sh
redeploy  at step 6.  If this works, then you need not worry about
restarting any apps that might have got stopped when tomcat was undeployed
as redeploy will restart everything that got stopped.


7.) restart any web apps that depend on Tomcat (undeploying Tomcat
> stopped them).  e.g.
>       $G/bin/deploy.sh start org.apache.geronimo.configs/welcome-
> tomcat/2.0.1/car
>
>
> As was mentioned earlier,  this process for adding new dependencies
> to an existing module needs to be improved in Geronimo.  This would
> make it easier to use your own classes for Tomcat valves.   BTW,
> there are several "native" valves already in the Tomcat jars that
> would not require you to go through this process:
> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/
> valves/package-summary.html
>
>
> Best wishes,
> Paul
>
> On Sep 20, 2007, at 2:34 PM, Carver wrote:
>
> >
> > Thanks Paul! I like this approach, but I don't know how to redeploy
> > it. Could
> > you tell me how to redeploy the tomcat module?
> >
> >
> > Paul McMahan-2 wrote:
> >>
> >> Geronimo's Tomcat component actually creates the valve and therefore
> >> needs to have the implementation classes available in its
> >> classloader.  A component's deployment plan specifies what goes in
> >> its classloader, so you could add your jar(s) to Tomcat's deployment
> >> plan and then redeploy it.
> >>
> >>
> >> Best wishes,
> >> Paul
> >>
> >>
> >> On Sep 20, 2007, at 8:52 AM, Carver wrote:
> >>
> >>>
> >>> It seems that I can merge all the other jar files into the
> >>> geronimo-tomcat-1.1.1.jar to make it works. Is there other ways to
> >>> handle
> >>> it?
> >>>
> >>> --
> >>> View this message in context: http://www.nabble.com/Problem-with-
> >>> defining-custom-Valve-in-config.xml-tf4486628s134.html#a12796470
> >>> Sent from the Apache Geronimo - Users mailing list archive at
> >>> Nabble.com.
> >>>
> >>
> >>
> >>
> >
> > --
> > View this message in context: http://www.nabble.com/Problem-with-
> > defining-custom-Valve-in-config.xml-tf4486628s134.html#a12803085
> > Sent from the Apache Geronimo - Users mailing list archive at
> > Nabble.com.
> >
>
>

Mime
View raw message