Re: What pattern to use for service disambiguation based on String input?

2016-05-09 Thread Chris Poulsen
If you create a MappedConfiguration you will end up with a configuration backed by a map of name->impl. In your service you inject the mapped configuration, check to see if the configuration contains a generator for your "string" and use the impl if that is the case

Re: What pattern to use for service disambiguation based on String input?

2016-05-09 Thread Rafael Bugajewski
> On 2016-07-05, at 09:48 AM, Chris Poulsen wrote: > > It is not really clear to me what you want to do? Are you talking about > picking the correct impl once (during initial application setup) or > selecting the impl. per request. Is the "input parameter" something that

Re: What pattern to use for service disambiguation based on String input?

2016-05-08 Thread Barry Books
I usually use two services to solve this problem. First I create a service that takes a string and returns an object. In your case I'd build a License interface and the objects would all implement License. Most likely this can be done with a service that takes a mapped configuration of

Re: What pattern to use for service disambiguation based on String input?

2016-05-07 Thread Chris Poulsen
It is not really clear to me what you want to do? Are you talking about picking the correct impl once (during initial application setup) or selecting the impl. per request. Is the "input parameter" something that is defined during registry bootstrap or passed in on every call? For the prior I

What pattern to use for service disambiguation based on String input?

2016-05-06 Thread Rafael Bugajewski
Hello, I use tapestry-ioc in a Jersey JAX-RS application to access my Tapestry services. I have a LicenseService that generates a software license with the help of another service. This LicenseGeneratorService has implementations for different products Product1LicenseGeneratorServiceImpl,