geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (XBEAN-133) Jar file is not close after open resulting in files delete failure when finding resource
Date Tue, 30 Jun 2009 09:57:48 GMT

    [ https://issues.apache.org/jira/browse/XBEAN-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725552#action_12725552
] 

Ivan commented on XBEAN-133:
----------------------------

Generally speaking, the jarFile is in the method domain,  it should be released soon. But,
if we could explicitly call the close method will be better.
After some investigation, whether or not we could invoke the close method, I think it depends
on.  If the usercache is closed and url is recreated to point to the jarFile (like what is
done in the findResource method), each call to openConnection().getJarFile() will return a
different JarFile object , which means that calling the close method would not affect others
who uses the same Jar file.
So, shall we change the patch to something like
 if (jarfile != null && !conn.getUseCaches())
                try {                                        
                     jarfile.close();
                } catch (Exception e) {
                }
Not sure whether I made a mistaken, thanks for any comment !

> Jar file is not close after open resulting in files delete failure when finding resource
> ----------------------------------------------------------------------------------------
>
>                 Key: XBEAN-133
>                 URL: https://issues.apache.org/jira/browse/XBEAN-133
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: os:win2003
>            Reporter: viola.lu
>            Assignee: David Blevins
>            Priority: Minor
>         Attachments: XBEAN-133.patch
>
>
> 1.Deploy a war including jar files under lib with a wrong deployment plan in Geronimo
server
> 2.Fail to deploy but can't recursive delete files under lib coz jar files are open not
close by xbean resource finder
> Refer to https://issues.apache.org/jira/browse/GERONIMO-4696 for details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message