Package javax.jms

Examples of javax.jms.ExceptionListener


      jndiCntxt = new InitialContext();
      ConnectionFactory connFac = (ConnectionFactory) jndiCntxt
        .lookup("ConnectionFactory");
      Connection conn = connFac.createConnection();
      conn.start();
      conn.setExceptionListener(new ExceptionListener() {
        @Override
        public void onException(JMSException jmse) {
          LOG.error(jmse.toString());
        }
      });
View Full Code Here


    try {
      jndiCntxt = new InitialContext();
      ConnectionFactory connFac = (ConnectionFactory) jndiCntxt.lookup("ConnectionFactory");
      jmsConnection = connFac.createConnection();
      jmsConnection.start();
      jmsConnection.setExceptionListener(new ExceptionListener() {
        @Override
        public void onException(JMSException jmse) {
          LOG.error("JMS Exception listener received exception. Ignored the error", jmse);
        }
      });
View Full Code Here

        container.setAutoStartup(true);
        container.setMessageListener(this);
        container.setPubSubDomain(false);
        container.setSubscriptionDurable(false);
        ExceptionListener exceptionListener = config.getExceptionListener();
        if (exceptionListener != null) {
            container.setExceptionListener(exceptionListener);
        }
        container.setSessionTransacted(config.isTransacted());
        if (config.isTransacted()) {
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

       
        //QPID-2081: use a latch to sync on exception causing connection close, to work
        //around the connection close race during tearDown() causing sporadic failures
        _exceptionReceived = new CountDownLatch(1);

        connection.setExceptionListener(new ExceptionListener()
        {
            public void onException(JMSException e)
            {
                _exceptionReceived.countDown();
            }
View Full Code Here

            }
        }

        _conn.setClosed();

        ExceptionListener listener = _conn.getExceptionListenerNoCheck();
        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.setLinkedException(exc);
            ex.initCause(exc);
            listener.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

        } else {
            _conn = _parent.obtainConnection(_cf, "DMQ", this, doReconnect);
        }

        _conn.setExceptionListener( new ExceptionListener() {

            public void onException(JMSException exception) {
                _logger.log(Level.WARNING, _jbr.getKString(
                            _jbr.W_ON_CONN_EXCEPTION, this.toString()), exception);
                _connException = true;
View Full Code Here

            }
        }

        _sourceConn.stop();

        _sourceConn.setExceptionListener( new ExceptionListener() {

            public void onException(JMSException exception) {
                _logger.log(Level.WARNING, _jbr.getKString(_jbr.W_CONN_EXCEPTION_OCCURRED,
                            _jbr.getString(_jbr.M_SOURCE_1), this.toString()), exception);
                if (_targetConn instanceof PooledConnection) {
View Full Code Here

            _targetConnType = "P";
        } else if (_targetConn instanceof SharedConnection) {
            _targetConnType = "S";
        }

        _targetConn.setExceptionListener( new ExceptionListener() {

            public void onException(JMSException exception) {
                _logger.log(Level.WARNING, _jbr.getKString(_jbr.W_CONN_EXCEPTION_OCCURRED,
                            _jbr.getString(_jbr.M_TARGET_1), this.toString()), exception);
                if (_targetConn instanceof PooledConnection) {
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.