Hi Thiago, unfortunately, it isn't that simple. I made a quick test and introduced a bean service lifecycle. Technically it works, but the solution isn't very elegant: you must bind every actor and make sure it uses the correct scope plus the correct marker (to trigger the method advise). Due to the architecture of Akka, you then have to create the actual actors using actorSystem.actorOf() using either an indirect actor producer or an instance of the actor service defined before. The solution with autobuild() is much more elegant, with the exception that you need to handle the transactions manually. For me it feels, that actors are more similar to pages than to real services. They act (sic) as glue code (integration layer) for high level business code.
I think I will go back to the autobuild() solution and manage the transactions manually (or outside Akka). Thanks for the input! Thilo ________________________________________ From: Thiago H de Paula Figueiredo <thiag...@gmail.com> Sent: Tuesday, February 11, 2014 17:30 To: Tapestry users Subject: Re: Tapestry IOC / Autobuild / Advise Question On Tue, 11 Feb 2014 13:51:13 -0200, Thilo Tanner <thilo.tan...@reprisk.com> wrote: > Hi Lance, hi Thiago, Hi! > thanks a lot for your feedback. To be honest, I'm still a bit confused: > > Creating a bean or prototype scope seem to be controversial, according > to older discussions: > > e.g. http://web.archiveorange.com/archive/v/NzHgIqXAifXhNB7jPRIc I don't think that's controversial at all. The thread had a scenario which is very different from yours. You need decoration and advice, so you need to make it a service. The scenario in the thread wanted that an object that isn't a proxy to be returned, so my answer wass based on this requirement. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org