users@glassfish.java.net

Re: Redeploy fails when using Struts with GlassFish

From: Craig McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Tue, 12 Dec 2006 14:48:02 -0800

Mark Hansen wrote:
> Thanks for the insight Craig. Do you know if this JAR locking problem
> is also an issue with Struts 2 ?
>
I'm afraid I do not know that, since I'm not involved in Struts 2
development. If Digester is used you'll certainly want to grab 1.8, but
beyond that I don't know if they have other locking issues.

Craig
> Craig McClanahan wrote:
>
>> jacob_at_hookom.net wrote:
>>
>>> It might be an issue to throw back at Struts or another dependent
>>> library that uses resources from the classpath-- I had the same
>>> problem with my project and ended up having to re-work closing
>>> URLConnections on the classpath.
>>>
>>>
>>
>> One of the culprits for Struts (and several other frameworks) is
>> actually Commons Digester, which is often told to reference DTDs that
>> are embedded as classpath resources. Version 1.8 of Commons Digester
>> was just released, and includes fixes for at least this scenario ...
>> it's worth trying (although it might not address all file locking
>> issues, it will certainly address some of them).
>>
>> There are additional Struts-specific issues that are related to which
>> version of Struts you are using. IIRC, these were addressed in 1.2.8
>> or later.
>>
>> Craig
>>
>>> One of the culprits was code to check the lastModified date of
>>> resources on the classpath, it will end up locking the resource, so
>>> you have to grab an inputstream and immediately close it to
>>> guarantee you've freed the lock.
>>>
>>>
>>>
>>>> I have an EAR that contains the Struts JARs. When I modify the app
>>>> and try to redeploy, it always fails because of file locks on the
>>>> Struts JARs. To redeploy, I have to shut down GlassFish, manually
>>>> delete the app from the domain, restart, and redeploy.
>>>>
>>>> Has anyone else run into a similar problem with Struts or anything
>>>> else? What is the solution? Its painful to try to develop for
>>>> GlassFish if you have to keep shutting down the server in order to
>>>> redeploy.
>>>>
>>>> Thanks,
>>>>
>>>> Mark
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>