For a general XAResource you should do both.
There should be a real (local) timeout in the backend and frontend timeout to cover
network splits, etc.
My question is why are you using an XAResource for remoting?
What state do you have to persist during prepare?
Do you really need to vote in 2PC?
If you have no state and therefore don't need to recover or vote
then you should use a TransactionSynchronization instead.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086006#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...