Package org.hornetq.core.version

Examples of org.hornetq.core.version.Version


         String name = UUIDGenerator.getInstance().generateStringUUID();

         boolean retry = false;
         do
         {
            Version clientVersion = VersionLoader.getVersion();

            Lock lock = null;

            try
            {
               Channel channel1;

               synchronized (failoverLock)
               {
                  if (connection == null)
                  {
                     throw new IllegalStateException("Connection is null");
                  }

                  channel1 = connection.getChannel(1, -1);

                  // Lock it - this must be done while the failoverLock is held
                  channel1.getLock().lock();

                  lock = channel1.getLock();
               } // We can now release the failoverLock

               // We now set a flag saying createSession is executing
               synchronized (exitLock)
               {
                  inCreateSession = true;
               }

               long sessionChannelID = connection.generateChannelID();

               Packet request = new CreateSessionMessage(name,
                                                         sessionChannelID,
                                                         clientVersion.getIncrementingVersion(),
                                                         username,
                                                         password,
                                                         serverLocator.getMinLargeMessageSize(),
                                                         xa,
                                                         autoCommitSends,
View Full Code Here


   {
      boolean incompatibleVersion = false;
      Packet response;
      try
      {
         Version version = server.getVersion();
         int[] compatibleList = version.getCompatibleVersionList();
         boolean isCompatibleClient = false;
         for (int i = 0; i < compatibleList.length; i++)
         {
            if (compatibleList[i] == request.getVersion())
            {
               isCompatibleClient = true;
               break;
            }
         }

         if (!isCompatibleClient)
         {
            log.warn("Client with version " + request.getVersion() +
                     " and address " +
                     connection.getRemoteAddress() +
                     " is not compatible with server version " +
                     version.getFullVersion() +
                     ". " +
                     "Please ensure all clients and servers are upgraded to the same version for them to " +
                     "interoperate properly");
            throw new HornetQException(HornetQException.INCOMPATIBLE_CLIENT_SERVER_VERSIONS,
                                       "Server and client versions incompatible");
View Full Code Here

   {
      boolean incompatibleVersion = false;
      Packet response;
      try
      {
         Version version = server.getVersion();
         int[] compatibleList = version.getCompatibleVersionList();
         boolean isCompatibleClient = false;
         for (int i = 0; i < compatibleList.length; i++)
         {
            if (compatibleList[i] == request.getVersion())
            {
               isCompatibleClient = true;
               break;
            }
         }

         if (!isCompatibleClient)
         {
            log.warn("Client with version " + request.getVersion() +
                     " and address " +
                     connection.getRemoteAddress() +
                     " is not compatible with server version " +
                     version.getFullVersion() +
                     ". " +
                     "Please ensure all clients and servers are upgraded to the same version for them to " +
                     "interoperate properly");
            throw new HornetQException(HornetQException.INCOMPATIBLE_CLIENT_SERVER_VERSIONS,
                                       "Server and client versions incompatible");
View Full Code Here

         String name = UUIDGenerator.getInstance().generateStringUUID();

         boolean retry = false;
         do
         {
            Version clientVersion = VersionLoader.getVersion();

            Lock lock = null;

            try
            {
               Channel channel1;

               synchronized (failoverLock)
               {
                  if (connection == null)
                  {
                     throw new IllegalStateException("Connection is null");
                  }

                  channel1 = connection.getChannel(1, -1);

                  // Lock it - this must be done while the failoverLock is held
                  channel1.getLock().lock();

                  lock = channel1.getLock();
               } // We can now release the failoverLock

               // We now set a flag saying createSession is executing
               synchronized (exitLock)
               {
                  inCreateSession = true;
               }

               long sessionChannelID = connection.generateChannelID();

               Packet request = new CreateSessionMessage(name,
                                                         sessionChannelID,
                                                         clientVersion.getIncrementingVersion(),
                                                         username,
                                                         password,
                                                         serverLocator.getMinLargeMessageSize(),
                                                         xa,
                                                         autoCommitSends,
View Full Code Here

      }
      if (other instanceof Version == false)
      {
         return false;
      }
      Version v = (Version)other;

      return versionName.equals(v.getVersionName()) && majorVersion == v.getMajorVersion() &&
             minorVersion == v.getMinorVersion() &&
             microVersion == v.getMicroVersion() &&
             versionSuffix.equals(v.getVersionSuffix()) &&
             incrementingVersion == v.getIncrementingVersion();
   }
View Full Code Here

TOP

Related Classes of org.hornetq.core.version.Version

Copyright © 2018 www.massapicom. 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.