private static void registerEvaluationContextFactory(final MutablePicoContainer container) { // PoolingEvaluationContextFactory depends on DefaultEvaluationContextFactory. // however both implement the same interface users depend on which causes an ambiguity. // therefore DefaultEvaluationContextFactory should be only visible to PoolingEvaluationContextFactory. final ConstructorInjectionComponentAdapter _serviceCA = new ConstructorInjectionComponentAdapter(DefaultEvaluationContextFactory.class, DefaultEvaluationContextFactory.class); final ConstructorInjectionComponentAdapter _poolingServiceCA = new ConstructorInjectionComponentAdapter(EvaluationContextFactory.class, PoolingEvaluationContextFactory.class, new Parameter[] {BasicComponentParameter.BASIC_DEFAULT, new BasicComponentParameter(DefaultEvaluationContextFactory.class)}); final LocalParameterComponentAdapter _localParamCA = new LocalParameterComponentAdapter(_poolingServiceCA, new ComponentAdapter[] {_serviceCA}); final ComponentAdapter _cachingCA = new CachingComponentAdapter(_localParamCA); container.registerComponent(_cachingCA); }