You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jeremy Boynes (JIRA)" <de...@geronimo.apache.org> on 2004/11/11 09:48:23 UTC

[jira] Created: (GERONIMO-470) Online deployer locks module file

Online deployer locks module file
---------------------------------

         Key: GERONIMO-470
         URL: http://nagoya.apache.org/jira/browse/GERONIMO-470
     Project: Apache Geronimo
        Type: Bug
  Components: deployment  
    Reporter: Jeremy Boynes


If I distribute a war file using the maven plugin and the online deployer, the server locks the input file. The means that a second build of my app fails as maven cannot delete the old war.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (GERONIMO-470) Online deployer locks module file

Posted by "Matt Hogstrom (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-470?page=all ]

Matt Hogstrom closed GERONIMO-470.
----------------------------------

    Resolution: Fixed
      Assignee: Dain Sundstrom

Addressed through changes in the JarfileClassLoader

> Online deployer locks module file
> ---------------------------------
>
>                 Key: GERONIMO-470
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-470
>             Project: Geronimo
>          Issue Type: Bug
>          Components: deployment
>            Reporter: Jeremy Boynes
>         Assigned To: Dain Sundstrom
>             Fix For: 1.2
>
>
> If I distribute a war file using the maven plugin and the online deployer, the server locks the input file. The means that a second build of my app fails as maven cannot delete the old war.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (GERONIMO-470) Online deployer locks module file

Posted by "Jeremy Boynes (JIRA)" <de...@geronimo.apache.org>.
     [ http://nagoya.apache.org/jira/browse/GERONIMO-470?page=comments#action_55354 ]
     
Jeremy Boynes commented on GERONIMO-470:
----------------------------------------

This appears to be because the jar: URL handler locks the file and does not release its lock when a stream to one of the entries is closed. So

URL url = new URL("jar:" + fileURL.toString() + "!/WEB-INF/web.xml");
InputStream is = url.openStream();
// read dd
is.close();

will leave the file locked.

I have not found a way of forcing it to release the lock.

> Online deployer locks module file
> ---------------------------------
>
>          Key: GERONIMO-470
>          URL: http://nagoya.apache.org/jira/browse/GERONIMO-470
>      Project: Apache Geronimo
>         Type: Bug
>   Components: deployment
>     Reporter: Jeremy Boynes

>
> If I distribute a war file using the maven plugin and the online deployer, the server locks the input file. The means that a second build of my app fails as maven cannot delete the old war.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (GERONIMO-470) Online deployer locks module file

Posted by "Matt Hogstrom (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-470?page=all ]

Matt Hogstrom updated GERONIMO-470:
-----------------------------------

    Fix Version: 1.1
                     (was: 1.0)

Moved to 1.1 for final fix.

> Online deployer locks module file
> ---------------------------------
>
>          Key: GERONIMO-470
>          URL: http://issues.apache.org/jira/browse/GERONIMO-470
>      Project: Geronimo
>         Type: Bug
>   Components: deployment
>     Reporter: Jeremy Boynes
>      Fix For: 1.1

>
> If I distribute a war file using the maven plugin and the online deployer, the server locks the input file. The means that a second build of my app fails as maven cannot delete the old war.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (GERONIMO-470) Online deployer locks module file

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-470?page=all ]

Aaron Mulder updated GERONIMO-470:
----------------------------------

    Fix Version: 1.0
    Environment: 

If that's all that's being done, could replace this with opening a JarFile on the JAR, getting the stream from that, and then closing the JarFile after the reading is done.

> Online deployer locks module file
> ---------------------------------
>
>          Key: GERONIMO-470
>          URL: http://issues.apache.org/jira/browse/GERONIMO-470
>      Project: Geronimo
>         Type: Bug
>   Components: deployment
>     Reporter: Jeremy Boynes
>      Fix For: 1.0

>
> If I distribute a war file using the maven plugin and the online deployer, the server locks the input file. The means that a second build of my app fails as maven cannot delete the old war.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-470) Online deployer locks module file

Posted by "Karl Avedal (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-470?page=comments#action_12362893 ] 

Karl Avedal commented on GERONIMO-470:
--------------------------------------

For a general solution to this, you could instead do:

URL url = new URL("jar:" + fileURL.toString() + "!/WEB-INF/web.xml");
URLConnection urlConnection = url.openConnection();
urlConnection.setUseCaches(false); // This is the key to not locking the file across close().
InputStream is = urlConnection.getInputStream();
// read dd
is.close();

That will not leave the file locked.

To solve this in a way that doesn't rely on turning off caching for URLConnection is to write a better URLStreamHandler for jars than the Sun one.

> Online deployer locks module file
> ---------------------------------
>
>          Key: GERONIMO-470
>          URL: http://issues.apache.org/jira/browse/GERONIMO-470
>      Project: Geronimo
>         Type: Bug
>   Components: deployment
>     Reporter: Jeremy Boynes
>      Fix For: 1.1

>
> If I distribute a war file using the maven plugin and the online deployer, the server locks the input file. The means that a second build of my app fails as maven cannot delete the old war.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira