Book Image

Service Oriented Java Business Integration

Book Image

Service Oriented Java Business Integration

Overview of this book

Table of Contents (23 chapters)
Service Oriented Java Business Integration
Credits
About the Author
Acknowledgement
About the Reviewers
Preface

Sample Demonstrating Transaction


In this section we will demonstrate configuring transactions for a message exchange in an asynchronous pattern.

Sample Use Case

In the sample scenario to demonstrate transactions, we will configure DefaultServiceMixClient within the JBI container as the client or consumer for the JBI bus. We will first start a transaction and then ask DefaultServiceMixClient to send an InOnly message exchange to the JBI bus. We will use "send" here so that the act of sending the message will be enlisted in the current transaction, but the processing of the message exchange will be deferred and handled in a separate thread.

We will have a servicemix-jms component configured in the provider role to which the DefaultServiceMixClient can target message exchange. We then have a servicemix-jms in the consumer role to which the JMS provider pipelines messages. For the JMS consumer, we have configured a Receiver component using the targetService attribute. Hence any messages in the...