Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ajdt-dev] (no subject)


Hi all,
 I'm new to AspectJ and I write a point cut for a method as shown

Point Cuts as shown below :

pointcut somecall(): call(* *.executeRules(..)) ;
pointcut myJsr94Class(): somecall() && cflowbelow(somecall()) ;


Before and After advices  :

before(): myJsr94Class() {
                System.out.println("***jsr enter --> "
                                + thisJoinPointStaticPart.getSignature());
        }
        after() returning:myJsr94Class() {
                System.out.println("***jsr enter --> "
                                + thisJoinPointStaticPart.getSignature());
               
        }

It shows this advices in 6 places on my program.But when I run the program Im not able to see the System.out messages.
Can someone tell me am i doing anything wrong here,

Im using RAD 6.0 with AspectJM5



The code which suppose to get advised is below
StatelessRuleSession stateless =
                                (StatelessRuleSession) runtime.createRuleSession(
                                        bindUri,
                                        null,
                                        RuleRuntime.STATELESS_SESSION_TYPE);
Main jsrimpl = new Main();
List objects = new ArrayList();
objects.add(new BREParam("xml_in", jsrimpl.getXMLString(inputFileName)));
stateless.executeRules(objects)                ---------------> Pointcut will advise this line so Im expecting before and after this line to see
                                                                                             the  System out messages


Thanks in advance.
Vinodh

Back to the top