msp
msp

Reputation: 173

Update OSGi bundles

I'm building an OSGi application using Equinox. It is essential for this application, that the individual bundles can be updated.

The application checks a folder on a HTTP server for new versions of the bundles and if any new bundles are available. If any new bundle is available, the application loads the *.jar file and updates this bundle. The update is performed by stopping the bundle, updating it with the input stream of the loaded file and starting the bundle again.

The problem is, that after updating a file and restarting the application, the old version of the file is used and not the new one.

Michael

Upvotes: 0

Views: 119

Answers (1)

Chris Dolan
Chris Dolan

Reputation: 8973

Consider using the Apache Felix fileinstall bundle for this. It is very useful for watching for new jars and/or .cfg files. Apache Karaf (and its derivatives) have this functionality built in. JBoss AS 7 does too, although with a rather different implementation.

Upvotes: 3

Related Questions