This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Can I control transactions using JBI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can I control transactions using JBI?" Watch "Can I control transactions using JBI?" New topic
Author

Can I control transactions using JBI?

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 689
Hello,

I'd like to know if it is possible to control transactions using Java Business Integration. For an instance, let's say I have a transaction that starts when I call a java method. This method calls a web service, that calls a legacy procedure (written in another language), where this transaction ends. Can I mark the points where I want to rollback if something wrong happens, using JBI, or even Web Services?

Thank you.


SCEA 5 (part 1), SCBCD, SCWCD, SCJP, CLP, CLS
Binildas Christudas
author
Greenhorn

Joined: Sep 02, 2002
Posts: 25
Hi,

I think, your query can be split up into two parts:

Can I do web service transactions

The answer is Yes and No. Yes because, specifications are there and are at different stages of adoption and maturity. Let me provide you at least one link of interest: A comparison of Web services transaction protocols. I also said No because, the Transaction Managers and the libraries (.jar files available along with vendor's package) may support WS-TX again at verying levels, and hence it depends not only on your own domain but also on the domain of the foreign Web Service providers with which you want to interact with transactionally. So all of them are to be TX aware if your composed service has to be transactional.

Whether JBI supports Transactions

JBI provides enough clarity on the support of transactions. Let me reproduce something from the specification here:

Using JBI to compose services will often require the sharing of a transaction context between JBI engines/bindings. Such transactions can facilitate reliable operation of composed services. The unit of work in the NMR is a Message Exchange. This is also the unit of work when a transaction is being used. The NMR is considered to be transaction aware. If the NMR is told that the Message Exchange is being controlled by a transaction, the NMR will internally use the transaction, if required, and will pass the transaction context along with the Message Exchange.


To learn more on ESB, JBI, ServiceMix & EIP including samples on Transactions, refer to the PACKT title "Service Oriented Java Business Integration":
http://www.packtpub.com/service-oriented-java-business-integration/book
http://www.amazon.com/Service-Oriented-Business-Integration-Binildas-Christudas/dp/1847194400


Binildas C. A.<br />Principal Architect, <a href="http://www.infosys.com/" target="_blank" rel="nofollow">http://www.infosys.com/</a><br />(SCJP, SCJD, SCBCD, SCEA, MCP, TOGAF, LZA)<br /><a href="http://www.packtpub.com/author_view_profile/id/180" target="_blank" rel="nofollow">http://www.packtpub.com/author_view_profile/id/180</a>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can I control transactions using JBI?
 
Similar Threads
User Transaction on private method
Transactions
CMT or BMT ?
Allow single transaction only
Whether normal methods involved in a User Transaction