Appendix B. ra.xml HornetQ Resource Adapter File

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ -->

<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>HornetQ 2.0 Resource Adapter</description>
   <display-name>HornetQ 2.0 Resource Adapter</display-name>

   <vendor-name>Red Hat Middleware LLC</vendor-name>
   <eis-type>JMS 1.1 Server</eis-type>
   <resourceadapter-version>1.0</resourceadapter-version>

   <license>
      <description>
Copyright 2009 Red Hat, Inc.
 Red Hat 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-required>
   </license>

   <resourceadapter>
      <resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
      <config-property>
         <description>
            The transport type. Multiple connectors can be configured by using a comma separated list,
            i.e. org.hornetq.core.remoting.impl.invm.InVMConnectorFactory,org.hornetq.core.remoting.impl.invm.InVMConnectorFactory.
         </description>
         <config-property-name>ConnectorClassName</config-property-name>
         <config-property-type>java.lang.String</config-property-type>
         <config-property-value>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
      </config-property>
      <config-property>
         <description>The transport configuration. These values must be in the form of key=val;key=val;,
            if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=5445,host=host2;port=5446.
            Each set of params maps to the connector classname specified.
         </description>
         <config-property-name>ConnectionParameters</config-property-name>
         <config-property-type>java.lang.String</config-property-type>
         <config-property-value>server-id=0</config-property-value>
      </config-property>
      <!--
      <config-property>
        <description>Does we support HA</description>
        <config-property-name>HA</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value>false</config-property-value>
      </config-property>
      <config-property>
        <description>The method to use for locating the transactionmanager</description>
        <config-property-name>TransactionManagerLocatorMethod</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value>getTm</config-property-value>
      </config-property>
      <config-property>
        <description>Use A local Transaction instead of XA?</description>
        <config-property-name>UseLocalTx</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value>false</config-property-value>
      </config-property>
      <config-property>
        <description>The user name used to login to the JMS server</description>
        <config-property-name>UserName</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The password used to login to the JMS server</description>
        <config-property-name>Password</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The jndi params to use to look up the jms resources if local jndi is not to be used</description>
        <config-property-name>JndiParams</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory;java.naming.provider.url=jnp://localhost:1199;java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</config-property-value>
      </config-property>
      <config-property>
        <description>The discovery group address</description>
        <config-property-name>DiscoveryAddress</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The discovery group port</description>
        <config-property-name>DiscoveryPort</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The discovery refresh timeout</description>
        <config-property-name>DiscoveryRefreshTimeout</config-property-name>
        <config-property-type>java.lang.Long</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The discovery initial wait timeout</description>
        <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
        <config-property-type>java.lang.Long</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The load balancing policy class name</description>
        <config-property-name>LoadBalancingPolicyClassName</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The client failure check period</description>
        <config-property-name>ClientFailureCheckPeriod</config-property-name>
        <config-property-type>java.lang.Long</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The connection TTL</description>
        <config-property-name>ConnectionTTL</config-property-name>
        <config-property-type>java.lang.Long</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The call timeout</description>
        <config-property-name>CallTimeout</config-property-name>
        <config-property-type>java.lang.Long</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The dups ok batch size</description>
        <config-property-name>DupsOKBatchSize</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The transaction batch size</description>
        <config-property-name>TransactionBatchSize</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The consumer window size</description>
        <config-property-name>ConsumerWindowSize</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The consumer max rate</description>
        <config-property-name>ConsumerMaxRate</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The confirmation window size</description>
        <config-property-name>ConfirmationWindowSize</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The producer max rate</description>
        <config-property-name>ProducerMaxRate</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The min large message size</description>
        <config-property-name>MinLargeMessageSize</config-property-name>
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The block on acknowledge</description>
        <config-property-name>BlockOnAcknowledge</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The block on non durable send</description>
        <config-property-name>BlockOnNonDurableSend</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The block on durable send</description>
        <config-property-name>BlockOnDurableSend</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The auto group</description>
        <config-property-name>AutoGroup</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The max connections</description>        
        <config-property-type>java.lang.Integer</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The pre acknowledge</description>
        <config-property-name>PreAcknowledge</config-property-name>
        <config-property-type>java.lang.Boolean</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The retry interval</description>
        <config-property-name>RetryInterval</config-property-name>
        <config-property-type>java.lang.Long</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The retry interval multiplier</description>
        <config-property-name>RetryIntervalMultiplier</config-property-name>
        <config-property-type>java.lang.Double</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
      <config-property>
        <description>The client id</description>
        <config-property-name>ClientID</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value></config-property-value>
      </config-property>-->

      <outbound-resourceadapter>
         <connection-definition>
            <managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>

            <config-property>
               <description>The default session type</description>
               <config-property-name>SessionDefaultType</config-property-name>
               <config-property-type>java.lang.String</config-property-type>
               <config-property-value>javax.jms.Queue</config-property-value>
            </config-property>
            <config-property>
               <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
               <config-property-name>UseTryLock</config-property-name>
               <config-property-type>java.lang.Integer</config-property-type>
               <config-property-value>0</config-property-value>
            </config-property>

            <connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
            <connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
            <connection-interface>javax.jms.Session</connection-interface>
            <connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class>
         </connection-definition>
         <transaction-support>XATransaction</transaction-support>
         <authentication-mechanism>
            <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
            <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
         </authentication-mechanism>
         <reauthentication-support>false</reauthentication-support>
      </outbound-resourceadapter>

      <inbound-resourceadapter>
         <messageadapter>
            <messagelistener>
               <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
               <activationspec>
                  <activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class>
                  <required-config-property>
                      <config-property-name>destination</config-property-name>
                  </required-config-property>
               </activationspec>
            </messagelistener>
         </messageadapter>
      </inbound-resourceadapter>

   </resourceadapter>
</connector>

		
		
		
		<resourceadapter>
  <resourceadapter-class>
    org.hornetq.ra.HornetQResourceAdapter
  </resourceadapter-class>
  <config-property>
     <description>The transport type</description>
     <config-property-name>ConnectorClassName</config-property-name>
     <config-property-type>java.lang.String</config-property-type>
     <config-property-value>
       org.hornetq.core.remoting.impl.invm.InVMConnectorFactory
     </config-property-value>
  </config-property>
  <config-property>
     <description>
       The transport configuration. These values must be in the form of key=val;key=val;
     </description>
     <config-property-name>ConnectionParameters</config-property-name>
     <config-property-type>java.lang.String</config-property-type>
     <config-property-value>server-id=0</config-property-value>
  </config-property>

  <outbound-resourceadapter>
     <connection-definition>
        <managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnection
        Factory</managedconnectionfactory-class>

        <config-property>
           <description>The default session type</description>
           <config-property-name>SessionDefaultType</config-property-name>
           <config-property-type>java.lang.String</config-property-type>
           <config-property-value>javax.jms.Queue</config-property-value>
        </config-property>
        <config-property>
           <description>Try to obtain a lock within specified number of seconds; less
           than or equal to 0 disable this functionality</description>
           <config-property-name>UseTryLock</config-property-name>
           <config-property-type>java.lang.Integer</config-property-type>
           <config-property-value>0</config-property-value>
        </config-property>

        <connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory
        </connectionfactory-interface>
        <connectionfactory-impl-class>
		org.hornetq.ra.HornetQConnectionFactoryImplonFactoryImpl
        </connectionfactory-impl-class>
        <connection-interface>javax.jms.Session</connection-interface>
        <connection-impl-class>org.hornetq.ra.HornetQRASession
        </connection-impl-class>
     </connection-definition>
     <transaction-support>XATransaction</transaction-support>
     <authentication-mechanism>
        <authentication-mechanism-type>BasicPassword
        </authentication-mechanism-type>
        <credential-interface>javax.resource.spi.security.PasswordCredential
        </credential-interface>
     </authentication-mechanism>
     <reauthentication-support>false</reauthentication-support>
  </outbound-resourceadapter>

  <inbound-resourceadapter>
     <messageadapter>
        <messagelistener>
           <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
           <activationspec>
              <activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec
              </activationspec-class>
              <required-config-property>
                  <config-property-name>destination</config-property-name>
              </required-config-property>
           </activationspec>
        </messagelistener>
     </messageadapter>
  </inbound-resourceadapter>

  </resourceadapter>