Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347617

Summary: Dynamically install/update/remove OSGi bundles placed in the jetty contexts folder.
Product: [RT] Jetty Reporter: Hugues Malphettes <hmalphettes>
Component: osgiAssignee: Hugues Malphettes <hmalphettes>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jetty-inbox
Version: 7.4.2   
Target Milestone: 7.3.x   
Hardware: All   
OS: All   
Whiteboard:

Description Hugues Malphettes CLA 2011-05-30 05:50:38 EDT
It is currently painful with jetty/equinox to install and start a new bundle.

What the developers would like to do is to place a few bundles in a folder and have them installed and started as bundles once the framework has completed the initialization and start of the other bundles.

Eclipse RCP applications provide the support for the dropins folder to achieve this and more complex situations.
However the dropins folder depend on eclipse APIs. Incliding the runtime and the app API.
We cannot add the dropins support without pulling a lot many more dependencies.

This enhancement consists of taking advantage of the the fact that jetty is already scanning some folders for changes.
We can register a listener to the scanner to look for OSGi bundles and start/update/remove them dynamically.

Warning: this is purely for demo and development purpose.
Comment 1 Hugues Malphettes CLA 2011-05-30 05:54:53 EDT
The OSGiAppProvider keeps track of the changes in the contexts folder: it deploys dynamically the webapps that are placed there (http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications).

We extend this behavior to install/update/remove OSGi bundles that are placed in the contexts folder.

The bundles are installed whenever they are discovered.
When they are discovered when the jetty server is started, we wait for the framework to complete its initialization before we start the discovered bundles:
the bundles placed in the contexts folder are started after all the other bundles have been auto-started.
Comment 2 Jesse McConnell CLA 2011-09-20 15:52:32 EDT
Resolved -> Closed