Package juzu.impl.inject.spi

Examples of juzu.impl.inject.spi.InjectorProvider


    if (config.name == null) {
      throw new ServletException("No application configured");
    }

    // Create and configure bridge
    InjectorProvider injectorProvider = config.injectorProvider;
    if (injectorProvider == null) {
      throw new UnavailableException("No inject implementation selected");
    } else {
      servletLogger.info("Using inject implementation " + injectorProvider.getValue());
    }

    //
    BridgeContext bridgeContext = new AbstractBridgeContext() {
      final ResourceResolver resolver = new ResourceResolver() {
View Full Code Here


          log.debug("Inject implementation " + provider.getValue() + " not available");
        }
      }
      Iterator<InjectorProvider> i = providers.values().iterator();
      if (i.hasNext()) {
        InjectorProvider implementation = i.next();
        log.debug("Selected " + implementation.get() + " inject implementation");
        return implementation;
      } else {
        log.debug("No inject implementation available");
        return null;
      }
    } else {
      inject = inject.trim().toLowerCase();
      InjectorProvider implementation = InjectorProvider.find(inject);
      if (implementation == null) {
        log.debug("Inject implementation " + inject + " not available");
        return null;
      } else {
        return implementation;
View Full Code Here

        context.setAttribute(key, value);
      }
    };

    //
    InjectorProvider injectorProvider = bridgeConfig.injectorProvider;
    if (injectorProvider == null) {
      throw new UnavailableException("No inject implementation selected");
    } else {
      portletLogger.info("Using inject implementation " + injectorProvider.getValue());
    }

    //
    Injector injector = injectorProvider.get();
    if (injector instanceof SpringInjector) {
      SpringInjector springInjector = (SpringInjector)injector;
      Object parent = context.getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
      if (parent != null) {
        springInjector.setParent(parent);
View Full Code Here

TOP

Related Classes of juzu.impl.inject.spi.InjectorProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.