Community
Participate
Working Groups
Build Identifier: 3.4.100.v20090520-1800 I'm running OSGI in a servlet-bridged WAR (standard Equinox servlet bridge distribution), and I noticed that even after the application WAR was terminated Windows was reporting a file lock was still being held in the appserver JVM on .extraData.XX and .mainData.XX in the org.eclipse.core.runtime configuration directory. I traced back through the environment in a debugger and it appears that the stop() method in org.eclipse.equinox.registry/org.eclipse.core.internal.registry.ExtensionRegistry is only calling close() on the theTableReader object when there are changes to the registry. Shouldn't theTableReader.close() always be invoked in ExtensionRegistry.stop() to release the input streams, regardless of whether the registry objects changed? While the open input streams are eventually purged via garbage collection, any action on the web container that needs to remove/recreate the platform deployment will be unable to continue until that occurs. Reproducible: Always Steps to Reproduce: 1. Start OSGi environment in WAR with servlet-bridge, include registry bundle as well as other registry bundle consumers 2. Stop web application (which triggers framework shutdown) without triggering garbage collection. 3. Observe file locks are being held on .extraData.XX and .mainData.XX in the operating system.
Created attachment 187648 [details] patch Nice find. I think you are correct. theTableReader should be closed if we detect no registry change.
Oleg, please review the patch.
Looks good to me.
patch released.