Package org.apache.geronimo.jee.connector

Examples of org.apache.geronimo.jee.connector.ConnectiondefinitionInstance


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


      conn.getResourceadapter().add(adapter);

      OutboundResourceadapter outboundAdpater = new OutboundResourceadapter();
      ConnectionDefinition definition = new ConnectionDefinition();
      definition.setConnectionfactoryInterface("javax.sql.DataSource");
      ConnectiondefinitionInstance instance = new ConnectiondefinitionInstance();
      instance.setName(page1.getPoolName());

      String[] loginData = page2.getLoginData();
      if (!loginData[1].equals(loginData[2])) {
    Status status = new Status(IStatus.WARNING, "Login Error", 0,
      "Password provided in both fiels do not match", null);
    ErrorDialog.openError(this.getShell(), "Login Error",
      "Invalid Login Details", status);
    return false;
      }
      ConfigPropertySetting setting1 = new ConfigPropertySetting();
      setting1.setName("Password");
      setting1.setValue(loginData[1]);
      instance.getConfigPropertySetting().add(setting1);
      ConfigPropertySetting setting2 = new ConfigPropertySetting();
      setting2.setName("LoginTimeout");
      setting2.setValue(page2.getLoginTimeout());
      instance.getConfigPropertySetting().add(setting2);
      ConfigPropertySetting setting3 = new ConfigPropertySetting();
      setting3.setName("DatabaseName");
      setting3.setValue(page1.getDBName());
      instance.getConfigPropertySetting().add(setting3);
      ConfigPropertySetting setting4 = new ConfigPropertySetting();
      setting4.setName("CreateDatabase");
      setting4.setValue(page2.getCreateDatabase());
      instance.getConfigPropertySetting().add(setting4);
      ConfigPropertySetting setting5 = new ConfigPropertySetting();
      setting5.setName("UserName");
      setting5.setValue(loginData[0]);
      instance.getConfigPropertySetting().add(setting5);

      instance.setConnectionmanager(page3.getConnectionManager());
      definition.getConnectiondefinitionInstance().add(instance);
      outboundAdpater.getConnectionDefinition().add(definition);
      adapter.setOutboundResourceadapter(outboundAdpater);

      if (section.getViewer().getInput() == section.getPlan()) {
View Full Code Here

      // if edit a pool,the info must be filled into wizard
      if (eObject != null && ExtModule.class.isInstance(eObject)) {
    ExtModule extModule = (ExtModule) eObject;

    try {
        ConnectiondefinitionInstance conndefInstance = ((JAXBElement<Connector>) extModule
          .getAny()).getValue().getResourceadapter().get(0)
          .getOutboundResourceadapter()
          .getConnectionDefinition().get(0)
          .getConnectiondefinitionInstance().get(0);
        text[0].setText(conndefInstance.getName());
        java.util.List<ConfigPropertySetting> configPropertySettingList = conndefInstance
          .getConfigPropertySetting();
        for (ConfigPropertySetting cps : configPropertySettingList) {
      if (cps.getName().equals("DatabaseName")) {
          text[1].setText(cps.getValue());
      }
View Full Code Here

      // if edit a pool,the info must be filled into wizard
      if (eObject != null && ExtModule.class.isInstance(eObject)) {
    ExtModule extModule = (ExtModule) eObject;
    try {
        ConnectiondefinitionInstance conndefInstance = ((JAXBElement<Connector>) extModule
          .getAny()).getValue().getResourceadapter().get(0)
          .getOutboundResourceadapter()
          .getConnectionDefinition().get(0)
          .getConnectiondefinitionInstance().get(0);
        java.util.List<ConfigPropertySetting> configPropertySettingList = conndefInstance
          .getConfigPropertySetting();
        for (ConfigPropertySetting cps : configPropertySettingList) {
      if (cps.getName().equals("CreateDatabase")) {
          if (cps.getValue().equals("true"))
        createDatabase.setSelection(true);
View Full Code Here

      // if edit a pool,the info must be filled into wizard
      if (eObject != null && ExtModule.class.isInstance(eObject)) {
    ExtModule extModule = (ExtModule) eObject;
    try {
        ConnectiondefinitionInstance conndefInstance = ((JAXBElement<Connector>) extModule
          .getAny()).getValue().getResourceadapter().get(0)
          .getOutboundResourceadapter()
          .getConnectionDefinition().get(0)
          .getConnectiondefinitionInstance().get(0);

        Connectionmanager connManager = conndefInstance
          .getConnectionmanager();
        if (connManager.getXaTransaction() != null) {
      combo.select(0);
        } else if (connManager.getLocalTransaction() != null) {
      combo.select(1);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jee.connector.ConnectiondefinitionInstance

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.