[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-4078) Jar locking during of component initialization on Windows
Andrey Lomakin (JIRA)
jira-events at lists.jboss.org
Sat Apr 4 05:21:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Lomakin updated JBSEAM-4078:
-----------------------------------
Environment: Windows XP, Java(TM) SE Runtime Environment (build 1.6.0_13-b03), GlassFish v3 Prelude (build b28c) (was: Windows 2000, Java(TM) SE Runtime Environment (build 1.6.0_13-b03), GlassFish v3 Prelude (build b28c))
> Jar locking during of component initialization on Windows
> ---------------------------------------------------------
>
> Key: JBSEAM-4078
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4078
> Project: Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.1.GA
> Environment: Windows XP, Java(TM) SE Runtime Environment (build 1.6.0_13-b03), GlassFish v3 Prelude (build b28c)
> Reporter: Andrey Lomakin
>
> JARs that contain components.xml are locked till server shutdown and can not be removed after application undeploy on Windows.
> As I understand following snippet of code in method org.jboss.seam.init.Initialization#initComponentsFromXmlDocuments:
> InputStream stream = url.openStream();
> log.debug("reading " + url);
> try {
> installComponentsFromXmlElements(XML.getRootElement(stream), replacements);
> } finally {
> Resources.closeStream(stream);
> }
> should be replaced by
> URLConnection connection = url.openConnection();
> connection.setUseCaches(false);
> InputStream stream = connection.getInputStream();
> // and so on...
> If cashes are switched off file is opened but never closed.
> Returned instance of InputStream interface is sun.net.www.protocol.jar.JarURLConnection,JarURLInputStream that closes opened jar file
> only if cashes are not used.
> class JarURLInputStream extends java.io.FilterInputStream {
> 103 JarURLInputStream (InputStream src) {
> 104 super (src);
> 105 }
> 106 public void close () throws IOException {
> 107 try {
> 108 super.close();
> 109 } finally {
> 110 if (!getUseCaches()) {
> 111 jarFile.close();
> 112 }
> 113 }
> 114 }
> 115 }
> http://www.docjar.com/html/api/sun/net/www/protocol/jar/JarURLConnection.java.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list