30.4.2. JCA Outbound Configuration
The outbound configuration remains unchanged because it defines connection factories that are used by Java EE components. These Connection Factories can be defined inside a configuration file that matches the name
*-ds.xml
. A default jms-ds.xml
configuration file is located in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/jms-ds.xml
. The connection factories defined in this file inherit their properties from the main ra.xml
configuration but can also be overridden. The following example shows how to override them.
<tx-connection-factory> <jndi-name>RemoteJmsXA</jndi-name> <xa-transaction/> <rar-name>jms-ra.rar</rar-name> <connection-definition> org.hornetq.ra.HornetQRAConnectionFactory </connection-definition> <config-property name="SessionDefaultType" type="String">javax.jms.Topic </config-property> <config-property name="ConnectorClassName" type="String"> org.hornetq.core.remoting.impl.netty.NettyConnectorFactory </config-property> <config-property name="ConnectionParameters" type="String"> port=5445 </config-property> <max-pool-size>20</max-pool-size> </tx-connection-factory>
In this example the connection factory is bound to JNDI with the name
RemoteJmsXA
and can be looked up in the usual way using JNDI or defined within the EJB or MDB as such:
@Resource(mappedName="java:/RemoteJmsXA") private ConnectionFactory connectionFactory;
The
config-property
elements are what overrides those in the ra.xml
configuration file. Any of the elements pertaining to the connection factory can be overridden here.
The outbound configuration also defines additional properties in addition to the global configuration properties.
Property Name | Property Type | Property Description |
---|---|---|
SessionDefaultType | String | the default session type |
UseTryLock | Integer | try to obtain a lock within specified number of seconds. less than or equal to 0 disable this functionality |