Package org.apache.geronimo.jee.deployment

Examples of org.apache.geronimo.jee.deployment.Environment


        openEjbJar.setEjbQlCompilerFactory("ejbqlcompilerfactory");
        Empty empty = openejbFactory.createEmpty();
        openEjbJar.setEnforceForeignKeyConstraints(empty);

        // set the Environment
        Environment environment = deploymentFactory.createEnvironment();
        Artifact artifact = deploymentFactory.createArtifact();
        artifact.setGroupId("org.apache.geronimo.testsuite");
        artifact.setArtifactId("agent-ear");
        artifact.setVersion("2.2-SNAPSHOT");
        artifact.setType("ear");
        environment.setModuleId(artifact);
        Dependencies dependencies = deploymentFactory.createDependencies();
        Dependency dependency = deploymentFactory.createDependency();
        dependency.setGroupId("org.apache.geronimo.testsuite");
        dependency.setArtifactId("agent-ds");
        dependency.setVersion("2.2-SNAPSHOT");
        dependency.setType("car");
        dependencies.getDependency().add(dependency);
        environment.setDependencies(dependencies);
        openEjbJar.setEnvironment (environment);

        // set the Cmp Connection Factory
        ResourceLocator resourceLocator = namingFactory.createResourceLocator();
        resourceLocator.setUrl("resourcelocator-url");
View Full Code Here


        webApp.setContextRoot("contextroot");
        webApp.setSecurityRealmName("securityrealmname");
        webApp.setWorkDir("workdir");

        // set the Environment
        Environment environment = deploymentFactory.createEnvironment();
        Artifact artifact = deploymentFactory.createArtifact();
        artifact.setGroupId("org.apache.geronimo.testsuite");
        artifact.setArtifactId("agent-ear");
        artifact.setVersion("2.2-SNAPSHOT");
        artifact.setType("ear");
        environment.setModuleId(artifact);
        Dependencies dependencies = deploymentFactory.createDependencies();
        Dependency dependency = deploymentFactory.createDependency();
        dependency.setGroupId("org.apache.geronimo.testsuite");
        dependency.setArtifactId("agent-ds");
        dependency.setVersion("2.2-SNAPSHOT");
        dependency.setType("car");
        dependencies.getDependency().add(dependency);
        environment.setDependencies(dependencies);
        webApp.setEnvironment(environment);

        // set the Container Config TODO
        //ContainerConfig containerConfig = webFactory.createContainerConfig();
        //containerConfig.getAny().add("containerconfig-any");
View Full Code Here

        // hard code everything to come up with a large XML with everything in it
        application.setApplicationName("test-app-name");

        // set the Environment
        Environment environment = deploymentFactory.createEnvironment();
        Artifact artifact = deploymentFactory.createArtifact();
        artifact.setGroupId("org.apache.geronimo.testsuite");
        artifact.setArtifactId("agent-ear");
        artifact.setVersion("2.2-SNAPSHOT");
        artifact.setType("ear");
        environment.setModuleId(artifact);
        Dependencies dependencies = deploymentFactory.createDependencies();
        Dependency dependency = deploymentFactory.createDependency();
        dependency.setGroupId("org.apache.geronimo.testsuite");
        dependency.setArtifactId("agent-ds");
        dependency.setVersion("2.2-SNAPSHOT");
        dependency.setType("car");
        dependencies.getDependency().add(dependency);
        environment.setDependencies(dependencies);
        application.setEnvironment(environment);

        // set the Module
        Module module = applicationFactory.createModule();
        Path path = applicationFactory.createPath();
View Full Code Here

    //}

    public static String getConfigId(IModule module) throws Exception {
        Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConfigId", module);

        Environment environment = null;
        if (isWebModule(module)) {
            if (getWebDeploymentPlan(module)!=null) {
              WebApp plan = getWebDeploymentPlan(module).getValue();
              if (plan != null)
                environment = plan.getEnvironment();
            }
        }
        else if (isEjbJarModule(module)) {
             if (getOpenEjbDeploymentPlan(module)!=null) {
                OpenejbJar plan = getOpenEjbDeploymentPlan(module).getValue();
                if (plan != null)
                  environment = plan.getEnvironment();
             }
        }
        else if (isEarModule(module)) {
          if (getApplicationDeploymentPlan(module)!=null) {
            Application plan = getApplicationDeploymentPlan(module).getValue();
            if (plan != null)
              environment = plan.getEnvironment();
          }
        }
        else if (isRARModule(module)) {
          if (getConnectorDeploymentPlan(module)!=null) {
              Connector plan = getConnectorDeploymentPlan(module).getValue();
              if (plan != null)
                  environment = plan.getEnvironment();
          }
        }

        if (environment != null
            && environment.getModuleId() != null) {
            Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId", getQualifiedConfigID(environment.getModuleId()));
            return getQualifiedConfigID(environment.getModuleId());
        }

        Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId", getId(module));
        return getId(module);
    }
View Full Code Here

        return getDependencies().getDependency();
    }

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

  }

  // add the dependencies and ext-module to plan
  if (Application.class.isInstance(plan.getValue())) {
      Application application = (Application) plan.getValue();
      Environment env = application.getEnvironment();
      if (env == null) {
    env = new Environment();
    application.setEnvironment(env);
      }
      Dependencies dependencies = env.getDependencies();
      if (dependencies == null) {
    dependencies = new Dependencies();
    env.setDependencies(dependencies);
      }

      // if there are no same dependencies in plan,then add them
      for (int i = 0; i < page1.getDrivers().length; i++) {
    Dependency selectedDependency = (Dependency) page1.getDrivers()[i];
View Full Code Here

            return moduleId.getType();
        return "";
    }

    protected boolean isInverseClassloading() {
        Environment type = getEnvironment(false);
        return type != null && type.getInverseClassloading() != null;
    }
View Full Code Here

        Environment type = getEnvironment(false);
        return type != null && type.getInverseClassloading() != null;
    }

    protected boolean isSuppressDefaultEnvironment() {
        Environment type = getEnvironment(false);
        return type != null && type.getSuppressDefaultEnvironment() != null;
    }
View Full Code Here

        return false;
    }

    protected void setInverseClassloading(boolean enable) {
        if (enable) {
            Environment type = getEnvironment(true);
            type.setInverseClassloading(getDeploymentObjectFactory().createEmpty());
        } else {
            Environment type = getEnvironment(false);
            if (type != null) {
                type.setInverseClassloading(null);
            }
        }
    }
View Full Code Here

        }
    }

    protected void setSuppressDefaultEnvironment(boolean enable) {
        if (enable) {
            Environment type = getEnvironment(true);
            type.setSuppressDefaultEnvironment(getDeploymentObjectFactory().createEmpty());
        } else {
            Environment type = getEnvironment(false);
            if (type != null) {
                type.setSuppressDefaultEnvironment(null);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jee.deployment.Environment

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.