I can't see how this could be a Tomcat or Windows problem. With Struts
2.1.2 and setting antiJARLocking="true", I was able to undeploy.
However, the necessity of the option tells me Struts (or XWork) is
leaky somewhere and is not properly cleaning up its house. When
running under Windows, files are only locked when they are open, and
if Tomcat can't GC due to uncollectable references, then it's proof
there's a leak.

I don't think this problem should be ignored.

Paul

On Sun, Aug 24, 2008 at 6:59 PM, Jeromy Evans
<[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> I'm not 100% sure as I've never investigated this in detail myself.  Now
> that you've mentioned it though, I recall another issue with Struts 2
> leaving files open.  It related to the FreeMarker template caching and
> someone had setup a task to monitor open file counts at run-time.
>
> That would also cause the problem you're seeing and there's probably an
> issue in JIRA about that one too.
>
> I rarely attempt to undeploy myself as the application servers run out of
> PermGen space eventually anyway requiring a restart.  I prefer a reliable
> slow restart rather than a fast redeployment with an occasional failure.
> Paul Benedict wrote:
>>
>> Jeromy,
>>
>> I wrapped a try/finally in the init and destroy method as you and the
>> ticket described, but there was still a memory leak that locked down
>> the Struts 2 core library. Are you sure these are the only things to
>> be done?
>>
>> @Override
>> public void init(FilterConfig filterConfig) throws ServletException {
>>    try {
>>        super.init(filterConfig);
>>    } finally {
>>        ActionContext.setContext(null);
>>    }
>> }
>>
>> @Override
>> public void destroy() {
>>    try {
>>        super.destroy();
>>    } finally {
>>        ActionContext.setContext(null);
>>    }
>> }
>>
>> Paul
>>
>> On Sat, Aug 23, 2008 at 12:20 AM, Jeromy Evans
>> <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Paul Benedict wrote:
>>>
>>>>
>>>> https://issues.apache.org/struts/browse/WW-2167
>>>>
>>>>
>>>
>>> Yes, it's easy to retrofit to 2.0.  It only requires a finally statement
>>> in
>>> the init and destroy methods.
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to