Package org.hornetq.core.protocol.core.impl.wireformat

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


            }
            case EXCEPTION:
            {
               // TODO - we can provide a means for async exceptions to get back to to client
               // For now we just log it
               HornetQExceptionMessage mem = (HornetQExceptionMessage)packet;

               HornetQClientLogger.LOGGER.receivedExceptionAsynchronously(mem.getException());

               break;
            }
            default:
            {
View Full Code Here


   {
      lock.lock();

      try
      {
         response = new HornetQExceptionMessage(HornetQClientMessageBundle.BUNDLE.unblockingACall());

         sendCondition.signal();
      }
      finally
      {
View Full Code Here

               throw HornetQClientMessageBundle.BUNDLE.timedOutSendingPacket(packet.getType());
            }

            if (response.getType() == PacketImpl.EXCEPTION)
            {
               final HornetQExceptionMessage mem = (HornetQExceptionMessage)response;

               HornetQException e = mem.getException();

               e.fillInStackTrace();

               throw e;
            }
View Full Code Here

            packet = new DisconnectConsumerMessage();
            break;
         }
         case EXCEPTION:
         {
            packet = new HornetQExceptionMessage();
            break;
         }
         case PACKETS_CONFIRMED:
         {
            packet = new PacketsConfirmedMessage();
View Full Code Here

            packet = new DisconnectMessage();
            break;
         }
         case EXCEPTION:
         {
            packet = new HornetQExceptionMessage();
            break;
         }
         case PACKETS_CONFIRMED:
         {
            packet = new PacketsConfirmedMessage();
View Full Code Here

                  {
                     response = new NullResponseMessage();
                  }
                  else
                  {
                     response = new HornetQExceptionMessage(new HornetQException(HornetQException.DUPLICATE_METADATA,
                                                     "Metadata " + message.getKey() +
                                                              "=" +
                                                              message.getData() +
                                                              " had been set already"));
                  }
                  break;
               }
            }
         }
         catch (HornetQXAException e)
         {
            if (requiresResponse)
            {
               log.debug("Sending exception to client", e);
               response = new SessionXAResponseMessage(true, e.errorCode, e.getMessage());
            }
            else
            {
               log.error("Caught XA exception", e);
            }
         }
         catch (HornetQException e)
         {
            if (requiresResponse)
            {
               log.debug("Sending exception to client", e);
               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

      {
         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

   {
      lock.lock();

      try
      {
         response = new HornetQExceptionMessage(new HornetQException(HornetQException.UNBLOCKED,
                                                                     "Connection failure detected. Unblocking a blocking call that will never get a response"

         ));

         sendCondition.signal();
View Full Code Here

                                          "Timed out waiting for response when sending packet " + packet.getType());
            }

            if (response.getType() == PacketImpl.EXCEPTION)
            {
               final HornetQExceptionMessage mem = (HornetQExceptionMessage)response;

               HornetQException e = mem.getException();

               e.fillInStackTrace();

               throw e;
            }
View Full Code Here

         response = new CreateSessionResponseMessage(server.getVersion().getIncrementingVersion());
      }
      catch (HornetQException e)
      {
         HornetQServerLogger.LOGGER.failedToCreateSession(e);
         response = new HornetQExceptionMessage(e);

         if (e.getType() == HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS)
         {
            incompatibleVersion = true;
         }
      }
      catch (Exception e)
      {
         HornetQServerLogger.LOGGER.failedToCreateSession(e);

         response = new HornetQExceptionMessage(new HornetQInternalErrorException());
      }

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

TOP

Related Classes of org.hornetq.core.protocol.core.impl.wireformat.HornetQExceptionMessage

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.