I got this wired problem: my aspect only works on JBoss when I use Eclipse IDE to compile and build. It never get called on JBoss if I use Ant build. What's behind the scene of Eclipse and how to compile/build/deploy AOP stuff?
Detail info:
in the applicationContext.xml:
In MyAopClassCode:<aop:aspectj-autoproxy/> <bean id="procedureInteceptor" class="controller.aspect.MyAopClass"/>
In the controller this aspect adviced:Code:@Aspect public class MyAopClass { private Log logger = LogFactory.getLog(getClass()); @Pointcut("execution(java.lang.String controller.lims.WorkStepController.*(..)) && args(request, ..)") private void workflowOperation(WebRequest request) {} /** * Used to set returning view of each lims work flow step. */ @Before("workflowOperation(request)") public void directingPage(WebRequest request) { ........ }
The way my Ant build works is simple:Code:@Controller @RequestMapping("/workflowStep.html") public class WorkStepController { protected Log logger = LogFactory.getLog(getClass()); @RequestMapping(method=RequestMethod.POST, params="processBtn") public String processStep(WebRequest request, @RequestParam("wfdId") String[] wfdIds) { ..... }
include aspectJrt and aspectJweaver.jar file classpath, compiled and WARed it, deploy to jboss.


Reply With Quote