Hi

I suddenly saw the light :) The arguments to the call must be Java types, not 
instances.

However it is not capturing the invocation of getConnection.

Hermod

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, June 12, 2007 9:07 AM
To: [email protected]
Subject: [aspectj-users] Parameters in call - Error


Hi

I am trying to write an around advice, but it is complaining: "name binding 
only allowed in target, this, and args pcds" referring to the parameters in the 
call statement. I am using Eclipse 3.2.2 with AJDT 1.4.2. I was looking at a 
sample from AspectJ in Action that uses the exact same syntax.

        Connection around(DriverManager driverManager, String url, String un, 
String pwd) : call(* DriverManager.getConnection(url, un, pwd)) && 
target(driverManager) && args(url, un, pwd)
        {
                System.err.println("Getting connection for: " + url + " using: 
" + un + "/" + pwd);
                return proceed(driverManager, url, un, pwd);
        }

Hermod
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to