You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Quintin Beukes <qu...@skywalk.co.za> on 2010/01/15 18:54:45 UTC

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Hey,

I'll do this.

To use ActiveMQ with embedded OpenEJB, I just create a MDB and post
messages to it?

Quintin Beukes



On Thu, Jan 14, 2010 at 1:39 AM, David Blevins <da...@visi.com> wrote:
>
> On Jan 13, 2010, at 11:18 AM, Andy Gumbrecht wrote:
>
>> Is there a reason why such an 'old' activemq version is being used? - 4.x
>> is really only for jdk1.4.
>
> IIRC some package and class names changed between 4.x and 5.x so it wasn't
> possible to support them both without a bit of reflection (and there really
> wouldn't need to be much).
>
> If someone wanted to give it a whirl here's the factory class that creates
> the broker:
>
>  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java
>
> And I think it was the super class of this class that was moved between 4.x
> and 5.x:
>
>  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/OpenEjbBrokerFactory.java
>
> One approach might be to rename the "OpenEjbBrokerFactory" to
> "ActiveMQ4BrokerFactory", create another that is "ActiveMQ5BrokerFactory"
> and have the ActiveMQResourceAdapter use reflection to try and load each and
> use the first one that loads.  Or some flavor of that -- could take the same
> approach and have two different ActiveMQ${version}ResourceAdapter factories
> with a generic reflection based ActiveMQResourceAdapter factory.
>
> -David
>
>
>
>

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by David Blevins <da...@visi.com>.
On Jan 27, 2010, at 8:06 PM, Jean-Louis MONTEIRO wrote:

>
> Before going ahead, i'd like to share a patch file.
> I did some refactoring and before going ahead i want to share it  
> with you to
> get your opinion.
>
> Will try to push it today is possible.

If it takes too long maybe just share the intent of the refactoring.   
I'm generally not fond of splitting out the ActiveMQ Resource Adapter  
(or any other "can't run without" service).

The v4 stuff seems unavoidable if we want to continue to support it,  
but still makes me cringe.


-David


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.

Andy Gumbrecht wrote:
> 
> I was working on this as your email came in.
> I shall post a revised patch at 
> https://issues.apache.org/jira/browse/OPENEJB-1227 within the next half 
> hour.
> 
> Changes:
> Module renamed to: OpenEJB :: Container :: ActiveMQ4
> Artifact renamed to: openejb-activemq4
> Prefix:
>      openejb - loads org.apache.openejb.resource.activemq.ActiveMQ5Factory
>      amq5factory- loads 
> org.apache.openejb.resource.activemq.ActiveMQ5Factory
>      amq4factory - loads 
> org.apache.openejb.resource.activemq.ActiveMQ4Factory
> 
> As far as I know the 'openejb' properties can only contain one 'class' 
> entry, so this is to be (as stated above) ActiveMQ5Factory.
> 

Awesome!
Thanks again for this great contribution.

Jean-Louis

-- 
View this message in context: http://n4.nabble.com/Re-OpenEJB-3-1-2-maven-build-broken-due-to-ActiveMQ-dependency-tp1015106p1414818.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Andy <an...@orprovision.com>.
On 28.01.2010 23:38, Jean-Louis MONTEIRO wrote:
> Hey Andy,
>
> sorry for the very long delay.
>
> Firstly, i believed we could refactor some activemq integration before
> checking in your patch.
> But, to be honest, i'm not really happy with that refactoring because it
> makes things more complicated.
>
> So i plan to CI your patch asap (thx again for the good job).
> If we all agree, i gonna just rename the prefix as proposed by David
> (amq4factory and amq5factory).
>
> But i'd really like to keep backward compatibility. So, can you have a look
> on how we can still use openejb: prefix?
>
> If you have other topics/jira/features you want to work on, feel free to
> push a post, a jira, a patch ... I'd be more than happy to commit it for
> you. Help is always welcome.
>
> Jean-Louis
>
>    
I was working on this as your email came in.
I shall post a revised patch at 
https://issues.apache.org/jira/browse/OPENEJB-1227 within the next half 
hour.

Changes:
Module renamed to: OpenEJB :: Container :: ActiveMQ4
Artifact renamed to: openejb-activemq4
Prefix:
     openejb - loads org.apache.openejb.resource.activemq.ActiveMQ5Factory
     amq5factory- loads 
org.apache.openejb.resource.activemq.ActiveMQ5Factory
     amq4factory - loads 
org.apache.openejb.resource.activemq.ActiveMQ4Factory

As far as I know the 'openejb' properties can only contain one 'class' 
entry, so this is to be (as stated above) ActiveMQ5Factory.

____________
Virus checked by G Data AntiVirus
Version: AVA 19.9823 dated 28.01.2010


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hey Andy,

sorry for the very long delay.

Firstly, i believed we could refactor some activemq integration before
checking in your patch.
But, to be honest, i'm not really happy with that refactoring because it
makes things more complicated.

So i plan to CI your patch asap (thx again for the good job).
If we all agree, i gonna just rename the prefix as proposed by David
(amq4factory and amq5factory).

But i'd really like to keep backward compatibility. So, can you have a look
on how we can still use openejb: prefix?

If you have other topics/jira/features you want to work on, feel free to
push a post, a jira, a patch ... I'd be more than happy to commit it for
you. Help is always welcome.

Jean-Louis

-- 
View this message in context: http://n4.nabble.com/Re-OpenEJB-3-1-2-maven-build-broken-due-to-ActiveMQ-dependency-tp1015106p1401324.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Andy Gumbrecht <an...@orprovision.com>.
On 27.01.2010 20:06, Jean-Louis MONTEIRO wrote:
> Before going ahead, i'd like to share a patch file.
> I did some refactoring and before going ahead i want to share it with you to
> get your opinion.
>
> Will try to push it today is possible.
>
> Jean-Louis
>
>
>    
I'll take a pew.

Andy.

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Before going ahead, i'd like to share a patch file.
I did some refactoring and before going ahead i want to share it with you to
get your opinion.

Will try to push it today is possible.

Jean-Louis


-- 
View this message in context: http://n4.nabble.com/Re-OpenEJB-3-1-2-maven-build-broken-due-to-ActiveMQ-dependency-tp1015106p1311974.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by David Blevins <da...@visi.com>.
On Jan 26, 2010, at 8:09 PM, Jean-Louis MONTEIRO wrote:

>
>
> David Blevins wrote:
>>
>> Right, exactly.  Was just going to post that.  That prefix works just
>> fine.  Or even just "amq4factory" and "amq5factory" or something.
>>
>
> Just as a side note, i would like to keep things working between  
> previous
> version and the next one.
> With that said openejb:broker should still work (IMHO).

Good thinking.

> I started refactoring some small things around activemq to see how  
> it works.
> We already have a module openejb-activemq to start a server. Don't  
> know if
> it's still relevant.

Still used.  Allows you to start an ActiveMQ broker rather than just  
connect to one via the Resource Adapter.

> I had in mind something like:
> - openejb-activemq --> lastest activemq integration
> - openejb-activemq4 --> oldest version
>
> So IMO, the broker factory should go to those modules and disappear  
> from the
> core.

Downside of that is we'd loose the ability to unit test MDBs in  
openejb-core.  The one class in server/openejb-activemq is very server- 
specific and couldn't be moved into container/.

-David


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.

David Blevins wrote:
> 
> Right, exactly.  Was just going to post that.  That prefix works just  
> fine.  Or even just "amq4factory" and "amq5factory" or something.
> 

Just as a side note, i would like to keep things working between previous
version and the next one.
With that said openejb:broker should still work (IMHO).
We can make default to amq5 as proposed by Andy.


David Blevins wrote:
> 
> Anyway, on the openejb-legacy concept, let's go with a tight and  
> focused openejb-activemq4 module.  I've done the bucket "legacy" thing  
> before and doesn't play out well over years.  Ends up a "junk drawer"  
> that no one ever cleans out.
> 

I started refactoring some small things around activemq to see how it works.
We already have a module openejb-activemq to start a server. Don't know if
it's still relevant.

I had in mind something like:
- openejb-activemq --> lastest activemq integration
- openejb-activemq4 --> oldest version

So IMO, the broker factory should go to those modules and disappear from the
core.

Jean-Louis

-- 
View this message in context: http://n4.nabble.com/Re-OpenEJB-3-1-2-maven-build-broken-due-to-ActiveMQ-dependency-tp1015106p1310711.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by David Blevins <da...@visi.com>.
On Jan 26, 2010, at 3:47 PM, Andy Gumbrecht wrote:

>
>> I would prefer something like
>> openejb:activemq5:broker:(...)
>> or
>> openejb:activemq4:broker:(...)
>>
>> Would like to get your opinion?
>> Thanks a lot for the great contribution.
>>
>> Jean-Louis
>>

[...]
> static final private FactoryFinder brokerFactoryHandlerFinder
> = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");

>
> It (the implementation) then looks for a properties file at 'META- 
> INF/services/org/apache/activemq/broker/[openejb5]'
> which it splits (using ':') from the broker URL.
>
> The property files simply contain the BrokerFactoryHandler class  
> names.
>
> We could change/rename the property file names to  
> 'openejb.activemq5' and 'openejb.activemq4' for example (any valid  
> file name will do).
> ActiveMQFactory.getBrokerMetaFile() would just need to return the  
> correct prefix/filename.
>
> The URL would be - openejb.activemq5:broker:(...)
> The property file would then be - 'META-INF/services/org/apache/ 
> activemq/broker/openejb.activemq5'


Right, exactly.  Was just going to post that.  That prefix works just  
fine.  Or even just "amq4factory" and "amq5factory" or something.

Anyway, on the openejb-legacy concept, let's go with a tight and  
focused openejb-activemq4 module.  I've done the bucket "legacy" thing  
before and doesn't play out well over years.  Ends up a "junk drawer"  
that no one ever cleans out.

On the test case front, I wonder if we can simply add a TestSuite that  
pulls in all the tests we want to run in the openejb-activemq4 module?

-David


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Andy Gumbrecht <an...@orprovision.com>.
> I would prefer something like
> openejb:activemq5:broker:(...)
> or
> openejb:activemq4:broker:(...)
>
> Would like to get your opinion?
> Thanks a lot for the great contribution.
>
> Jean-Louis
>    

Hi Jean-Louis,

I would agree, but the path prefix is defined internally by the ActiveMQ 
implementation - i.e, not by me.
I only found this out by checking out the ActiveMQ source during my 
investigation.

The path is defined in both BrokerFactory implementations of MQ4 and MQ5 
like so...

static final private FactoryFinder brokerFactoryHandlerFinder
= new FactoryFinder("META-INF/services/org/apache/activemq/broker/");

It (the implementation) then looks for a properties file at 
'META-INF/services/org/apache/activemq/broker/[openejb5]'
which it splits (using ':') from the broker URL.

The property files simply contain the BrokerFactoryHandler class names.

We could change/rename the property file names to 'openejb.activemq5' 
and 'openejb.activemq4' for example (any valid file name will do).
ActiveMQFactory.getBrokerMetaFile() would just need to return the 
correct prefix/filename.

The URL would be - openejb.activemq5:broker:(...)
The property file would then be - 
'META-INF/services/org/apache/activemq/broker/openejb.activemq5'


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.

Andy Gumbrecht wrote:
> 
> The broker properties file prefix name must be determined at runtime - 
> i.e. 'openejb4:' or 'openejb5:'.
> The ActiveMQFactory provides this name via 
> ActiveMQFactory.getBrokerMetaFile() which returns
> the available/loaded prefix.
> 

Hi Andy, 

it looks really nice.
Using namespace prefixes to load factories is great and easily extensible.
Actually, "openejb4" and "openejb5" seems a bit confusing to me!
I would prefer something like 
openejb:activemq5:broker:(...)
or 
openejb:activemq4:broker:(...)

Would like to get your opinion?
Thanks a lot for the great contribution.

Jean-Louis
-- 
View this message in context: http://n4.nabble.com/Re-OpenEJB-3-1-2-maven-build-broken-due-to-ActiveMQ-dependency-tp1015106p1290303.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Andy <an...@orprovision.com>.
Consider it done..

> Can you attach the patch to this jira?
>
>  https://issues.apache.org/jira/browse/OPENEJB-1227
>
>
> -David
>
>


____________
Virus checked by G Data AntiVirus
Version: AVA 19.9771 dated 25.01.2010


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by David Blevins <da...@visi.com>.
On Jan 23, 2010, at 2:14 PM, Andy wrote:

> Ok, I was kidding myself. My test was somewhat flawed.
> However, I am sure that I have it covered now, including poms.
> If someone in authority could check my suggested  trunk patch I'd be  
> grateful.
> (against - http://svn.apache.org/repos/asf/openejb/trunk/openejb3)
>
> The 'challenge' was actually within the BrokerFactory implementation -
>
> static final private FactoryFinder brokerFactoryHandlerFinder
> = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");
>
> ...defines the discovery location prefix of the properties file to  
> load in order to determine which handler class to load.
>
> Reflection is required to call the appropriate methods on the  
> available BrokerFactoryHandler.
> For this purpose I created an ActiveMQFactory which masks either  
> ActiveMQ5Factory or ActiveMQ4Factory
> depending on the available library.
> This resolves the broken 'BrokerFactory.BrokerFactoryHandler'  
> interface issue between versions 4 and 5.
>
> The broker properties file prefix name must be determined at runtime  
> - i.e. 'openejb4:' or 'openejb5:'.
> The ActiveMQFactory provides this name via  
> ActiveMQFactory.getBrokerMetaFile() which returns
> the available/loaded prefix.
>
> I created a new project - OpenEJB :: Container :: Legacy (Which  
> could actually host other legacy issues).
> This project hosts the ActiveMQ4Factory and tests against ActiveMQ  
> 4.1.1 rather than 5.0.3.
> The jar this creates can remain in the release as it will only load  
> mq4 if the mq4 jars are on the classpath and
> the mq5 jars are removed - mq5 jars take precedence.
>
> I hope this helps, and doesn't tread on anyone's toes!

No, this is fantastic!  Can you attach the patch to this jira?

  https://issues.apache.org/jira/browse/OPENEJB-1227

Primary reason is we need you to check that little box that says you  
agree we can include it in the source before we can check this in.

Really great.  If you want to hack on any EJB 3.1 stuff, feel free.   
The project can always use more good help.


-David


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Andy <an...@orprovision.com>.
Ok, I was kidding myself. My test was somewhat flawed.
However, I am sure that I have it covered now, including poms.
If someone in authority could check my suggested  trunk patch I'd be 
grateful.
(against - http://svn.apache.org/repos/asf/openejb/trunk/openejb3)

The 'challenge' was actually within the BrokerFactory implementation -

static final private FactoryFinder brokerFactoryHandlerFinder
  = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");

...defines the discovery location prefix of the properties file to load 
in order to determine which handler class to load.

Reflection is required to call the appropriate methods on the available 
BrokerFactoryHandler.
For this purpose I created an ActiveMQFactory which masks either 
ActiveMQ5Factory or ActiveMQ4Factory
depending on the available library.
This resolves the broken 'BrokerFactory.BrokerFactoryHandler' interface 
issue between versions 4 and 5.

The broker properties file prefix name must be determined at runtime - 
i.e. 'openejb4:' or 'openejb5:'.
The ActiveMQFactory provides this name via 
ActiveMQFactory.getBrokerMetaFile() which returns
the available/loaded prefix.

I created a new project - OpenEJB :: Container :: Legacy (Which could 
actually host other legacy issues).
This project hosts the ActiveMQ4Factory and tests against ActiveMQ 4.1.1 
rather than 5.0.3.
The jar this creates can remain in the release as it will only load mq4 
if the mq4 jars are on the classpath and
the mq5 jars are removed - mq5 jars take precedence.

I hope this helps, and doesn't tread on anyone's toes!

Andy Gumbrecht.




____________
Virus checked by G Data AntiVirus
Version: AVA 19.9735 dated 23.01.2010

Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by Andy <an...@orprovision.com>.
Is there a way to get maven to conditionally compile certain classes 
against different artifact versions of ActiveMQ within the same project?

I have a working build against 5.3.0 (replaced 4.1.1), but can't see a 
way of keeping 'ActiveMQ4Factory' in the same project (see below) - I 
currently have a separate module/jar containing the ActiveMQ4Factory 
class, which only gets loaded if mq5 ra jars are swapped out with mq4.

package org.apache.openejb.resource.activemq;

import org.apache.activemq.broker.BrokerService;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URI;
import java.util.Properties;

public class ActiveMQFactory {

     private static final Method setThreadProperties;
     private static final Method createBroker;

     static {

         Class c = null;
         try {
             c = 
Class.forName("org.apache.openejb.resource.activemq.ActiveMQ5Factory");
         } catch (ClassNotFoundException e1) {
             try {
                 c = 
Class.forName("org.apache.openejb.resource.activemq.ActiveMQ4Factory");
             } catch (ClassNotFoundException e2) {
                 throw new RuntimeException("Unable to load 
ActiveMQFactory");
             }
         }

         try {
             setThreadProperties = 
c.getDeclaredMethod("setThreadProperties", new Class[]{Properties.class});
         } catch (NoSuchMethodException e) {
             throw new RuntimeException("Unable to create 
ActiveMQFactory setThreadProperties method");
         }

         try {
             createBroker = c.getDeclaredMethod("createBroker", new 
Class[]{URI.class});
         } catch (NoSuchMethodException e) {
             throw new RuntimeException("Unable to create 
ActiveMQFactory setThreadProperties method");
         }
     }

     public static void setThreadProperties(final Properties p) {
         try {
             setThreadProperties.invoke(null, p);
         } catch (IllegalAccessException e) {
             throw new 
RuntimeException("ActiveMQFactory.setThreadProperties.IllegalAccessException", 
e);
         } catch (IllegalArgumentException e) {
             throw new 
RuntimeException("ActiveMQFactory.setThreadProperties.IllegalArgumentException", 
e);
         } catch (InvocationTargetException e) {
             throw new 
RuntimeException("ActiveMQFactory.setThreadProperties.InvocationTargetException", 
e);
         }
     }

     public BrokerService createBroker(final URI brokerURI) throws 
Exception {
         try {
             return (BrokerService) createBroker.invoke(null, brokerURI);
         } catch (IllegalAccessException e) {
             throw new 
Exception("ActiveMQFactory.createBroker.IllegalAccessException", e);
         } catch (IllegalArgumentException e) {
             throw new 
Exception("ActiveMQFactory.createBroker.IllegalArgumentException", e);
         } catch (InvocationTargetException e) {
             throw new 
Exception("ActiveMQFactory.createBroker.InvocationTargetException", e);
         }
     }
}


On 21.01.2010 15:29, David Blevins wrote:
>
> On Jan 15, 2010, at 6:54 PM, Quintin Beukes wrote:
>
>> Hey,
>>
>> I'll do this.
>>
>> To use ActiveMQ with embedded OpenEJB, I just create a MDB and post
>> messages to it?
>
> To test there are some unit tests that involve MDBs.   There are a few 
> under openejb-core/src/test/java/org/apache/openejb/core/mdb.  There 
> are also tests elsewhere for MDBs -- quite a lot in the iTests.
>
> The work in question is largely on the classes mentioned below.  
> Initially it would be good enough to have a test case that ensured the 
> factory built the correct ActiveMQ resource adapter.  Presuming it 
> does just that then all the other tests should still work.
>
> Feel encouraged to keep asking questions.  Rather impossible to give 
> an single answer that has all the info, so hopefully this is, to coin 
> a new acronym, ETKYG (Enough To Keep You Going).
>
> -David
>
>
>
>>
>> Quintin Beukes
>>
>>
>>
>> On Thu, Jan 14, 2010 at 1:39 AM, David Blevins 
>> <da...@visi.com> wrote:
>>>
>>> On Jan 13, 2010, at 11:18 AM, Andy Gumbrecht wrote:
>>>
>>>> Is there a reason why such an 'old' activemq version is being used? 
>>>> - 4.x
>>>> is really only for jdk1.4.
>>>
>>> IIRC some package and class names changed between 4.x and 5.x so it 
>>> wasn't
>>> possible to support them both without a bit of reflection (and there 
>>> really
>>> wouldn't need to be much).
>>>
>>> If someone wanted to give it a whirl here's the factory class that 
>>> creates
>>> the broker:
>>>
>>>  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java 
>>>
>>>
>>> And I think it was the super class of this class that was moved 
>>> between 4.x
>>> and 5.x:
>>>
>>>  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/OpenEjbBrokerFactory.java 
>>>
>>>
>>> One approach might be to rename the "OpenEjbBrokerFactory" to
>>> "ActiveMQ4BrokerFactory", create another that is 
>>> "ActiveMQ5BrokerFactory"
>>> and have the ActiveMQResourceAdapter use reflection to try and load 
>>> each and
>>> use the first one that loads.  Or some flavor of that -- could take 
>>> the same
>>> approach and have two different ActiveMQ${version}ResourceAdapter 
>>> factories
>>> with a generic reflection based ActiveMQResourceAdapter factory.
>>>
>>> -David
>>>
>>>
>>>
>>>
>>
>
>


____________
Virus checked by G Data AntiVirus
Version: AVA 19.9710 dated 21.01.2010


Re: OpenEJB 3.1.2 maven build broken due to ActiveMQ dependency

Posted by David Blevins <da...@visi.com>.
On Jan 15, 2010, at 6:54 PM, Quintin Beukes wrote:

> Hey,
>
> I'll do this.
>
> To use ActiveMQ with embedded OpenEJB, I just create a MDB and post
> messages to it?

To test there are some unit tests that involve MDBs.   There are a few  
under openejb-core/src/test/java/org/apache/openejb/core/mdb.  There  
are also tests elsewhere for MDBs -- quite a lot in the iTests.

The work in question is largely on the classes mentioned below.   
Initially it would be good enough to have a test case that ensured the  
factory built the correct ActiveMQ resource adapter.  Presuming it  
does just that then all the other tests should still work.

Feel encouraged to keep asking questions.  Rather impossible to give  
an single answer that has all the info, so hopefully this is, to coin  
a new acronym, ETKYG (Enough To Keep You Going).

-David



>
> Quintin Beukes
>
>
>
> On Thu, Jan 14, 2010 at 1:39 AM, David Blevins  
> <da...@visi.com> wrote:
>>
>> On Jan 13, 2010, at 11:18 AM, Andy Gumbrecht wrote:
>>
>>> Is there a reason why such an 'old' activemq version is being  
>>> used? - 4.x
>>> is really only for jdk1.4.
>>
>> IIRC some package and class names changed between 4.x and 5.x so it  
>> wasn't
>> possible to support them both without a bit of reflection (and  
>> there really
>> wouldn't need to be much).
>>
>> If someone wanted to give it a whirl here's the factory class that  
>> creates
>> the broker:
>>
>>  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java
>>
>> And I think it was the super class of this class that was moved  
>> between 4.x
>> and 5.x:
>>
>>  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/OpenEjbBrokerFactory.java
>>
>> One approach might be to rename the "OpenEjbBrokerFactory" to
>> "ActiveMQ4BrokerFactory", create another that is  
>> "ActiveMQ5BrokerFactory"
>> and have the ActiveMQResourceAdapter use reflection to try and load  
>> each and
>> use the first one that loads.  Or some flavor of that -- could take  
>> the same
>> approach and have two different ActiveMQ${version}ResourceAdapter  
>> factories
>> with a generic reflection based ActiveMQResourceAdapter factory.
>>
>> -David
>>
>>
>>
>>
>