Package org.jboss.osgi.framework

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


            ServiceName serviceName;
            try {
                final BundleManager bundleManager = depUnit.getAttachment(OSGiConstants.BUNDLE_MANAGER_KEY);
                if (!deploymentTracker.isClosed() && deploymentTracker.hasDeploymentName(depUnit.getName())) {
                    restoreStorageState(phaseContext, deployment);
                    serviceName = bundleManager.installBundle(deployment, deploymentTracker.getBundleInstallListener());
                    deploymentTracker.registerBundleInstallService(serviceName);
                } else {
                    serviceName = bundleManager.installBundle(deployment, null);
                }
            } catch (BundleException ex) {
View Full Code Here


                if (!deploymentTracker.isClosed() && deploymentTracker.hasDeploymentName(depUnit.getName())) {
                    restoreStorageState(phaseContext, deployment);
                    serviceName = bundleManager.installBundle(deployment, deploymentTracker.getBundleInstallListener());
                    deploymentTracker.registerBundleInstallService(serviceName);
                } else {
                    serviceName = bundleManager.installBundle(deployment, null);
                }
            } catch (BundleException ex) {
                throw new DeploymentUnitProcessingException(ex);
            }
            phaseContext.addDeploymentDependency(serviceName, OSGiConstants.INSTALLED_BUNDLE_KEY);
View Full Code Here

        StorageStateProvider storageProvider = injectedStorageProvider.getValue();
        StorageState storageState = storageProvider.getByLocation(dep.getLocation());
        if (storageState != null) {
            dep.addAttachment(StorageState.class, storageState);
        }
        return bundleManager.installBundle(dep, listener);
    }

    @Override
    public synchronized AutoInstallIntegration getValue() throws IllegalStateException {
        return this;
View Full Code Here

            StorageState storageState = storageStateProvider.getByLocation(deployment.getLocation());
            if (storageState != null) {
                deployment.addAttachment(StorageState.class, storageState);
            }
            ServiceListener<Bundle> listener = deploymentTracker.getBundleInstallListener();
            bundleManager.installBundle(deployment, listener);
        } catch (Throwable th) {
            throw MESSAGES.startFailedToInstallDeployment(th, deployment);
        }
    }
}
View Full Code Here

    public synchronized void start(StartContext context) throws StartException {
        ServiceController<?> controller = context.getController();
        LOGGER.tracef("Starting: %s in mode %s", controller.getName(), controller.getMode());
        try {
            BundleManager bundleManager = injectedBundleManager.getValue();
            bundleManager.installBundle(deployment, null);
        } catch (Throwable th) {
            throw MESSAGES.startFailedToInstallDeployment(th, deployment);
        }
    }
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.