Most of the AspectJ AOP work I've done was either using compile-time weaving or 
load-time weaving.  So IMO its rather unrelated to any Wink specifics.  You 
should be able to write an aspect around a resource and/or provider and weave 
it at compile or load time (with customization of the cl) and it should adapt 
the bytecode to use the aspect w/o Wink even knowing the aspects were there.

--jason


On Jun 27, 2011, at 2:16 PM, Bryant Luk wrote:

> Hi Paulo,
> 
> I can see the added value, but unfortunately I don't have much
> experience with AspectJ so don't really know where to start. Besides
> handlers, there are internal lifecycle managers which may help with
> implementing some of these (i.e. @PostCreate) callbacks.
> 
> On Sun, Jun 26, 2011 at 4:44 PM, Paulo Borges <[email protected]> wrote:
>> 
>> Hello:
>> 
>> It would be very nice if Wink can support Aspectj AOPs ,much like Spring 
>> framework, out of the box where you can weave advices at runtime for cross 
>> cutting concerns.
>> 
>> Currently, I believe the only way to do this is through writing customized 
>> user handlers but the logic would apply across the board to all resources. 
>> The granularity of applying some cross concern logic to specific resources 
>> or/and resource methods are not there.
>> 
>> It is a common use case where you want to make sure  that for certain 
>> resources a user has ,say, some role in database while for others you do not 
>> care. Copying the same code all over those resources and resource methods is 
>> cumbersome. Ideally, even a call back methods annotated with @PostCreate , 
>> much like EJB3 call backs, where some logic is called right before a 
>> resource method is invoked would go a long way as well.
>> 
>> However, the AOP support out of the box would eliminated most of issues with 
>> @Before, @Around and @After AOP features.
>> 

Reply via email to