Hi Lance, I saw this in the user guide lately. What I want is something like @AfterRender, @BeforeRender etc. I want to invoke a method (per name constraints for example) and provide some objects to inject on top of the registery and the dependencies the registery is able to inject itself should be automatically added.
Think about this: interface MyRunnable<T> { //T invoke(Object...arguments); } class Task implements MyRunnable<Boolean> { Boolean invoke(@Inject Session session, @Inject Service service, String jsonConfig, long timeout); } final long TIMEOUT = TIME_60_MINUTES; Invoker.invoke("invoke", task, "{'config':{'value':10, 'value2':'string'}}", TIMEOUT); Thats kind of what I am looking for. Cheers, Martin (Kersten) 2013/9/23 Dmitry Gusev <dmitry.gu...@gmail.com> > Didn't know about @PostInjecton, thanks for sharing. > > > On Mon, Sep 23, 2013 at 3:19 PM, Lance Java <lance.j...@googlemail.com > >wrote: > > > Methods marked with @PostInjection will be called after your constructor. > > The method params will be injected. > > > > > > > http://tapestry.apache.org/tapestry5/apidocs//org/apache/tapestry5/ioc/annotations/PostInjection.html > > > > Eg > > public class MyServiceImpl implements MyService { > > public MyServiceImpl(Dependency1 s1, Dependency2 d2) { > > // set > > } > > > > @PostInjection > > public cleanupThread(PerthreadManager perthreadManager) { > > perthreadManager.addThreadCleanupListener(…); > > } > > } > > > > > > -- > Dmitry Gusev > > AnjLab Team > http://anjlab.com >