Package org.apache.geronimo.system.configuration

Examples of org.apache.geronimo.system.configuration.DependencyManager


        System.out.println("Packaging module configuration: " + plan);

//        ModuleType config = ModuleDocument.Factory.parse(plan).getModule();

        Maven2Repository repository = new Maven2Repository(localRepo);
        new DependencyManager(bundleContext, Collections.<Repository>singleton(repository), null);

        GBeanBuilder gBeanBuilder = new GBeanBuilder(null, null);
        ServiceConfigBuilder builder = new ServiceConfigBuilder(null, Collections.<Repository>singleton(repository), Collections.<NamespaceDrivenBuilder>singleton(gBeanBuilder), new Jsr77Naming(), bundleContext);
        ConfigurationStore targetConfigurationStore = new NullConfigurationStore() {
            public File createNewConfigurationDir(Artifact configId) throws ConfigurationAlreadyExistsException {
View Full Code Here


        Set<Bundle> dependentBundles = new HashSet<Bundle>();
       
        // add in bundles from dependency manager
        ServiceReference serviceReference = bundleContext.getServiceReference(DependencyManager.class.getName());
        if (serviceReference != null) {
            DependencyManager dependencyManager = (DependencyManager) bundleContext.getService(serviceReference);
            try {
                dependentBundles.addAll(dependencyManager.getFullDependentBundles(bundleId));
            } finally {
                bundleContext.ungetService(serviceReference);
            }
        }
       
View Full Code Here

        Set<Bundle> dependentBundles = new HashSet<Bundle>();
       
        // add in bundles from dependency manager
        ServiceReference serviceReference = bundleContext.getServiceReference(DependencyManager.class.getName());
        if (serviceReference != null) {
            DependencyManager dependencyManager = (DependencyManager) bundleContext.getService(serviceReference);
            try {
                dependentBundles.addAll(dependencyManager.getFullDependentBundles(bundle.getBundleId()));
            } finally {
                bundleContext.ungetService(serviceReference);
            }
        }
       
View Full Code Here

    @Override
    public Map<Long, Set<ExportPackage>> select(OSGiBuildContext context) {
        Map<Long, Set<ExportPackage>> bundleIdExportPackages = new HashMap<Long, Set<ExportPackage>>();
        Map<String, Version> packageNameVersionMap = new HashMap<String, Version>();
        DependencyManager dependencyManager = context.getDependencyManager();
        for (Dependency dependency : context.getEnvironment().getDependencies()) {
            Artifact resolvedArtifact = context.resolveArtifact(dependency.getArtifact());
            if(resolvedArtifact == null) {
                logger.warn("Dependency " + dependency.getArtifact() + " could not be resolved, its export packages are ignored");
                continue;
            }
            Bundle dependentBundle = dependencyManager.getBundle(resolvedArtifact);
            if (dependentBundle == null) {
                logger.warn("Fail to resolve the bundle corresponding to the artifact " + dependency.getArtifact() + ", its export packages are ignored");
                continue;
            }
            Set<ExportPackage> exportPackages = context.getEffectExportPackages(dependentBundle.getBundleId());
View Full Code Here

    public void build(Environment environment, boolean clientModule) throws IllegalConfigurationException {
        processClassloadingRules(environment);
        ServiceReference serviceReference = null;
        try {
            serviceReference = bundleContext.getServiceReference(DependencyManager.class.getName());
            DependencyManager dependencyManager = null;
            if (serviceReference != null) {
                dependencyManager = (DependencyManager) bundleContext.getService(serviceReference);
            }
            OSGiBuildContext context = createOSGiBuildContext(environment, dependencyManager, clientModule);
            processImportPackages(context);
View Full Code Here

        System.out.println("Packaging module configuration: " + plan);

//        ModuleType config = ModuleDocument.Factory.parse(plan).getModule();

        Maven2Repository repository = new Maven2Repository(localRepo);
        new DependencyManager(bundleContext, Collections.<Repository>singleton(repository), null);

        GBeanBuilder gBeanBuilder = new GBeanBuilder(null, null);
        ServiceConfigBuilder builder = new ServiceConfigBuilder(null, Collections.<Repository>singleton(repository), Collections.<NamespaceDrivenBuilder>singleton(gBeanBuilder), new Jsr77Naming(), bundleContext);
        ConfigurationStore targetConfigurationStore = new NullConfigurationStore() {
            public File createNewConfigurationDir(Artifact configId) throws ConfigurationAlreadyExistsException {
View Full Code Here

    public void build(Environment environment, boolean clientModule) throws IllegalConfigurationException {
        processClassloadingRules(environment);
        ServiceReference serviceReference = null;
        try {
            serviceReference = bundleContext.getServiceReference(DependencyManager.class.getName());
            DependencyManager dependencyManager = null;
            if (serviceReference != null) {
                dependencyManager = (DependencyManager) bundleContext.getService(serviceReference);
            }
            OSGiBuildContext context = createOSGiBuildContext(environment, dependencyManager, clientModule);
            processImportPackages(context);
View Full Code Here

        Set<Bundle> dependentBundles = new HashSet<Bundle>();
       
        // add in bundles from dependency manager
        ServiceReference serviceReference = bundleContext.getServiceReference(DependencyManager.class.getName());
        if (serviceReference != null) {
            DependencyManager dependencyManager = (DependencyManager) bundleContext.getService(serviceReference);
            try {
                dependentBundles.addAll(dependencyManager.getFullDependentBundles(bundle.getBundleId()));
            } finally {
                bundleContext.ungetService(serviceReference);
            }
        }
       
View Full Code Here

        System.out.println("Packaging module configuration: " + plan);

//        ModuleType config = ModuleDocument.Factory.parse(plan).getModule();

        Maven2Repository repository = new Maven2Repository(localRepo);
        new DependencyManager(bundleContext, Collections.<Repository>singleton(repository), null);

        GBeanBuilder gBeanBuilder = new GBeanBuilder(null, null);
        ServiceConfigBuilder builder = new ServiceConfigBuilder(null, Collections.<Repository>singleton(repository), Collections.<NamespaceDrivenBuilder>singleton(gBeanBuilder), new Jsr77Naming(), bundleContext);
        ConfigurationStore targetConfigurationStore = new NullConfigurationStore() {
            public File createNewConfigurationDir(Artifact configId) throws ConfigurationAlreadyExistsException {
View Full Code Here

        Set<Bundle> dependentBundles = new HashSet<Bundle>();
       
        // add in bundles from dependency manager
        ServiceReference serviceReference = bundleContext.getServiceReference(DependencyManager.class.getName());
        if (serviceReference != null) {
            DependencyManager dependencyManager = (DependencyManager) bundleContext.getService(serviceReference);
            try {
                dependentBundles.addAll(dependencyManager.getFullDependentBundles(bundle.getBundleId()));
            } finally {
                bundleContext.ungetService(serviceReference);
            }
        }
       
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.configuration.DependencyManager

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.