Examples of ExceptionResponse


Examples of org.apache.activemq.command.ExceptionResponse

        } else {

            try {
                Response response = (Response)this.transport.request(command, timeout);
                if (response != null && response.isException()) {
                    ExceptionResponse er = (ExceptionResponse)response;
                    if (er.getException() instanceof JMSException) {
                        throw (JMSException)er.getException();
                    } else {
                        throw JMSExceptionSupport.create(er.getException());
                    }
                }
                return response;
            } catch (IOException e) {
                throw JMSExceptionSupport.create(e);
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

                                    context.getConnection().dispatchAsync(response);
                                }

                            } catch (Exception e) {
                                if (!sendProducerAck && !context.isInRecoveryMode()) {
                                    ExceptionResponse response = new ExceptionResponse(e);
                                    response.setCorrelationId(message.getCommandId());
                                    context.getConnection().dispatchAsync(response);
                                }
                            }
                           
                        }
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

        } else {

            try {
                Response response = (Response)this.transport.request(command);
                if (response.isException()) {
                    ExceptionResponse er = (ExceptionResponse)response;
                    if (er.getException() instanceof JMSException) {
                        throw (JMSException)er.getException();
                    } else {
                        if (isClosed()||closing.get()) {
                            LOG.debug("Received an exception but connection is closing");
                        }
                        JMSException jmsEx = null;
                        try {
                         jmsEx = JMSExceptionSupport.create(er.getException());
                        }catch(Throwable e) {
                            LOG.error("Caught an exception trying to create a JMSException for " +er.getException(),e);
                        }
                        if(jmsEx !=null) {
                            throw jmsEx;
                        }
                    }
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

    try {
        Response response = (Response) (timeout > 0
                    ? this.transport.request(command, timeout)
                    : this.transport.request(command));
        if (response != null && response.isException()) {
            ExceptionResponse er = (ExceptionResponse)response;
            if (er.getException() instanceof JMSException) {
                throw (JMSException)er.getException();
            } else {
                throw JMSExceptionSupport.create(er.getException());
            }
        }
        return response;
    } catch (IOException e) {
        throw JMSExceptionSupport.create(e);
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

            if (SERVICELOG.isDebugEnabled() && e.getClass() != BrokerStoppedException.class) {
                SERVICELOG.debug("Error occured while processing " + (responseRequired ? "sync" : "async")
                        + " command: " + command + ", exception: " + e, e);
            }
            if (responseRequired) {
                response = new ExceptionResponse(e);
            } else {
                serviceException(e);
            }
        }
        if (responseRequired) {
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

        // if the broker service has slave attached, wait for the slave to be
        // attached to allow client connection. slave connection is fine
        if (!info.isBrokerMasterConnector() && connector.getBrokerService().isWaitForSlave()
                && connector.getBrokerService().getSlaveStartSignal().getCount() == 1) {
            ServiceSupport.dispose(transport);
            return new ExceptionResponse(new Exception("Master's slave not attached yet."));
        }
        // Older clients should have been defaulting this field to true.. but
        // they were not.
        if (wireFormatInfo != null && wireFormatInfo.getVersion() <= 2) {
            info.setClientMaster(true);
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

                                        context.getConnection().dispatchAsync(response);
                                    }

                                } catch (Exception e) {
                                    if (!sendProducerAck && !context.isInRecoveryMode()) {
                                        ExceptionResponse response = new ExceptionResponse(e);
                                        response.setCorrelationId(message.getCommandId());
                                        context.getConnection().dispatchAsync(response);
                                    }
                                }

                            }
View Full Code Here

Examples of org.apache.activemq.command.ExceptionResponse

                            ResponseCallback callback = new ResponseCallback() {
                                public void onCompletion(FutureResponse future) {
                                    try {
                                        Response response = future.getResult();
                                        if (response.isException()) {
                                            ExceptionResponse er = (ExceptionResponse) response;
                                            serviceLocalException(er.getException());
                                        } else {
                                            localBroker.oneway(new MessageAck(md, MessageAck.INDIVIDUAL_ACK_TYPE, 1));
                                            dequeueCounter.incrementAndGet();
                                        }  
                                    } catch (IOException e) {
View Full Code Here

Examples of org.apache.cloudstack.api.response.ExceptionResponse

                                ServerApiException sApiEx = (ServerApiException)e;
                                errorMsg = sApiEx.getDescription();
                                errorCode = sApiEx.getErrorCode().getHttpCode();
                            }

                            ExceptionResponse response = new ExceptionResponse();
                            response.setErrorCode(errorCode);
                            response.setErrorText(errorMsg);
                            response.setResponseName((cmdObj == null) ? "unknowncommandresponse" : cmdObj.getCommandName());

                            // FIXME:  setting resultCode to ApiErrorCode.INTERNAL_ERROR is not right, usually executors have their exception handling
                            //         and we need to preserve that as much as possible here
                            completeAsyncJob(jobId, AsyncJobResult.STATUS_FAILED, ApiErrorCode.INTERNAL_ERROR.getHttpCode(), response);
View Full Code Here

Examples of org.apache.hadoop.hbase.protobuf.generated.RPCProtos.ExceptionResponse

          LOG.debug("Unknown callId: " + id + ", skipping over this response of " +
            whatIsLeftToRead + " bytes");
          IOUtils.skipFully(in, whatIsLeftToRead);
        }
        if (responseHeader.hasException()) {
          ExceptionResponse exceptionResponse = responseHeader.getException();
          RemoteException re = createRemoteException(exceptionResponse);
          if (isFatalConnectionException(exceptionResponse)) {
            markClosed(re);
          } else {
            if (call != null) call.setException(re);
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.