|
ActiveMQ example source code file (ra.xml)
This example ActiveMQ source code file (ra.xml) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The ActiveMQ ra.xml source code
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
version="1.5">
<description>ActiveMQ inbound and outbound JMS ResourceAdapter
<display-name>ActiveMQ JMS Resource Adapter
<vendor-name>activemq.org
<eis-type>JMS 1.1
<resourceadapter-version>1.0
<license>
<description>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</description>
<license-required>true
</license>
<resourceadapter>
<resourceadapter-class>org.apache.activemq.ra.ActiveMQResourceAdapter
<config-property>
<description>
The URL to the ActiveMQ server that you want this connection to connect to. If using
an embedded broker, this value should be 'vm://localhost'.
</description>
<config-property-name>ServerUrl
<config-property-type>java.lang.String
<config-property-value>tcp://localhost:61616
<!-- -->
</config-property>
<config-property>
<description>The default user name that will be used to establish connections to the ActiveMQ server.
<config-property-name>UserName
<config-property-type>java.lang.String
<config-property-value>defaultUser
</config-property>
<config-property>
<description>The default password that will be used to log the default user into the ActiveMQ server.
<config-property-name>Password
<config-property-type>java.lang.String
<config-property-value>defaultPassword
</config-property>
<config-property>
<description>The client id that will be set on the connection that is established to the ActiveMQ server.
<config-property-name>Clientid
<config-property-type>java.lang.String
</config-property>
<config-property>
<description>Boolean to configure if outbound connections should reuse the inbound connection's session for sending messages.
<config-property-name>UseInboundSession
<config-property-type>java.lang.Boolean
<config-property-value>false
</config-property>
<!-- NOTE disable the following property if you do not wish to deploy an embedded broker -->
<config-property>
<description>
Sets the XML configuration file used to configure the embedded ActiveMQ broker via
Spring if using embedded mode.
BrokerXmlConfig is the filename which is assumed to be on the classpath unless
a URL is specified. So a value of foo/bar.xml would be assumed to be on the
classpath whereas file:dir/file.xml would use the file system.
Any valid URL string is supported.
</description>
<config-property-name>BrokerXmlConfig
<config-property-type>java.lang.String
<config-property-value>
<!--
To use the broker-config.xml from the root for the RAR
<config-property-value>xbean:broker-config.xml
To use an external file or url location
<config-property-value>xbean:file:///amq/config/jee/broker-config.xml
-->
</config-property>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory
<connectionfactory-interface>javax.jms.ConnectionFactory
<connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory
<connection-interface>javax.jms.Connection
<connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy
</connection-definition>
<connection-definition>
<managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory
<connectionfactory-interface>javax.jms.QueueConnectionFactory
<connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory
<connection-interface>javax.jms.QueueConnection
<connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy
</connection-definition>
<connection-definition>
<managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory
<connectionfactory-interface>javax.jms.TopicConnectionFactory
<connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory
<connection-interface>javax.jms.TopicConnection
<connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy
</connection-definition>
<transaction-support>XATransaction
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword
<credential-interface>javax.resource.spi.security.PasswordCredential
</authentication-mechanism>
<reauthentication-support>false
</outbound-resourceadapter>
<inbound-resourceadapter>
<messageadapter>
<messagelistener>
<messagelistener-type>javax.jms.MessageListener
<activationspec>
<activationspec-class>org.apache.activemq.ra.ActiveMQActivationSpec
<required-config-property>
<config-property-name>destination
</required-config-property>
<required-config-property>
<config-property-name>destinationType
</required-config-property>
</activationspec>
</messagelistener>
</messageadapter>
</inbound-resourceadapter>
<adminobject>
<adminobject-interface>javax.jms.Queue
<adminobject-class>org.apache.activemq.command.ActiveMQQueue
<config-property>
<config-property-name>PhysicalName
<config-property-type>java.lang.String
</config-property>
</adminobject>
<adminobject>
<adminobject-interface>javax.jms.Topic
<adminobject-class>org.apache.activemq.command.ActiveMQTopic
<config-property>
<config-property-name>PhysicalName
<config-property-type>java.lang.String
</config-property>
</adminobject>
</resourceadapter>
</connector>
Other ActiveMQ examples (source code examples)
Here is a short list of links related to this ActiveMQ ra.xml source code file:
|