shale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SHALE-274) [dialog2] Clean up static resources at application shutdown
Date Mon, 13 Nov 2006 23:46:57 GMT
    [ http://issues.apache.org/struts/browse/SHALE-274?page=comments#action_38684 ] 
            
Craig McClanahan commented on SHALE-274:
----------------------------------------

Further research, plus a pointer in the right direction from Niall Pemberton[1], illustrates
that the above steps (while a good idea to avoid memory leaks) are not sufficient to avoid
leaving shale-dialog-basic-xxxxx.jar locked when undeploying on Windows.  There is an issue
in Digester 1.6 and 1.7 (but fixed in recent nightly builds) when you use the Digester.register()
method to register instances of (say) DTDs that are present inside your JAR file, so that
the application does not have to go out to the Internet to resolve them.  Released versions
of Digester leave an I/O channel to the internal DTD open when it is used in this way, which
prevents the JAR file from being closed on Windows.  The latest Digester trunk code uses a
workaround to avoid this problem.

[1] http://issues.apache.org/jira/browse/DIGESTER-29


> [dialog2] Clean up static resources at application shutdown
> -----------------------------------------------------------
>
>                 Key: SHALE-274
>                 URL: http://issues.apache.org/struts/browse/SHALE-274
>             Project: Shale
>          Issue Type: Bug
>          Components: Dialog
>            Reporter: Craig McClanahan
>             Fix For: 1.0.4-SNAPSHOT
>
>
> The legacy dialog2 implementation relies on both Commons Logging and Commons Digester
(which implies a transitive dependence on Commons BeanUtils).  Therefore, we need to clean
up at application shutdown by executing the following in a contextDestroyed() lifecycle listener
(or equivalent):
>     PropertyUtils.clearDescriptors();
>     LogFactory.release(Thread.currentThread().getContextClassLoader());

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

        

Mime
View raw message