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