[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[aspectj-users] checkpoint
|
- From: "lily lily" <lixiaojiao@xxxxxxxxxxx>
- Date: Thu, 15 May 2003 01:41:19 +0000
- Delivered-to: aspectj-users@eclipse.org
Hi:
I want to write an aspect which will be executed before the insert and
insertExp method.
The insert method is like this:
public String insert(String tablename, Vector values)
{
...
}
The insertExp methos is like this:
public String insertExp(String tablename, Vector values)
{
...
insert(table,values); //call the insert method inside insertExp
...
}
And the aspect is like this:
aspect AccessControl
{
pointcut insert_checkpoint(String tablename,Vector values):
within(tableBean) && execution(public String
tableBean.insert(String,Vector))
|| execution(public String tableBean.insertExp(String,Vector)) &&
args(tablename,values);
String around(String tablename,Vector values):
insert_checkpoint(tablename,values)
{
.....
}
}
The problem is that,the aspect will be executed before every insert and
insertExp method,
including the one which is called inside the insertExp method. But this is
not what I want. I do not
want the insert method being called inside insertExp method to be disturbed.
That is , the aspect
should be executed only before insertExp, but not before the insert method
within the insertEXp body.
Is there any idea? I know there must be a way to solve it.
Thank you for your help.
Lily
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963