Examples of SessionXAResponseMessage


Examples of org.hornetq.core.protocol.core.impl.wireformat.SessionXAResponseMessage

      SessionXAPrepareMessage packet = new SessionXAPrepareMessage(xid);

      startCall();
      try
      {
         SessionXAResponseMessage response = (SessionXAResponseMessage)channel.sendBlocking(packet);

         if (response.isError())
         {
            throw new XAException(response.getResponseCode());
         }
         else
         {
            xaRetry = false;
            return response.getResponseCode();
         }
      }
      catch (HornetQException e)
      {
         if (e.getType() == HornetQExceptionType.UNBLOCKED)
         {
            // Unblocked on failover
            try
            {
               HornetQClientLogger.LOGGER.failoverDuringPrepare();
               SessionXAResponseMessage response = (SessionXAResponseMessage)channel.sendBlocking(packet);

               if (response.isError())
               {
                  throw new XAException(response.getResponseCode());
               }

               xaRetry = false;
               return response.getResponseCode();
            }
            catch (HornetQException e1)
            {
               // ignore and rollback
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.