Package org.apache.activemq.command

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();
                                          
                                        }
View Full Code Here


                                        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


    public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest();

    public Object createObject() throws Exception {
        ExceptionResponse info = new ExceptionResponse();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ExceptionResponse info = (ExceptionResponse) object;

        info.setException(createThrowable("Exception:1"));
    }
View Full Code Here

public class ExceptionResponseTest extends ResponseTest {

    public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest();

    public Object createObject() throws Exception {
        ExceptionResponse info = new ExceptionResponse();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ExceptionResponse info = (ExceptionResponse)object;
        info.setException(createThrowable("Exception:1"));

    }
View Full Code Here


    public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest();

    public Object createObject() throws Exception {
        ExceptionResponse info = new ExceptionResponse();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ExceptionResponse info = (ExceptionResponse) object;

        info.setException(createThrowable("Exception:1"));
    }
View Full Code Here

            public void handle(Response response) throws Exception {

                Iq result = createResult(iq);

                if (response instanceof ExceptionResponse) {
                    ExceptionResponse exceptionResponse = (ExceptionResponse)response;
                    Throwable exception = exceptionResponse.getException();

                    LOG.warn("Failed to create connection: " + exception, exception);

                    Error error = new Error();
                    result.setError(error);
View Full Code Here

    protected Handler<Response> createErrorHandler(final String text) {
        return new Handler<Response>() {
            public void handle(Response event) throws Exception {
                if (event instanceof ExceptionResponse) {
                    ExceptionResponse exceptionResponse = (ExceptionResponse)event;
                    Throwable exception = exceptionResponse.getException();
                    LOG.error("Failed to " + text + ". Reason: " + exception, exception);
                } else if (LOG.isDebugEnabled()) {
                    LOG.debug("Completed " + text);
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ExceptionResponse

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.