Forums
| Resource Health Monitoring in WLS |
|
|
|
| Written by Schelstraete Bart | |||||
| Tuesday, 12 January 2010 19:58 | |||||
Resource Health MonitoringTo prevent losing server threads to faulty XAResources, WebLogic Server JTA has an internal resource health monitoring mechanism. A resource is considered active if either there are no pending requests or the result from any of the XAResource pending requests is not XAER_RMFAIL. If an XAResource is not active within two minutes, the WebLogic Server transaction manager will declare it dead. Any further requests to the XAResource are shunned, and an XAER_RMFAIL XAException is thrown. The two minute interval can be configured via the maxXACallMillis JTAMBean attribute. It is not exposed through the Administration Console. You can configure maxXACallMillis in the config.xml file. For example: <Domain> .... <JTA .... </Domain> To receive notification from the WebLogic Server transaction manager and to inform the WebLogic Server transaction manager whether it is indeed dead when the resource is about to be declared dead, you can implement weblogic.transaction.XAResource (which extends javax.transaction.xa.XAResource) and register it with the transaction manager. The transaction manager will call the detectUnavailable method of the XAResource when it is about to declare it unavailable. If the XAResource returns true, then it will not be declared unavailable. If the XAResource is indeed unavailable, it can use this opportunity to perform cleanup and re-registration with the transaction manager. See the WebLogic Server Javadocs for weblogic.transaction.XAResource for more information.
By default, if an XA resource that is participating in a global transaction fails to respond to an XA call from the WebLogic Server transaction manager, WebLogic Server flags the resource as unhealthy and unavailable, and blocks any further calls to the resource in an effort to preserve resource threads. The failure can be caused by either an unhealthy transaction or an unhealthy resource—there is no distinction between the two causes. In both cases, the resource is marked as unhealthy. To mitigate this limitation, WebLogic Server provides the configuration attributes You set these attributes directly in the config.xml file when the domain is inactive. These attributes are not available in the Administration Console. The following example shows an excerpt of a configuration file with these attributes: ... <JTA <JDBCConnectionPool <JDBCTxDataSource ...
Only registered users can write comments!
!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved." |
|||||
| Last Updated on Tuesday, 12 January 2010 20:06 |


