You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by fl...@gmx.de on 2008/04/30 21:49:46 UTC
Registry as a property
Hello everyone!
I want to do something like this (simplified)
public class someService {
private Registry _registry;
public void doSomething(String sPoint, Object obj) {
SomeInterface worker = _registry.getService(sPoint, someInterface.class);
worker.doTheWork(obj);
}
... getter/setter ....
}
someService is a service constructed by the registry and has a property holding the registry again ... is this possible?
Or is there another way to do something like this?
Thanks for any suggestions!
Re: Registry as a property
Posted by Davor Hrg <hr...@gmail.com>.
Use mapped configuration,
cntribute all workers to it, named with a string,
use that mapped configuration to get the needed worker...
check the tapestry site for more info on Mapped configuration
...
Davor Hrg
On Wed, Apr 30, 2008 at 9:49 PM, <fl...@gmx.de> wrote:
> Hello everyone!
>
> I want to do something like this (simplified)
>
> public class someService {
>
> private Registry _registry;
>
> public void doSomething(String sPoint, Object obj) {
>
> SomeInterface worker = _registry.getService(sPoint, someInterface.class);
> worker.doTheWork(obj);
>
> }
>
> ... getter/setter ....
>
> }
>
> someService is a service constructed by the registry and has a property
> holding the registry again ... is this possible?
> Or is there another way to do something like this?
>
> Thanks for any suggestions!
>
>