On Jul 17, 2009, at 4:35 AM, Fredrik Jonson wrote:

David Jencks wrote:

My guess would be that
- you are using the amq 5.2 rar as supplied by amq, which contains
waaaay too much stuff including the j2ca spec jar.

No, not anymore. I ran into some issues around that in my first attempt.
Instead I package and depend on a custom and adopted version of
geronimo-activemq-ra.

- the classloader for the rar does not have the jee-specs plugin as a
parent (or, rather, ancestor).

So the rar is loading the javax.resource classes in its own classloader
and openejb is trying to load them in the jee-specs  classloader.

Yes, that sounds more likely. Neither my custom version of the activemq-broker or the geronimo-activemq-ra plugin project pom have any geronimo module as parent. Is that the correct way to share ancestor? Or perhaps it doesn't have anything to do with dependencies in the pom, but rather is a matter of how
the plan.xml is configured?

What configuration for the car-maven-plugin decides which classloader a plugin
will use? Does it have anything with the category tag?

so, basically plugin == classloader + services. The classloader is described by the environment element in the geronimo plan. If you are using the car-maven-plugin to package the plugin, it will construct the environment element from your maven dependencies. So if you have a maven dependency on e.g. jee-specs, that will turn into a parent classloader of your plugin. You should do this :-)


Can I ask why you aren't using 2.2-SNAPSHOT and/or porting our amq 5.x
integration back to 2.1.x? AMQ 5.2 did have some tck issues in
geronimo which is why we are using 5.3-SNAPSHOT and hoping for a
imminent 5.3 release.

Yes, I'm also hoping that both the AMQ 5.3 and G 2.2 release are imminent.
The gotcha is that our product release is even more imminent.

I considered backporting the 2.2 plugins but was concerned the project would depend to much on 2.2-specific functionality in dependencies. Also it seemed less invasive to just cut out those few modules that depended on ActiveMQ, and replace just the broker and as little as possible otherwise. Hindsight
maybe that wasn't the best assumption. ;)


What I would try is:

-- copy the activemq-broker and rar modules from 2.2 to your project, changing the groupId -- look at the g. 2.2 processed plans and copy all the dependencies into the pom (in 2.2 geronimo follows maven transitive dependencies, in 2.1 geronimo does not, so you need more maven dependencies listed in 2.1)
-- change the amq version to 5.2 if you want

In production you probably don't need any of the other bits from the activmq integration like the admin console stuff.

Another aspect is that we've had good experience with the stability of 5.2 used as a standalone broker for our use cases. I don't know to what extent 5.3 has been tested, so that would seem like a bit of a uncertain choice.

On the other hand 5.3 definitely has some bug fixes over 5.2. But if 5.2 works for you.... use it.

thanks
david jencks

--
Fredrik Jonson

Reply via email to