Package org.apache.openejb.jee.oejb2

Examples of org.apache.openejb.jee.oejb2.DependenciesType


  
    EnvironmentType env = serviceFactory.createEnvironmentType();
    env.setModuleId(artifact);

    if (cfg != null && cfg.isSharedLib()) {
      DependenciesType dt = serviceFactory.createDependenciesType();
      DependencyType sharedLib = createDependency("org.apache.geronimo.configs", "sharedlib", null, "car");
      dt.getDependency().add(sharedLib);
      env.setDependencies(dt);
    }

         Trace.tracePoint("Exit ", "V11DeploymentPlanCreationOperation.getConfigEnvironment", env);
    return env;
View Full Code Here


              //GERONIMODEVTOOLS-361
              for (IModule singleModule:module){
                EnvironmentType environment = getEnvironment(singleModule);
                  if (environment != null) {
                      ArtifactType child = environment.getModuleId();
                      DependenciesType dependencies = environment.getDependencies();
                      if (dependencies != null) {
                          List<DependencyType> depList = dependencies.getDependency();
                          for ( DependencyType dep : depList) {
                              ArtifactType parent = deploymentFactory.createArtifactType();
                              parent.setGroupId( dep.getGroupId() );
                              parent.setArtifactId( dep.getArtifactId() );
                              parent.setVersion( dep.getVersion() );
View Full Code Here

        for (JAXBElement jaxbElement : jaxbElements) {
            EnvironmentType environment = getEnvironment(jaxbElement);
            if (environment != null) {
                ArtifactType child = environment.getModuleId();
                if (child != null) {
                    DependenciesType dependencies = environment.getDependencies();
                    if (dependencies != null) {
                        List<DependencyType> depList = dependencies.getDependency();
                        if (depList != null) {
                            for ( DependencyType dep : depList) {
                                ArtifactType parent = deploymentFactory.createArtifactType();
                                parent.setGroupId( dep.getGroupId() );
                                parent.setArtifactId( dep.getArtifactId() );
View Full Code Here

        EnvironmentType type = getEnvironment(false);
        return type != null && type.getSuppressDefaultEnvironment() != null;
    }
   
    protected boolean isSharedLibDependency() {
        DependenciesType depType = getDependencies(false);
        if(depType != null) {
            return getSharedLibDependency(depType) != null;
        }
        return false;
    }
View Full Code Here

        }
    }
   
    protected void setSharedLibDependency(boolean enable) {
        if (enable) {
            DependenciesType deptype = getDependencies(true);
            DependencyType sharedLib = getDeploymentObjectFactory().createDependencyType();
            sharedLib.setGroupId("org.apache.geronimo.configs");
            sharedLib.setArtifactId("sharedlib");
            sharedLib.setType("car");
            deptype.getDependency().add(sharedLib);
        } else {
          DependenciesType deptype = getDependencies(false);
            if (deptype != null) {
                ArtifactType ArtifactType = getSharedLibDependency(deptype);
                if(ArtifactType != null) {
                    deptype.getDependency().remove(ArtifactType);
                }
            }
        }
    }
View Full Code Here

            }
        }
    }
   
    private ArtifactType getSharedLibDependency(DependenciesType dependencies) {
      DependenciesType depType = getDependencies(false);
        List dependenciesList = depType.getDependency();
        Iterator i = dependenciesList.iterator();
        while(i.hasNext()) {
            ArtifactType ArtifactType = (ArtifactType) i.next();
            if("org.apache.geronimo.configs".equals(ArtifactType.getGroupId()) && "sharedlib".equals(ArtifactType.getArtifactId()) && "car".equals(ArtifactType.getType())) {
                return ArtifactType;
View Full Code Here

    }
   
    private DependenciesType getDependencies(boolean create) {
        EnvironmentType env = getEnvironment(create);
        if(env != null) {
            DependenciesType dep = env.getDependencies();
            if (dep == null && create) {
                dep = getDeploymentObjectFactory().createDependenciesType();
                env.setDependencies(dep);
            }
            return dep;
View Full Code Here

    private DependenciesType getDependencies() {
        if (environment == null) {
            environment = new EnvironmentType();
        }
        if (environment.getDependencies() == null) {
            environment.setDependencies(new DependenciesType());
        }
        return environment.getDependencies();
    }
View Full Code Here

            MessageDrivenBean mdb = mdbs.get(bean.getEjbName());
            if (mdb == null) {
                // todo warn no such ejb in the ejb-jar.xml
                continue;
            }
            ActivationConfigType activationConfigType = bean.getActivationConfig();
            if (activationConfigType != null) {
                ActivationConfig activationConfig = mdb.getActivationConfig();
                if (activationConfig == null) {
                    activationConfig = new ActivationConfig();
                    mdb.setActivationConfig(activationConfig);
                }
                for (ActivationConfigPropertyType propertyType : activationConfigType.getActivationConfigProperty()) {
                    ActivationConfigProperty property = new ActivationConfigProperty(
                            propertyType.getActivationConfigPropertyName(),
                            propertyType.getActivationConfigPropertyValue());
                    activationConfig.getActivationConfigProperty().add(property);
                }
View Full Code Here

                id = id.substring(0, id.length() - 1);
            }
        }


        ArtifactType artifactType = new ArtifactType();
        artifactType.setArtifactId(id);

        EnvironmentType environmentType = new EnvironmentType();
        environmentType.setModuleId(artifactType);

        GeronimoEjbJarType geronimoEjbJarType = new GeronimoEjbJarType();
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.oejb2.DependenciesType

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.