Search

32.3. Configuring reconnection/reattachment attributes

download PDF
If you are using JMS and the JMS Service on the server is being used to load your JMS connection factory instances into JNDI, you can specify these parameters in JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml like so:
<connection-factory name="NettyConnectionFactory">
   <xa>true</xa>
   <connectors>
      <connector-ref connector-name="netty"/>
   </connectors>
   <entries>
      <entry name="/ConnectionFactory"/>
      <entry name="/XAConnectionFactory"/>
   </entries>
</connection-factory>

If you are using JMS, but instantiating your JMS connection factory directly, you can specify the parameters using the appropriate setter methods on the HornetQConnectionFactory immediately after its creation.
If you are using the core API and instantiating the ClientSessionFactory instance directly, you can also specify the parameters using the appropriate setter methods on the ClientSessionFactory immediately after its creation.
If your client does manage to reconnect but the session is no longer available on the server, for instance if the server has been restarted or it has timed out, then the client will be unable to re-attach, and any ExceptionListener or SessionFailureListener instances registered on the connection or session will be called.

Note

Registered JMS ExceptionListener or Core SessionFailureListener instances are called when a client reconnects or re-attaches.
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.