X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.simple%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FExecutionAspect.java;h=c2abfed27005ebde3fbc4c37918005aa05f36287;hb=5ae9dc81ad1c3ddfa99a8456b0c5263dd483642d;hp=aae2e80c60568e07626d59cedd4324d351141e18;hpb=1b19cac6a92c31d9119fc2986e7aaf3df98b2393;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java index aae2e80c6..c2abfed27 100644 --- a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java +++ b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/ExecutionAspect.java @@ -2,6 +2,7 @@ package org.argeo.slc.core.execution; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.argeo.slc.execution.ExecutionContext; import org.argeo.slc.execution.ExecutionFlow; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; @@ -15,13 +16,23 @@ import org.aspectj.lang.annotation.Pointcut; public class ExecutionAspect { private static Log log = LogFactory.getLog(ExecutionAspect.class); + private ExecutionContext executionContext; + + public ExecutionContext getExecutionContext() { + return executionContext; + } + + public void setExecutionContext(ExecutionContext executionContext) { + this.executionContext = executionContext; + } + @Before("flowExecution()") public void beforeFlow(JoinPoint jp) throws Throwable { //log.debug("this " + jp.getThis().getClass()); //log.debug("target " + jp.getTarget().getClass()); // Thread.dumpStack(); ExecutionFlow executionFlow = (ExecutionFlow) jp.getTarget(); - ExecutionContext.enterFlow(executionFlow); + executionContext.enterFlow(executionFlow); } @After("flowExecution()") @@ -29,10 +40,12 @@ public class ExecutionAspect { //log.debug("this " + jp.getThis().getClass()); //log.debug("target " + jp.getTarget().getClass()); ExecutionFlow executionFlow = (ExecutionFlow) jp.getTarget(); - ExecutionContext.leaveFlow(executionFlow); + executionContext.leaveFlow(executionFlow); } - @Pointcut("execution(void org.argeo.slc.execution.ExecutionFlow.execute())") + @Pointcut("execution(void org.argeo.slc.execution.ExecutionFlow.run())") public void flowExecution() { } + + }