if(cvtObjSource.getGenericConverter() == null)
cvtObjSource.setGenericConverter(getConfiguration().getGenericConverter());
}
Interceptor itptInfo = getConfiguration().getInterceptor();
//保存执行语境信息
Execution context=null;
if(itptInfo!=null && itptInfo.getExecutionKey()!=null)
{
context=new Execution(executable, objSource, null);
try
{
objSource.set(itptInfo.getExecutionKey(), context);
}
catch(Exception e)
{
throw new ExecuteException(e);
}
}
try
{
//before
if(itptInfo!=null && itptInfo.getBefore()!=null)
executeInterceptor(itptInfo.getBefore(), objSource);
executeTargetExecutable(executable, objSource);
//after
if(itptInfo!=null && itptInfo.getAfter()!=null)
executeInterceptor(itptInfo.getAfter(), objSource);
return executable;
}
catch(ExecuteException e)
{
if(context != null)
context.setExecuteException(e);
Executable expExe= itptInfo == null ? null : itptInfo.getException();
if(expExe == null)
throw e;
//exception
executeInterceptor(expExe, objSource);