-
1. Re: Seam Interceptors vs. AspectJ
jacob.orshalick Jul 20, 2008 8:25 PM (in response to jskillings07)I have used AspectJ with Spring applications but never with a Seam application as I have always been able to achieve what I needed through interceptors. You could always give AspectJ a shot with the ajc compiler and report back your results ;)
Perhaps I do not fully understand your requirements, but interceptors seem like a reasonable approach for your scenario. Why not simply define an annotation to tag the concerned classes and define a stereotype for the classes? Say,
@Name("myLicensedClass") @LicenseRestricted public class MyLicensedClass { ... ...
It's then quite simple to define an interceptor:
@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Interceptors(LicensingInterceptor.class) @Inherited public @interface LicenseRestricted {}
Hope that helps.
-
2. Re: Seam Interceptors vs. AspectJ
pmuir Jul 27, 2008 1:22 PM (in response to jskillings07)I don't see how Seam limits you in using AOP?
-
3. Re: Seam Interceptors vs. AspectJ
jskillings07 Jul 28, 2008 3:31 AM (in response to jskillings07)Agreed. Seam provides AOP support using Interceptors. My questions was more on integrating AspectJ, and I have not seen any concrete examples of AspectJ integration. Hence my inquiry in the first place.
-
4. Re: Seam Interceptors vs. AspectJ
pmuir Jul 28, 2008 10:30 AM (in response to jskillings07)Your Seam components and JPA entities are POJOs so you should be able to use any AOP library to do bytecode enhancement. For example, with JBoss AS, look at JBoss AOP as it is built in.
No, there is no
special
integration, there doesn't need to be.