You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Felipe Jaekel <fk...@gmail.com> on 2015/09/15 20:11:07 UTC

Question on autoDeploy=true + editing conf/context.xml

Hi,

I use parallel deployment, so I set *autoDeploy=true* to enable newer
versions of webapps as as soon as they are deployed, but if I edit
*conf/context.xml*, I'd like that Tomcat 7.0.62 did not restart
automatically.

Is it possible?

Thanks

Re: Question on autoDeploy=true + editing conf/context.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Felipe,

On 9/15/15 4:15 PM, Felipe Jaekel wrote:
> I don't replace the war file, only copy a new version to webapps
> folder.
> 
> I restart tomcat everyday at dawn to reset PermGen space. (Tried to
> profile the webapps sometimes but didn't figured out the
> problem...)
> 
> I edited conf/context.xml to disable session persistence.
> 
> My idea was making tomcat read the new configuration value after it
> was restarted.

Sorry, you can't have it both ways: both auto-detect config changes
and ignore config changes.

If you want that kind of semantics, you *can* do it, but it's not a
configuration setting: you actually have to do work:

1. Set autoDeploy="false"
2. Use the manager web application to deploy new versions of your
application

- -chris

> 2015-09-15 16:52 GMT-03:00 Christopher Schultz
> <chris@christopherschultz.net
>> :
> 
> Felipe,
> 
> On 9/15/15 2:11 PM, Felipe Jaekel wrote:
>>>> I use parallel deployment, so I set *autoDeploy=true* to
>>>> enable newer versions of webapps as as soon as they are
>>>> deployed
> 
> Deployed... how? If you replace webapp.war with a new copy, Tomcat 
> will re-start *that* context, and not just add a new versioned
> context with a new version number.
> 
>>>> but if I edit *conf/context.xml*, I'd like that Tomcat 7.0.62
>>>> did not restart automatically.
> 
> Why would you edit conf/context.xml in the first place?
> 
> -chris
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJV+ZAWAAoJEBzwKT+lPKRYQ6MP/0WXkZ4/BPQaFbhVn6g45+ua
GTUWKNhoHwUBSrhpuk6wfXpLBJOfE/ieD3q7IEsH998zEouHqOZvczez5OMdMZdU
z/fhU8C7L+m5mkMK3x4NrfxG/JLVZSsKr1QdiFNOUvBp7l1syWoW1/4z4eEPl33L
LSsLcLsqF2JT961l6cauOO7IX+GzZldgUQbgm/dg95djnAHh6G94HO0dZABcqzf8
tCO4T0iFRH5SUU2b5onnuswigsAlnp1B/Uoq070JbUFmmqzCM3peFr8cnps5HLoh
/boO4x3zzQZ7cE+Ud6VFel53NI7PtvIoy3p7DZHGJg/Y+8efMfMyCxXFc/06CZOH
I6ffJr6rQjxuXrykez+JMMvjunBXYfYtMv0y9ujPIXI3urKrOTIYSefQGVOBW4iu
BLn+WQBnpzOMsjV83AhOuyeSH5mds9b5A8TKASSQr5mFk5mvlB5ZK8Tic5IeLb7Z
PoC+srDmdy6q3pFsgKCjZBvUrH++iZBvy4MLnJ7lYp67G98zoWlL/JOeMNd6BS+S
/YQZ5qY5q8vYzl4xt1L1ePJEiFKLjb43Mx6kmfQffJLlz/pOQuAj13Rt5yib+9Xp
xhkwB4Bl+dy18EZRfUeUpAW4Rv0qqnzPX48e5FL8dYMiekwwn6l4ia6rijfXUASm
XETqUawOO4QGGE23Rq8P
=HQVQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Question on autoDeploy=true + editing conf/context.xml

Posted by Felipe Jaekel <fk...@gmail.com>.
Hi,

I don't replace the war file, only copy a new version to webapps folder.

I restart tomcat everyday at dawn to reset PermGen space. (Tried to profile
the webapps sometimes but didn't figured out the problem...)

I edited conf/context.xml to disable session persistence.

My idea was making tomcat read the new configuration value after it was
restarted.

2015-09-15 16:52 GMT-03:00 Christopher Schultz <chris@christopherschultz.net
>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Felipe,
>
> On 9/15/15 2:11 PM, Felipe Jaekel wrote:
> > I use parallel deployment, so I set *autoDeploy=true* to enable
> > newer versions of webapps as as soon as they are deployed
>
> Deployed... how? If you replace webapp.war with a new copy, Tomcat
> will re-start *that* context, and not just add a new versioned context
> with a new version number.
>
> > but if I edit *conf/context.xml*, I'd like that Tomcat 7.0.62 did
> > not restart automatically.
>
> Why would you edit conf/context.xml in the first place?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJV+HbxAAoJEBzwKT+lPKRYHwQQAL3t1suhM+z8qk6byUC83QJ4
> KBq3ZXualzokLJj+4VI+zhgniiuVJnEkmwgerqGdVVYrlj8aFS3FquX/SwA3sHMs
> rp5sdIOKBKCyz+xAIsk5eZ5I/BRB5BGk0jFW//ahAHXHUC7BYhmxrHfNI/YfsRn0
> nFNNUoCGvPL0lGMrzhwiZTVlA3hZtPaN2UUpCHo1PbF4JJTv22Z++B4joNqr3s6M
> BSDuZsx/JWp19MphDM8IjfISlaMii4gl9pN5cXTcADhzF9YGkI+GvXOMR30QQHm1
> nO9r/U3rqdkC1ecIuv/Gp8d8snTUHD9nCz52Jm5kQujOxZf4hYdqLZIzsTVFcbcw
> l05Yyt++74Y9wwGzuUYb+8B3Hpa95y0e3rHj9zbOFzlvJrTbZhKNJKGLHQN7IfLO
> ye3h408GtKl4+3jDp0VKBezHvFEvtSzbRAkHpBk1upbK7DepkBbFaYO+pkJAB4SS
> O296H6LhS5E8AS9JInoNE5aGXqyF8JfPN4Ed0FA6yQbo0ZmtvnbUP4fQt3Klty7B
> K0xnFBHX+H7BFRPOSbNJNZ4QUxhV+FVq58MTRHnUqc26SDS69EkKS3mOwaeLZwbh
> b6oZ55EXNSVzQVELwouI+Qy1Iw2QE7gMSYSvd4VZH/zbMwQr+nFWwjt6VelTGwii
> X0HZJh4WB+u6+HTVfShj
> =AhL2
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Question on autoDeploy=true + editing conf/context.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Felipe,

On 9/15/15 2:11 PM, Felipe Jaekel wrote:
> I use parallel deployment, so I set *autoDeploy=true* to enable
> newer versions of webapps as as soon as they are deployed

Deployed... how? If you replace webapp.war with a new copy, Tomcat
will re-start *that* context, and not just add a new versioned context
with a new version number.

> but if I edit *conf/context.xml*, I'd like that Tomcat 7.0.62 did 
> not restart automatically.

Why would you edit conf/context.xml in the first place?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJV+HbxAAoJEBzwKT+lPKRYHwQQAL3t1suhM+z8qk6byUC83QJ4
KBq3ZXualzokLJj+4VI+zhgniiuVJnEkmwgerqGdVVYrlj8aFS3FquX/SwA3sHMs
rp5sdIOKBKCyz+xAIsk5eZ5I/BRB5BGk0jFW//ahAHXHUC7BYhmxrHfNI/YfsRn0
nFNNUoCGvPL0lGMrzhwiZTVlA3hZtPaN2UUpCHo1PbF4JJTv22Z++B4joNqr3s6M
BSDuZsx/JWp19MphDM8IjfISlaMii4gl9pN5cXTcADhzF9YGkI+GvXOMR30QQHm1
nO9r/U3rqdkC1ecIuv/Gp8d8snTUHD9nCz52Jm5kQujOxZf4hYdqLZIzsTVFcbcw
l05Yyt++74Y9wwGzuUYb+8B3Hpa95y0e3rHj9zbOFzlvJrTbZhKNJKGLHQN7IfLO
ye3h408GtKl4+3jDp0VKBezHvFEvtSzbRAkHpBk1upbK7DepkBbFaYO+pkJAB4SS
O296H6LhS5E8AS9JInoNE5aGXqyF8JfPN4Ed0FA6yQbo0ZmtvnbUP4fQt3Klty7B
K0xnFBHX+H7BFRPOSbNJNZ4QUxhV+FVq58MTRHnUqc26SDS69EkKS3mOwaeLZwbh
b6oZ55EXNSVzQVELwouI+Qy1Iw2QE7gMSYSvd4VZH/zbMwQr+nFWwjt6VelTGwii
X0HZJh4WB+u6+HTVfShj
=AhL2
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Question on autoDeploy=true + editing conf/context.xml

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 15.09.2015 20:11, Felipe Jaekel wrote:
> Hi,
>
> I use parallel deployment, so I set *autoDeploy=true* to enable newer
> versions of webapps as as soon as they are deployed, but if I edit
> *conf/context.xml*, I'd like that Tomcat 7.0.62 did not restart
> automatically.
>
> Is it possible?
>


Just a comment from a not-Tomcat-developer :

According to a comment in the file (tomcat_dir)/conf/context.xml :

<!-- The contents of this file will be loaded for each web application -->

and it seems that this very file, is telling Tomcat which webapp resource to watch for 
changes, in relation to the applications that may need to be reloaded/restarted :

<WatchedResource>WEB-INF/web.xml</WatchedResource>

So to me, it does make sense, if someone changes conf/context.xml, to restart the whole 
Tomcat, to take into account such a possible change to the very thing that controls the 
detection of a change in all applications.

Which is probably the basic reason why it is so. No ?

A further question would be : what is the "use case" for modifying the global 
conf/context.xml while Tomcat is running ?





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org