Package org.osgi.framework.launch

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()


        factory = (FrameworkFactory) osgiFrameworkFactoryClazz
            .newInstance();
      } catch (Exception e) {
        throw new RuntimeException("初始化osgiFrameworkFactoryClass失败!", e);
      }
      framework = factory.newFramework(osgiFrameworkConfigMap);

      logger.info("正在启动OSGi框架,OSGi框架工厂类: " + osgiFrameworkFactoryClass);
    }

    long osgiFrameworkStartTime = System.currentTimeMillis();
View Full Code Here


        Map<Object, Object> props = new HashMap<Object, Object>();
        props.put("osgi.clean", "true");
        props.put("osgi.instance.area", new File("target/workspace").toURI().toString());
        props.put("osgi.install.area", new File("target/eclipse").toURI().toString());
        props.put("osgi.configuration.area", new File("target/eclipse").toURI().toString());
        framework = factory.newFramework(props);
        framework.start();
        return framework.getBundleContext();
    }

    public BundleContext start() {
View Full Code Here

                }
                propMap.putAll(props);
            }
        }
        propMap.putAll(properties);
        return factory.newFramework(propMap);
    }

    public boolean isEquinox() {
        return isEquinox;
    }
View Full Code Here

            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
            factoryClass = br.readLine();
            br.close();
        }
        FrameworkFactory factory = (FrameworkFactory) classLoader.loadClass(factoryClass).newInstance();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.init();
        // Process properties
        loadStartupProperties(configProps);
        processAutoProperties(framework.getBundleContext());
        framework.start();
View Full Code Here

        final Map<String, String> configMap = new HashMap<String, String>(2);
        // Cleans framework before first init. Subsequent init invocations do not clean framework.
        configMap.put("org.osgi.framework.storage.clean", "onFirstInit");
        // Delegates loading of endorsed libraries to JVM classloader
        // config.put("org.osgi.framework.bootdelegation", "javax.*,org.w3c.*,org.xml.*");
        OsgiFramework = factory.newFramework(configMap);
        OsgiFramework.init();
        OsgiFramework.start();
    }

}
View Full Code Here

        final Map<String, String> configMap = new HashMap<String, String>(2);
        // Cleans framework before first init. Subsequent init invocations do not clean framework.
        configMap.put("org.osgi.framework.storage.clean", "onFirstInit");
        // Delegates loading of endorsed libraries to JVM classloader
        // config.put("org.osgi.framework.bootdelegation", "javax.*,org.w3c.*,org.xml.*");
        OsgiFramework = factory.newFramework(configMap);
        OsgiFramework.init();
        OsgiFramework.start();
    }

}
View Full Code Here

                + "org.osgi.service.metatype;version=\"1.1\","
                + "org.apache.ace.log;version=\"0.8.0\"");

        frameworkProperties.putAll(m_fwOptionHandler.getProperties());

        factory.newFramework(frameworkProperties).start();
    }

    private void showHelp() {
        System.out.println("Apache ACE Launcher\n"
                + "Usage:\n"
View Full Code Here

      System.out.println( "Unable to locate the osgi jar");
    }
   
    try {
      FrameworkFactory frameworkFactory = factoryIterator.next();
      framework = frameworkFactory.newFramework(Collections.EMPTY_MAP);
    } catch (ServiceConfigurationError sce) {
      sce.printStackTrace();
    }
    framework.init();
    framework.start();
View Full Code Here

        });
       
        // Start up the OSGI framework
        ServiceLoader<FrameworkFactory> loader = ServiceLoader.load(FrameworkFactory.class);
        FrameworkFactory factory = loader.iterator().next();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.start();
               
        serverInfo = new ServerInfo(geronimoHome, geronimoBase);       
        framework.getBundleContext().registerService(ServerInfo.class.getName(), serverInfo, null);
       
View Full Code Here

            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
            factoryClass = br.readLine();
            br.close();
        }
        FrameworkFactory factory = (FrameworkFactory) classLoader.loadClass(factoryClass).newInstance();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.init();
        // Process properties
        loadStartupProperties(configProps);
        processAutoProperties(framework.getBundleContext());
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.