On Tue, 11 Feb 2014 15:03:21 -0200, Thilo Tanner <thilo.tan...@reprisk.com> wrote:

Hi Thiago,

Hi!

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.

You can declare services based on objects you instantiate yourself. Just create a buildXXX() method. Of course, you'll need to create one for each actor.

The solution with autobuild() is much more elegant,

Have you tried using the proxy() method instead of autobuild? I'm not sure it'll work, but that's something I'd try. After all, the whole Tapestry-IoC implementation of decoration and aspects are based on proxies.

--
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

Reply via email to