« Return to Thread: Registry as a property

Re: Registry as a property

by Davor Hrg :: Rate this Message:

Reply to Author | View in Thread

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, <flidp@...> 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!


 « Return to Thread: Registry as a property