I am implementing a GUI (swing) Application comprising three bundles, let say bundleA, bundleB, and bundleC. I install all these three bundles in/using a separate installer bundle using BundleContext.installBundle(String location) method.
The problem starts when I use another bundle named "UpgradeBundle" to update one of the three already installed bundles. To be more precise I call BundleC.update(null) method followed by the call to FrameworkWiring.refreshBundles(BundlesForRefresh, null) method, as I read that bundle update requires call to FrameworkWiring.refreshBundles. However the call to FrameworkWiring.refreshBundles results in launching a new GUI application with updated bundle (instead of updating it in already running application instance), while already running application keeps on running with old bundle. Any idea why this is happening?
If you need more elaboration on the problem, please let me know, and I will try to explain the problem further.
P.S. I am using Equinox OSGi framework.