Luciano Resende <[email protected]> wrote on 06/27/2011 04:51:14 PM:

> From: Luciano Resende <[email protected]>
> To: [email protected]
> Date: 06/27/2011 04:52 PM
> Subject: Re: Enhancement to Wink Rest life cycle
>
> On Mon, Jun 27, 2011 at 1:47 PM, Daniel Krook <[email protected]> wrote:
> > Paulo Borges <[email protected]> wrote on 06/26/2011 05:44:29 PM:
> >
> >> From: Paulo Borges <[email protected]>
> >> To: Wink user group <[email protected]>
> >> Date: 06/26/2011 05:45 PM
> >
> >> Subject: Enhancement to Wink Rest life cycle
> >>
> >>
> >> 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.
> >>
> >
> >
> > Hi Paulo,
> >
> > I am using Wink with Spring and would like to see clearer support for
AOP
> > around resource methods myself.
> >
> > A few months back, I tried several approaches using both Spring 1.2 and
2.0
> > AOP models but wasn't successful. My goal was to remove my programmatic
> > access control checks from the methods that handled authenticated and
> > anonymous reads (GET) vs authenticated writes (PUT/POST/DELETE) within
a
> > single resource.
> >
> > I eventually worked out a solution using Spring Security, but it still
> > bugged me since I wanted to handle some logging as well.
> >
> > As I implemented the fix a while ago, unfortunately I can't provide
more
> > detail on the error messages I was seeing. But yes, my general feeling
is
> > that it would be nice to see an example that shows how Spring AOP /
AspectJ
> > could or should work in Wink.
> >
> >
> >
> > Thanks,
> > -Dan
> >
>
> Would it be helpful if I provide a sample using the Tuscany/Wink
> integration that does exactly this ? I could get it done in my "spare
> time" in couple days.
>
>
>
> --
> Luciano Resende

Hi Luciano,

It's no rush for me, but I would very much appreciate a look at that
implementation.



Thanks,
-Dan


Daniel Krook
Software Engineer, Advanced Cloud Technology, GTS, IBM
IBM Level 2 Certified IT Specialist - Java EE, PHP, BlackBerry, DB2 &
Solaris Certified

Reply via email to