1 package org
.argeo
.slc
.core
.execution
;
3 import org
.apache
.commons
.logging
.Log
;
4 import org
.apache
.commons
.logging
.LogFactory
;
5 import org
.argeo
.slc
.execution
.ExecutionFlow
;
6 import org
.aspectj
.lang
.JoinPoint
;
7 import org
.aspectj
.lang
.ProceedingJoinPoint
;
8 import org
.aspectj
.lang
.annotation
.After
;
9 import org
.aspectj
.lang
.annotation
.Around
;
10 import org
.aspectj
.lang
.annotation
.Aspect
;
11 import org
.aspectj
.lang
.annotation
.Before
;
12 import org
.aspectj
.lang
.annotation
.Pointcut
;
15 public class ExecutionAspect
{
16 private static Log log
= LogFactory
.getLog(ExecutionAspect
.class);
18 @Before("flowExecution()")
19 public void beforeFlow(JoinPoint jp
) throws Throwable
{
20 //log.debug("this " + jp.getThis().getClass());
21 //log.debug("target " + jp.getTarget().getClass());
22 // Thread.dumpStack();
23 ExecutionFlow executionFlow
= (ExecutionFlow
) jp
.getTarget();
24 ExecutionContext
.enterFlow(executionFlow
);
27 @After("flowExecution()")
28 public void afterFlow(JoinPoint jp
) throws Throwable
{
29 //log.debug("this " + jp.getThis().getClass());
30 //log.debug("target " + jp.getTarget().getClass());
31 ExecutionFlow executionFlow
= (ExecutionFlow
) jp
.getTarget();
32 ExecutionContext
.leaveFlow(executionFlow
);
35 @Pointcut("execution(void org.argeo.slc.execution.ExecutionFlow.execute())")
36 public void flowExecution() {