Why does Tomcat need antiJARLocking?

513 views
Skip to first unread message

Chandru

unread,
Feb 3, 2010, 5:31:09 AM2/3/10
to bo...@googlegroups.com
Hi,

When an application accesses a resource within its JARs, Tomcat doesn't seem to release the lock on the corresponding JAR files.  This prevents the application from being fully removed when undeployed on Windows.  Setting antiJARLocking to true in context.xml fixes this.

Why doesn't Tomcat fully release the locks on the JAR file when a resource is accessed from it?

Sriram Narayanan

unread,
Feb 3, 2010, 10:52:36 AM2/3/10
to bo...@googlegroups.com
This is a Windows issue, and antiJARLocking was added very
specifically to support web app uninstallation on Windows.

> --
> You received this message because you are subscribed to the Google Groups
> "Bangalore Open Java Users Group- BOJUG" group.
> To post to this group, send email to bo...@googlegroups.com.
> To unsubscribe from this group, send email to
> bojug+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/bojug?hl=en.
>
>


--
Belenix: www.belenix.org

Chandru

unread,
Feb 3, 2010, 12:28:47 PM2/3/10
to bo...@googlegroups.com
If I understand it correctly, Windows refuses to delete only those files which are currently open by some application.  Does that mean Tomcat is not closing the file when the application is undeployed?  If so why is it that it is not closed?
On Wed, Feb 3, 2010 at 9:22 PM, Sriram Narayanan <srir...@gmail.com> wrote:
This is a Windows issue, and antiJARLocking was added very
specifically to support web app uninstallation on Windows.

Sriram Narayanan

unread,
Feb 4, 2010, 5:58:38 AM2/4/10
to bo...@googlegroups.com
Windows does not always release the file handles when a process closes
them. This is a Windows issue.

-- Ram

On 2/3/10, Chandru <chand...@gmail.com> wrote:

> If I understand it correctly, Windows refuses to delete only those files
> which are currently open by some application. Does that mean Tomcat is not
> closing the file when the application is undeployed? If so why is it that
> it is not closed?
>
> --
> Chandra Sekar.S
>
> Twitter: http://twitter.com/tuxychandru
>
> Blog: http://tuxychandru.blogspot.com/
>
>
> On Wed, Feb 3, 2010 at 9:22 PM, Sriram Narayanan <srir...@gmail.com>wrote:
>
>> This is a Windows issue, and antiJARLocking was added very
>> specifically to support web app uninstallation on Windows.
>>

>> On 2/3/10, Chandru <chand...@gmail.com> wrote:
>> > Hi,
>> >
>> > When an application accesses a resource within its JARs, Tomcat doesn't
>> seem
>> > to release the lock on the corresponding JAR files. This prevents the
>> > application from being fully removed when undeployed on Windows.
>> > Setting
>> > antiJARLocking to true in context.xml fixes this.
>> >
>> > Why doesn't Tomcat fully release the locks on the JAR file when a
>> resource
>> > is accessed from it?
>> >
>> > --
>> > Chandra Sekar.S
>> >
>> > Twitter: http://twitter.com/tuxychandru
>> >
>> > Blog: http://tuxychandru.blogspot.com/
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Bangalore Open Java Users Group- BOJUG" group.
>> > To post to this group, send email to bo...@googlegroups.com.
>> > To unsubscribe from this group, send email to

>> > bojug+un...@googlegroups.com<bojug%2Bunsu...@googlegroups.com>


>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/bojug?hl=en.
>> >
>> >
>>
>>
>> --
>> Belenix: www.belenix.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Bangalore Open Java Users Group- BOJUG" group.
>> To post to this group, send email to bo...@googlegroups.com.
>> To unsubscribe from this group, send email to

>> bojug+un...@googlegroups.com <bojug%2Bunsu...@googlegroups.com>.


>> For more options, visit this group at
>> http://groups.google.com/group/bojug?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Bangalore Open Java Users Group- BOJUG" group.
> To post to this group, send email to bo...@googlegroups.com.
> To unsubscribe from this group, send email to
> bojug+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/bojug?hl=en.
>
>

--
Sent from my mobile device

Belenix: www.belenix.org

Chandru

unread,
Feb 4, 2010, 7:35:07 AM2/4/10
to bo...@googlegroups.com
Oh!  Din't know about that.

Thanks Sriram.
--
Chandra Sekar.S


On Thu, Feb 4, 2010 at 4:28 PM, Sriram Narayanan <srir...@gmail.com> wrote:
Windows does not always release the file handles when a process closes
them. This is a Windows issue.

-- Ram
Reply all
Reply to author
Forward
0 new messages