Examples of newFramework()


Examples of com.dotcms.repackage.org.apache.felix.framework.FrameworkFactory.newFramework()

  }

        try {
            // (8) Create an instance and initialize the framework.
            FrameworkFactory factory = getFrameworkFactory();
            m_fwk = factory.newFramework( configProps );
            m_fwk.init();

            // (9) Use the system bundle context to process the auto-deploy
            // and auto-install/auto-start properties.
            AutoProcessor.process( configProps, m_fwk.getBundleContext() );
View Full Code Here

Examples of org.apache.felix.framework.FrameworkFactory.newFramework()

      activators.add(new EclipseProjectURLAutoUpdater());

      StringMap stringMap = new StringMap(configProperties, false);
      stringMap.put("felix.systembundle.activators", activators);

      framework = (Felix)frameworkFactory.newFramework(stringMap);
      framework.init();
      AutoProcessor.process(stringMap, framework.getBundleContext());
      framework.start();
      framework.waitForStop(0);
      System.exit(0);
View Full Code Here

Examples of org.apache.felix.framework.FrameworkFactory.newFramework()

      activators.add(new EclipseProjectURLAutoUpdater());

      StringMap stringMap = new StringMap(configProperties);
      stringMap.put("felix.systembundle.activators", activators);

      framework = (Felix)frameworkFactory.newFramework(stringMap);
      framework.init();
      AutoProcessor.process(stringMap, framework.getBundleContext());
      framework.start();
      framework.waitForStop(0);
      System.exit(0);
View Full Code Here

Examples of org.eclipse.osgi.launch.EquinoxFactory.newFramework()

        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

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

            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.start();
        processAutoProperties(framework.getBundleContext());
        // Start lock monitor
        new Thread() {
            public void run() {
View Full Code Here

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

    @Override
    public void execute(CrankstartContext crankstartContext, CrankstartCommandLine commandLine) throws Exception {
        // TODO this should work
        // FrameworkFactory frameworkFactory = java.util.ServiceLoader.load(FrameworkFactory.class).iterator().next();
        final FrameworkFactory frameworkFactory = (FrameworkFactory)getClass().getClassLoader().loadClass("org.apache.felix.framework.FrameworkFactory").newInstance();
        crankstartContext.setOsgiFramework(frameworkFactory.newFramework(crankstartContext.getOsgiFrameworkProperties()));
        crankstartContext.getOsgiFramework().start();
        final int nBundles = crankstartContext.getOsgiFramework().getBundleContext().getBundles().length;
        log.info("OSGi framework started, {} bundles installed", nBundles);
       
        // Unless specified otherwise, stop processing the crankstart file if this is not the first
View Full Code Here

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

            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

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

            {
                verbose = cl.hasOption('v');

                Map<String, String> config = buildConfig(cl);

                framework = factory.newFramework(config);
                framework.init();
                framework.start();

                Server server = launch(cl);
View Full Code Here

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

        try
        {
            // Create an instance of the framework.
            FrameworkFactory factory = getFrameworkFactory();
            m_fwk = factory.newFramework(configProps);
            // Initialize the framework, but don't start it yet.
            m_fwk.init();
            // Use the system bundle context to process the auto-deploy
            // and auto-install/auto-start properties.
            AutoProcessor.process(configProps, m_fwk.getBundleContext());
View Full Code Here

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

    protected Framework createFramework(T conf) {
        FrameworkFactory factory = conf.getFrameworkFactory();
        if (factory == null)
            throw new IllegalStateException("Cannot obtain " + FrameworkFactory.class.getName());
        Map<String, String> config = conf.getFrameworkConfiguration();
        return factory.newFramework(config);
    }

    protected Framework getFramework() {
        return framework;
    }
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.