If there are just a few modules affected, and the reason for split packages is due to some fancy class discovery, or modularity, or something like, it may justify using OSGi fragments.
*Raúl Kripalani* PMC & Committer @ Apache Ignite, Apache Camel | Integration, Big Data and Messaging Engineer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Fri, Nov 13, 2015 at 2:21 PM, Guillaume Nodet <[email protected]> wrote: > I was looking at supporting OSGi deployment for Artemis. > > The first big problem I hit is the existence of split packages. Split > packages are java packages shared across multiple jars (which become > bundles in OSGi). > Examples of those are org.apache.activemq.artemis.uri (shared between > artemis-jms-client and artemis-core-client) or > org.apache.activemq.artemis.api.config (shared between artemis-core-client > and artemis-commons). > The reason they are problematic is that in OSGi, each bundle has its own > class loader, importing classes from other packages based on packages. The > same package can not be imported from 2 different bundles. > > So the question is: would it be possible to get rid of those split packages > ? It can be done either by moving the classes from a jar to another one, > keeping the same package name, or by renaming one of the split package so > that there's no duplicate package names across jars. > > Thoughts ? > Guillaume Nodet >
