Examples of InjectionManager


Examples of com.sun.enterprise.InjectionManager

  J2EETransactionManager tm =
    J2EETransactionManagerImpl.createTransactionManager();
  sw.setTransactionManager(tm);

        // Create the Injection Manager and set it on the switch.
        InjectionManager injectionMgr = new InjectionManagerImpl();
        sw.setInjectionManager(injectionMgr);              

        return result;
    }
View Full Code Here

Examples of com.sun.enterprise.InjectionManager

  try {
      if(callbackHandler != null) {
          handlerClass = Class.forName(callbackHandler, true, loader);
    handler = (CallbackHandler) handlerClass.newInstance();
                Thread.currentThread().setContextClassLoader(loader);
                InjectionManager injMgr = Switch.getSwitch().getInjectionManager();
                injMgr.injectInstance(handler, descriptor);
               
      } else {
          handler = new com.sun.enterprise.security.auth.login.LoginCallbackHandler(guiAuth);
      }
  } catch(Exception e) {
View Full Code Here

Examples of com.sun.enterprise.InjectionManager

           

            // Inject the application client's injectable resources.  This
            // must be done after java:comp/env is initialized but before
            // the application client's main class is invoked.
            InjectionManager injMgr = Switch.getSwitch().getInjectionManager();
            injMgr.injectClass(cl, appDesc);           
                           
            if(runClient) {
                Utility.invokeApplicationMain(cl, applicationArgs);
                _logger.info("Application main() finished normally");
            }


            // inject the pre-destroy methods before shutting down
            injMgr.invokeClassPreDestroy(cl, appDesc);           

      // Let's shutdown all the system resource adapters that are 
      // active in the container.
      shutDownSystemAdapters();
View Full Code Here

Examples of com.sun.enterprise.InjectionManager

           
            // Inject the application client's injectable resources.  This
            // must be done after java:comp/env is initialized but before
            // the application client's main class is invoked.  Also make
            // sure the injection mgr will clean up during shutdown.
            InjectionManager injMgr = Switch.getSwitch().getInjectionManager();
            cleanup.setInjectionManager(injMgr, cl, appDesc);
           
            injMgr.injectClass(cl, appDesc);           
                  
            /*
             Try to locate a script with the same name as the main class,
             but with a file type matching the file types handled by one of the
             scripting engines currently available.
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.severe("Handler " + h.getHandlerClass() +
                            " instance injection failed : " + e.getMessage());
                continue;
            }
View Full Code Here

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

        try {
            // Set proper component context
            invMgr.preInvoke(inv);
            // Injection first
            InjectionManager injManager = WebServiceContractImpl.getInstance().getInjectionManager();
            injManager.injectInstance(instance);

            // Set webservice context here
            // If the endpoint has a WebServiceContext with @Resource then
            // that has to be used
            WebServiceContextImpl wsc = null;
View Full Code Here

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

                for (ServletAdapter x : list) {
                    x.getEndpoint().dispose();
                    for (Handler handler : x.getEndpoint().getBinding().getHandlerChain()) {
                        try {
                            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
                            InjectionManager injManager = wscImpl.getInjectionManager();
                            injManager.destroyManagedObject(handler);
                        } catch (InjectionException e) {
                            logger.log(Level.WARNING, LogUtils.DESTORY_ON_HANDLER_FAILED,
                                    new Object[]{handler.getClass(), x.getEndpoint().getServiceName(), e.getMessage()});
                            continue;
                        }
View Full Code Here

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

        try {
            // Set proper component context
            invMgr.preInvoke(inv);
            // Injection first
            InjectionManager injManager = WebServiceContractImpl.getInstance().getInjectionManager();
            injManager.injectInstance(instance);

            // Set webservice context here
            // If the endpoint has a WebServiceContext with @Resource then
            // that has to be used
            WebServiceContextImpl wsc = null;
View Full Code Here

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

                for (ServletAdapter x :list)  {
                  x.getEndpoint().dispose();
                        for (Handler handler : x.getEndpoint().getBinding().getHandlerChain()) {
                        try {
                            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
                            InjectionManager injManager = wscImpl.getInjectionManager();
                            injManager.destroyManagedObject(handler);
                        } catch (InjectionException e) {
                            logger.log(Level.WARNING, LogUtils.DESTORY_ON_HANDLER_FAILED,
                                    new Object[]{handler.getClass(), x.getEndpoint().getServiceName(), e.getMessage()});
                            continue;
                        }
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();
                //PostConstruct is invoked by createManagedObject as well
                handler = (Handler) injManager.createManagedObject(handlerClass);
            } catch(InjectionException e) {
                logger.log(Level.SEVERE, LogUtils.HANDLER_INJECTION_FAILED,
                        new Object[] {h.getHandlerClass(), e.getMessage()});
                continue;
            }
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.