[ 
https://issues.apache.org/jira/browse/OPENEJB-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Gumbrecht updated OPENEJB-1227:
------------------------------------

    Attachment: activemq5.patch

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. 

> Support for ActiveMQ 5
> ----------------------
>
>                 Key: OPENEJB-1227
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1227
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: configuration, connectors, integration
>            Reporter: David Blevins
>             Fix For: 3.1.3
>
>         Attachments: activemq5.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to