tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rektide <rekt...@voodoowarez.com>
Subject Advising a Scope PerThread Services with Context
Date Fri, 04 Mar 2011 17:40:54 GMT
Hello everyone.  I'm new here, so let me just say hello.  I'm rektide, I've been using
Tapestry 5.1 since July 2010.  Been mostly great, with the main caveat being trying to
figure out how to coax my app into having enough context when I run Ajax requests.  The
component model is awesome, the IOC engine works great, the JS integration is like nothing
I've seen & has proved time & time again quite flexible.  Good stuff, thanks all.

At present, I'm trying to build a MethodAdvice implementation that modifies the behavior 
of a PerThread Scope'd service.  The MethodAdvice needs access to the public members of the
Service to perform this advising.

I cant find any way to get the Service instance from inside the MethodAdvice.

The module that fires the MethodAdviceReceiver can be injected in to, but this is a one time
initialization action: it rebuild the MethodAdvice per-request.  I've tried various
injection annotations in the MethodAdvice itself, but havent had any luck.  Is there some
programatic means of requesting a Service that I can run inside the MethodAdvice to pull out
the current instance of my Service?

As a note, it would be awfully handy if Invocation had a getThis() method!  Or if the
advise method had a second parameter to provide that context!

Any suggestions for now, on how to get the Service being advised from within the

Regards & thanks,

To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

View raw message