Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Best way to trigger the confapply command?(What is the best solution to call the confapply command automatically ?)
icon5.gif  Best way to trigger the confapply command? [message #525075] Mon, 05 April 2010 17:59
Anthony Dahanne is currently offline Anthony DahanneFriend
Messages: 9
Registered: March 2010
Location: Montreal
Junior Member
Hello everyone,
I already posted a thread in the p2 forum asking how to automatically install new bundles in equinox with p2 director: 9&#msg_524429
To sum up with , I want to add IU(s) to a running equinox and to start them automatically.
Today, I' m using p2 director to install the IUs to my target equinox (in its plugins and features directories)
To start these bundles without restarting my target platform, I connect to my target platform OSGi console and type :

Then my IUs are started, according to p2.inf instructions I gave.
But that's not enough !
I would like my target platform to do this automatically, without waiting for me to type in this command.
To solve this issue, I'm about to create a new bundle, that will check every 30 seconds if the file changed, if so, it will call confapply using this API :

	public void start(BundleContext context) throws Exception {
		plugin = this;
		FileMonitor fileMonitor = FileMonitor.getInstance();
		FileChangeListener listener = new FileChangeListener() {
			public void fileChanged(String filename) {
				ServiceTracker tracker = new ServiceTracker(Activator.this.context, Configurator.class.getName(), null);;
				Configurator configurator = (Configurator) tracker.getService();
				try {
				} catch (IOException e) {
		fileMonitor.addFileChangeListener(listener , BUNDLES_INFO, 30000);

But I think that this new feature should be part of the Equinox project...
Is it planned to add such a functionality (bundle discoverer and confapply triggerer) into the Equinox project ?
If not, is there a reason for that ? Should I do this differently to comply with the Equinox standards ?
Thank you very much for your help,

Previous Topic:[p2] Power User UI for P2
Next Topic:How to modularize a JSF/Facelets/Spring application with OSGi?
Goto Forum:

Current Time: Sun May 20 23:38:41 GMT 2018

Powered by FUDForum. Page generated in 0.01819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top