-
Mar 23rd, 2010, 12:41 AM
#1
AOP working with external classes
Hi,
I want to use AOP for classes not inside spring context.
<bean id="dbQueryCrackerAspect" class="com.my.db.DBQueryCrackerAspect"/>
<aop:aspectj-autoproxy proxy-target-class="true">
<aop:include name="dbQueryCrackerAspect"/>
</aop:aspectj-autoproxy>
@Aspect
public class DBQueryCrackerAspect {
@Around(value = "execution(public * org.hsqldb.jdbc.JDBCPreparedStatement.*(..))")
public Object testCalled(final ProceedingJoinPoint pjp) throws Throwable {
System.out.println("AAAAAAAAAAAAAAAAA!!!!!!!!!!!!! !!!!!!!");
return pjp.proceed();
}
}
is it possible?
Thanks in advance!
-
Mar 23rd, 2010, 02:07 AM
#2
Please use [ code][/code ] tags when posting code/xml/stacktraces!!!
Short answer no, for that you would have to use the full blown AspectJ solution with compile time or loadtime weaving.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules