Examples of Kernel


Examples of org.apache.geronimo.kernel.Kernel

        File targetServerPath = serverInfo.resolveServer(relativeTargetServerPath);
        if (targetServerPath.exists()) {
          FileUtils.forceDelete(targetServerPath);
        }
        String targetServerPathName = targetServerPath.getAbsolutePath();
        Kernel kernel = new BasicKernel("assembly");

        try {
//            kernel.boot();
            PluginInstallerGBean installer = new PluginInstallerGBean(
                    targetRepositoryPath,
                    targetServerPathName,
                    serverInstanceDatas,
                    kernel,
                    classLoader);

            installer.install(pluginList, localSourceRepository, true, null, null, downloadPoller);
        } finally {
            kernel.shutdown();
        }
        return downloadPoller;
    }
View Full Code Here

Examples of org.apache.xbean.kernel.Kernel

    /* (non-Javadoc)
     * @see org.apache.servicemix.common.Deployer#deploy(java.lang.String, java.lang.String)
     */
    public ServiceUnit deploy(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException {
        Kernel kernel = KernelFactory.newInstance().createKernel(component.getComponentName() + "/" + serviceUnitName);
        try {
            // Create service unit
            XBeanServiceUnit su = new XBeanServiceUnit();
            su.setKernel(kernel);
            su.setComponent(component);
            su.setName(serviceUnitName);
            su.setRootPath(serviceUnitRootPath);
            // Load configuration
            ClassLoader classLoader = component.getClass().getClassLoader();
            Thread.currentThread().setContextClassLoader(classLoader);

            SpringLoader springLoader = createSpringLoader();
            springLoader.setKernel(kernel);
            springLoader.setBaseDir(new File(serviceUnitRootPath));
            springLoader.setXmlPreprocessors(getXmlPreProcessors(serviceUnitRootPath));
            springLoader.setBeanFactoryPostProcessors(getBeanFactoryPostProcessors(serviceUnitRootPath));
           
            ServiceName configurationName = springLoader.load(getXBeanFile());
            kernel.startService(configurationName);
            su.setConfiguration(configurationName);
            // Use SU classloader
            Thread.currentThread().setContextClassLoader(su.getConfigurationClassLoader());
            // Retrieve endpoints
            List services = getServices(kernel);
            if (services == null || services.size() == 0) {
                throw failure("deploy", "No endpoints found", null);
            }
            for (Iterator iter = services.iterator(); iter.hasNext();) {
                Endpoint endpoint = (Endpoint) iter.next();
                endpoint.setServiceUnit(su);
                validate(endpoint);
                su.addEndpoint(endpoint);
            }
            if (su.getEndpoints().size() == 0) {
                throw failure("deploy", "No endpoint found", null);
            }
            return su;
        } catch (Throwable e) {
            // There is a chance the thread context classloader has been changed by the xbean kernel,
            // so put back a good one
            Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
            kernel.destroy();
            if (e instanceof DeploymentException) {
                throw ((DeploymentException) e);
            } else {
                throw failure("deploy", "Could not deploy xbean service unit", e);
            }
View Full Code Here

Examples of org.codehaus.loom.interfaces.Kernel

        }
    }

    private boolean emptyKernel()
    {
        final Kernel kernel = (Kernel)getEmbeddorComponent(
            Kernel.class.getName() );
        if( null != kernel )
        {
            final String[] names = kernel.getApplicationNames();
            return ( 0 == names.length );
        }
        else
        {
            //Consider the kernel empty
View Full Code Here

Examples of org.janusproject.kernel.agent.Kernel

    assert(environment!=null);
    if (environmentSingleton==null) {
      environmentSingleton = environment;
      uiSingleton = gui;
      if (gui!=null) environment.addEnvironmentListener(gui);
      Kernel k = Kernels.create(new SimulationScheduler(environment, waitDuration));
      k.addKernelListener(new KernelAdapter(){
        /**
         * {@inheritDoc}
         */
        @SuppressWarnings("synthetic-access")
        @Override
 
View Full Code Here

Examples of org.jboss.as.console.mbui.Kernel

                Console.MODULES.getCurrentUser()
        );

        // mbui kernel instance
        this.dialogs = new UndertowDialogs();
        this.kernel = new Kernel(dialogs, new Framework() {
            @Override
            public DispatchAsync getDispatcher() {
                return dispatcher;
            }
        }, globalContext);
View Full Code Here

Examples of org.jboss.kernel.Kernel

   {
      // Bind an EJB3 Registrar Implementation if not already bound
      if (!Ejb3RegistrarLocator.isRegistrarBound())
      {
         // Obtain the Kernel
         Kernel sanders = this.kernel;
         assert sanders != null : Kernel.class.getSimpleName() + " must be provided in order to bind "
               + Ejb3Registrar.class.getSimpleName();

         // Create an EJB3 Registrar
         Ejb3Registrar registrar = new Ejb3McRegistrar(sanders);
View Full Code Here

Examples of org.jboss.kernel.Kernel

      {
         processWebMetaData(sharedJBossWebMetaData);
      }

      ServletContext servletContext = context.getServletContext();
      Kernel kernel = kernelLocal.get();
      DeploymentUnit unit = deploymentUnitLocal.get();
      log.debug("Setting MC attributes, kernel: " + kernel + ", unit: " + unit);
      servletContext.setAttribute(KernelConstants.KERNEL_NAME, kernel);
      servletContext.setAttribute(DeploymentUnit.class.getName(), unit);
   }
View Full Code Here

Examples of org.jboss.kernel.Kernel

               ClassLoader loader = Thread.currentThread().getContextClassLoader();
               mbeanServer.registerMBean(new JmxCL(loader), new ObjectName("jboss:service=defaultClassLoader"));

               BasicBootstrap bootstrap = new BasicBootstrap();
               bootstrap.run();
               Kernel kernel = bootstrap.getKernel();
               AbstractController controller = (AbstractController)kernel.getController();

               serviceController.setMBeanServer(mbeanServer);
               serviceController.setKernel(kernel);

               MainDeployerImpl mainDeployer = new MainDeployerImpl();
View Full Code Here

Examples of org.jboss.kernel.Kernel

      assertEquals(expected, result);
   }

   protected SimpleBean simpleMapFromStrings() throws Throwable
   {
      Kernel kernel = bootstrap();
      KernelConfigurator configurator = kernel.getConfigurator();
     
      AbstractBeanMetaData bmd = new AbstractBeanMetaData(SimpleBean.class.getName());
      HashSet properties = new HashSet();
      bmd.setProperties(properties);
View Full Code Here

Examples of org.jboss.kernel.Kernel

      assertEquals(expected, result);
   }

   protected SimpleBean customMapExplicit() throws Throwable
   {
      Kernel kernel = bootstrap();
      KernelConfigurator configurator = kernel.getConfigurator();
     
      AbstractBeanMetaData bmd = new AbstractBeanMetaData(SimpleBean.class.getName());
      HashSet properties = new HashSet();
      bmd.setProperties(properties);
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.