Package org.mule.util.concurrent

Examples of org.mule.util.concurrent.Latch.release()


        FunctionalTestComponent ftc = getFunctionalTestComponent("OriginalMessageRouting");
        ftc.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                messageProcessedLatch.release();
                throw new RuntimeException();
            }
        });
        LocalMuleClient client = muleContext.getClient();
        client.dispatch("jms://in2?connector=jmsConnector", MESSAGE_TO_SEND, null);
View Full Code Here


        final Latch exceptionStrategyCalledLatch = new Latch();
        muleContext.registerListener(new ExceptionNotificationListener<ExceptionNotification>() {
            @Override
            public void onNotification(ExceptionNotification notification)
            {
                exceptionStrategyCalledLatch.release();
            }
        });
        Flow flow = (Flow) getFlowConstruct("retryExhausted");
        flow.process(getTestEvent("message"));
        if (!exceptionStrategyCalledLatch.await(10000, TimeUnit.MILLISECONDS))
View Full Code Here

        functionalTestComponent.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                endDlqFlowLatch.release();
            }
        });
        client.send("vm://in","message",null,RECEIVE_TIMEOUT);
        if (!endDlqFlowLatch.await(RECEIVE_TIMEOUT, TimeUnit.MILLISECONDS))
        {
View Full Code Here

            @Override
            public void onNotification(TransactionNotification notification)
            {
                if (notification.getAction() == TransactionNotification.TRANSACTION_COMMITTED)
                {
                    transactionCommitLatch.release();
                }
            }
        });
        execSqlUpdate("INSERT INTO TEST(TYPE, DATA, ACK, RESULT) VALUES(1, NULL, NULL, NULL)");
        if (!(transactionCommitLatch.await(5, TimeUnit.SECONDS)))
View Full Code Here

                    }
                }
            });
        }
        assertThat(workExecutedInCurrentThread.get(), is(true));
        holdThreads.release();
    }

}
View Full Code Here

            {
                if (message.getData() != null)
                {
                    //This simulate what the browser would receive
                    data.set((message.getData()));
                    latch.release();
                }
            }
        });
        //The '/response' channel is set on the request message
        client.subscribe("/response");
View Full Code Here

            {
                if (message.getData() != null)
                {
                    // This simulates what the browser would receive
                    data.set(message.toString());
                    latch.release();
                }
            }
        });
        bayeuxClient.subscribe("/test1");
View Full Code Here

        ftc.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                exceptionThrownLatch.release();
                throw new RuntimeException();
            }
        });
        Flow flow = (Flow)getFlowConstruct("FlowRefException");
        flow.stop();
View Full Code Here

            {
                if (message.getData() != null)
                {
                    // This simulate what the browser would receive
                    data.set(message.toString());
                    latch.release();
                }
            }
        });
        client.subscribe("/test1");
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.