Package javax.jms

Examples of javax.jms.ExceptionListener.onException()



  public void onException(JMSException ex) {
    for (Iterator it = this.delegates.iterator(); it.hasNext();) {
      ExceptionListener listener = (ExceptionListener) it.next();
      listener.onException(ex);
    }
  }

}
View Full Code Here


   * @see #setExceptionListener
   */
  protected void invokeExceptionListener(JMSException ex) {
    ExceptionListener exceptionListener = getExceptionListener();
    if (exceptionListener != null) {
      exceptionListener.onException(ex);
    }
  }


  /**
 
View Full Code Here

      }
    });

    MockControl mockExceptionListener = MockControl.createControl(ExceptionListener.class);
    ExceptionListener exceptionListener = (ExceptionListener) mockExceptionListener.getMock();
    exceptionListener.onException(theException);
    mockExceptionListener.setVoidCallable();
    mockExceptionListener.replay();

    this.container.setExceptionListener(exceptionListener);
    this.container.afterPropertiesSet();
View Full Code Here

            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.setLinkedException(exc);
            ex.initCause(exc);
            listener.onException(ex);
        }
    }

    public <T, E extends Exception> T executeRetrySupport(FailoverProtectedOperation<T,E> operation) throws E
    {
View Full Code Here

            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.setLinkedException(exc);
            ex.initCause(exc);
            listener.onException(ex);
        }
    }

    public <T, E extends Exception> T executeRetrySupport(FailoverProtectedOperation<T,E> operation) throws E
    {
View Full Code Here

                code = close.getReplyCode().toString();
            }

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

    public <T, E extends Exception> T executeRetrySupport(FailoverProtectedOperation<T,E> operation) throws E
    {
View Full Code Here

                        final ExceptionListener exceptionListener = _connection.getExceptionListener();
                        if(exceptionListener != null)
                        {
                            if(error != null)
                            {
                                exceptionListener.onException(new JMSException(error.getDescription(),
                                        error.getCondition().getValue().toString()));
                            }
                            else
                            {
                                exceptionListener.onException(new JMSException("Session remotely closed"));
View Full Code Here

                                exceptionListener.onException(new JMSException(error.getDescription(),
                                        error.getCondition().getValue().toString()));
                            }
                            else
                            {
                                exceptionListener.onException(new JMSException("Session remotely closed"));
                            }
                        }
                    }
                    catch (JMSException e)
                    {
View Full Code Here

                    final ExceptionListener exceptionListener = _session.getConnection().getExceptionListener();

                    if(exceptionListener != null)
                    {
                        final Error receiverError = _receiver.getError();
                        exceptionListener.onException(new JMSException(receiverError.getDescription(),
                                receiverError.getCondition().getValue().toString()));

                    }
                }
                catch (JMSException e)
View Full Code Here

                        MessageConsumerException mce = new MessageConsumerException(
                                receiverError.getDescription(),
                                receiverError.getCondition().getValue().toString(),
                                _destination.getAddress());

                        exceptionListener.onException(mce);
                    }
                }
                catch (JMSException e)
                {
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.