Examples of XEnvironment


Examples of org.jboss.osgi.resolver.XEnvironment

    }

    public synchronized void stop(StopContext context) {
        log.debugf("Stopping Arquillian Test Runner");
        if (resource != null) {
            XEnvironment env = injectedEnvironment.getValue();
            env.uninstallResources(resource);
        }
        try {
            if (jmxTestRunner != null) {
                jmxTestRunner.unregisterMBean(injectedMBeanServer.getValue());
            }
View Full Code Here

Examples of org.jboss.osgi.resolver.XEnvironment

                }
            };
            phaseService.addListener(Inheritance.ALL, serviceTracker);

            if (!bundle.isResolved()) {
                XEnvironment env = injectedEnvironment.getValue();
                XResolver resolver = injectedResolver.getValue();
                XResolveContext context = resolver.createResolveContext(env, Collections.singleton(bundle.getBundleRevision()), null);
                try {
                    resolver.resolveAndApply(context);
                } catch (ResolutionException ex) {
View Full Code Here

Examples of org.jboss.osgi.resolver.XEnvironment

        return builder.install();
    }

    public synchronized void registerModule(Module module, OSGiMetaData metadata) {
        BundleContext context = injectedSystemContext.getOptionalValue();
        XEnvironment env = injectedEnvironment.getOptionalValue();
        Registration reg = new Registration(module, metadata);
        if (context != null && env != null) {
            registerInternal(context, env, reg);
        }
        registrations.put(module, reg);
View Full Code Here

Examples of org.jboss.osgi.resolver.XEnvironment

        registrations.put(module, reg);
    }

    public synchronized void unregisterModule(Module module) {
        BundleContext context = injectedSystemContext.getOptionalValue();
        XEnvironment env = injectedEnvironment.getOptionalValue();
        Registration reg = registrations.remove(module);
        if (context != null && env != null && reg != null) {
            unregisterInternal(env, reg);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.resolver.XEnvironment

    public synchronized void start(StartContext startContext) throws StartException {
        ServiceController<?> serviceController = startContext.getController();
        LOGGER.tracef("Starting: %s in mode %s", serviceController.getName(), serviceController.getMode());

        BundleContext syscontext = injectedSystemContext.getValue();
        XEnvironment env = injectedEnvironment.getValue();
        for (Registration reg : registrations.values()) {
            registerInternal(syscontext, env, reg);
        }
        registrations.clear();
    }
View Full Code Here

Examples of org.jboss.osgi.resolver.XEnvironment

        resolveBundle(phaseContext, depUnit, bundle);
    }

    private void resolveBundle(DeploymentPhaseContext phaseContext, DeploymentUnit depUnit, XBundle bundle) {
        XBundleRevision brev = bundle.getBundleRevision();
        XEnvironment env = depUnit.getAttachment(OSGiConstants.ENVIRONMENT_KEY);
        XResolver resolver = depUnit.getAttachment(OSGiConstants.RESOLVER_KEY);
        BundleManager bundleManager = depUnit.getAttachment(OSGiConstants.BUNDLE_MANAGER_KEY);
        Set<XBundleRevision> mandatoryResources = Collections.singleton(brev);
        Set<XBundleRevision> optionalResources = getOptionalResources(bundleManager, brev);
        XResolveContext context = resolver.createResolveContext(env, mandatoryResources, optionalResources);
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.