Package org.apache.xbean.kernel

Examples of org.apache.xbean.kernel.StringServiceName


        return "servicemix";
    }

    protected List getServices(Kernel kernel) {
        try {
            Object jbi = kernel.getService(new StringServiceName("jbi"));
            SpringServiceUnitContainer suContainer = (SpringServiceUnitContainer) jbi;
            ActivationSpec[] specs = suContainer.getActivationSpecs();
            List services = new ArrayList();
            if (specs != null) {
                for (int i = 0; i < specs.length; i++) {
View Full Code Here


                ServiceFactory serviceFactory = new SpringConfigurationServiceFactory(applicationContext);

                log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel");

                kernel.registerService(new StringServiceName(name), serviceFactory);
            }
            finally {
                Thread.currentThread().setContextClassLoader(oldClassLoader);
            }
        }
View Full Code Here

            Map serviceNameIndex = new HashMap(beanNames.length);
            for (int i = 0; i < beanNames.length; i++) {
                String beanName = beanNames[i];
                BeanDefinition def = registry.getBeanDefinition(beanName);
                if (!def.isAbstract()) {
                    ServiceName serviceName = new StringServiceName(beanName);
                    serviceNameIndex.put(beanName, serviceName);
                }
            }
            return serviceNameIndex;
        } else {
            String[] beanNames = applicationContext.getBeanDefinitionNames();
            Map serviceNameIndex = new HashMap(beanNames.length);
            for (int i = 0; i < beanNames.length; i++) {
                String beanName = beanNames[i];
                ServiceName serviceName = new StringServiceName(beanName);
                serviceNameIndex.put(beanName, serviceName);
            }
            return serviceNameIndex;
        }
    }
View Full Code Here

        }
        if (classLoader == null) {
            classLoader = SpringLoader.class.getClassLoader();
        }

        ServiceName serviceName = new StringServiceName("configuration:" + location);
        ServiceFactory springConfigurationServiceFactory = new SpringConfigurationServiceFactory(applicationContext);
        kernel.registerService(serviceName, springConfigurationServiceFactory);
        return serviceName;
    }
View Full Code Here

                    Map.Entry entry = (Map.Entry) iterator.next();
                    String name = (String) entry.getKey();
                    Object service = entry.getValue();

                    try {
                        ServiceName serviceName = new StringServiceName(name);
                        kernel.registerService(serviceName, new StaticServiceFactory(service, classLoader));
                        kernel.startService(serviceName);
                    } catch (Exception e) {
                        throw new FatalStartupError("Unable to bind bootstrap service '" + name + "' into the kernel", e);
                    }
View Full Code Here

        return "servicemix";
    }

    protected List getServices(Kernel kernel) {
        try {
            Object jbi = kernel.getService(new StringServiceName("jbi"));
            SpringServiceUnitContainer suContainer = (SpringServiceUnitContainer) jbi;
            ActivationSpec[] specs = suContainer.getActivationSpecs();
            List services = new ArrayList();
            for (int i = 0; i < specs.length; i++) {
                services.add(new LwContainerEndpoint(specs[i]));
View Full Code Here

TOP

Related Classes of org.apache.xbean.kernel.StringServiceName

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.