You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/03/12 14:39:00 UTC

[Bug 56248] New: Automatic deployment with TCD deletes customized context.xml file

https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

            Bug ID: 56248
           Summary: Automatic deployment with TCD deletes customized
                    context.xml file
           Product: Tomcat 7
           Version: 7.0.52
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Manager
          Assignee: dev@tomcat.apache.org
          Reporter: jsb_apache@360works.com

I was very happy to see the changes to automatic deployment, and that
customized context.xml files in conf/Catalina/localhost/<appname>.xml are
preserved when a war file is replaced on the server.

However, when using the ant tasks that come with TCD (and I suspect when using
the Tomcat manager, although I have not tested that), it appears that the
webapp is deleted and then uploaded (as opposed to just being replaced), which
is causing the customized context.xml file to be lost and replaced with a
default version.

=== Reply from Mark Thomas ===

Hmm. It looks like the update command does an undeployment followed by a
deploy rather than a replacement of the WAR file and a redeploy. You
aren't going to be able to fix that without code changes to Tomcat.
Changing the behaviour seems reasonable here. I suggest you open a
bugzilla issue for this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56248] Automatic deployment with TCD deletes customized context.xml file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

--- Comment #2 from Jesse Barnum <js...@360works.com> ---
Wow, thank you!!!

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56248] Automatic deployment with TCD deletes customized context.xml file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

Jesse Barnum <js...@360works.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsb_apache@360works.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Re: [Bug 56248] Automatic deployment with TCD deletes customized context.xml file

Posted by sebb <se...@gmail.com>.
On 13 March 2014 15:30,  <bu...@apache.org> wrote:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56248
>
> Mark Thomas <ma...@apache.org> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>          Resolution|---                         |FIXED
>
> --- Comment #1 from Mark Thomas <ma...@apache.org> ---
> This has been fixed in 8.0.x for 8.0.4 onwards and in 7.0.x for 5.0.53 onwards.

5.0.53 ??

> --
> You are receiving this mail because:
> You are the assignee for the bug.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

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


[Bug 56248] Automatic deployment with TCD deletes customized context.xml file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
This has been fixed in 8.0.x for 8.0.4 onwards and in 7.0.x for 5.0.53 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56248] Automatic deployment with TCD deletes customized context.xml file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> ---
Reviewing r1577199

Besides two small issues that I mentioned in "Re: r1577199" thread on dev@, and
bug 56273, one more high-level one:

The logic in update=true case in
    protected synchronized void deploy
        (PrintWriter writer, ContextName cn,
         String tag, boolean update, HttpServletRequest request,
         StringManager smClient) {

is as follows:
1. mark webapp as serviced
2. delete old war
3. upload new war,
 that means to read the body of a PUT request and save it as file
4. trigger deployment, remove serviced mark

If step 3. fails due to aborted I/O, the old application will become
undeployed, deleting its custom configuration if there is any.

It would be better to upload it to a temporary name and rename the file.
A temporary name can be created with java.io.File.createTempFile(,,dir).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56248] Automatic deployment with TCD deletes customized context.xml file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
I've fixed all of these issues for 8.0.x (8.0.4 onwards) and 7.0.x (7.0.53
onwards)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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