If you have a request for a JMS server that is not in this list, please request this on the users mailing list alias. See the mailing lists page
for more information.
You can configure the JMS BC to connect to an ActiveMQ broker via its built-in, client-side JNDI support. This makes it possible to configure a connection to an external broker or to start an embedded broker for transient messaging on a specified port. For each of these methods, it is advised that you add activemq-all-x.x.x.jar to your domain's classpath (e.g. by dropping it into glassfish\domains\domain1\lib\ext).
NB: This only applies for
One or more destination-neutral connection factories (non-XA) can be declared in the JNDI settings of the JMSJCA options to be read when the InitialContext is created. XA interfaces need to be bound to a JNDI server manually to be used with OpenESB.
| JMSJCA Option | Value | Description |
|---|---|---|
| java.naming.factory.initial | org.apache.activemq.jndi.ActiveMQInitialContextFactory | The client-side JNDI initial context |
| java.naming.provider.url | tcp://host:port | Default is tcp://localhost:61616 |
| connectionFactoryNames | ConnectionFactory,QueueConnectionFactory,TopicConnectionFactory | Any list of names will do and we don't need multiple factories since the ActiveMQConnectionFactory factory retrieved implements each of the ConnectionFactory, QueueConnectionFactory and TopicConnectionFactory |
| JMSJCA.UnifiedCF | ConnectionFactory | As defined in the connectionFactoryNames, above |
| JMSJCA.TopicCF | TopicConnectionFactory | As defined in the connectionFactoryNames, above |
| JMSJCA.QueueCF | QueueConnectionFactory | As defined in the connectionFactoryNames, above |
Sample WSDL:
<service name="JMSOutService">
<port name="Write_OutPort" binding="tns:JMSOutBinding">
<jms:address connectionURL="jndi://" username="admin" password="admin">
<jms:jmsjcaOptions><![CDATA[#For JNDI (ConnectionURL=jndi://)
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
connectionFactoryNames=ConnectionFactory,QueueConnectionFactory,TopicConnectionFactory
JMSJCA.UnifiedCF=ConnectionFactory
JMSJCA.TopicCF=TopicConnectionFactory
JMSJCA.QueueCF=QueueConnectionFactory
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://localhost:61616
#java.naming.provider.url=vm:broker:(tcp://localhost:61617)
]]></jms:jmsjcaOptions>
</jms:address>
</port>
</service>
As above, but set:
java.naming.provider.url=vm://myEmbeddedBroker?create=true&waitForStart=5000
This URL ensures that the first connection created will start the broker (connect=true is the default) and provides a 5 second delay before the connection is formed for the broker to start. More options can be found here
.