Back Forum Reply New

Transaction propogation support with Hessian/Buclap/fromInvoker

Hi,

Does RPC protocols like Hessian/Buclap/fromInvoker supports transaction propogation?

Any example/sample will be really a great help.
The scenario can be:

A gui client/java client calls ejb. This ejb commits to database and calls a hessian service which in turn calls an ejb that commits to database.

Thanks in Advance
MJ

No, transaction propagation is only implemented in RMI-IIOP.

Federico.

What stops me from adding a Jta transaction manager to the service calls (or the EJB which is used by it)?  If everything is in the same app server, then it should co-ordinate the transaction.

Well, if you're using Hessian/Buclap to expose your services I assume they're not in the same server. Even if they're, tx coordination will not work because the underlying protocol doesn't provide that feature.
If they're, in fact, in the same server I guess it should also expose an ejb local interface to achieve the desired coordination.

Federico.

Below is text from hessian spec.

lt;hessian-specsgt;
Headers
Headers are (string, object) pairs that preceed the arguments.

The value of the header can be any serialized object.

For example, a request might include a transaction context in a header.lt;codegt;
Call with Distributed Transaction Context  c x01 x00 H x00 x0b transaction r t x00 x28 com.caucho.hessian.xa.TransactionManager   S x00 x23 xa?ejbid=01b8e19a77 m x00 x05 debug I x00 x03 x01 xcb z lt;/codegt;
lt;/hessian-specgt;

Also, if you read the hessian design goals, one of the goal was the support for transaction.

When they say, they support transactions, it is hard to believe that it cannot be achieved using spring....

Any taker of this challenge...

You also need a JTA XA transaction manager that's capable of distributed transactions on the side that initializes the transaction. Not all JTA XA transaction managers support it (JBoss has no support for it - maybe 4.0.5 or 5.0.0 support it, not sure).

If you are doing ejblt;-gt;ejb communication why do you need hessian?

Edit: if we are talking about one single server, yes it should work, but then you need no remoting at all.


Originally Posted by sp_ojhaAlso, if you read the hessian design goals, one of the goal was the support for transaction.

When they say, they support transactions, it is hard to believe that it cannot be achieved using spring....

As you say it's listed in the design goals, however I haven't ever seen a working example or even a reference of that. (I didn't make an exhaustive research though).
There's no reference of that even in the spring docs (docs/.../remoting.html), section 17.8

Maybe you're right and it works, but nobody tried it yet.

dejanp: Why should it work in a single server? Are you assuming everything happens in the same thread? Isn't transaction information lost in such a call?
¥
Back Forum Reply New