Examples of installBundle()


Examples of org.jboss.osgi.framework.bundle.BundleManager.installBundle()

        log.tracef("Installing deployment: %s", deployment);
        try {
            boolean autoStart = deployment.isAutoStart();
            deployment.setAutoStart(false);
            BundleManager bundleManager = injectedBundleManager.getValue();
            bundleManager.installBundle(deployment);
            deployment.setAutoStart(autoStart);
        } catch (Throwable t) {
            throw new StartException("Failed to install deployment: " + deployment, t);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.spi.BundleManager.installBundle()

            // Do the install directly if we have a running management op
            // https://issues.jboss.org/browse/AS7-5642
            if (OperationAssociation.INSTANCE.getAssociation() != null) {
                LOGGER.warnCannotDeployBundleFromManagementOperation(dep);
                BundleManager bundleManager = injectedBundleManager.getValue();
                bundleManager.installBundle(dep, null, null);
            } else {
                LOGGER.debugf("Install deployment: %s", dep);
                String runtimeName = getRuntimeName(dep);
                putDeployment(runtimeName, dep);
                try {
View Full Code Here

Examples of org.ops4j.pax.swissbox.framework.RemoteFramework.installBundle()

        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");
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

        final String bundleRef = commandLine.getQualifier();
        final URL url = new URL(bundleRef);
        final BundleContext ctx = crankstartContext.getOsgiFramework().getBundleContext();
        final InputStream bundleStream = url.openStream();
        try {
            final Bundle b = ctx.installBundle(bundleRef, url.openStream());
           
            final int level = getStartLevel(crankstartContext);
            if(level > 0) {
                final BundleStartLevel bsl = (BundleStartLevel)b.adapt(BundleStartLevel.class);
                if(bsl == null) {
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

        BundleContext bundleContext = m_framework.getBundleContext();
        Activator hostActivator = new Activator();
        hostActivator.start(bundleContext);
        for (String location : bundleLocations)
        {
            Bundle addition = bundleContext.installBundle(location);
            addition.start();
        }
    }
}
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

        BundleContext bundleContext = m_framework.getBundleContext();
        Activator hostActivator = new Activator();
        hostActivator.start(bundleContext);
        for (String location : bundleLocations)
        {
            Bundle addition = bundleContext.installBundle(location);
            addition.start();
        }
    }
}
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

                Bundle bundle = targetPackage.getBundle(bsn);
                try {
                    if (bundle == null) {
                        // new bundle, install it
                        bundle = context.installBundle(BUNDLE_LOCATION_PREFIX + bsn, new BundleInputStream(source.getCurrentEntryStream()));
                        addRollback(new UninstallBundleRunnable(bundle, log));
                    }
                    else {
                        // existing bundle, update it
                        Version currentVersion = getVersion(bundle);
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

   @Override
   public BundleHandle installBundle(URL bundleURL) throws BundleException, IOException
   {
      BundleContext sysContext = framework.getBundleContext();
      Bundle bundle = sysContext.installBundle(bundleURL.toExternalForm());
      return new BundleHandle(bundle.getBundleId(), bundle.getSymbolicName());
   }

   @Override
   public void resolveBundle(BundleHandle handle) throws BundleException, IOException
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

            BundleContext compositeBundleContext = cb.getCompositeFramework().getBundleContext();
            // install the blueprint sample onto the framework associated with the composite bundle
            MavenArtifactProvisionOption mapo = mavenBundleInTest(getClass().getClassLoader(), "org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
            // let's use input stream to avoid invoking mvn url handler which isn't avail in the child framework.
            InputStream is = new URL(mapo.getURL()).openStream();
            Bundle bundle = compositeBundleContext.installBundle(mapo.getURL(), is);
            assertNotNull(bundle);
           
            // start the composite bundle then the blueprint sample
            cb.start();
            bundle.start();
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

            BundleContext compositeBundleContext = cb.getCompositeFramework().getBundleContext();
            // install the blueprint sample onto the framework associated with the composite bundle
            MavenArtifactProvisionOption mapo = mavenBundleInTest(getClass().getClassLoader(), "org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
            // let's use input stream to avoid invoking mvn url handler which isn't avail in the child framework.
            InputStream is = new URL(mapo.getURL()).openStream();
            Bundle bundle = compositeBundleContext.installBundle(mapo.getURL(), is);
            assertNotNull(bundle);
           
            // start the composite bundle then the blueprint sample
            cb.start();
            bundle.start();
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.