Optimization of the last resource

I am writing a resource adapter that does not support two-phase commit. I know that there is an optimization method called "Optimization of Recent Resources".

In JBoss, your XAResource class must implement LastResource for optimization.

My question is: how can this be done in WebLogic, WebSpehre, Glassfish, etc.

+1
source share
1 answer

Weblogic: AFAIK (maybe very wrong) only JDBC drivers can be used with LRO, and this is a purely administrative task . When the driver does not support XA, it can be configured for use with LRO: "Select this option if you want to enable non-XA JDBC connections from a data source to emulate participation in global transactions using JTA."

Essentially, LRO allows a resource that does not have a preparation phase, and can only be committed or rolled back. Thus, if there is only one such resource in an XA transaction, we can first try to prepare all the others, then commit LRO to one, and then, if possible, commit others, otherwise roll back the others.

You see, there is no particular need to declare any interface. This is an algorithm that can work with any resource other than XA. I'm not sure why JBoss has this, but I don't expect other servers to have something like this.

+6
source

All Articles