tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: How can I prevent Quartz multiple execution after tomcat restart
Date Fri, 23 Oct 2009 11:02:31 GMT
On 23/10/2009 10:00, Elli Albek wrote:
> Where is your spring configuration file? Is it inside the war file?
> When you have two hosts, do you have the war file in both? If this is he case you may
deploy the entire war file twice. Generally a deployed war file can run only in one host.
If you run it in two hosts, you are deploying the entire war file twice. This will create
two instances of your quartz object.

Actually, now that Elli points that out...

> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="false"
> xmlValidation="false" xmlNamespaceAware="false">
> </Host>
> <Host name=""
> unpackWARs="true" autoDeploy="false" deployOnStartup="false"
> xmlValidation="false" xmlNamespaceAware="false">
> <Alias></Alias>
> <Context path="" docBase="/var/lib/tomcat55/webapps/xxx" reloadable="true">


> </Context>
> </Host>

The Host doesn't have an appBase defined, so it might be using 
the default - which may mean that you're deploying the app twice, once 
as the ROOT application, and once under it's actual name.

You can check this by requesting:, where "xxx" is 
the actual name of your app.

Either way, setting the Context in server.xml is _strongly_ discouraged.

You should:

1. set an appBase attribute in the Host definition.

2. Remove the Context definition from server.xml

3. Remove the path & docBase attributes from the Context definition

4. Add a file "META-INF/context.xml" containing the Context definition 
to your web application.

5. rename your application directory "ROOT".

... and then let us know if the problem still occurs.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message