On 09/05/2010 16:03, red phoenix wrote:
> I use tomcat 6.0.18 deploy struts2.1.8.1+hibernate3+spring3.0,I find a
> puzzled question,I find tomcat will be shutdown automatically after about 10
> minutes,I look up files under logs directory of tomcat,I find
> localhost.2010-05-09.log,it looks follows:
> 2010-5-9 22:36:12 org.apache.catalina.core.ApplicationContext log
> Info: Initializing Spring root WebApplicationContext
> 2010-5-9 22:45:12 org.apache.catalina.core.ApplicationContext log
> Info: Initializing Spring root WebApplicationContext
> 
> The I look server.xml,
> ...
> <Host name="localhost"  appBase="webapps"
>             unpackWARs="true" autoDeploy="true"
>             xmlValidation="false" xmlNamespaceAware="false">
> <Context path="/MyApp" docBase="MyApp" reloadable="true"
> crossContext="true"></Context>

For Tomcat 6.0.x, it's usually inadvisable to put the Context definition
in server.xml.  Instead put it in:

 MyApp/META-INF/context.xml

and remove the 'path' and 'docBase' attributes.

> ...
> I look up reason,it looks spring will reboot webapplication,so I delete
> following statement:

Where did you look it up and why did it say Spring will 'reboot' the web
application?

> <Context path="/MyApp" docBase="MyApp" reloadable="true"
> crossContext="true"></Context>
> 
> Then I start Tomcat,this time tomcat don't shutdown after 10 minutes,but
> about 30 minutes,tomcat6 also shutdown automatically! this time I look at
> localhost.2010-05-09.log,I don't find following information twice:
> Info: Initializing Spring root WebApplicationContext
> 
> I am puzzled with it!!! Why tomcat will be shutdown automatically? What
> reason raise tomcat shutdown  automatically? How to solve it?

Is this the last log message before it shuts down?


p

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to