Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330098 - org.eclipse.jetty.osgi.boot does not handle WAB stop event correctly
Summary: org.eclipse.jetty.osgi.boot does not handle WAB stop event correctly
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: osgi (show other bugs)
Version: 7.2.0   Edit
Hardware: PC Windows Vista
: P3 critical (vote)
Target Milestone: 7.2.x   Edit
Assignee: Hugues Malphettes CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-12 10:20 EST by Dmytro Pishchukhin CLA
Modified: 2010-11-19 22:28 EST (History)
2 users (show)

See Also:


Attachments
Equinox with Jetty and test WAB (part 1) (unzip with 7-zip or winzip) (1.46 MB, application/octet-stream)
2010-11-12 10:40 EST, Dmytro Pishchukhin CLA
no flags Details
Equinox with Jetty and test WAB (part 2) (unzip with 7-zip or winzip) (1.03 MB, application/octet-stream)
2010-11-12 10:41 EST, Dmytro Pishchukhin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmytro Pishchukhin CLA 2010-11-12 10:20:31 EST
Build Identifier: jetty-7.2.0.v20101020

Jetty OSGi bundle does not handle Web Application Bundle (WAB) stop event correctly. It does not destroy Web Application context and resources. Web Application resources are still available after bundle stop (even after bundle uninstall)

Reproducible: Always

Steps to Reproduce:
1.install/start web application bundle (e.g. under context /)
2.access web application context in browser (e.g. http://localhost:8080/)
3.stop/uninstall WAB bundle
4.web application context is still available in browser (i.e. servlets/filters/etc. are not destroyed)
Comment 1 Dmytro Pishchukhin CLA 2010-11-12 10:40:43 EST
Created attachment 183002 [details]
Equinox with Jetty and test WAB (part 1) (unzip with 7-zip or winzip)
Comment 2 Dmytro Pishchukhin CLA 2010-11-12 10:41:10 EST
Created attachment 183003 [details]
Equinox with Jetty and test WAB (part 2) (unzip with 7-zip or winzip)
Comment 3 Hugues Malphettes CLA 2010-11-12 13:30:31 EST
Dmytro added that they count on this to restart the web bundles at the end of a p2 update.
We have a bit of backlog to complete the support for WAB as specified and this is one of those things we are not supporting yet.
I'm shooting for this for 7.2.1
Comment 4 Hugues Malphettes CLA 2010-11-12 13:59:51 EST
With additional discussion with Dmytro, this is not related to the package admin events.
This is really a regression with 7.2.0: when the bundle that defines a webapp (aka the WAB) is stopped, the webapp it defines must be stopped and undeployed.
This used to work with 7.1.x and it is broken now.
Comment 5 Hugues Malphettes CLA 2010-11-12 14:03:51 EST
For anyone curious to see a very small distribution of equinox and jetty the attached test case is exactly that:
- 2.5 megs,
- 7 jars including the example web application bundle
- 2 config files: jetty.xml and equinox's config.ini
- sh and bat start scripts
Good to see that the aggregate jar is working in OSGi too and is used by the community.
Comment 6 Hugues Malphettes CLA 2010-11-19 21:58:52 EST
Fixed for 7.2.2
The OSGiAppProvider was relying on an index of the deployed App (object that wraps the ContextHandler) that was not choosing its keys well enough.

I'll try to push a patched 7.2.1 in the jetty p2 repository with this fix Dmytro and will confirm on this bug.
Comment 7 Hugues Malphettes CLA 2010-11-19 22:28:32 EST
http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/7.2.1.v20101111/plugins/org.eclipse.jetty.osgi.boot_7.2.1.v20101111.jar
is patched.

I'll upload a WebStarterKit for a patched 7.2.1 with enough time to run a signed build.