Re: [osgi-dev] Same interface implemented multiple times
Hi Mirko Not sure what exactly is in your API packages (like anything implementation specific that would complicate the following), No implementation specific resides inside this shared API, just plain interfaces and abstract classes, imported and exported between bundles. All the implementation details for each JMS provider is done inside the satellite bundles (together with specific jars libs). The main bundle doesn't have to know anything about any implementation, it just works with interfaces, but you should try to extract all these packages to a single bundle that is used by all your satellite bundles as well as the the main bundle. Ok, i'll try that. As a result these API's get only loaded by one single classloader and you won't ran into your current problems (the main bundle class loader could only handle the same type coming from one class loader. There is no type cast taking the class loader into account, which would be necessary in your scenario). I'll get back to you after i'm testing this idea. btw.: your framework should tell you why the other bundles are not resolved! Nope, the framework (Eclipse Equinox) does not throw any problems, just the traces (sys.outs) doesn't appear for all satellite bundles. regards, Daniel On Thu, Jun 4, 2009 at 4:56 PM, Daniel Dumitrescu dumitrescu.dan...@gmail.com wrote: Hi guys I'm really new on this mailing list, so I say hello to all. I'm facing a problem that may seems pretty simple. but in the last couple of weeks it driven me crazy: I want to have a plugin working with different implementations of javax.jms package (all the libs and stuff) from different providers, like JBoss, ActiveMQ and so on, and also I want to separate these different implementations in different OSGi bundles, that may be used by my plugin. This package, javax.jms. and another one, like another one, my.package.myinterface are exported by the satellite bundles (the ones with different JMS imlpementations) and imported into this main plugin that works with them. The weird thing is that when i try to start this main plugin only one of the satellite plugins is spawned (installed started), and i need all the plugins to start up. Also, it seems that the class path somehow mixes up, although it seems that every plugin has its own classloader. In my main plugin i don;t have anything like require-bundle things, just import javax.jms and my.package.myinterface. Did i do something wrong, or the OSGi specifications are this way? Can anyone help me? Thanx regards, Daniel ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
Re: [osgi-dev] Same interface implemented multiple times
On Fri, Jun 5, 2009 at 9:32 AM, Daniel Dumitrescu dumitrescu.dan...@gmail.com wrote: but you should try to extract all these packages to a single bundle that is used by all your satellite bundles as well as the the main bundle. Ok, i'll try that. This is equivalent to Richards 2. proposal... btw.: your framework should tell you why the other bundles are not resolved! Nope, the framework (Eclipse Equinox) does not throw any problems, just the traces (sys.outs) doesn't appear for all satellite bundles. you can try to start these bundles manually. Usually then you see the error. Alternatively you can try diag bundleID to get some more information. Hope that helps a bit, Mirko ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
[osgi-dev] Multiple ServiceReference for one ServiceRegistration ?
Hi OSGi Experts, I have a question in the core spec. -- 6.1.23 public interface ServiceReference extends Comparable page 186 in R4.1 Core Spec Every service registered in the Framework has a unique ServiceRegistration object and may have multiple, distinct ServiceReference objects referring to it. -- What kind of cases are multiple ServiceReference objects are needed for a unique ServiceRegistration? (only one object is needed, IMO). # Does it mean there might be a framework impl, which returns distinct # ServiceReference objects for every time when # BundleContext#getServiceReference(s) is called, # although it is not required in theory ? Best regards, - NTT Cyber Solutions Laboratories Ikuo YAMASAKI E-mail: yamasaki.i...@lab.ntt.co.jp TEL +81-46-859-8537 FAX +81-46-855-1282 ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
Re: [osgi-dev] Multiple ServiceReference for one ServiceRegistration ?
Yes. It means it is legal for a framework impl to return multiple distinct ServiceReference objects for a given service. So a bundle must not rely on == and must instead use equals() when trying to determine if 2 ServiceReferences refer to the same service. This is standard behavior for Maps. BTW The thunking layer of the framework 2.0 prototype Peter and I presented at JavaOne relies on this. BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance hargr...@us.ibm.com Office: +1 386 848 1781 Mobile: +1 386 848 3788 - Original Message - From: Ikuo Yamasaki [yamasaki.i...@lab.ntt.co.jp] Sent: 06/05/2009 08:08 PM ZE9 To: osgi-dev@mail.osgi.org Subject: [osgi-dev] Multiple ServiceReference for one ServiceRegistration ? Hi OSGi Experts, I have a question in the core spec. -- 6.1.23 public interface ServiceReference extends Comparable page 186 in R4.1 Core Spec Every service registered in the Framework has a unique ServiceRegistration object and may have multiple, distinct ServiceReference objects referring to it. -- What kind of cases are multiple ServiceReference objects are needed for a unique ServiceRegistration? (only one object is needed, IMO). # Does it mean there might be a framework impl, which returns distinct # ServiceReference objects for every time when # BundleContext#getServiceReference(s) is called, # although it is not required in theory ? Best regards, - NTT Cyber Solutions Laboratories Ikuo YAMASAKI E-mail: yamasaki.i...@lab.ntt.co.jp TEL +81-46-859-8537 FAX +81-46-855-1282 ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev