I am just guessing as I never tried it but wouldn't the following work (assuming guice-servlet)?
@RequestScoped
public final MyService provideMyService(Injector injector, @RequestParameters Map<String, String[]> requestParams) {
String txValue = ... // get TX query param value from requestParams
String className = lookupImplClass(txValue); // same lookup code as before which searches through your configuration
Class<?> serviceImplClass = Class.forName(className);
return injector.getInstance(serviceImplClass); // should work because of Just-In-Time bindings
}
And then you inject a Provider<MyService> into your servlet and call service.get() for each request? Since provideMyService() is called for each request it should provide the correct implementation and you can use @Inject in all your service implementations.
-- J.