Package org.apache.xbean.kernel

Examples of org.apache.xbean.kernel.StaticServiceFactory


                Map.Entry entry = (Map.Entry) iterator.next();
                String beanName = (String) entry.getKey();
                ServiceName serviceName = (ServiceName) entry.getValue();

                Object bean = applicationContext.getBean(beanName);
                StaticServiceFactory serviceFactory = new StaticServiceFactory(bean, classLoader);
                factories.put(serviceName, serviceFactory);
            }
            serviceFactories = Collections.unmodifiableMap(factories);

            // register each bean with the kernel
            for (Iterator iterator = serviceFactories.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry = (Map.Entry) iterator.next();
                ServiceName serviceName = (ServiceName) entry.getKey();
                StaticServiceFactory serviceFactory = (StaticServiceFactory) entry.getValue();
                kernel.registerService(serviceName, serviceFactory);
            }

        } catch (ServiceAlreadyExistsException e) {
            destroy();
View Full Code Here


                    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

TOP

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

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.