Package org.jboss.osgi.framework

Examples of org.jboss.osgi.framework.BundleManagerService


        serviceController = context.getController();
        ROOT_LOGGER.debugf("Starting: %s in mode %s", serviceController.getName(), serviceController.getMode());

        final Map<ServiceName, OSGiModule> pendingServices = new LinkedHashMap<ServiceName, OSGiModule>();
        try {
            final BundleManagerService bundleManager = injectedBundleManager.getValue();
            final ServiceContainer serviceContainer = serviceController.getServiceContainer();
            serviceTarget = context.getChildTarget();

            modulesDir = injectedEnvironment.getValue().getModulesDir();
            bundlesDir = new File(modulesDir.getPath() + "/../bundles").getCanonicalFile();
View Full Code Here


        ServiceController<Void> frameworkController = (ServiceController<Void>) getServiceContainer().getRequiredService(Services.FRAMEWORK_ACTIVATOR);
        new FutureServiceValue<Void>(frameworkController).get();

        // Get the {@link BundleManagerService}
        ServiceController<BundleManagerService> bundleManagerService = (ServiceController<BundleManagerService>) getServiceContainer().getRequiredService(Services.BUNDLE_MANAGER);
        BundleManagerService bundleManager = bundleManagerService.getValue();

        ServiceController<ModuleLoader> moduleLoaderService = (ServiceController<ModuleLoader>) getServiceContainer().getRequiredService(ServiceName.parse("jboss.as.service-module-loader"));
        ModuleLoader moduleLoader = moduleLoaderService.getValue();
        Module module = moduleLoader.loadModule(identifier);

        ServiceTarget serviceTarget = getServiceContainer().subTarget();
        ServiceName serviceName = bundleManager.registerModule(serviceTarget, module, null);
        return getBundleFromService(serviceName);
    }
View Full Code Here

    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

        final BundleContext syscontext = injectedSystemBundle.getValue().getBundleContext();
        final String slstr = syscontext.getProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL);
        final Integer beginningStartLevel = Integer.parseInt(slstr != null ? slstr : "1");

        try {
            final BundleManagerService bundleManager = injectedBundleManager.getValue();
            final ServiceContainer serviceContainer = serviceController.getServiceContainer();
            serviceTarget = context.getChildTarget();

            ServerEnvironment serverEnvironment = injectedEnvironment.getValue();
            bundlesDir = serverEnvironment.getBundlesDir();
View Full Code Here

    public synchronized void start(StartContext context) throws StartException {
        ServiceController<?> controller = context.getController();
        ROOT_LOGGER.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(MESSAGES.failedToInstallDeployment(deployment), t);
        }
    }
View Full Code Here

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

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

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

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

        final BundleContext syscontext = injectedSystemBundle.getValue().getBundleContext();
        final String slstr = syscontext.getProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL);
        final Integer beginningStartLevel = Integer.parseInt(slstr != null ? slstr : "1");

        try {
            final BundleManagerService bundleManager = injectedBundleManager.getValue();
            final ServiceContainer serviceContainer = serviceController.getServiceContainer();
            serviceTarget = context.getChildTarget();

            ServerEnvironment serverEnvironment = injectedEnvironment.getValue();
            bundlesDir = serverEnvironment.getBundlesDir();
View Full Code Here

        serviceController = context.getController();
        log.debugf("Starting: %s in mode %s", serviceController.getName(), serviceController.getMode());

        final Map<ServiceName, OSGiModule> pendingServices = new LinkedHashMap<ServiceName, OSGiModule>();
        try {
            final BundleManagerService bundleManager = injectedBundleManager.getValue();
            final ServiceContainer serviceContainer = serviceController.getServiceContainer();
            serviceTarget = context.getChildTarget();

            final File modulesDir = injectedEnvironment.getValue().getModulesDir();
            bundlesDir = new File(modulesDir.getPath() + "/../bundles").getCanonicalFile();
View Full Code Here

TOP

Related Classes of org.jboss.osgi.framework.BundleManagerService

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.