geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/connector/src/test-data/connector_1_5 geronimo-ra.xml
Date Tue, 10 Feb 2004 19:59:14 GMT
djencks     2004/02/10 11:59:14

  Modified:    modules/connector/src/java/org/apache/geronimo/connector/deployment
                        Connector_1_0Module.java Connector_1_5Module.java
               modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean
                        ConnectionDefinitionInstanceDConfigBean.java
               modules/connector/src/schema geronimo-connector_1_5.xsd
               modules/connector/src/test/org/apache/geronimo/connector/deployment
                        Connector_1_5Test.java
               modules/connector/src/test-data/connector_1_0
                        geronimo-ra.xml
               modules/connector/src/test-data/connector_1_5
                        geronimo-ra.xml
  Removed:     modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean
                        ConnectionManagerDConfigBean.java
  Log:
  rearrange and test connection manager dconfig properties
  
  Revision  Changes    Path
  1.7       +2 -2      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/Connector_1_0Module.java
  
  Index: Connector_1_0Module.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/Connector_1_0Module.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Connector_1_0Module.java	9 Feb 2004 23:13:27 -0000	1.6
  +++ Connector_1_0Module.java	10 Feb 2004 19:59:14 -0000	1.7
  @@ -148,7 +148,7 @@
                       throw new DeploymentException("Unable to create GMBean", e);
                   }
                   try {
  -                    connectionManagerFactoryGBean.setAttribute("Name", connectionManagerFactory.getName());
  +                    connectionManagerFactoryGBean.setAttribute("Name", gerConnectionfactoryInstance.getName());
                       connectionManagerFactoryGBean.setAttribute("BlockingTimeout", new Integer(connectionManagerFactory.getBlockingTimeout().intValue()));
                       connectionManagerFactoryGBean.setAttribute("MaxSize", new Integer(connectionManagerFactory.getMaxSize().intValue()));
                       connectionManagerFactoryGBean.setAttribute("UseTransactions", Boolean.valueOf(connectionManagerFactory.getUseTransactions()));
  
  
  
  1.8       +2 -2      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/Connector_1_5Module.java
  
  Index: Connector_1_5Module.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/Connector_1_5Module.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Connector_1_5Module.java	10 Feb 2004 08:04:21 -0000	1.7
  +++ Connector_1_5Module.java	10 Feb 2004 19:59:14 -0000	1.8
  @@ -184,7 +184,7 @@
                       throw new DeploymentException("Unable to create GMBean", e);
                   }
                   try {
  -                    connectionManagerFactoryGBean.setAttribute("Name", connectionManagerFactory.getName());
  +                    connectionManagerFactoryGBean.setAttribute("Name", connectionfactoryInstance.getName());
                       connectionManagerFactoryGBean.setAttribute("BlockingTimeout", new Integer(connectionManagerFactory.getBlockingTimeout().intValue()));
                       connectionManagerFactoryGBean.setAttribute("MaxSize", new Integer(connectionManagerFactory.getMaxSize().intValue()));
                       connectionManagerFactoryGBean.setAttribute("UseTransactions", Boolean.valueOf(connectionManagerFactory.getUseTransactions()));
  
  
  
  1.2       +69 -14    incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionInstanceDConfigBean.java
  
  Index: ConnectionDefinitionInstanceDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionInstanceDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectionDefinitionInstanceDConfigBean.java	9 Feb 2004 23:13:27 -0000	1.1
  +++ ConnectionDefinitionInstanceDConfigBean.java	10 Feb 2004 19:59:14 -0000	1.2
  @@ -58,6 +58,7 @@
   
   import java.util.HashMap;
   import java.util.Map;
  +import java.math.BigInteger;
   
   import javax.enterprise.deploy.model.DDBean;
   import javax.enterprise.deploy.spi.DConfigBean;
  @@ -83,8 +84,6 @@
           "config-property"};
       private Map configPropertiesMap = new HashMap();
   
  -    private ConnectionManagerDConfigBean connectionManagerDConfigBean;
  -
       public ConnectionDefinitionInstanceDConfigBean() {
           super(null, null, SCHEMA_TYPE_LOADER);
       }
  @@ -110,16 +109,8 @@
               }
   
           }, configPropertiesMap);
  -        GerConnectionmanagerType connectionmanagerType;
           if (connectiondefinitionInstance.getConnectionmanager() == null) {
  -            connectionmanagerType = connectiondefinitionInstance.addNewConnectionmanager();
  -        } else {
  -            connectionmanagerType = connectiondefinitionInstance.getConnectionmanager();
  -        }
  -        if (connectionManagerDConfigBean == null) {
  -        connectionManagerDConfigBean = new ConnectionManagerDConfigBean(ddBean, connectionmanagerType);
  -        } else {
  -            connectionManagerDConfigBean.setParent(ddBean, connectionmanagerType);
  +            connectiondefinitionInstance.addNewConnectionmanager();
           }
       }
   
  @@ -128,6 +119,10 @@
           return (GerConnectiondefinitionInstanceType)getXmlObject();
       }
   
  +    GerConnectionmanagerType getConnectionManager() {
  +        return getConnectiondefinitionInstance().getConnectionmanager();
  +    }
  +
       public String getName() {
           return getConnectiondefinitionInstance().getName();
       }
  @@ -144,8 +139,68 @@
           getConnectiondefinitionInstance().setGlobalJndiName(globalJNDIName);
       }
   
  -    public ConnectionManagerDConfigBean getConnectionManagerDConfigBean() {
  -        return connectionManagerDConfigBean;
  +    public boolean isUseConnectionRequestInfo() {
  +        return getConnectionManager().getUseConnectionRequestInfo();
  +    }
  +
  +    public void setUseConnectionRequestInfo(boolean useConnectionRequestInfo) {
  +        getConnectionManager().setUseConnectionRequestInfo(useConnectionRequestInfo);
  +    }
  +
  +    public boolean isUseSubject() {
  +        return getConnectionManager().getUseSubject();
  +    }
  +
  +    public void setUseSubject(boolean useSubject) {
  +        getConnectionManager().setUseSubject(useSubject);
  +    }
  +
  +    public boolean isUseTransactionCaching() {
  +        return getConnectionManager().getUseTransactionCaching();
  +    }
  +
  +    public void setUseTransactionCaching(boolean useTransactionCaching) {
  +        getConnectionManager().setUseTransactionCaching(useTransactionCaching);
  +    }
  +
  +    public boolean isUseLocalTransactions() {
  +        return getConnectionManager().getUseLocalTransactions();
  +    }
  +
  +    public void setUseLocalTransactions(boolean useLocalTransactions) {
  +        getConnectionManager().setUseLocalTransactions(useLocalTransactions);
  +    }
  +
  +    public boolean isUseTransactions() {
  +        return getConnectionManager().getUseTransactions();
  +    }
  +
  +    public void setUseTransactions(boolean useTransactions) {
  +        getConnectionManager().setUseTransactions(useTransactions);
  +    }
  +
  +    public int getMaxSize() {
  +        return getConnectionManager().getMaxSize().intValue();
  +    }
  +
  +    public void setMaxSize(int maxSize) {
  +        getConnectionManager().setMaxSize(BigInteger.valueOf(maxSize));
  +    }
  +
  +    public int getBlockingTimeout() {
  +        return getConnectionManager().getBlockingTimeout().intValue();
  +    }
  +
  +    public void setBlockingTimeout(int blockingTimeout) {
  +        getConnectionManager().setBlockingTimeout(BigInteger.valueOf(blockingTimeout));
  +    }
  +
  +    public String getRealmBridgeName() {
  +        return getConnectionManager().getRealmBridge();
  +    }
  +
  +    public void setRealmBridgeName(String realmBridgeName) {
  +        getConnectionManager().setRealmBridge(realmBridgeName);
       }
   
       public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException {
  
  
  
  1.5       +0 -2      incubator-geronimo/modules/connector/src/schema/geronimo-connector_1_5.xsd
  
  Index: geronimo-connector_1_5.xsd
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/schema/geronimo-connector_1_5.xsd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- geronimo-connector_1_5.xsd	10 Feb 2004 08:04:21 -0000	1.4
  +++ geronimo-connector_1_5.xsd	10 Feb 2004 19:59:14 -0000	1.5
  @@ -230,8 +230,6 @@
               <xsd:element name="realm-bridge"
                   type="xsd:string"
                   minOccurs="0"/>
  -            <xsd:element name="name"
  -                type="xsd:string"/>
               <xsd:element name="blockingTimeout"
                   type="xsd:integer"/>
               <xsd:element name="maxSize"
  
  
  
  1.6       +9 -2      incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/Connector_1_5Test.java
  
  Index: Connector_1_5Test.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/Connector_1_5Test.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Connector_1_5Test.java	10 Feb 2004 17:26:58 -0000	1.5
  +++ Connector_1_5Test.java	10 Feb 2004 19:59:14 -0000	1.6
  @@ -90,6 +90,7 @@
   import org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType;
   import org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType;
   import org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType;
  +import org.apache.geronimo.xbeans.geronimo.GerConnectionmanagerType;
   import org.apache.geronimo.deployment.DeploymentModule;
   import org.apache.geronimo.deployment.ConfigurationCallback;
   import org.apache.geronimo.deployment.tools.DDBeanRootImpl;
  @@ -100,7 +101,6 @@
   import org.apache.geronimo.connector.deployment.dconfigbean.AdminObjectInstanceDConfigBean;
   import org.apache.geronimo.connector.deployment.dconfigbean.ConnectionDefinitionDConfigBean;
   import org.apache.geronimo.connector.deployment.dconfigbean.ConnectionDefinitionInstanceDConfigBean;
  -import org.apache.geronimo.connector.deployment.dconfigbean.ConnectionManagerDConfigBean;
   import org.apache.xmlbeans.XmlOptions;
   
   /**
  @@ -183,6 +183,8 @@
           assertEquals(4, connectionDefinitionConfigPropDDs.length);
           ConfigPropertySettingDConfigBean connectionDefinitionSetting1 = (ConfigPropertySettingDConfigBean)
connectionDefinitionInstanceDConfigBean1.getDConfigBean(connectionDefinitionConfigPropDDs[0]);
           connectionDefinitionSetting1.setConfigPropertyValue("TestCDValue1");
  +        //connection manager properties
  +        connectionDefinitionInstanceDConfigBean1.setBlockingTimeout(3000);
   
           //check the results
           ByteArrayOutputStream baos = new ByteArrayOutputStream();
  @@ -208,6 +210,9 @@
           GerConnectionDefinitionType connectionDefinitionType = ra.getOutboundResourceadapter().getConnectionDefinitionArray(0);
           GerConnectiondefinitionInstanceType connectiondefinitionInstanceType = connectionDefinitionType.getConnectiondefinitionInstanceArray(0);
           assertEquals("TestCDValue1", connectiondefinitionInstanceType.getConfigPropertySettingArray(0).getStringValue());
  +        //connection manager
  +        GerConnectionmanagerType connectionmanagerType = connectiondefinitionInstanceType.getConnectionmanager();
  +        assertEquals(3000, connectionmanagerType.getBlockingTimeout().intValue());
   
           //and read back into dconfigbeans
           rarConfiguration.restore(new ByteArrayInputStream(bytes));
  @@ -237,6 +242,8 @@
           ConnectionDefinitionInstanceDConfigBean[] connectionDefinitionInstanceDConfigBeans
= connectionDefinitionDConfigBean.getConnectionDefinitionInstance();
           connectionDefinitionSetting1 = (ConfigPropertySettingDConfigBean) connectionDefinitionInstanceDConfigBeans[0].getDConfigBean(connectionDefinitionConfigPropDDs[0]);
           assertEquals("TestCDValue1", connectionDefinitionSetting1.getConfigPropertyValue());
  +        //connection manager
  +        assertEquals(3000, connectionDefinitionInstanceDConfigBeans[0].getBlockingTimeout());
   
       }
   
  
  
  
  1.5       +0 -3      incubator-geronimo/modules/connector/src/test-data/connector_1_0/geronimo-ra.xml
  
  Index: geronimo-ra.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test-data/connector_1_0/geronimo-ra.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- geronimo-ra.xml	10 Feb 2004 08:04:21 -0000	1.4
  +++ geronimo-ra.xml	10 Feb 2004 19:59:14 -0000	1.5
  @@ -12,7 +12,6 @@
                       <config-property-setting name="OutboundStringProperty3">newvalue2</config-property-setting>
                       <connectionmanager>
                           <realm-bridge>TargetRealm</realm-bridge>
  -                        <name>Test</name>
                           <blockingTimeout>5000</blockingTimeout>
                           <maxSize>10</maxSize>
                           <useTransactions>true</useTransactions>
  @@ -29,7 +28,6 @@
                       <config-property-setting name="OutboundStringProperty1">newvalue4</config-property-setting>
                       <connectionmanager>
                           <realm-bridge>TargetRealm</realm-bridge>
  -                        <name>Test</name>
                           <blockingTimeout>5000</blockingTimeout>
                           <maxSize>10</maxSize>
                           <useTransactions>true</useTransactions>
  @@ -44,7 +42,6 @@
                       <config-property-setting name="OutboundStringProperty">StringValue3</config-property-setting>
                       <connectionmanager>
                           <realm-bridge>TargetRealm</realm-bridge>
  -                        <name>Test</name>
                           <blockingTimeout>5000</blockingTimeout>
                           <maxSize>10</maxSize>
                           <useTransactions>true</useTransactions>
  
  
  
  1.5       +0 -3      incubator-geronimo/modules/connector/src/test-data/connector_1_5/geronimo-ra.xml
  
  Index: geronimo-ra.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test-data/connector_1_5/geronimo-ra.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- geronimo-ra.xml	10 Feb 2004 08:04:21 -0000	1.4
  +++ geronimo-ra.xml	10 Feb 2004 19:59:14 -0000	1.5
  @@ -13,7 +13,6 @@
                       <config-property-setting name="OutboundStringProperty3">newvalue2</config-property-setting>
                       <connectionmanager>
                           <realm-bridge>TargetRealm</realm-bridge>
  -                        <name>Test</name>
                           <blockingTimeout>5000</blockingTimeout>
                           <maxSize>10</maxSize>
                           <useTransactions>true</useTransactions>
  @@ -30,7 +29,6 @@
                       <config-property-setting name="OutboundStringProperty1">newvalue4</config-property-setting>
                       <connectionmanager>
                           <realm-bridge>TargetRealm</realm-bridge>
  -                        <name>Test</name>
                           <blockingTimeout>5000</blockingTimeout>
                           <maxSize>10</maxSize>
                           <useTransactions>true</useTransactions>
  @@ -48,7 +46,6 @@
                       <config-property-setting name="OutboundStringProperty">StringValue3</config-property-setting>
                       <connectionmanager>
                           <realm-bridge>TargetRealm</realm-bridge>
  -                        <name>Test</name>
                           <blockingTimeout>5000</blockingTimeout>
                           <maxSize>10</maxSize>
                           <useTransactions>true</useTransactions>
  
  
  

Mime
View raw message