Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.5)

Part Number E13941-05

weblogic.transaction
Interface XAResource

All Superinterfaces:
XAResource

public interface XAResource
extends XAResource

This is an optional interface that XA resource provider can implement to communicate extra information to the Transaction Manager.


Field Summary
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Method Summary
 boolean detectedUnavailable()
          Transaction Manager calls this method of the XA resource when it detects it to be unresponsive (i.e.
 int getDelistFlag()
          Normally, the Transaction Manager determines the delist flag to be used for the XAResource.end() operations.
 
Methods inherited from interface javax.transaction.xa.XAResource
commit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, start
 

Method Detail

getDelistFlag

int getDelistFlag()
Normally, the Transaction Manager determines the delist flag to be used for the XAResource.end() operations. However, for some resource providers, calling XAResource.end() with TMSUSPEND flag may be more expensive than calling XAResource.end() with TMSUCCESS, due to e.g. the need to maintain open cursors in the former case. If this interface is implemented, the Transaction Manager calls this method to obtain the delist flag to be used. This provide opportunity for resource provider to perform optimizations during XAResource.end().

Returns:
delist flag

detectedUnavailable

boolean detectedUnavailable()
Transaction Manager calls this method of the XA resource when it detects it to be unresponsive (i.e. no pending XA requests is replied after MaxXACallMillis.) This unresponsiveness could be due to problems with the particular transactions of the pending XA requests, or it could be in fact due to general unavailability of the resource. Resource provider which implements this method is expected to reply to the Transaction Manager about the actual health status of the resource. If the resource is indeed unavailable, this is also the notification for it to schedule an asynchronous refresh and re-registration. It is important that the resource provider DO NOT BLOCK for an extended period of time at this method call. To re-register with the Transaction Manager, the resource provider can call weblogic.transaction.TransactionManager's unregisterResource method, followed by registerResource, or registerStaticResource, or registerDynamicResource. If this interface is not implemented, the Transaction Manager will mark the resource to be unhealthy once it detects it to be unresponsive. Also, in this case, it is up to the resource provider to refresh and re-register at appropriate time. If nothing is done explicitly, the Transaction Manager will declare the resource healthy again after MaxResourceUnavailableMillis.

Returns:
whether the resource is healthy

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.5)

Part Number E13941-05