Results 1 to 6 of 6

Thread: How to compile AOP? My aspect never get called

Threaded View

  1. #1
    Join Date
    Dec 2007
    Location
    Boston, MA
    Posts
    34

    Default How to compile AOP? My aspect never get called

    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:
    Code:
    <aop:aspectj-autoproxy/>   
        
    <bean id="procedureInteceptor" class="controller.aspect.MyAopClass"/>
    In MyAopClass
    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) {
             ........
            }
    In the controller this aspect adviced:
    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) {
    		.....
    	}
    The way my Ant build works is simple:
    include aspectJrt and aspectJweaver.jar file classpath, compiled and WARed it, deploy to jboss.
    Last edited by leewill; Feb 18th, 2008 at 04:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •