activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <>
Subject Re: amq 5.4 and osgi/blueprint
Date Sat, 06 Feb 2010 10:17:27 GMT
On Fri, Feb 5, 2010 at 21:01, David Jencks <> wrote:
> For the geronimo 3 amq integration I've been working on getting amq 5.4 to
> run in de-springified osgi/buleprint using the xbean-blueprint
> NamespaceHandler I ported.  I think I have at least a basic broker starting
> up.
> I'd like to make a few changes so this will work better:
> 1. Several classes use what I think are obsolete spring-isms namely
> implementing the spring interfaces InitializingBean, DisposableBean, and
> FactoryBean to tell spring stuff.  IIUC a more up-to-date technique is to
> set this in the xml or, using xbean, using InitMethod and destroyMethod
> annotations.  For the classes that are otherwise not spring-dependent I'd
> like to switch to the xbean annotations.  The classes involved are:
> activemq-pool/src/main/java/org/apache/activemq/pool/
> activemq-camel/src/main/java/org/apache/activemq/camel/component/
> activemq-core/src/main/java/org/apache/activemq/spring/
> activemq-core/src/main/java/org/apache/activemq/spring/
> activemq-core/src/main/java/org/apache/activemq/spring/
> (has other spring-isms)
> activemq-core/src/main/java/org/apache/activemq/broker/util/
> activemq-core/src/main/java/org/apache/activemq/broker/util/
> activemq-core/src/main/java/org/apache/activemq/filter/

I guess we should also annotate those methods with @PostConstruct and
@PreDestroy annotation.
I guess I'm slightly worried that our users configurations will jsut
stop working or behave badly without
much warning about it.  Can xbean or spring automatically detect such
annotations and do the necessary
processing ?

But I'm ok with the principle.

> In addition, I need to expose
> activemq-core/src/main/java/org/apache/activemq/broker/
> to xbean.
> 2. To allow other bundles to interact with amq in osgi, it looks like
> org.apache.activemq.util.osgi.Activator needs to be run.  One possibility
> would be to just install it as the bundle activator for activemq-core, this
> is what I've tried and appears to work OK.  If this doesn't seem like a good
> idea to everyone I think I can just install it as a blueprint bean in a
> geronimo bundle.

What would the activator do ?

A few I was thinking about for a better activemq / osgi integration are:
  * make sure we use version ranges everywhere and define which range we want to
      use for our activemq imports (in camel, we use [2.1,2.2) range
for camel imports and [2,3)
      for other imports
  * rework the discovery mechanism for transports and such so that
it's more OSGI friendly
I guess those are quite independant on the blueprint stuff you're working on.

> Comments?
> thanks
> david jencks

Guillaume Nodet
Open Source SOA

View raw message