Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10450

CLONE - Server cannot be shutdowned gracefully when reconnect-attempts is set to -1

XMLWordPrintable

    • Release Notes
    • Hide
      In circumstances where a HornetQ resource adapter (RA) was configured to connect via a remote JBoss Messaging Server (JMS) instance and the resource adapter had <systemitem>reconnect-attempts</systemitem> set to <literal>-1</literal> (infinite), the server hosting the message-driven bean (MDB) could not be shut down cleanly if the remote server was not available. Potential consequences of this issue included loss of transactions being processed at the time the server was attempting to shut down. This issue has been resolved by changing the handling of the <literal>-1</literal> setting for <systemitem>reconnect-attempts</systemitem> so that reconnection attempts are stopped if the remote server is not available. In these circumstances the server hosting the MDB instance can now be shut down cleanly.
      Show
      In circumstances where a HornetQ resource adapter (RA) was configured to connect via a remote JBoss Messaging Server (JMS) instance and the resource adapter had <systemitem>reconnect-attempts</systemitem> set to <literal>-1</literal> (infinite), the server hosting the message-driven bean (MDB) could not be shut down cleanly if the remote server was not available. Potential consequences of this issue included loss of transactions being processed at the time the server was attempting to shut down. This issue has been resolved by changing the handling of the <literal>-1</literal> setting for <systemitem>reconnect-attempts</systemitem> so that reconnection attempts are stopped if the remote server is not available. In these circumstances the server hosting the MDB instance can now be shut down cleanly.
    • Documented as Resolved Issue

      Test scenario:

      1. Start two EAP 6 servers - mdb and jms server. mdb server is configured to connect through remote JCA to jms server.
      2. Stop (ctrl-c) jms server
      3. Try to stop (ctrl-c) mdb server

      Result:
      Mdb server hangs (I waited more than 10 minutes) - attached mdb-server-console.log (with thread dump during hang)

      Attached reproducer-shutdown.zip:
      1. Download and unzip reproducer-shutdown.zip
      2. Prepare servers - "sh prepare.sh"
      3. Start jms server - "sh start-server1.sh localhost"
      4. Start mdb server - "sh start-server2.sh <some_other_ip>"
      5 Shutdown jms server
      6. Try to shutdown mdb server

      Issue seems to be caused by setting <reconnect-attempts>-1</reconnect-attempts> in "hornetq-ra" connection factory:

                         <pooled-connection-factory name="hornetq-ra">
                              <transaction mode="xa"/>
      			<reconnect-attempts>-1</reconnect-attempts>
                              <connectors>
                                  <connector-ref connector-name="netty-remote"/>
                              </connectors>
                              <entries>
                                  <entry name="java:/JmsXA"/>
                              </entries>
                          </pooled-connection-factory>
      

      When reconnect-attempts is set to 0 then server shutdowns immediately.

        1. server.log
          408 kB
        2. thread_dump_eap5_mdb_server.log
          152 kB
        3. threadump_mdb_server.txt
          134 kB

              csuconic@redhat.com Clebert Suconic
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: