Package org.apache.geronimo.jee.deployment

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


        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);
        applicationClient.setClientEnvironment(environment);

        // set the Subject Info
        SubjectInfo subject = securityFactory.createSubjectInfo();
        subject.setId("subjectinfo-id");
        subject.setRealm("subjectinfo-realm");
        Description description = securityFactory.createDescription();
        description.setValue("subjectinfo-description");
        subject.getDescription().add(description);
        applicationClient.setDefaultSubject(subject);

        // set the EJB Ref
        EjbRef ejbRef = namingFactory.createEjbRef();
        ejbRef.setName("ejbref-name");
        ejbRef.setRefName("ejbref-refname");
        ejbRef.setCssLink("ejbref-csslink");
        ejbRef.setEjbLink("ejbref-ejblink");
        ejbRef.setNsCorbaloc("ejbref-nscorbaloc");
        org.apache.geronimo.jee.naming.Pattern namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("ejbref-css-artifactid");
        namingPattern.setGroupId("ejbref-css-groupid");
        namingPattern.setModule("ejbref-css-module");
        namingPattern.setName("ejbref-css-name");
        namingPattern.setVersion("ejbref-css-version");
        ejbRef.setCss(namingPattern);
        namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("ejbref-pattern-artifactid");
        namingPattern.setGroupId("ejbref-pattern-groupid");
        namingPattern.setModule("ejbref-pattern-module");
        namingPattern.setName("ejbref-pattern-name");
        namingPattern.setVersion("ejbref-pattern-version");
        ejbRef.setPattern(namingPattern);
        applicationClient.getEjbRef().add(ejbRef);

        // set the GBean Ref
        GbeanRef gbeanRef = namingFactory.createGbeanRef();
        gbeanRef.setRefName("gbeanref-name");
        gbeanRef.getRefType().add("gbeanref-reftype");
        namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("gbeanref-pattern-artifactid");
        namingPattern.setGroupId("gbeanref-pattern-groupid");
        namingPattern.setModule("gbeanref-pattern-module");
        namingPattern.setName("gbeanref-pattern-name");
        namingPattern.setVersion("gbeanref-pattern-version");
        gbeanRef.getPattern().add(namingPattern);
        applicationClient.getGbeanRef().add(gbeanRef);

        // set the Message Destination
        MessageDestination messageDestination = namingFactory.createMessageDestination();
        messageDestination.setAdminObjectLink("messagedestination-adminobjectlink");
        messageDestination.setAdminObjectModule("messagedestination-adminobjectmodule");
        messageDestination.setMessageDestinationName("messagedestination-name");
        namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("messagedestination-pattern-artifactid");
        namingPattern.setGroupId("messagedestination-pattern-groupid");
        namingPattern.setModule("messagedestination-pattern-module");
        namingPattern.setName("messagedestination-pattern-name");
        namingPattern.setVersion("messagedestination-pattern-version");
        messageDestination.setPattern(namingPattern);
        applicationClient.getMessageDestination().add(messageDestination);

        // set the Resource
        Resource resource = applicationClientFactory.createResource();
        resource.setInternalRar("resource-internalrar");
        Connector connector = connectorFactory.createConnector();
        Adminobject adminobject = connectorFactory.createAdminobject();
        adminobject.setAdminobjectClass("resource-connector-adminobject-adminobjectclass");
        adminobject.setAdminobjectInterface("resource-connector-adminobject-adminobjectinterface");
        AdminobjectInstance adminobjectInstance = connectorFactory.createAdminobjectInstance();
        adminobjectInstance.setMessageDestinationName("resource-connector-adminobject-instance-messagedestinationname");
        ConfigPropertySetting configPropertySetting = connectorFactory.createConfigPropertySetting();
        configPropertySetting.setName("resource-connector-adminobject-instance-name");
        configPropertySetting.setValue("resource-connector-adminobject-instance-value");
        adminobjectInstance.getConfigPropertySetting().add(configPropertySetting);
        adminobject.getAdminobjectInstance().add(adminobjectInstance);
        connector.getAdminobject().add(adminobject);
        environment = deploymentFactory.createEnvironment();
        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 = deploymentFactory.createDependencies();
        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);
        connector.setEnvironment(environment);
        Resourceadapter resourceadapter = connectorFactory.createResourceadapter();
        ResourceadapterInstance resourceadapterInstance = connectorFactory.createResourceadapterInstance();
        resourceadapterInstance.setResourceadapterName("resource-connector-resourceadapter-name");
        GbeanLocator gbeanLocator = namingFactory.createGbeanLocator();
        gbeanLocator.setGbeanLink("connector-resourceadapter-workmanager-gbeanlink");
        namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("connector-resourceadapter-workmanager-pattern-artifactid");
        namingPattern.setGroupId("connector-resourceadapter-workmanager-pattern-groupid");
        namingPattern.setModule("connector-resourceadapter-workmanager-pattern-module");
        namingPattern.setName("connector-resourceadapter-workmanager-pattern-name");
        namingPattern.setVersion("connector-resourceadapter-workmanager-pattern-version");
        gbeanLocator.setPattern(namingPattern);
        resourceadapterInstance.setWorkmanager(gbeanLocator);
        configPropertySetting = connectorFactory.createConfigPropertySetting();
        configPropertySetting.setName("resource-connector-resourceadapter-instance-name");
        configPropertySetting.setValue("resource-connector-resourceadapter-instance-value");       
        resourceadapterInstance.getConfigPropertySetting().add(configPropertySetting);
        resourceadapter.setResourceadapterInstance(resourceadapterInstance);
        OutboundResourceadapter outboundResourceadapter = connectorFactory.createOutboundResourceadapter();
        ConnectionDefinition connectionDefinition = connectorFactory.createConnectionDefinition();
        connectionDefinition.setConnectionfactoryInterface("resource-connector-resourceadapter-outbound-connectiondefinition-interface");
        ConnectiondefinitionInstance connectionDefinitionInstance = connectorFactory.createConnectiondefinitionInstance();
        connectionDefinitionInstance.setName("resource-connector-resourceadapter-outbound-connectiondefinition-instance-name");
        connectionDefinitionInstance.getImplementedInterface().add("resource-connector-resourceadapter-outbound-connectiondefinition-instance-implementedinterface");
        Connectionmanager connectionManager = connectorFactory.createConnectionmanager();
        Empty empty = connectorFactory.createEmpty();
        connectionManager.setContainerManagedSecurity(empty);
        connectionManager.setLocalTransaction(empty);
        connectionManager.setNoPool(empty);
        connectionManager.setNoTransaction(empty);
        connectionManager.setTransactionLog(empty);
        Partitionedpool partitionedPool = connectorFactory.createPartitionedpool();
        partitionedPool.setBlockingTimeoutMilliseconds(new Integer(0));
        partitionedPool.setIdleTimeoutMinutes(new Integer(0));
        partitionedPool.setMatchAll(empty);
        partitionedPool.setMatchOne(empty);
        partitionedPool.setMaxSize(new Integer(0));
        partitionedPool.setMinSize(new Integer(0));
        partitionedPool.setPartitionByConnectionrequestinfo(empty);
        partitionedPool.setPartitionBySubject(empty);
        partitionedPool.setSelectOneAssumeMatch(empty);
        connectionManager.setPartitionedPool(partitionedPool);
        Singlepool singlePool = connectorFactory.createSinglepool();
        singlePool.setBlockingTimeoutMilliseconds(new Integer(0));
        singlePool.setIdleTimeoutMinutes(new Integer(0));
        singlePool.setMatchAll(empty);
        singlePool.setMatchOne(empty);
        singlePool.setMaxSize(new Integer(0));
        singlePool.setMinSize(new Integer(0));
        singlePool.setSelectOneAssumeMatch(empty);
        connectionManager.setPartitionedPool(partitionedPool);
        connectionManager.setSinglePool(singlePool);
        Xatransaction xaTransaction = connectorFactory.createXatransaction();
        xaTransaction.setThreadCaching(empty);
        xaTransaction.setTransactionCaching(empty);
        connectionManager.setXaTransaction(xaTransaction);
        connectionDefinitionInstance.setConnectionmanager(connectionManager);
        configPropertySetting = connectorFactory.createConfigPropertySetting();
        configPropertySetting.setName("resource-connector-resourceadapter-outbound-connectiondefinition-instance-name");
        configPropertySetting.setValue("resource-connector-resourceadapter-outbound-connectiondefinition-instance-value");
        connectionDefinitionInstance.getConfigPropertySetting().add(configPropertySetting);
        connectionDefinition.getConnectiondefinitionInstance().add(connectionDefinitionInstance);
        outboundResourceadapter.getConnectionDefinition().add(connectionDefinition);
        resourceadapter.setOutboundResourceadapter(outboundResourceadapter);
        connector.getResourceadapter().add(resourceadapter);
        Gbean gbean = deploymentFactory.createGbean();
        gbean.setClazz("resource-connector-gbean-class");
        gbean.setName("resource-connector-gbean-name");
        connector.getService().add(deploymentFactory.createGbean(gbean));
        resource.setConnector(connector);
        org.apache.geronimo.jee.deployment.Pattern deploymentPattern = deploymentFactory.createPattern();
        deploymentPattern.setArtifactId("resource-externalrar-artifactid");
        deploymentPattern.setGroupId("resource-externalrar-groupid");
        deploymentPattern.setModule("resource-externalrar-module");
        deploymentPattern.setVersion("resource-externalrar-version");
        deploymentPattern.setCustomFoo("resource-externalrar-customfoo");
        deploymentPattern.setType("resource-externalrar-type");
        resource.setExternalRar(deploymentPattern);
        applicationClient.getResource().add(resource);

        // set the resource env ref
        ResourceEnvRef resourceEnvRef = namingFactory.createResourceEnvRef();
        resourceEnvRef.setAdminObjectLink("resourceenvref-adminobjectlink");
        resourceEnvRef.setAdminObjectModule("resourceenvref-adminobjectmodule");
        resourceEnvRef.setMessageDestinationLink("resourceenvref-messagedestinationlink");
        resourceEnvRef.setRefName("resourceenvref-refname");
        namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("resourceenvref-pattern-artifactid");
        namingPattern.setGroupId("resourceenvref-pattern-groupid");
        namingPattern.setModule("resourceenvref-pattern-module");
        namingPattern.setName("resourceenvref-pattern-name");
        namingPattern.setVersion("resourceenvref-pattern-version");
        resourceEnvRef.setPattern(namingPattern);
        applicationClient.getResourceEnvRef().add(resourceEnvRef);

        // set the resource ref
        ResourceRef resourceRef = namingFactory.createResourceRef();
        resourceRef.setRefName("resourceref-refname");
        resourceRef.setResourceLink("resourceref-resourcelink");
        resourceRef.setUrl("resourceref-url");
        namingPattern = namingFactory.createPattern();
        namingPattern.setArtifactId("resourceref-pattern-artifactid");
        namingPattern.setGroupId("resourceref-pattern-groupid");
        namingPattern.setModule("resourcref-pattern-module");
        namingPattern.setName("resourceref-pattern-name");
        namingPattern.setVersion("resourceref-pattern-version");
        resourceRef.setPattern(namingPattern);
        applicationClient.getResourceRef().add(resourceRef);

        // set the Server Environment
        environment = deploymentFactory.createEnvironment();
        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 = deploymentFactory.createDependencies();
        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);
        applicationClient.setServerEnvironment(environment);

        // add the service
View Full Code Here


        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);
        connector.setEnvironment (environment);

        // set the Admin Object
View Full Code Here

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

    Environment env = serviceFactory.createEnvironment();
    env.setModuleId(artifact);

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

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

 
  public static Dependency createDependency(String groupId, String artifactId, String version, String type) {
      Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createDependency", groupId, artifactId, version, type);

    org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
    Dependency dependency = serviceFactory.createDependency();
    if (groupId != null)
      dependency.setGroupId(groupId);
    if (artifactId != null)
      dependency.setArtifactId(artifactId);
    if (version != null)
      dependency.setVersion(version);
    dependency.setType(type);
   
        Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createDependency", dependency);
    return dependency;
  }
View Full Code Here

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

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

            }
        }
        if (artifacts != null) {
            for (int i = 0; i < artifacts.size(); i++) {
                Dependency dependency = new Dependency();
                dependency.setArtifactId(((Artifact) artifacts.get(i))
                        .getArtifactId());
                dependency.setGroupId(((Artifact) artifacts.get(i))
                        .getGroupId());
                dependency.setVersion(((Artifact) artifacts.get(i))
                        .getVersion().toString());
                dependency.setType(((Artifact) artifacts.get(i)).getType());
                if (!commonLibs.contains(dependency)) {
                    commonLibs.add(dependency);
                }
            }
        }
View Full Code Here

        }
    }

    protected void printDependencies(List<Dependency> dependencyList) {
        for (int i = 0; i < dependencyList.size(); i++) {
            Dependency dependency = dependencyList.get(i);
            System.out.println("ArtifactID:" + dependency.getArtifactId()
                    + " GroupID:" + dependency.getGroupId() + " Type:"
                    + dependency.getType() + " Version:"
                    + dependency.getVersion());
        }
    }
View Full Code Here

    public ITableLabelProvider getLabelProvider() {
        return new LabelProvider() {
            @Override
            public String getColumnText(Object element, int columnIndex) {
                if (Dependency.class.isInstance(element)) {
                    Dependency dependency = (Dependency) element;
                    switch (columnIndex) {
                    case 0:
                        return dependency.getGroupId();
                    case 1:
                        return dependency.getArtifactId();
                    case 2:
                        return dependency.getVersion();
                    case 3:
                        return dependency.getType();
                    }
                }
                return "";
            }
        };
View Full Code Here

TOP

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

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.