activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: [DISCUSS] OSGi support for Artemis
Date Mon, 16 Nov 2015 13:42:09 GMT
I agree we should try to get rid of the split packages. They are even a 
problem in plain java as you could easily create the same class
in both without noticing at fist.

A big ueber jat could be a kind of stop gap solution but I think it 
makes sense to try to avoid it if the effort is not too big.

I do not like the fragment approach too much. I personally only consider 
fragments if I need to make some existing jar work and can not change 
it. It might be a last resort if the split packages can not be resolved 
in any other way.

Do you have a good way to find all the split packages? I think the first 
thing we should do is get a complete list of all split packages. Then we 
can decide what to do.
If there is no automated way I can make a list.

The next step would be to add the maven bundle plugin with defaults and 
see what results it produces.

After that we need to see if we can make the plugin mechanism work for 
OSGi. It seems that for example the protocols use the ServiceLoader to 
announce their impls. That might be covered by Aries spi-fly though
I do not have any experience with it.

In any case I am willing to help with the OSGi effort.


On 13.11.2015 15:21, Guillaume Nodet 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

Christian Schneider

Open Source Architect

View raw message