Is there a way to force bundles to be loaded in a specific order inside of a PAR file? Right now it looks like they are loaded and started alphabetically.
Is there a way to force bundles to be loaded in a specific order inside of a PAR file? Right now it looks like they are loaded and started alphabetically.
It's not alphabetic, as the dm Server will perform some dependency analysis and deploy the bundles in the proper order (i.e. bundles that depend on others are deployed later).
For future releases, support is planned for deployment plans that will allow you to have more control over the deployment order AFAIK. I have no idea when that will be available, though.
Correction: the order of deployment of modules in a PAR file is undefined. It is not necessarily in any kind of dependency order.
The modules of a PAR are first of all installed after which they are started. If Spring DM is used to publish and access services connecting the modules, there should be no problems due to the start order.
Glyn Normington
SpringSource
We have a bundle that provides configuration data to the Configuration Admin. Our other bundles reference these values in their bean definitions via placeholders and the osgixroperty-placeholder element. Our other bundles can’t start if this configuration bundle isn’t loaded first.
Currently I am packaging everything up in a PAR file. Is there a way to force this configuration bundle to be started before the others?
I can't think of a way to achieve this. Might there be a workaround by making each of the bundles have a bundle activator which calls the code to make the configuration available to ConfigurationAdmin? I know this isn't particularly pleasant and so I'd recommend you log a JIRA issue for this requirement so we can take it into account in future releases.
Glyn Normington
SpringSource