Package org.mule.construct

Examples of org.mule.construct.Flow.stop()


        // before new flow
        processedEvent.getMessage().setInvocationProperty("newKey", "newValue");
        assertEquals("newValue", processedEvent.getMessage().getInvocationProperty("newKey"));
        assertEquals("newValue", event.getMessage().getInvocationProperty("newKey"));

        flow.stop();
        flow.dispose();
    }

}
View Full Code Here


        assertEquals(3, processedEvent.getSession().getPropertyNamesAsSet().size());
        assertEquals("newValue", processedEvent.getSession().getProperty("newKey"));
        assertEquals(3, event.getSession().getPropertyNamesAsSet().size());
        assertEquals("newValue", event.getSession().getProperty("newKey"));

        flow.stop();
        flow.dispose();
    }

}
View Full Code Here

        muleClient.dispatch("jms://in", MESSAGE, null);
        latch.await(LATCH_AWAIT_TIMEOUT, MILLISECONDS);
        //Stop flow to not consume message again
        Flow flow = muleContext.getRegistry().get("flowWithoutExceptionStrategyAndTx");
        flow.stop();
        //Check message rollback
        //Seems not to be a rollback
        MuleMessage muleMessage = muleClient.request("jms://in", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>notNullValue());
        //This is currently expected
View Full Code Here

        muleClient = muleContext.getClient();
        muleClient.dispatch("jms://in2", MESSAGE, null);
        latch.await(LATCH_AWAIT_TIMEOUT, MILLISECONDS);
        //Stop flow to not consume message again
        Flow flow = muleContext.getRegistry().get("flowWithoutExceptionStrategyAndNoTx");
        flow.stop();
        //Check message was no consumed
        MuleMessage muleMessage = muleClient.request("jms://in2", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>notNullValue());

        //Check outbound-endpoint was not executed
View Full Code Here

        muleClient = muleContext.getClient();
        muleClient.dispatch("jms://in3", MESSAGE, null);
        latch.await(LATCH_AWAIT_TIMEOUT, MILLISECONDS);
        //Stop flow to not consume message again
        Flow flow = muleContext.getRegistry().get("flowWithDefaultStrategyConfigured");
        flow.stop();
        //Check message was no consumed
        MuleMessage muleMessage = muleClient.request("jms://in3", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>notNullValue());

        //Check outbound-endpoint was not executed
View Full Code Here

        muleClient = muleContext.getClient();
        muleClient.dispatch("jms://in4", MESSAGE, null);
        latch.await(LATCH_AWAIT_TIMEOUT, MILLISECONDS);
        //Stop flow to not consume message again
        Flow flow = muleContext.getRegistry().get("flowWithExceptionNotification");
        flow.stop();
        //Check message was no consumed
        MuleMessage muleMessage = muleClient.request("jms://in4", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>notNullValue());

        // Check exception notification was sent
View Full Code Here

        muleClient = muleContext.getClient();
        muleClient.dispatch("jms://in5", MESSAGE, null);
        latch.await(LATCH_AWAIT_TIMEOUT, MILLISECONDS);
        //Stop flow to not consume message again
        Flow flow = muleContext.getRegistry().get("flowConfiguredForDeadLetterQueue");
        flow.stop();
        //Check message was no consumed
        MuleMessage muleMessage = muleClient.request("jms://in5", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>nullValue());

        // Check exception notification was sent
View Full Code Here

        muleClient = muleContext.getClient();
        muleClient.dispatch("jms://in6", MESSAGE, null);
        latch.await(LATCH_AWAIT_TIMEOUT, MILLISECONDS);
        //Stop flow to not consume message again
        Flow flow = muleContext.getRegistry().get("flowConfiguredForDeadLetterQueueTx");
        flow.stop();
        //Check message was no consumed
        MuleMessage muleMessage = muleClient.request("jms://in6", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>nullValue());

        // Check exception notification was sent
View Full Code Here

        if (!messageFailureReceived.await(TIMEOUT, TimeUnit.MILLISECONDS))
        {
            fail("JMS messages didn't execute concurrently, might be using only one Session for more than one transaction");
        }
        Flow flowWithTxConfigured = (Flow) getFlowConstruct("flowWithTxConfigured");
        flowWithTxConfigured.stop();
        MuleMessage muleMessage = muleClient.request("jms://in", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>notNullValue());
        muleMessage = muleClient.request("jms://in", TIMEOUT);
        assertThat(muleMessage, IsNull.<Object>nullValue());
    }
View Full Code Here

    @Test
    public void executeAsynchronouslyDoingRetriesAfterRestart() throws Exception
    {
        Flow flow = (Flow) getFlowConstruct("asynchronous-using-threading-profile");
        flow.stop();
        flow.start();
        executeAsynchronouslyDoingRetries();

    }
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.