Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Beginner Question adviceDidNotMatch

Thank you for your response, I appreciate the time you have taken to respond.

After spending a few hours I figured out the mistake I was making,

Initially, I specified all the arguments to the constructor as ..

pointcut initConnectionPool(SysServiceab le services, String dbID, boolean flag, boolean flag) : call(com.primavera.infr.db.DBConnectionPool.new(SysServiceable, String, boolean, boolean)) && args(services, dbID, flag, flag);

prior to explicitly specify all arguments I had tried the following

pointcut initConnectionPool(SysServiceable services, String dbID) : call(com.primavera.infr.db.DBConnectionPool.new(SysServiceable, String, ..)) && args(services, dbID);

but received the warning adviceDidNotMatch.

and finally I used the .. syntax to the args pointcut as in

pointcut initConnectionPool(SysServiceable services, String dbID) : call(com.primavera.infr.db.DBConnectionPool.new(SysServiceable, String, ..)) && args(services, dbID, ..);

The syntax for binding of arguments from the joinpoints to the pointcuts and then to the advice is not intuitive and takes a beginner a few attempts prior to getting it right. I did see some messages (searching on google, I forget the group, probably developers) on the reasoning to have the current argument binding syntax.

Once again Thank you for your time

-Bhaskar

Back to the top