Examples of ReattachSessionResponseMessage


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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request);

            if (response.isReattached())
            {
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               // The session wasn't found on the server - probably we're failing over onto a backup server where the
View Full Code Here

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

      try
      {

         if (!server.isStarted())
         {
            response = new ReattachSessionResponseMessage(-1, false);
         }

         ServerSessionPacketHandler sessionHandler = protocolManager.getSessionHandler(request.getName());

         if (!server.checkActivate())
         {
            response = new ReattachSessionResponseMessage(-1, false);
         }

         if (sessionHandler == null)
         {
            response = new ReattachSessionResponseMessage(-1, false);
         }
         else
         {
            if (sessionHandler.getChannel().getConfirmationWindowSize() == -1)
            {
               // Even though session exists, we can't reattach since confi window size == -1,
               // i.e. we don't have a resend cache for commands, so we just close the old session
               // and let the client recreate

               sessionHandler.close();

               response = new ReattachSessionResponseMessage(-1, false);
            }
            else
            {
               // Reconnect the channel to the new connection
               int serverLastConfirmedCommandID = sessionHandler.transferConnection(connection,
                                                                                    request.getLastConfirmedCommandID());

               response = new ReattachSessionResponseMessage(serverLastConfirmedCommandID, true);
            }
         }
      }
      catch (Exception e)
      {
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage) channel1.sendBlocking(request, PacketImpl.REATTACH_SESSION_RESP);

            if (response.isReattached())
            {
               if (HornetQClientLogger.LOGGER.isDebugEnabled())
               {
                  HornetQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (HornetQClientLogger.LOGGER.isDebugEnabled())
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request);

            if (response.isReattached())
            {
               if (log.isDebugEnabled())
               {
                  log.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (log.isDebugEnabled())
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request, PacketImpl.REATTACH_SESSION_RESP);

            if (response.isReattached())
            {
               if (HornetQClientLogger.LOGGER.isDebugEnabled())
               {
                  HornetQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (HornetQClientLogger.LOGGER.isDebugEnabled())
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request, PacketImpl.REATTACH_SESSION_RESP);

            if (response.isReattached())
            {
               if (HornetQClientLogger.LOGGER.isDebugEnabled())
               {
                  HornetQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (HornetQClientLogger.LOGGER.isDebugEnabled())
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request);

            if (response.isReattached())
            {
               if (log.isDebugEnabled())
               {
                  log.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (log.isDebugEnabled())
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request);

            if (response.isReattached())
            {
               if (log.isDebugEnabled())
               {
                  log.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (log.isDebugEnabled())
View Full Code Here

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

            Packet request = new ReattachSessionMessage(name, lcid);

            Channel channel1 = backupConnection.getChannel(1, -1);

            ReattachSessionResponseMessage response = (ReattachSessionResponseMessage)channel1.sendBlocking(request, PacketImpl.REATTACH_SESSION_RESP);

            if (response.isReattached())
            {
               if (HornetQClientLogger.LOGGER.isDebugEnabled())
               {
                  HornetQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands");
               }
               // The session was found on the server - we reattached transparently ok

               channel.replayCommands(response.getLastConfirmedCommandID());
            }
            else
            {

               if (HornetQClientLogger.LOGGER.isDebugEnabled())
View Full Code Here

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

            packet = new ReattachSessionMessage();
            break;
         }
         case REATTACH_SESSION_RESP:
         {
            packet = new ReattachSessionResponseMessage();
            break;
         }
         case SESS_CLOSE:
         {
            packet = new SessionCloseMessage();
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.