5 Replies Latest reply on Jun 30, 2004 3:53 PM by Chen Wang

    JMS+HAIL+XA: Pooled Connections Never reconnects on singleto

    arisa Newbie

      I'm using JMS with HAIL and XA on JBoss 3.2.3, which seems uncommon from the posts I see. I have a clustered configuration (2 servers), and need to send JMS Messages transactionally with the container-managed transactions. I need to send the JMS Message to the singleton JMS Server (which in 3.2.3 is done via HAIL. This is different in 3.2.4 I believe).

      Everything works fine except when the JMS Singleton Server moves. Then I can no longer send messages because I get the IllegalStateTransition error that singletonServerMoved_. The app server never recovers from this problem.

      So far, I have diagnosed the following:
      1. The connections in the managed connection pool, once created, are not destroyed even in the event of a singletonServerMoved_ exception.
      2. The connections are thus stale when the singleton server moves.
      3. I can manually fix the problem by invoking "flush" on the managed connection pool, which destroys the connection. Sending a JMS message after this will result in new connections being created in the pool, which works perfectly.
      4. I cannot use setExceptionListener on the connections because a) I can't set it on the pre-created pooled connections, and b) I don't know how to force the pooled connection to be recreated.

      My questions:
      1. Is there a way to solve this problem?
      2. If not, is there a way to workaround this problem? My current thought is to listen to the singleton server moved notification event, and flush the managed connection pool at that time.
      3. If not, how are other people sending JMS Messages on 3.2.3 with container-managed transactions on a clustered configuration to a singleton? I suppose with singleton MDBs, but I haven't tried that yet.

      Many thanks for any direction any of you can give...