Package org.ops4j.pax.swissbox.framework

Examples of org.ops4j.pax.swissbox.framework.RemoteFramework


    static String toPath(Class<?> klass) throws URISyntaxException {
        return klass.getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
    }

    private RemoteFramework findRemoteFramework(int _port, String rmiName) {
        RemoteFramework framework = null;
        Throwable reason = null;
        long startedTrying = System.currentTimeMillis();

        do {
            try {
View Full Code Here


        ForkedFrameworkFactory forkedFactory = new ForkedFrameworkFactory(frameworkFactory);

        Map<String, Object> frameworkProperties = new HashMap<String, Object>();
        frameworkProperties.put(Constants.FRAMEWORK_STORAGE, storage.getAbsolutePath());
        RemoteFramework framework = forkedFactory.fork(Collections.<String> emptyList(),
            Collections.<String, String> emptyMap(), frameworkProperties);
        framework.start();

        long bundleId = framework
            .installBundle("file:target/bundles/regression-pde-bundle-2.3.0.jar");
        framework.startBundle(bundleId);

        framework.callService("(objectClass=org.ops4j.pax.exam.regression.pde.HelloService)",
            "getMessage");

        Thread.sleep(3000);
        framework.stop();

        forkedFactory.join();
    }
View Full Code Here

        Map<String, Object> frameworkProperties = new HashMap<String, Object>();
        frameworkProperties.put(Constants.FRAMEWORK_STORAGE, storage.getAbsolutePath());
        frameworkProperties.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA,
            "org.kohsuke.metainf_services");
        RemoteFramework framework = forkedFactory.fork(Collections.<String> emptyList(),
            Collections.<String, String> emptyMap(), frameworkProperties, null,
            bootClasspath);
        framework.start();

        File testBundle = generateBundle();
        long bundleId = framework.installBundle("file:" + testBundle.getAbsolutePath());
        framework.startBundle(bundleId);

        // START>>> not yet implemented
        // framework.waitForState(bundleId, Bundle.ACTIVE, 1500);
        Thread.sleep(3000);
        // <<<END not yet implemented

        framework.stop();

        forkedFactory.join();
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.swissbox.framework.RemoteFramework

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.