Examples of HornetQExceptionMessage


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

         }
         catch (HornetQException e)
         {
            if (requiresResponse)
            {
               response = new HornetQExceptionMessage((HornetQException)e);
            }
            else
            {
               log.error("Caught exception", e);
            }
         }
         catch (Throwable t)
         {
            if (requiresResponse)
            {
               log.warn("Sending unexpected exception to the client", t);
               HornetQException hqe = new HornetQException(HornetQException.INTERNAL_ERROR);
               hqe.initCause(t);
               response = new HornetQExceptionMessage(hqe);
            }
            else
            {
               log.error("Caught unexpected exception", t);
            }
View Full Code Here

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

      {
         public void onError(final int errorCode, final String errorMessage)
         {
            log.warn("Error processing IOCallback code = " + errorCode + " message = " + errorMessage);

            HornetQExceptionMessage exceptionMessage = new HornetQExceptionMessage(new HornetQException(errorCode,
                                                                                                        errorMessage));

            doConfirmAndResponse(confirmPacket, exceptionMessage, flush, closeChannel);
         }
View Full Code Here

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

         response = new CreateSessionResponseMessage(server.getVersion().getIncrementingVersion());
      }
      catch (HornetQException e)
      {
         log.error("Failed to create session ", e);
         response = new HornetQExceptionMessage((HornetQException)e);

         if (e.getCode() == HornetQException.INCOMPATIBLE_CLIENT_SERVER_VERSIONS)
         {
            incompatibleVersion = true;
         }
      }
      catch (Exception e)
      {
         log.error("Failed to create session ", e);

         HornetQPacketHandler.log.error("Failed to create session", e);

         response = new HornetQExceptionMessage(new HornetQException(HornetQException.INTERNAL_ERROR));
      }

      // send the exception to the client and destroy
      // the connection if the client and server versions
      // are not compatible
View Full Code Here

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

      }
      catch (Exception e)
      {
         HornetQPacketHandler.log.error("Failed to reattach session", e);

         response = new HornetQExceptionMessage(new HornetQException(HornetQException.INTERNAL_ERROR));
      }

      channel1.send(response);
   }
View Full Code Here

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

      }
      catch (Exception e)
      {
         if (e instanceof HornetQException)
         {
            response = new HornetQExceptionMessage((HornetQException)e);
         }
         else
         {
            HornetQPacketHandler.log.warn(e.getMessage(), e);
            response = new HornetQExceptionMessage(new HornetQException(HornetQException.INTERNAL_ERROR));
         }
      }

      channel1.send(response);
   }
View Full Code Here

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

      @Override
      public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException
      {
         if (packet.getType() == PacketImpl.EXCEPTION)
         {
            HornetQExceptionMessage msg = (HornetQExceptionMessage)packet;
            final HornetQException exception = msg.getException();
            if (exception.getType() == HornetQExceptionType.CLUSTER_SECURITY_EXCEPTION)
            {
               HornetQServerLogger.LOGGER.clusterManagerAuthenticationError(exception.getMessage());
               executor.execute(new Runnable()
               {
View Full Code Here

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

         }
      }
      catch (HornetQException e)
      {
         HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet);
         response = new HornetQExceptionMessage(e);
      }
      catch (Exception e)
      {
         HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet);
         response =
                  new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.replicationUnhandledError(e));
      }
      channel.send(response);
   }
View Full Code Here

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

                  {
                     response = new NullResponseMessage();
                  }
                  else
                  {
                     response = new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.duplicateMetadata(message.getKey(), message.getData()));
                  }
                  break;
               }
            }
         }
         catch (HornetQXAException e)
         {
            if (requiresResponse)
            {
               HornetQServerLogger.LOGGER.debug("Sending exception to client", e);
               response = new SessionXAResponseMessage(true, e.errorCode, e.getMessage());
            }
            else
            {
               HornetQServerLogger.LOGGER.caughtXaException(e);
            }
         }
         catch (HornetQException e)
         {
            if (requiresResponse)
            {
               HornetQServerLogger.LOGGER.debug("Sending exception to client", e);
               response = new HornetQExceptionMessage(e);
            }
            else
            {
               HornetQServerLogger.LOGGER.caughtException(e);
            }
         }
         catch (Throwable t)
         {
            if (requiresResponse)
            {
               HornetQServerLogger.LOGGER.warn("Sending unexpected exception to the client", t);
               HornetQException hqe = new HornetQInternalErrorException();
               hqe.initCause(t);
               response = new HornetQExceptionMessage(hqe);
            }
            else
            {
               HornetQServerLogger.LOGGER.caughtException(t);
            }
View Full Code Here

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

      {
         public void onError(final int errorCode, final String errorMessage)
         {
            HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage);

            HornetQExceptionMessage exceptionMessage = new HornetQExceptionMessage( HornetQExceptionType.createException(errorCode, errorMessage));

            doConfirmAndResponse(confirmPacket, exceptionMessage, flush, closeChannel);
         }

         public void done()
View Full Code Here

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

                  {
                     response = new NullResponseMessage();
                  }
                  else
                  {
                     response = new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.duplicateMetadata(message.getKey(), message.getData()));
                  }
                  break;
               }
            }
         }
         catch (HornetQXAException e)
         {
            if (requiresResponse)
            {
               HornetQServerLogger.LOGGER.debug("Sending exception to client", e);
               response = new SessionXAResponseMessage(true, e.errorCode, e.getMessage());
            }
            else
            {
               HornetQServerLogger.LOGGER.caughtXaException(e);
            }
         }
         catch (HornetQException e)
         {
            if (requiresResponse)
            {
               HornetQServerLogger.LOGGER.debug("Sending exception to client", e);
               response = new HornetQExceptionMessage(e);
            }
            else
            {
               HornetQServerLogger.LOGGER.caughtException(e);
            }
         }
         catch (Throwable t)
         {
            if (requiresResponse)
            {
               HornetQServerLogger.LOGGER.warn("Sending unexpected exception to the client", t);
               HornetQException hqe = new HornetQInternalErrorException();
               hqe.initCause(t);
               response = new HornetQExceptionMessage(hqe);
            }
            else
            {
               HornetQServerLogger.LOGGER.caughtException(t);
            }
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.