Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This time we want to setup the camel context and routes using the Spring XML syntax.

Wiki Markup
{snippet:id=e1|lang=xml|url=activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/JMSTransactionalClientTest.xml}

.Since the rest is standard XML stuff its nothing fancy now for the reader:

Wiki Markup
{snippet:id=e2|lang=xml|url=activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/JMSTransactionalClientTest.xml}

...

Our business logic is set to handle the incomming messages and fail the first two times. When its a success it responds with a Bye World message.

Wiki Markup
{snippet:id=e2|lang=java|url=activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionalClientTest.java}

...

And our unit test is tested with this java code. Notice that we expect the Bye World message to be delivered at the 3rd attempt.

Wiki Markup
{snippet:id=e1|lang=java|url=activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JMSTransactionalClientTest.java}

...

Spring based configuration

...