org.apache.jetspeed.util.interceptors
Class TransactionalMethodReplayDecisionMaker

java.lang.Object
  extended by org.apache.jetspeed.util.interceptors.TransactionalMethodReplayDecisionMaker
All Implemented Interfaces:
MethodReplayDecisionMaker

public class TransactionalMethodReplayDecisionMaker
extends Object
implements MethodReplayDecisionMaker

MethodReplayDecisionMaker intended for use with methods marked as transactional, where the decision to replay the method is based on the content of the underlying exception from the resource.

Author:
a336317, a202225

Field Summary
private  int[] sqlErrorCodes
           
 
Constructor Summary
TransactionalMethodReplayDecisionMaker()
           
 
Method Summary
protected  SQLException findSQLException(Exception exception)
           
private  boolean isErrorCodeListed(int errorCode)
           
 void setSqlErrorCodes(String sqlErrorCodesString)
           
 boolean shouldReplay(org.aopalliance.intercept.MethodInvocation invocation, Exception exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sqlErrorCodes

private int[] sqlErrorCodes
Constructor Detail

TransactionalMethodReplayDecisionMaker

public TransactionalMethodReplayDecisionMaker()
Method Detail

shouldReplay

public boolean shouldReplay(org.aopalliance.intercept.MethodInvocation invocation,
                            Exception exception)
Specified by:
shouldReplay in interface MethodReplayDecisionMaker
Parameters:
invocation - The MethodInvocation object
exception - Exception thrown on previous invocation attempt
Returns:
True if we should replay the method, false otherwise

findSQLException

protected SQLException findSQLException(Exception exception)

setSqlErrorCodes

public void setSqlErrorCodes(String sqlErrorCodesString)

isErrorCodeListed

private boolean isErrorCodeListed(int errorCode)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.