Luciano: It would be very kind of you to share us a simplified version of what you are proposing. With all said, it will be beneficial if the wink community comes up with "Winky" way to do this. My preference is AOP using aspectj as all building blocks are there. It is just to build the integration point.
On the side note, very good to know that Wink is integrated in Tuscany. Being a project donated by IBM, I believe it will be a matter of time before it gets integrated with IBM SCA (if not already) and work its way. I would also be much obliged if you can send me a sample Tuscany app that uses Wink. [I can not wait for capability to create mediation modules for a fully ROA application with Wink.] ---------------------------------------- > Date: Mon, 27 Jun 2011 13:46:16 -0700 > Subject: Re: Enhancement to Wink Rest life cycle > From: [email protected] > To: [email protected] > > On Sun, Jun 26, 2011 at 2: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. > > > > I believe these are probably valid use cases, I have done something > similar while integrating Wink with Tuscany where you can create your > policies which would inject interceptor to the invocation chain, > similar to what you are proposing directly in Wink. Maybe a > simplified version of what you are proposing would be a way to > identify a handler to be injected declaratively or via some > annotation. Having said that, let's see what feedback other community > members would provide. > > -- > Luciano Resende > http://people.apache.org/~lresende > http://twitter.com/lresende1975 > http://lresende.blogspot.com/
