Package org.jboss.osgi.framework.bundle

Examples of org.jboss.osgi.framework.bundle.AbstractUserBundle


            BundleListener uninstallListener = new SynchronousBundleListener() {

                @Override
                public void bundleChanged(BundleEvent event) {
                    if (event.getType() == BundleEvent.UNINSTALLED) {
                        AbstractUserBundle userBundle;
                        try {
                            userBundle = AbstractUserBundle.assertBundleState(event.getBundle());
                        } catch (RuntimeException ex) {
                            // ignore
                            return;
                        }
                        Deployment deployment = userBundle.getDeployment();
                        ServiceName serviceName = deployment.getAttachment(ServiceName.class);
                        if (serviceName != null) {
                            ServiceController<?> controller = serviceContainer.getService(serviceName);
                            if (controller != null) {
                                controller.setMode(ServiceController.Mode.REMOVE);
View Full Code Here


            @Override
            public void bundleChanged(BundleEvent event) {
                if (event.getType() == BundleEvent.INSTALLED) {

                    AbstractUserBundle userBundle;
                    try {
                        userBundle = AbstractUserBundle.assertBundleState(event.getBundle());
                    } catch (RuntimeException ex) {
                        // ignore
                        return;
                    }

                    Deployment dep = userBundle.getDeployment();
                    String contextName = DeploymentHolderService.getContextName(dep);

                    // Check if we have an {@link OSGiDeploymentService}
                    ServiceContainer container = context.getController().getServiceContainer();
                    ServiceName osgiDeploymentService = OSGiDeploymentService.getServiceName(contextName);
View Full Code Here

TOP

Related Classes of org.jboss.osgi.framework.bundle.AbstractUserBundle

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.