Examples of ExceptionListener


Examples of javax.jms.ExceptionListener

    */
   public void testExceptionListener() throws Exception
   {
      Connection conn = JMSTestCase.cf.createConnection();

      ExceptionListener listener1 = new MyExceptionListener();

      conn.setExceptionListener(listener1);

      ExceptionListener listener2 = conn.getExceptionListener();

      ProxyAssertSupport.assertNotNull(listener2);

      ProxyAssertSupport.assertEquals(listener1, listener2);

View Full Code Here

Examples of javax.jms.ExceptionListener

         if (conn != null)
         {
            try
            {
               final ExceptionListener exceptionListener = conn.getExceptionListener();

               if (exceptionListener != null)
               {
                  final JMSException je = new JMSException(me.toString(), failedOver?EXCEPTION_FAILOVER: EXCEPTION_DISCONNECT);

                  je.initCause(me);

                  new Thread(new Runnable()
                  {
                     public void run()
                     {
                        exceptionListener.onException(je);
                     }
                  }).start();
               }
            }
            catch (JMSException e)
View Full Code Here

Examples of org.mule.tck.listener.ExceptionListener

    @Test
    public void catchExceptionStrategyHandlesSoapFault() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("soapFaultWithCatchExceptionStrategy");

        ExceptionListener listener = new ExceptionListener(muleContext);
        MuleMessage response = flow.process(getTestEvent(FAIL_REQUEST)).getMessage();

        // Assert that the exception was thrown
        listener.waitUntilAllNotificationsAreReceived();

        assertXMLEqual(EXPECTED_SOAP_FAULT_DETAIL, response.getPayloadAsString());

        assertNull(response.getExceptionPayload());
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.