Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 261044 - [server] [plan] Problems cleaning up when undeploying Servletbrdige WAR
Summary: [server] [plan] Problems cleaning up when undeploying Servletbrdige WAR
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Server-Side (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 3.4.2   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 190279
Blocks:
  Show dependency tree
 
Reported: 2009-01-14 11:54 EST by Simon Kaegi CLA
Modified: 2009-01-14 13:48 EST (History)
4 users (show)

See Also:
philippe_mulet: pmc_approved+
tjwatson: review+


Attachments
path for 3_4_maintenance branch (14.29 KB, patch)
2009-01-14 12:26 EST, Simon Kaegi CLA
no flags Details | Diff
patch v2 (14.28 KB, patch)
2009-01-14 13:02 EST, Simon Kaegi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2009-01-14 11:54:21 EST
+++ This bug was initially created as a clone of Bug #190279 +++

The Servletbridge's FrameworkLauncher uses a URLClassLoader to create the instance of Equinox and hold framework extensions. This ends up using the Jar URL Handling which does not provide anyway to close the Jar file when finished. The net result is that the file remains open until the VM is shutdown.

This isn't a problem on Linux or other Unixes however on Windows you cannot delete (or rename) a file while it is still open. As a result when the Servletbridge is undeployed we don't cleanup the jar files and folders associated with resources loaded by the URLClassLoader.

It would be excellent to have an alternative. A further requirement is that the alternative must provide support for addURL as the framework uses this method to add framework extensions.
Comment 1 Simon Kaegi CLA 2009-01-14 11:55:58 EST
This bug is to track backporting the fix done in 3.5 M3.
Comment 2 Simon Kaegi CLA 2009-01-14 12:26:01 EST
Created attachment 122553 [details]
path for 3_4_maintenance branch
Comment 3 Philipe Mulet CLA 2009-01-14 12:51:23 EST
+1 for 3.4.2
Comment 4 Thomas Watson CLA 2009-01-14 13:01:47 EST
The CloseableURLClassLoader class is public making this seem like new real API
in a point release.  I think we should make the class package private in the
point release.  If we want to make it public in 3.5 then we can consider doing
so, but we must add the appropriate javadoc to the class if we intend others to
use it.

Once Simon makes this change to the patch I will +1 my review.
Comment 5 Simon Kaegi CLA 2009-01-14 13:02:39 EST
Created attachment 122561 [details]
patch v2

After talking with Tom we decided that for 3.4.2 we don't want to add any new API so for now we'll keep the CloseableURLClassLoader package private.
Comment 6 Thomas Watson CLA 2009-01-14 13:21:22 EST
+1 to latest patch for 3.4.2.
Comment 7 Simon Kaegi CLA 2009-01-14 13:48:55 EST
Fixed in R_3_4_maintenance branch and tagged.