[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jetty-dev] Unregistering OSGi web bundles when they are stoped in the framwork
- From: Chris Frost <frostc@xxxxxxxxxx>
- Date: Thu, 29 Mar 2012 05:35:27 -0700 (PDT)
- Delivered-to: email@example.com
We have found a problem using Jetty on OSGi and Windows. Want to check it's actually a bug before raising one. When a web bundle is stopped, Jetty should unregister the webapp and let go of any file handles it has open on it. I don't think this last part is happening as we are unable to delete any files from the webapp until we shut Virgo down, Windows prevents this when a file is still open unlike Mac.
Looking through the code in the Jetty-OSGi-Boot bundle, there seems to be some 'todos' around the area of unregistering. The relevant code seems to be around JettyBootstrapActivator, WebBundleTrackerCustomizer and JettyContextHandlerServiceTracker. There is a comment in the code saying that the WebBundleTrackerCustomizer.unregister method has nothing to do as Jetty listens for services to go down instead but that method is still called a lot and I'm not sure I understand what is happening when JettyContextHandlerServiceTracker tries an unregister, I believe this is the right service tracker to be looking at. Any pointers are appreciated and I'll dig a little deeper.
Christopher Frost - VMware
Virgo from EclipseRT