[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] returning result in after/before advice
|
Hi Naval,
You can use the around() advice to execute code before AND after the
call.
E.g.
Object around() : call(addParamToPreparedStmt(..){
PreparedStatement pstmt =
conn.prepareStatement(query);
pstmt = proceed(pstmt, params); // Runs
the addParamToPreparedStmt
// Any other code
return pstmt;
}
HTH,
Fintan
-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Naval Vaidya
Sent: 27 May 2005 12:41
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] returning result in after/before advice
AspectJ allows returning results in only around advice.
I have a following problem:
1. PreparedStatement pstmt = conn.prepareStatement(query);
2. pstmt = addParamToPreparedStmt(pstmt, params);
I want to write a before advice for the first statement.
i.e. before(): call(addParamToPreparedStmt(..){ execute statemnt 1} How
can i return the result of it?
Naval.
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
* ** *** ** * ** *** ** * ** *** ** *
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
Any views or opinions presented are solely those of the author, and do not necessarily
represent those of ESB.
If you have received this email in error please notify the sender.
Although ESB scans e-mail and attachments for viruses, it does not guarantee
that either are virus-free and accepts no liability for any damage sustained
as a result of viruses.
* ** *** ** * ** *** ** * ** *** ** *