File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can I control transactions using JBI?" Watch "Can I control transactions using JBI?" New topic

Can I control transactions using JBI?

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 690

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.

Binildas Christudas

Joined: Sep 02, 2002
Posts: 25

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":

Binildas C. A.<br />Principal Architect, <a href="" target="_blank" rel="nofollow"></a><br />(SCJP, SCJD, SCBCD, SCEA, MCP, TOGAF, LZA)<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Can I control transactions using JBI?
It's not a secret anymore!