Examples of BundleManagerService


Examples of org.jboss.osgi.framework.BundleManagerService

        ServiceController<?> controller = context.getController();
        log.debugf("Starting: %s in mode %s", controller.getName(), controller.getMode());
        log.infof("Register module: %s", module);
        try {
            ServiceTarget serviceTarget = context.getChildTarget();
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            installedBundleName = bundleManager.registerModule(serviceTarget, module, metadata);
        } catch (Throwable t) {
            throw new StartException("Failed to register module: " + module, t);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void stop(StopContext context) {
        ServiceController<?> controller = context.getController();
        log.debugf("Stopping: %s in mode %s", controller.getName(), controller.getMode());
        log.infof("Unregister module: %s", module);
        try {
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            bundleManager.unregisterModule(module.getIdentifier());
        } catch (Throwable t) {
            log.errorf(t, "Failed to uninstall module: %s", module);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void start(StartContext context) throws StartException {
        ServiceController<?> controller = context.getController();
        log.debugf("Starting: %s in mode %s", controller.getName(), controller.getMode());
        try {
            ServiceTarget serviceTarget = context.getChildTarget();
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            installedBundleName = bundleManager.installBundle(serviceTarget, deployment);
            injectedStartTracker.getValue().addInstalledBundle(installedBundleName, deployment);
        } catch (Throwable t) {
            throw new StartException("Failed to install deployment: " + deployment, t);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void stop(StopContext context) {
        ServiceController<?> controller = context.getController();
        log.debugf("Stoppping: %s in mode %s", controller.getName(), controller.getMode());
        try {
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            bundleManager.uninstallBundle(deployment);
        } catch (Throwable t) {
            log.errorf(t, "Failed to uninstall deployment: %s", deployment);
        }

        // [JBAS-8801] Undeployment leaks root deployment service
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void start(StartContext context) throws StartException {
        serviceContainer = context.getController().getServiceContainer();
        serviceTarget = context.getChildTarget();
        arqService.registerArquillianConfig(this);

        BundleManagerService bundleManager = injectedBundleManager.getOptionalValue();
        if (bundleManager != null) {
            arqService.registerArquillianServiceWithOSGi(bundleManager);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

        ServiceController<?> controller = context.getController();
        log.debugf("Starting: %s in mode %s", controller.getName(), controller.getMode());
        log.infof("Register module: %s", module);
        try {
            ServiceTarget serviceTarget = context.getChildTarget();
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            installedBundleName = bundleManager.registerModule(serviceTarget, module, metadata);
        } catch (Throwable t) {
            throw new StartException("Failed to register module: " + module, t);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void stop(StopContext context) {
        ServiceController<?> controller = context.getController();
        log.debugf("Stopping: %s in mode %s", controller.getName(), controller.getMode());
        log.infof("Unregister module: %s", module);
        try {
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            bundleManager.unregisterModule(module.getIdentifier());
        } catch (Throwable t) {
            log.errorf(t, "Failed to uninstall module: %s", module);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public void start(StartContext context) throws StartException {
        ServiceController<?> controller = context.getController();
        log.debugf("Starting: %s in mode %s", controller.getName(), controller.getMode());
        final Map<ServiceName, OSGiModule> pendingServices = new LinkedHashMap<ServiceName, OSGiModule>();
        try {
            final BundleManagerService bundleManager = injectedBundleManager.getValue();
            final ServiceContainer serviceContainer = context.getController().getServiceContainer();
            final ServiceTarget serviceTarget = context.getChildTarget();
            final File modulesDir = injectedEnvironment.getValue().getModulesDir();
            final File bundlesDir = new File(modulesDir.getPath() + "/../bundles").getCanonicalFile();
            for (OSGiModule moduleMetaData : subsystemState.getModules()) {
                ServiceName serviceName;
                ModuleIdentifier identifier = moduleMetaData.getIdentifier();
                File bundleFile = getRepositoryEntry(bundlesDir, identifier);
                if (bundleFile != null) {
                    URL url = bundleFile.toURI().toURL();
                    BundleInfo info = BundleInfo.createBundleInfo(url);
                    Deployment dep = DeploymentFactory.createDeployment(info);
                    Integer startLevel = moduleMetaData.getStartLevel();
                    if (startLevel != null)
                        dep.setStartLevel(startLevel.intValue());
                    serviceName = bundleManager.installBundle(serviceTarget, dep);
                } else {
                    ModuleLoader moduleLoader = Module.getBootModuleLoader();
                    Module module = moduleLoader.loadModule(identifier);
                    OSGiMetaData metadata = getModuleMetadata(module);
                    serviceName = bundleManager.registerModule(serviceTarget, module, metadata);
                }
                pendingServices.put(serviceName, moduleMetaData);
            }

            // Install a service that has a dependency on all pending bundle INSTALLED services
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void start(StartContext context) throws StartException {
        ServiceController<?> controller = context.getController();
        log.debugf("Starting: %s in mode %s", controller.getName(), controller.getMode());
        try {
            ServiceTarget serviceTarget = context.getChildTarget();
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            installedBundleName = bundleManager.installBundle(serviceTarget, deployment);
            injectedStartTracker.getValue().addInstalledBundle(installedBundleName, deployment);
        } catch (Throwable t) {
            throw new StartException("Failed to install deployment: " + deployment, t);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.framework.BundleManagerService

    public synchronized void stop(StopContext context) {
        ServiceController<?> controller = context.getController();
        log.debugf("Stoppping: %s in mode %s", controller.getName(), controller.getMode());
        try {
            BundleManagerService bundleManager = injectedBundleManager.getValue();
            bundleManager.uninstallBundle(deployment);
        } catch (Throwable t) {
            log.errorf(t, "Failed to uninstall deployment: %s", deployment);
        }

        // [JBAS-8801] Undeployment leaks root deployment service
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.