Jean-Baptiste Onofré wrote: > > I think the problem is with your Import-Package statement. > > For example, if you have something like that: > > <Export-Package>my.package*</Export-Package> > <Import-Package>other,*</Export-Package> > > It's totally possible that my.package* comes from another same bundle in > another version. > > The good approach is to have: > > <Export-Package>my.package*;version=xx</Export-Package> > <Import-Package>my.package*;version=xx,*</Import-Package> > > or > > <Export-Package>my.package*;version=xx</Export-Package> > <Import-Package>!my.package*,*</Import-Package> > > like this, you are sure that you use the package provided by your bundle > (and not by another same bundle in a different version). > >
Your suggestion is absolutely spot on. Once I had proper exports and imports, both versions run fine. Jean-Baptiste Onofré wrote: > > If the configuration is the same, you can use the same (same PID) for > both 1.0.0 and 1.1.0. It's only the usage of the same PID via the > ConfigAdmin service. > However, if the configuration is different between 1.1.0 and 1.0.0, in > that case, you have to use different PID, or add a version property to > filter. > > If I use the same PID, only one bundle consumes the configuration. Update method for the second one is not called. Am I doing something wrong? Anyway, I wonder what is the proper way to configure bundles with multiple versions installed? There is a possibility for a conflict as you mentioned. I will most likely just have one PID per version and upon installation of a new version of a bundle just copy configuration from the latest version. Cheers -- View this message in context: http://karaf.922171.n3.nabble.com/Problems-with-two-versions-of-the-same-bundle-tp3267839p3280481.html Sent from the Karaf - User mailing list archive at Nabble.com.
