[jboss-dev-forums] [Design of JCA on JBoss] - JBAS-5002 - Tracking XAResource failures

adrian@jboss.org do-not-reply at jboss.com
Mon Nov 26 08:48:03 EST 2007


This is a thread to discuss the tracking of XAResource failures
(for resource adapters that don't do it themselves).

Unlike what I put on the original feature request
http://jira.jboss.com/jira/browse/JBAS-5002
it would be better implemented as a generic plugin to the TxConnectionManager
class
http://jira.jboss.com/jira/browse/JBAS-5003

i.e. in the pseudo code on JBAS-5002 where it invokes checkFailure(XAException)
it would really invoke on the connection listener associated with the XAResource
(not currently implemented in the XAResourceWrapper).

This would use a singleton checker defined on the TxConnectionManager
to check for errors

  | public interface XAResourceExceptionSorter
  | {
  |    boolean isFatal(XAExecption e);
  | ]
  | 
  | TxConnectionManager
  | {
  |    public setXAResourceExceptionSorter(XAResourceExceptionSorter e) { ... }
  | }
  | 

and configured in the -ds.xml

  | <xa-resource-execption-sorter>...</xa-resource-exception-sorter>
  | 

The default implementation would check for XAER_RMFAIL and XAER_RMERR
but there should also be a null implementation (always return false)
to disable the feature.

Somebody can then write their own logic to check for other errors
where the connection should be closed.

As stated above. The XAResourceWrapper impl also needs changing
to hold a reference to the ConnectionListener so we know which connection
we are processing.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107724#4107724

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107724



More information about the jboss-dev-forums mailing list