Examples of OSGiMetaData


Examples of org.jboss.osgi.metadata.OSGiMetaData

                dep.setStartLevel(startLevel.intValue());
            return bundleManager.installBundle(serviceTarget, dep);
        } else {
            ModuleLoader moduleLoader = Module.getBootModuleLoader();
            Module module = moduleLoader.loadModule(identifier);
            OSGiMetaData metadata = getModuleMetadata(module);
            return bundleManager.registerModule(serviceTarget, module, metadata);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

            deployment.addAttachment(BundleInfo.class, info);
            DeploymentAttachment.attachDeployment(context, deployment);
        }

        // Check for attached OSGiMetaData
        OSGiMetaData metadata = OSGiMetaDataAttachment.getOSGiMetaDataAttachment(context);
        if (deployment == null && metadata != null) {
            VirtualFile virtualFile = VirtualFileAttachment.getVirtualFileAttachment(context);
            String location = virtualFile.getPathName();
            String symbolicName = metadata.getBundleSymbolicName();
            Version version = metadata.getBundleVersion();
            deployment = DeploymentFactory.createDeployment(AbstractVFS.adapt(virtualFile), location, symbolicName, version);
            deployment.addAttachment(OSGiMetaData.class, metadata);
            DeploymentAttachment.attachDeployment(context, deployment);
        }
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

        String resName = "META-INF/jbosgi-xservice.properties";
        VirtualFile virtualFile = VirtualFileAttachment.getVirtualFileAttachment(context);
        VirtualFile xserviceFile = virtualFile.getChild(resName);
        if (xserviceFile.exists()) {
            try {
                OSGiMetaData metadata = OSGiMetaDataBuilder.load(xserviceFile.openStream());
                String location = virtualFile.getPathName();
                String symbolicName = metadata.getBundleSymbolicName();
                Version version = metadata.getBundleVersion();
                deployment = DeploymentFactory.createDeployment(AbstractVFS.adapt(virtualFile), location, symbolicName, version);
                deployment.addAttachment(OSGiMetaData.class, metadata);
                OSGiMetaDataAttachment.attachOSGiMetaData(context, metadata);
                DeploymentAttachment.attachDeployment(context, deployment);
            } catch (IOException ex) {
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

    @Override
    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

        // Check if we already have an OSGi deployment
        final DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
        OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY);
        if (metadata != null)
            return;

        // Get the OSGi XService properties
        VirtualFile virtualFile = depUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

        // Create the {@link ModuleRegisterService}
        final DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
        final Module module = depUnit.getAttachment(Attachments.MODULE);
        if (module != null) {
            OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY);
            ModuleRegisterService.addService(phaseContext, module, metadata);
        }
    }
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

                    module = moduleLoader.loadModule(moduleId);
                } catch (ModuleLoadException ex) {
                    throw MESSAGES.startFailedCannotResolveInitialCapability(ex, identifier);
                }
                if (module != null) {
                    OSGiMetaData metadata = getModuleMetadata(module);
                    XResourceBuilder builder = XResourceBuilderFactory.create();
                    if (metadata != null) {
                        builder.loadFrom(metadata);
                    } else {
                        builder.loadFrom(module);
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

            deployment.addAttachment(BundleInfo.class, info);
            OSGiDeploymentAttachment.attachDeployment(deploymentUnit, deployment);
        }

        // Check for attached OSGiMetaData
        OSGiMetaData metadata = OSGiMetaDataAttachment.getOSGiMetaData(deploymentUnit);
        if (deployment == null && metadata != null) {
            String symbolicName = metadata.getBundleSymbolicName();
            Version version = metadata.getBundleVersion();
            deployment = DeploymentFactory.createDeployment(AbstractVFS.adapt(virtualFile), location, symbolicName, version);
            deployment.addAttachment(OSGiMetaData.class, metadata);
            OSGiDeploymentAttachment.attachDeployment(deploymentUnit, deployment);
        }
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

                        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);
            }
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

    @Override
    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

        // Check if we already have an OSGi deployment
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        OSGiMetaData metadata = OSGiMetaDataAttachment.getOSGiMetaData(deploymentUnit);
        if (metadata != null)
            return;

        // Get the OSGi XService properties
        VirtualFile virtualFile = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
View Full Code Here

Examples of org.jboss.osgi.metadata.OSGiMetaData

    @Override
    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

        // Check if we already have an OSGi deployment
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        OSGiMetaData metadata = OSGiMetaDataAttachment.getOSGiMetaData(deploymentUnit);
        if (metadata != null)
            return;

        // Get the OSGi XService properties
        VirtualFile virtualFile = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
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.