public Object invoke(MethodInvocation invocation) throws Throwable {
		ProxyMethodInvocation pmi = (ProxyMethodInvocation) invocation;
		TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
		TargetMetaDef targetMetaDef = targetMetaRequest.getTargetMetaDef();
		if (targetMetaDef.isEJB())
			return invocation.proceed();

		if (!isSessionContextAcceptable(targetMetaDef)) {
			// Debug.logVerbose("[JdonFramework] target service is not SessionContextAcceptable: "
			// + targetMetaDef.getClassName() +
			// " SessionContextInterceptor unactiive", module);
			return invocation.proceed();
		}
		Debug.logVerbose("[JdonFramework] enter SessionContextInterceptor", module);

		Object result = null;
		try {
			Object targetObject = pmi.getThis();
			if (targetObject == null) {
				throw new Exception("targetObject is null, add @Poolable and try again");
			}
			Debug.logVerbose("[JdonFramework] targetObject should be SessionContextAcceptable: " + targetObject.getClass().getName(), module);
			setSessionContext(targetObject, targetMetaRequest);

			result = invocation.proceed();

		} catch (Exception ex) {
			Debug.logError("[JdonFramework]SessionContextInterceptor error: " + ex, module);
		}
		return result;
	}
public Object invoke ( MethodInvocation invocation ) throws Throwable { ProxyMethodInvocation pmi = ( ProxyMethodInvocation ) invocation ; TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder . getTargetMetaRequest ( ) ; TargetMetaDef targetMetaDef = targetMetaRequest . getTargetMetaDef ( ) ; if ( targetMetaDef . isEJB ( ) ) return invocation . proceed ( ) ; if ( ! isSessionContextAcceptable ( targetMetaDef ) ) { return invocation . proceed ( ) ; } Debug . logVerbose ( "[JdonFramework] enter SessionContextInterceptor" , module ) ; Object result = null ; try { Object targetObject = pmi . getThis ( ) ; if ( targetObject == null ) { throw new Exception ( "targetObject is null, add @Poolable and try again" ) ; } Debug . logVerbose ( "[JdonFramework] targetObject should be SessionContextAcceptable: " + targetObject . getClass ( ) . getName ( ) , module ) ; setSessionContext ( targetObject , targetMetaRequest ) ; result = invocation . proceed ( ) ; } catch ( Exception ex ) { Debug . logError ( "[JdonFramework]SessionContextInterceptor error: " + ex , module ) ; } return result ; }
/*
inject SessionContext into targetObject.

@see
org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept
.MethodInvocation)