Examples of InjectionManager


Examples of com.sun.enterprise.container.common.spi.util.InjectionManager

            // Register EE injection manager at the bean deployment archive level.
            // We use the generic InjectionService service to handle all EE-style
            // injection instead of the per-dependency-type InjectionPoint approach.
            // Each InjectionServicesImpl instance knows its associated GlassFish bundle.

            InjectionManager injectionMgr = habitat.getByContract(InjectionManager.class);
            InjectionServices injectionServices = new InjectionServicesImpl(injectionMgr, bundle);

            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "WeldDeployer:: Adding injectionServices "
                        + injectionServices + " for " + bda.getId());
View Full Code Here

Examples of com.sun.enterprise.container.common.spi.util.InjectionManager

            // Register EE injection manager at the bean deployment archive level.
            // We use the generic InjectionService service to handle all EE-style
            // injection instead of the per-dependency-type InjectionPoint approach.
            // Each InjectionServicesImpl instance knows its associated GlassFish bundle.

            InjectionManager injectionMgr = services.getService(InjectionManager.class);
            InjectionServices injectionServices = new InjectionServicesImpl(injectionMgr, bundle);

            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "WeldDeployer:: Adding injectionServices "
                        + injectionServices + " for " + bda.getId());
View Full Code Here

Examples of com.sun.enterprise.container.common.spi.util.InjectionManager

            // Register EE injection manager at the bean deployment archive level.
            // We use the generic InjectionService service to handle all EE-style
            // injection instead of the per-dependency-type InjectionPoint approach.
            // Each InjectionServicesImpl instance knows its associated GlassFish bundle.

            InjectionManager injectionMgr = habitat.getByContract(InjectionManager.class);
            InjectionServices injectionServices = new InjectionServicesImpl(injectionMgr, bundle);

            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "WeldDeployer:: Adding injectionServices "
                        + injectionServices + " for " + bda.getId());
View Full Code Here

Examples of com.sun.enterprise.container.common.spi.util.InjectionManager

                    // Register EE injection manager at the bean deployment archive level.
                    // We use the generic InjectionService service to handle all EE-style
                    // injection instead of the per-dependency-type InjectionPoint approach.
                    // Each InjectionServicesImpl instance knows its associated GlassFish bundle.

                    InjectionManager injectionMgr = services.getService(InjectionManager.class);
                    InjectionServices injectionServices = new InjectionServicesImpl(injectionMgr, bundle, deploymentImpl);

                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE,
                                   CDILoggerInfo.ADDING_INJECTION_SERVICES,
View Full Code Here

Examples of com.sun.enterprise.container.common.spi.util.InjectionManager

           
            // perform injection
            try {
               
                WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
                InjectionManager injManager = wscImpl.getInjectionManager();
                injManager.injectInstance(handler);
            } catch(InjectionException e) {
                logger.log(Level.SEVERE, LogUtils.HANDLER_INJECTION_FAILED,
                        new Object[] {h.getHandlerClass(), e.getMessage()});
                continue;
            }
View Full Code Here

Examples of com.sun.enterprise.container.common.spi.util.InjectionManager

            // Register EE injection manager at the bean deployment archive level.
            // We use the generic InjectionService service to handle all EE-style
            // injection instead of the per-dependency-type InjectionPoint approach.
            // Each InjectionServicesImpl instance knows its associated GlassFish bundle.

            InjectionManager injectionMgr = services.getService(InjectionManager.class);
            InjectionServices injectionServices = new InjectionServicesImpl(injectionMgr, bundle);

            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "WeldDeployer:: Adding injectionServices "
                        + injectionServices + " for " + bda.getId());
View Full Code Here

Examples of org.jboss.injection.manager.spi.InjectionManager

      dependsPolicy.addDependency(this.createSwitchBoardDependency(ejbContainer, switchBoard));
      log.debug("Added dependency on Switchboard " + switchBoard.getId() + " for EJB container " + ejbContainer.getName());
     
     
      // create and setup Injector(s) for InjectionManager 
      InjectionManager injectionManager = this.getInjectionManager(container);
      // the container cannot function without an InjectionManager
      if (injectionManager == null)
      {
         throw new RuntimeException("No InjectionManager found for bean: " + container.getEjbName() + " in unit: "
               + this.jbossUnit + " (or its component deployment unit)");
View Full Code Here

Examples of org.jboss.injection.manager.spi.InjectionManager

            ServiceDependencyMetaData switchBoardDependency = new AnyStateServiceDependencyMetaData(switchBoard.getId(), ControllerState.START, ControllerState.INSTALLED);
            dependencies.add(switchBoardDependency);
            log.debug("Added switchboard dependency: " + switchBoard.getId() + " for web module: " + name);
         }
         // Injection Manager
         InjectionManager injectionManager = unit.getAttachment(InjectionManager.class);
         if (injectionManager != null)
         {
            // set the InjectionManager on the deployment
            deployment.setInjectionManager(injectionManager);
            // Setup the Injector
            Environment webEnvironment = metaData.getJndiEnvironmentRefsGroup();
            if (webEnvironment != null)
            {
               // convert JBMETA metadata to jboss-injection specific metadata
               JndiEnvironmentRefsGroup jndiEnvironment = new JndiEnvironmentImpl(webEnvironment, unit.getClassLoader());
               // For optimization, we'll create an Injector only if there's atleast one InjectionTarget
               if (this.hasInjectionTargets(jndiEnvironment))
               {
                  // create the injector
                  EEInjector eeInjector = new EEInjector(jndiEnvironment);
                  // add the injector the injection manager
                  injectionManager.addInjector(eeInjector);
                  // Deploy the Injector as a MC bean (so that the fully populated naming context (obtained via the SwitchBoard
                  // Barrier) gets injected.
                  String injectorMCBeanName = this.getInjectorMCBeanName(unit);
                  BeanMetaData injectorBMD = this.createInjectorBMD(injectorMCBeanName, eeInjector, switchBoard);
                  unit.addAttachment(BeanMetaData.class + ":" + injectorMCBeanName, injectorBMD);
View Full Code Here

Examples of org.jboss.injection.manager.spi.InjectionManager

    */
   @Override
   public void deploy(DeploymentUnit unit) throws DeploymentException
   {
      // create and attach a new InjectionManager for the unit
      InjectionManager injectionManager = new DefaultInjectionManager();
      unit.addAttachment(InjectionManager.class, injectionManager);
      if (logger.isTraceEnabled())
      {
         logger.trace("Added InjectionManager: " + injectionManager + " to unit " + unit);
      }
View Full Code Here

Examples of org.jboss.injection.manager.spi.InjectionManager

      // add dependency on START (and not INSTALLED) state of Switchboard, since the container only requires a fully populated ENC context,
      // but doesn't require a invokable context. An invokable context is only needed by Injector.
      containerBMDBuilder.addDemand(switchBoard.getId(), ControllerState.CREATE, ControllerState.START, null);
      logger.debug("Added dependency on switchboard " + switchBoard.getId() + " for container " + container.getName());
     
      InjectionManager injectionManager = unit.getAttachment(InjectionManager.class);
      // the container cannot function without an InjectionManager
      if (injectionManager == null)
      {
         throw new RuntimeException("No InjectionManager found for bean: " + container.getEjbName() + " in unit: " + unit);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.