Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Question about using within/cflow pointcuts with third-party jars

Hi,

I'm new to AspectJ, and have run into the following problem:

I want to create a pointcut that excludes all joinpoints within classes
contained by a package root (in this case org.hibernate), as well as
within code called by those classes. So, I've created the following set
of pointcuts, where the first two support the third:

	pointcut hibernate(): within(org.hibernate..*);
	pointcut calledByHibernate(): cflow(hibernate());

	pointcut setterNotCalledByHibernate():
		!calledByHibernate() && execution(* *.set*(..));

The above works as expected when the TypePattern supplied to within()
matches my own classes, but not when it matches classes in this
third-party library. Given what I know about how AspectJ works, I don't
believe any weaving of the org.hibernate classes needs to happen - in
any case, I confirmed that the hibernate jars are in the classpath and
inpath at iajc (compile) time, but no luck. 

Anyone have experience with this type of situation? Is there some reason
this won't work? 

Thanks,
Neil

------------
Neil Redding
Director
Lab49, Inc.

Phone: 646.291.2868
Email: nredding@xxxxxxxxx
Web  : www.lab49.com


Back to the top