Professional Documents
Culture Documents
ecial DEFERRED flag rather than the TMSUCCESS flag used currently. This call si
mply sets a flag locally and does not make a remote call.
2. When XAResource.prepare is called by the application server the database rec
eives the request and conducts the necessary work that would have resulted from
an explicit XAResource.end call and then conducts the XAResource.prepare.
3. Both XAResource.end and XAResource.prepare throw XAExceptions, however, diff
erent error codes can be thrown for each. The application server will inspect a
ny XAException error codes and process appropriately just as it does today.
4. A further optimization occurs in the case where it is known by the applicati
on server that there is only one XAResource in a transaction or when all of the
XAResource.prepare calls from all but the last XAResource to be prepared have re
turned a vote of XA_RDONLY. In this case there is no need call XAResource.prepa
re on the only (or only remaining) XAResource and so the application server forg
oes calling XAResource.prepare on that resource and the XAResource.end call is d
iffered until the XAResource.commit.