pmularien wrote:

Al Maw wrote:
Yes, there was, and this issue hasn't been resolved for 1.3 yet.

I did it like this because some people will want to use both Guice and Spring in their apps at the same time, especially if they're
mid-migration.

We should come up with a decent way to make this still possible. Suggestions/patches are welcome.

Suggestions (not really thought through well, so apologies if they seem
silly):
- InjectorHolder.getInjectors() returns any/all injector references
- InjectorHolder.getInjector(_some enum / constant)

If you're planning supporting multiple ConfigurableInjectors within the same
wicket app simultaneously, changing InjectorHolder to a multi-valued object
would make the most sense. Although I agree this gets a bit away from the
simplicity of the existing model.

Yeah. I think maybe:

public static ConfigurableInjector getInjector() {
    return getInjectors(null);
}

public static ConfigurableInjector getInjector() {
    if (type == null && injectors.size() > 1) {
        throw new IllegalArgumentException(
                "Have more than one Injector available"
        );
    }
}

...sort of thing, would make some sense. That way we won't break existing people's code. I'll have a look into this ahead of the RC2 release.

Could you create a JIRA issue for it please?

Regards,

Al

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to