이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 9. Configuring Connection Factories


By default, the JBoss EAP messaging-activemq subsystem provides the InVmConnectionFactory and RemoteConnectionFactory connection factories, as well as the activemq-ra pooled connection factory.

Basic Connection Factories

InVmConnectionFactory references an in-vm-connector and can be used to send and receive messages when both the client and server are running in the same JVM. RemoteConnectionFactory references an http-connector and can be used to send and receive messages over HTTP when the client and server are running in different JVMs.

<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
  <server name="default">
    ...
    <connection-factory name="InVmConnectionFactory" connectors="in-vm" entries="java:/ConnectionFactory"/>
    <connection-factory name="RemoteConnectionFactory" connectors="http-connector" entries="java:jboss/exported/jms/RemoteConnectionFactory"/>
    ...
  </server>
</subsystem>
Copy to Clipboard Toggle word wrap

For more information on the different types of connectors, see the Acceptors and Connectors section.

Add a Connection Factory

You can add a new connection factory using the following management CLI command. When adding a connection factory, you must provide the connectors and the JNDI entries.

/subsystem=messaging-activemq/server=default/connection-factory=MyConnectionFactory:add(entries=[java:/MyConnectionFactory],connectors=[in-vm])
Copy to Clipboard Toggle word wrap

Configure a Connection Factory

You can update a connection factory’s settings using the management CLI.

/subsystem=messaging-activemq/server=default/connection-factory=MyConnectionFactory:write-attribute(name=thread-pool-max-size,value=40)
Copy to Clipboard Toggle word wrap

For information on the available attributes for a connection factory, see Connection Factory Attributes.

Remove a Connection Factory

You can remove a connection factory using the management CLI.

/subsystem=messaging-activemq/server=default/connection-factory=MyConnectionFactory:remove
Copy to Clipboard Toggle word wrap

Pooled Connection Factories

The JBoss EAP messaging-activemq subsystem provides a pooled connection factory that allows you to configure the inbound and outbound connectors of the integrated ActiveMQ Artemis resource adapter. For more information on configuring a pooled-connection-factory to connect to a remote ActiveMQ Artemis server, see Using the Integrated Resource Adapter for Remote Connections.

<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
  <server name="default">
    ...
    <pooled-connection-factory name="activemq-ra" transaction="xa" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm"/>
  </server>
</subsystem>
Copy to Clipboard Toggle word wrap

There are several unique characteristics of a pooled connection factory:

  • It is only available to local clients, though it can be configured to point to a remote server. For more information on connecting to a remote ActiveMQ Artemis server, see Using the Integrated Artemis Resource Adapter for Remote Connections.
  • It should only be used to send messages when looked up in JNDI or injected.
  • It can be configured to use security credentials, which is useful if it is pointing to a secured remote server.
  • Resources acquired from it will be automatically enlisted in any ongoing JTA transactions.

Add a Pooled Connection Factory

You can add a new pooled connection factory using the following management CLI command. When adding a connection factory, you must provide the connectors and the JNDI entries.

/subsystem=messaging-activemq/server=default/pooled-connection-factory=MyPooledConnectionFactory:add(entries=[java:/MyPooledConnectionFactory],connectors=[in-vm])
Copy to Clipboard Toggle word wrap

Configure a Pooled Connection Factory

You can update a pooled connection factory’s settings using the management CLI.

/subsystem=messaging-activemq/server=default/pooled-connection-factory=MyPooledConnectionFactory:write-attribute(name=max-retry-interval,value=3000)
Copy to Clipboard Toggle word wrap

For information on the available attributes for a pooled connection factory, see Pooled Connection Factory Attributes.

You can disable the recording of enlistment traces for this pooled connection factory using the management CLI by setting the enlistment-trace attribute to false.

/subsystem=messaging-activemq/server=default/pooled-connection-factory=MyPooledConnectionFactory:write-attribute(name=enlistment-trace,value=false)
Copy to Clipboard Toggle word wrap
Warning

Disabling the enlistment trace will make tracking down errors during transaction enlistment more difficult.

You can also configure the managed connection pool implementation used by the pooled connection factory. For more information, see the Configure Managed Connection Pools section of the JBoss EAP Configuration Guide.

Remove a Pooled Connection Factory

You can remove a pooled connection factory using the management CLI.

/subsystem=messaging-activemq/server=default/pooled-connection-factory=MyPooledConnectionFactory:remove
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat