Package javax.jms

Examples of javax.jms.ExceptionListener


        assertEquals(true, endpoint.isDisableReplyTo());

        endpoint.setEagerLoadingOfProperties(true);
        assertEquals(true, endpoint.isEagerLoadingOfProperties());

        endpoint.setExceptionListener(new ExceptionListener() {
            public void onException(JMSException exception) {
            }
        });
        assertNotNull(endpoint.getExceptionListener());
View Full Code Here


            {
                _logger.error("error during failover", e);
            }
        }

        ExceptionListener listener = _conn._exceptionListener;
        if (listener == null)
        {
            _logger.error("connection exception: " + conn, exc);
        }
        else
        {
            String code = null;
            if (close != null)
            {
                code = close.getReplyCode().toString();
            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.initCause(exc);
            listener.onException(ex);
        }
    }
View Full Code Here

    private void prepareQueues() throws Exception
    {
        // Create a connection
        Connection connection = _connFac.createConnection();
        connection.start();
        connection.setExceptionListener(new ExceptionListener()
        {
            public void onException(JMSException e)
            {
                e.printStackTrace();
            }
View Full Code Here

    {

        // Create a connection
        TopicConnection connection = _connFac.createTopicConnection();
        connection.start();
        connection.setExceptionListener(new ExceptionListener()
        {
            public void onException(JMSException e)
            {
                e.printStackTrace();
            }
View Full Code Here

               
                ActiveMQActivationSpec activationSpec = endpointActivationKey.getActivationSpec();
                try {
                    connection = adapter.makeConnection(activationSpec);
                    connection.start();
                    connection.setExceptionListener(new ExceptionListener() {
                        public void onException(JMSException error) {
                            if (!serverSessionPool.isClosing()) {
                                reconnect(error);
                            }
                        }
View Full Code Here

        assertEquals(true, endpoint.isDisableReplyTo());

        endpoint.setEagerLoadingOfProperties(true);
        assertEquals(true, endpoint.isEagerLoadingOfProperties());

        endpoint.setExceptionListener(new ExceptionListener() {
            public void onException(JMSException exception) {
            }
        });
        assertNotNull(endpoint.getExceptionListener());
View Full Code Here

        }
        TaskExecutor taskExecutor = configuration.getTaskExecutor();
        if (taskExecutor != null) {
            answer.setTaskExecutor(taskExecutor);
        }
        ExceptionListener exceptionListener = configuration.getExceptionListener();
        if (exceptionListener != null) {
            answer.setExceptionListener(exceptionListener);
        }
        return answer;
    }
View Full Code Here

   * Invoke the registered JMS ExceptionListener, if any.
   * @param ex the exception that arose during JMS processing
   * @see #setExceptionListener
   */
  protected void invokeExceptionListener(JMSException ex) {
    ExceptionListener exceptionListener = getExceptionListener();
    if (exceptionListener != null) {
      exceptionListener.onException(ex);
    }
  }
View Full Code Here

        assertEquals(true, endpoint.isDisableReplyTo());

        endpoint.setEagerLoadingOfProperties(true);
        assertEquals(true, endpoint.isEagerLoadingOfProperties());

        endpoint.setExceptionListener(new ExceptionListener() {
            public void onException(JMSException exception) {
            }
        });
        assertNotNull(endpoint.getExceptionListener());
View Full Code Here

   * Invoke the registered JMS ExceptionListener, if any.
   * @param ex the exception that arose during JMS processing
   * @see #setExceptionListener
   */
  protected void invokeExceptionListener(JMSException ex) {
    ExceptionListener exceptionListener = getExceptionListener();
    if (exceptionListener != null) {
      exceptionListener.onException(ex);
    }
  }
View Full Code Here

TOP

Related Classes of javax.jms.ExceptionListener

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.