tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Redeploy on context.xml changes (Was: Tagging 7.0.23)
Date Sat, 05 Nov 2011 15:24:15 GMT
2011/11/4 Mark Thomas <>:
> On 03/11/2011 17:08, Mark Thomas wrote:
>> I'm still looking at:
>> - recovery after fixing the broken file
>> - not deploying an expanded dir if the context.xml in
>> conf/Catalina/localhost is broken.
> OK. Here is a patch for review. There are so many combinations
> deployment and ways to create a dodgy configuration that I have probably
> missed a couple of edge cases.
> The main idea with this patch is that a Context always gets added even
> if deployment fails. That allows fixes via JMX and prevents
> WAR/directory deployment after a failed descriptor deployment. If the
> context.xml can't be read, a new FailedContext object is used. This
> allows redeploy resources to be tracked but the Context cannot be started.
> A number of clean-up issues I spotted along the way have already been fixed.

It is just your patch, but
- reverted renames of "watched resource" -> "reload resource". (*)
- formatted and added javadoc at the top of it
- corrected a typo s/absolue/absolute/

(*) Renaming does not add much, and so it is easier to backport. Let's
do not rename WatchedResource -> ReloadResource.

As of now:
1) addReloadResource() is not implemented in FailedContext. So there
is no way to add dependency on the global conf/context.xml there.

Possible solutions, but need to think about them
 a) store reload resources elsewhere outside of Context
 b) extract some code from StandardContext into a new class (something
like StandardContextBase?) and share it with FailedContext?  I see
that FailedContext does not inherit from ContainerBase, so maybe there
is some trouble with that.
 c) Copy some code into FailedContext?
 d) Use StandardContext, but overwrite some methods?

2) It is odd that FailedContext has
    public synchronized void addValve(Valve valve)

3) deployer-howto.xml still mentions "RedeployResource". I'd see where
it goes and fix later.

PS: I had troubles applying your patch with svn and started a thread
on users@subversion referring to it as an example. It does not handle
the way git denotes added files. Not a big deal when there is only one
added file - it us easy to handle that.

Best regards,
Konstantin Kolinko

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

View raw message