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'

Reply via email to