此内容没有您所选择的语言版本。

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>
Copy to Clipboard Toggle word wrap
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;
Copy to Clipboard Toggle word wrap
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.
Expand
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

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat