snaker-core/src/main/java/org/snaker/engine/access/transaction/TransactionInterceptor.java
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
		Object result = null;
		TransactionStatus status = null;
		if(isMatch(method.getName())) {
			if(log.isDebugEnabled()) {
				log.debug("intercept method is[name="  + method.getName() + "]");
			}
			try {
				status = getTransaction();
				AssertHelper.notNull(status);
				//调用具体无事务支持的业务逻辑
				result = proxy.invokeSuper(obj, args);
				//如果整个执行过程无异常抛出，则提交TransactionStatus持有的transaction对象
				if(status.isNewTransaction()) {
					commit(status);
				}
			} catch (Exception e) {
				rollback(status);
				throw new SnakerException(e);
			}
		} else {
			if(log.isDebugEnabled()) {
				log.debug("****don't intercept method is[name="  + method.getName() + "]");
			}
			result = proxy.invokeSuper(obj, args);
		}
		return result;
	}
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
		Object result = null;
		TransactionStatus status = null;
		if(isMatch(method.getName())) {
			if(log.isDebugEnabled()) {
				log.debug("intercept method is[name="  + method.getName() + "]");
			}
			try {
				status = getTransaction();
				AssertHelper.notNull(status);
				//调用具体无事务支持的业务逻辑
				result = proxy.invokeSuper(obj, args);
				//如果整个执行过程无异常抛出，则提交TransactionStatus持有的transaction对象
				if(status.isNewTransaction()) {
					commit(status);
				}
			} catch (Exception e) {
				rollback(status);
				throw new SnakerException(e);
			}
		} else {
			if(log.isDebugEnabled()) {
				log.debug("****don't intercept method is[name="  + method.getName() + "]");
			}
			result = proxy.invokeSuper(obj, args);
		}
		return result;
	}
public Object intercept ( Object obj , Method method , Object [ ] args , MethodProxy proxy ) throws Throwable { Object result = null ; TransactionStatus status = null ; if ( isMatch ( method . getName ( ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "intercept method is[name=" + method . getName ( ) + "]" ) ; } try { status = getTransaction ( ) ; AssertHelper . notNull ( status ) ; //调用具体无事务支持的业务逻辑 result = proxy . invokeSuper ( obj , args ) ; //如果整个执行过程无异常抛出，则提交TransactionStatus持有的transaction对象 if ( status . isNewTransaction ( ) ) { commit ( status ) ; } } catch ( Exception e ) { rollback ( status ) ; throw new SnakerException ( e ) ; } } else { if ( log . isDebugEnabled ( ) ) { log . debug ( "****don't intercept method is[name=" + method . getName ( ) + "]" ) ; } result = proxy . invokeSuper ( obj , args ) ; } return result ; }
方法执行的拦截器，拦截条件为：
1、数据库访问类是DBTransaction的实现类
2、方法名称匹配初始化的事务方法列表
方法执行的拦截器，拦截条件为： 1、数据库访问类是DBTransaction的实现类 2、方法名称匹配初始化的事务方法列表