Search

30.4.2. JCA Outbound Configuration

download PDF
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.
Table 30.2. Outbound 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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.