Announcement Announcement Module
Collapse
No announcement yet.
Aspect to trap Controller creation - how to? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aspect to trap Controller creation - how to?

    I would like my first Aspect in a Roo project to run the advice when a web controller starts up. But I cant get the pointcut to match.

    The controllers have a class name starting Cfx. I have tried with the following form:
    Code:
    	pointcut setBrand() : initialization(Cfx*.new (..));
    			
    	before()  : setBrand()
    	{
    		log.info("xxxxxxxxxxxx  setting brand");
    	}
    As well as "initialization" I have tried (from the book AspectJ Cookbook) call(Signature) with new keyword, preinitialization, staticinitialization. What is the formula?

    Maybe this is related - the Roo aspects do not have this form - no pointcut for example. How are they working? Where is this documented?

    Thanks
Working...
X