[jboss-cvs] JBossAS SVN: r107999 - in projects/jboss-jca/trunk: adapters/src/test/resources and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Sep 6 11:39:37 EDT 2010
Author: maeste
Date: 2010-09-06 11:39:36 -0400 (Mon, 06 Sep 2010)
New Revision: 107999
Added:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Pool.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/PoolImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java
Modified:
projects/jboss-jca/trunk/.gitignore
projects/jboss-jca/trunk/adapters/src/test/resources/h2-ds.xml
projects/jboss-jca/trunk/adapters/src/test/resources/h2-xa-ds.xml
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/CommonDataSource.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java
projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd
projects/jboss-jca/trunk/common/src/test/resources/ds/db2-400-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/db2-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/db2-jcc-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/db2-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/derby-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/derby-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/hsqldb-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/informix-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/informix-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/jdatastore-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/jsql-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/msaccess-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/mysql-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-xa-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/postgres-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/progress-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/sapdb-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-ds.xml
projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-xa-ds.xml
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java
Log:
JBJCA-400: creating new types pool and xa-pool. Adapting parser, metadatas and test suite
Modified: projects/jboss-jca/trunk/.gitignore
===================================================================
--- projects/jboss-jca/trunk/.gitignore 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/.gitignore 2010-09-06 15:39:36 UTC (rev 107999)
@@ -33,3 +33,4 @@
common/src/main/resources/schema/connector_1_0.xsd
common/src/test/resources/todo/
+logtest
Modified: projects/jboss-jca/trunk/adapters/src/test/resources/h2-ds.xml
===================================================================
--- projects/jboss-jca/trunk/adapters/src/test/resources/h2-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/adapters/src/test/resources/h2-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -3,12 +3,12 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="java:/H2DS" pool-name="H2DS">
+ <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+ <driver-class>org.h2.Driver</driver-class>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
- <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
- <driver-class>org.h2.Driver</driver-class>
</datasource>
</datasources>
Modified: projects/jboss-jca/trunk/adapters/src/test/resources/h2-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/adapters/src/test/resources/h2-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/adapters/src/test/resources/h2-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -3,14 +3,14 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<xa-datasource jndi-name="java:/H2XADS" pool-name="H2XADS">
- <security>
+ <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+ <xa-datasource-property name="URL">jdbc:h2:mem:test</xa-datasource-property>
+ <security>
<!-- Have to defined as a primary property - otherwise it won't work -->
<user-name>sa</user-name>
<!-- Have to defined as a primary property - otherwise it won't work -->
<password>sa</password>
</security>
- <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:h2:mem:test</xa-datasource-property>
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/CommonDataSource.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/CommonDataSource.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/CommonDataSource.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -34,30 +34,6 @@
{
/**
- * Get the minPoolSize.
- *
- * @return the minPoolSize.
- */
-
- public Integer getMinPoolSize();
-
- /**
- * Get the maxPoolSize.
- *
- * @return the maxPoolSize.
- */
-
- public Integer getMaxPoolSize();
-
- /**
- * Get the prefill.
- *
- * @return the prefill.
- */
-
- public boolean isPrefill();
-
- /**
* Get the transactionIsolation.
*
* @return the transactionIsolation.
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -87,7 +87,14 @@
*/
public String getNewConnectionSql();
+ /**
+ * Get the pool.
+ *
+ * @return the pool.
+ */
+ public Pool getPool();
+
/**
*
* A Tag.
@@ -103,20 +110,10 @@
UNKNOWN(null),
/**
- * min-pool-size tag
+ * pool tag
*/
- MIN_POOL_SIZE("min-pool-size"),
-
+ POOL("pool"),
/**
- * maxPoolSize tag
- */
- MAXPOOLSIZE("max-pool-size"),
- /**
- * prefill tag
- */
- PREFILL("prefill"),
-
- /**
* connection-url tag
*/
CONNECTIONURL("connection-url"),
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Pool.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Pool.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Pool.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A Pool.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface Pool extends JCAMetadata
+{
+
+ /**
+ * Get the minPoolSize.
+ *
+ * @return the minPoolSize.
+ */
+ public Integer getMinPoolSize();
+
+ /**
+ * Get the maxPoolSize.
+ *
+ * @return the maxPoolSize.
+ */
+ public Integer getMaxPoolSize();
+
+ /**
+ * Get the prefill.
+ *
+ * @return the prefill.
+ */
+ public boolean isPrefill();
+
+ /**
+ * Get the useStrictMin.
+ *
+ * @return the useStrictMin.
+ */
+ public boolean isUseStrictMin();
+
+ /**
+ *
+ * A Tag.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Tag
+ {
+ /** always first
+ *
+ */
+ UNKNOWN(null),
+
+ /**
+ * min-pool-size tag
+ */
+ MIN_POOL_SIZE("min-pool-size"),
+
+ /**
+ * maxPoolSize tag
+ */
+ MAXPOOLSIZE("max-pool-size"),
+ /**
+ * prefill tag
+ */
+ PREFILL("prefill"),
+
+ /**
+ * use-strict-min tag
+ */
+ USE_STRICT_MIN("use-strict-min");
+
+ private final String name;
+
+ /**
+ *
+ * Create a new Tag.
+ *
+ * @param name a name
+ */
+ Tag(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+
+ private static final Map<String, Tag> MAP;
+
+ static
+ {
+ final Map<String, Tag> map = new HashMap<String, Tag>();
+ for (Tag element : values())
+ {
+ final String name = element.getLocalName();
+ if (name != null)
+ map.put(name, element);
+ }
+ MAP = map;
+ }
+
+ /**
+ *
+ * Static method to get enum instance given localName XsdString
+ *
+ * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+ * @return the enum instance
+ */
+ public static Tag forName(String localName)
+ {
+ final Tag element = MAP.get(localName);
+ return element == null ? UNKNOWN : element;
+ }
+
+ }
+
+}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -43,20 +43,6 @@
/**
- * Get the isSameRmOverride.
- *
- * @return the isSameRmOverride.
- */
- public boolean isSameRmOverride();
-
- /**
- * Get the interleaving.
- *
- * @return the interleaving.
- */
- public boolean isInterleaving();
-
- /**
* Get the statement.
*
* @return the statement.
@@ -93,27 +79,13 @@
public Map<String, String> getXaDataSourceProperty();
/**
- * Get the padXid.
+ * Get the xaPool.
*
- * @return the padXid.
+ * @return the xaPool.
*/
- public boolean isPadXid();
+ public XaPool getXaPool();
/**
- * Get the wrapXaDataSource.
- *
- * @return the wrapXaDataSource.
- */
- public boolean isWrapXaDataSource();
-
- /**
- * Get the noTxSeparatePool.
- *
- * @return the noTxSeparatePool.
- */
- public boolean isNoTxSeparatePool();
-
- /**
*
* A Tag.
*
@@ -128,18 +100,6 @@
UNKNOWN(null),
/**
- * minPoolSize tag
- */
- MINPOOLSIZE("min-pool-size"),
- /**
- * maxPoolSize tag
- */
- MAXPOOLSIZE("max-pool-size"),
- /**
- * prefill tag
- */
- PREFILL("prefill"),
- /**
* xaDatasourceProperty tag
*/
XADATASOURCEPROPERTY("xa-datasource-property"),
@@ -152,14 +112,6 @@
*/
TRANSACTIONISOLATION("transaction-isolation"),
/**
- * isSameRmOverrideValue tag
- */
- ISSAMERMOVERRIDEVALUE("is-same-rm-override"),
- /**
- * interleaving tag
- */
- INTERLEAVING("interleaving"),
- /**
* timeOut tag
*/
TIMEOUT("time-out"),
@@ -189,20 +141,10 @@
NEWCONNECTIONSQL("new-connection-sql"),
/**
- * pad-xid tag
+ * xa-pool tag
*/
- PAD_XID("pad-xid"),
+ XA_POOL("xa-pool");
- /**
- * wrap-xa-resource tag
- */
- WRAP_XA_RESOURCE("wrap-xa-resource"),
-
- /**
- * no-tx-separate-pools tag
- */
- NO_TX_SEPARATE_POOLS("no-tx-separate-pools");
-
private final String name;
/**
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java (from rev 107993, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DataSource.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaPool.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -0,0 +1,179 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.api.metadata.ds;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A XaPool.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface XaPool extends Pool
+{
+
+ /**
+ * Get the isSameRmOverride.
+ *
+ * @return the isSameRmOverride.
+ */
+ public boolean isSameRmOverride();
+
+ /**
+ * Get the interleaving.
+ *
+ * @return the interleaving.
+ */
+ public boolean isInterleaving();
+
+ /**
+ * Get the padXid.
+ *
+ * @return the padXid.
+ */
+ public boolean isPadXid();
+
+ /**
+ * Get the wrapXaDataSource.
+ *
+ * @return the wrapXaDataSource.
+ */
+ public boolean isWrapXaDataSource();
+
+ /**
+ * Get the noTxSeparatePool.
+ *
+ * @return the noTxSeparatePool.
+ */
+ public boolean isNoTxSeparatePool();
+
+ /**
+ *
+ * A Tag.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Tag
+ {
+ /** always first
+ *
+ */
+ UNKNOWN(null),
+
+ /**
+ * min-pool-size tag
+ */
+ MIN_POOL_SIZE("min-pool-size"),
+
+ /**
+ * maxPoolSize tag
+ */
+ MAXPOOLSIZE("max-pool-size"),
+ /**
+ * prefill tag
+ */
+ PREFILL("prefill"),
+
+ /**
+ * use-strict-min tag
+ */
+ USE_STRICT_MIN("use-strict-min"),
+ /**
+ * isSameRmOverrideValue tag
+ */
+ ISSAMERMOVERRIDEVALUE("is-same-rm-override"),
+ /**
+ * interleaving tag
+ */
+ INTERLEAVING("interleaving"),
+ /**
+ * pad-xid tag
+ */
+ PAD_XID("pad-xid"),
+
+ /**
+ * wrap-xa-resource tag
+ */
+ WRAP_XA_RESOURCE("wrap-xa-resource"),
+
+ /**
+ * no-tx-separate-pools tag
+ */
+ NO_TX_SEPARATE_POOLS("no-tx-separate-pools");
+
+ private final String name;
+
+ /**
+ *
+ * Create a new Tag.
+ *
+ * @param name a name
+ */
+ Tag(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+
+ private static final Map<String, Tag> MAP;
+
+ static
+ {
+ final Map<String, Tag> map = new HashMap<String, Tag>();
+ for (Tag element : values())
+ {
+ final String name = element.getLocalName();
+ if (name != null)
+ map.put(name, element);
+ }
+ MAP = map;
+ }
+
+ /**
+ *
+ * Static method to get enum instance given localName XsdString
+ *
+ * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+ * @return the enum instance
+ */
+ public static Tag forName(String localName)
+ {
+ final Tag element = MAP.get(localName);
+ return element == null ? UNKNOWN : element;
+ }
+
+ }
+
+}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -42,21 +42,6 @@
private static final long serialVersionUID = -5612846950298960159L;
/**
- * minPoolSize
- */
- protected final Integer minPoolSize;
-
- /**
- * maxPoolSize
- */
- protected final Integer maxPoolSize;
-
- /**
- * prefill
- */
- protected final boolean prefill;
-
- /**
* transactionIsolation
*/
protected final TransactionIsolation transactionIsolation;
@@ -114,9 +99,6 @@
/**
* Create a new DataSourceAbstractImpl.
*
- * @param minPoolSize minPoolSize
- * @param maxPoolSize maxPoolSize
- * @param prefill prefill
* @param transactionIsolation transactionIsolation
* @param timeOut timeOut
* @param security security
@@ -129,17 +111,11 @@
* @param enabled enabled
* @param jndiName jndiName
*/
- protected DataSourceAbstractImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill,
- TransactionIsolation transactionIsolation,
- TimeOut timeOut,
- Security security, Statement statement, Validation validation,
- String urlDelimiter, String urlSelectorStrategyClassName, boolean useJavaContext,
- String poolName, boolean enabled, String jndiName)
+ protected DataSourceAbstractImpl(TransactionIsolation transactionIsolation, TimeOut timeOut, Security security,
+ Statement statement, Validation validation, String urlDelimiter, String urlSelectorStrategyClassName,
+ boolean useJavaContext, String poolName, boolean enabled, String jndiName)
{
super();
- this.minPoolSize = minPoolSize;
- this.maxPoolSize = maxPoolSize;
- this.prefill = prefill;
this.transactionIsolation = transactionIsolation;
this.timeOut = timeOut;
this.security = security;
@@ -153,43 +129,9 @@
this.jndiName = jndiName;
}
- /**
- * Get the minPoolSize.
- *
- * @return the minPoolSize.
- */
- @Override
- public final Integer getMinPoolSize()
- {
- return minPoolSize;
- }
/**
- * Get the maxPoolSize.
- *
- * @return the maxPoolSize.
- */
-
- @Override
- public final Integer getMaxPoolSize()
- {
- return maxPoolSize;
- }
-
- /**
- * Get the prefill.
- *
- * @return the prefill.
- */
-
- @Override
- public final boolean isPrefill()
- {
- return prefill;
- }
-
- /**
* Get the transactionIsolation.
*
* @return the transactionIsolation.
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -22,6 +22,7 @@
package org.jboss.jca.common.metadata.ds;
import org.jboss.jca.common.api.metadata.ds.DataSource;
+import org.jboss.jca.common.api.metadata.ds.Pool;
import org.jboss.jca.common.api.metadata.ds.Security;
import org.jboss.jca.common.api.metadata.ds.Statement;
import org.jboss.jca.common.api.metadata.ds.TimeOut;
@@ -52,12 +53,11 @@
private final String newConnectionSql;
+ private final Pool pool;
+
/**
* Create a new DataSourceImpl.
*
- * @param minPoolSize minPoolSize
- * @param maxPoolSize maxPoolSize
- * @param prefill prefill
* @param connectionUrl connectionUrl
* @param driverClass driverClass
* @param transactionIsolation transactionIsolation
@@ -73,15 +73,15 @@
* @param poolName poolName
* @param enabled enabled
* @param jndiName jndiName
+ * @param pool pool
*/
- public DataSourceImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String connectionUrl,
- String driverClass, TransactionIsolation transactionIsolation, Map<String, String> connectionProperties,
- TimeOut timeOut, Security security, Statement statement, Validation validation, String urlDelimiter,
- String urlSelectorStrategyClassName, String newConnectionSql, boolean useJavaContext, String poolName,
- boolean enabled, String jndiName)
+ public DataSourceImpl(String connectionUrl, String driverClass, TransactionIsolation transactionIsolation,
+ Map<String, String> connectionProperties, TimeOut timeOut, Security security, Statement statement,
+ Validation validation, String urlDelimiter, String urlSelectorStrategyClassName, String newConnectionSql,
+ boolean useJavaContext, String poolName, boolean enabled, String jndiName, Pool pool)
{
- super(minPoolSize, maxPoolSize, prefill, transactionIsolation, timeOut, security, statement, validation,
- urlDelimiter, urlSelectorStrategyClassName, useJavaContext, poolName, enabled, jndiName);
+ super(transactionIsolation, timeOut, security, statement, validation, urlDelimiter,
+ urlSelectorStrategyClassName, useJavaContext, poolName, enabled, jndiName);
this.connectionUrl = connectionUrl;
this.driverClass = driverClass;
if (connectionProperties != null)
@@ -94,6 +94,7 @@
this.connectionProperties = new HashMap<String, String>(0);
}
this.newConnectionSql = newConnectionSql;
+ this.pool = pool;
}
@@ -174,7 +175,18 @@
return newConnectionSql;
}
+ /**
+ * Get the pool.
+ *
+ * @return the pool.
+ */
@Override
+ public final Pool getPool()
+ {
+ return pool;
+ }
+
+ @Override
public int hashCode()
{
final int prime = 31;
@@ -182,22 +194,8 @@
result = prime * result + ((connectionProperties == null) ? 0 : connectionProperties.hashCode());
result = prime * result + ((connectionUrl == null) ? 0 : connectionUrl.hashCode());
result = prime * result + ((driverClass == null) ? 0 : driverClass.hashCode());
- result = prime * result + (enabled ? 1231 : 1237);
- result = prime * result + ((jndiName == null) ? 0 : jndiName.hashCode());
- result = prime * result + ((maxPoolSize == null) ? 0 : maxPoolSize.hashCode());
- result = prime * result + ((minPoolSize == null) ? 0 : minPoolSize.hashCode());
result = prime * result + ((newConnectionSql == null) ? 0 : newConnectionSql.hashCode());
- result = prime * result + ((poolName == null) ? 0 : poolName.hashCode());
- result = prime * result + (prefill ? 1231 : 1237);
- result = prime * result + ((security == null) ? 0 : security.hashCode());
- result = prime * result + ((statement == null) ? 0 : statement.hashCode());
- result = prime * result + ((timeOut == null) ? 0 : timeOut.hashCode());
- result = prime * result + ((transactionIsolation == null) ? 0 : transactionIsolation.hashCode());
- result = prime * result + ((urlDelimiter == null) ? 0 : urlDelimiter.hashCode());
- result = prime * result +
- ((urlSelectorStrategyClassName == null) ? 0 : urlSelectorStrategyClassName.hashCode());
- result = prime * result + (useJavaContext ? 1231 : 1237);
- result = prime * result + ((validation == null) ? 0 : validation.hashCode());
+ result = prime * result + ((pool == null) ? 0 : pool.hashCode());
return result;
}
@@ -232,29 +230,6 @@
}
else if (!driverClass.equals(other.driverClass))
return false;
- if (enabled != other.enabled)
- return false;
- if (jndiName == null)
- {
- if (other.jndiName != null)
- return false;
- }
- else if (!jndiName.equals(other.jndiName))
- return false;
- if (maxPoolSize == null)
- {
- if (other.maxPoolSize != null)
- return false;
- }
- else if (!maxPoolSize.equals(other.maxPoolSize))
- return false;
- if (minPoolSize == null)
- {
- if (other.minPoolSize != null)
- return false;
- }
- else if (!minPoolSize.equals(other.minPoolSize))
- return false;
if (newConnectionSql == null)
{
if (other.newConnectionSql != null)
@@ -262,74 +237,28 @@
}
else if (!newConnectionSql.equals(other.newConnectionSql))
return false;
- if (poolName == null)
+ if (pool == null)
{
- if (other.poolName != null)
+ if (other.pool != null)
return false;
}
- else if (!poolName.equals(other.poolName))
+ else if (!pool.equals(other.pool))
return false;
- if (prefill != other.prefill)
- return false;
- if (security == null)
- {
- if (other.security != null)
- return false;
- }
- else if (!security.equals(other.security))
- return false;
- if (statement == null)
- {
- if (other.statement != null)
- return false;
- }
- else if (!statement.equals(other.statement))
- return false;
- if (timeOut == null)
- {
- if (other.timeOut != null)
- return false;
- }
- else if (!timeOut.equals(other.timeOut))
- return false;
- if (transactionIsolation != other.transactionIsolation)
- return false;
- if (urlDelimiter == null)
- {
- if (other.urlDelimiter != null)
- return false;
- }
- else if (!urlDelimiter.equals(other.urlDelimiter))
- return false;
- if (urlSelectorStrategyClassName == null)
- {
- if (other.urlSelectorStrategyClassName != null)
- return false;
- }
- else if (!urlSelectorStrategyClassName.equals(other.urlSelectorStrategyClassName))
- return false;
- if (useJavaContext != other.useJavaContext)
- return false;
- if (validation == null)
- {
- if (other.validation != null)
- return false;
- }
- else if (!validation.equals(other.validation))
- return false;
return true;
}
@Override
public String toString()
{
- return "DataSourceImpl [minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" +
- prefill + ", connectionUrl=" + connectionUrl + ", driverClass=" + driverClass +
- ", transactionIsolation=" + transactionIsolation + ", connectionProperties=" + connectionProperties +
- ", timeOut=" + timeOut + ", security=" + security + ", statement=" + statement + ", validation=" +
- validation + ", urlDelimiter=" + urlDelimiter + ", urlSelectorStrategyClassName=" +
- urlSelectorStrategyClassName + ", newConnectionSql=" + newConnectionSql + ", useJavaContext=" +
- useJavaContext + ", poolName=" + poolName + ", enabled=" + enabled + ", jndiName=" + jndiName + "]";
+ return "DataSourceImpl [connectionUrl=" + connectionUrl + ", driverClass=" + driverClass +
+ ", connectionProperties=" + connectionProperties + ", newConnectionSql=" + newConnectionSql +
+ ", pool=" + pool + ", transactionIsolation=" + transactionIsolation + ", timeOut=" + timeOut +
+ ", security=" + security + ", statement=" + statement + ", validation=" + validation +
+ ", urlDelimiter=" + urlDelimiter + ", urlSelectorStrategyClassName=" + urlSelectorStrategyClassName +
+ ", useJavaContext=" + useJavaContext + ", poolName=" + poolName + ", enabled=" + enabled +
+ ", jndiName=" + jndiName + "]";
}
+
+
}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -23,6 +23,7 @@
import org.jboss.jca.common.api.metadata.ds.DataSource;
import org.jboss.jca.common.api.metadata.ds.DataSources;
+import org.jboss.jca.common.api.metadata.ds.Pool;
import org.jboss.jca.common.api.metadata.ds.Security;
import org.jboss.jca.common.api.metadata.ds.Statement;
import org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum;
@@ -31,6 +32,7 @@
import org.jboss.jca.common.api.metadata.ds.Validation;
import org.jboss.jca.common.api.metadata.ds.XaDataSource;
import org.jboss.jca.common.api.metadata.ds.XaDataSource.Attribute;
+import org.jboss.jca.common.api.metadata.ds.XaPool;
import org.jboss.jca.common.metadata.AbstractParser;
import org.jboss.jca.common.metadata.MetadataParser;
import org.jboss.jca.common.metadata.ParserException;
@@ -160,9 +162,6 @@
private XaDataSource parseXADataSource(XMLStreamReader reader) throws XMLStreamException, ParserException
{
- Integer minPoolSize = null;
- Integer maxPoolSize = null;
- boolean prefill = false;
TransactionIsolation transactionIsolation = null;
Map<String, String> xaDataSourceProperty = new HashMap<String, String>();
TimeOut timeOutSettings = null;
@@ -172,13 +171,9 @@
String urlDelimiter = null;
String urlSelectorStrategyClassName = null;
String newConnectionSql = null;
+ XaPool xaPool = null;
- boolean interleaving = false;
- boolean isSameRmOverrideValue = false;
String xaDataSourceClass = null;
- boolean padXid = false;
- boolean noTxSeparatePool = false;
- boolean wrapXaDataSource = false;
//attributes reading
@@ -221,13 +216,11 @@
if (DataSources.Tag.forName(reader.getLocalName()) == DataSources.Tag.XA_DATASOURCE)
{
- return new XADataSourceImpl(minPoolSize, maxPoolSize, prefill, xaDataSourceProperty,
- xaDataSourceClass, transactionIsolation, isSameRmOverrideValue,
- interleaving, timeOutSettings, securitySettings,
+ return new XADataSourceImpl(transactionIsolation, timeOutSettings, securitySettings,
statementSettings, validationSettings, urlDelimiter,
- urlSelectorStrategyClassName, newConnectionSql, useJavaContext,
- poolName, enabled, jndiName, padXid, wrapXaDataSource,
- noTxSeparatePool);
+ urlSelectorStrategyClassName, useJavaContext, poolName, enabled,
+ jndiName, xaDataSourceProperty, xaDataSourceClass, newConnectionSql,
+ xaPool);
}
else
{
@@ -249,22 +242,14 @@
xaDataSourceClass = elementAsString(reader);
break;
}
- case MAXPOOLSIZE : {
- maxPoolSize = elementAsInteger(reader);
+ case XA_POOL : {
+ xaPool = parseXaPool(reader);
break;
}
- case MINPOOLSIZE : {
- minPoolSize = elementAsInteger(reader);
- break;
- }
case NEWCONNECTIONSQL : {
newConnectionSql = elementAsString(reader);
break;
}
- case PREFILL : {
- prefill = elementAsBoolean(reader);
- break;
- }
case URLDELIMITER : {
urlDelimiter = elementAsString(reader);
break;
@@ -293,26 +278,6 @@
validationSettings = parseValidationSetting(reader);
break;
}
- case INTERLEAVING : {
- interleaving = elementAsBoolean(reader);
- break;
- }
- case ISSAMERMOVERRIDEVALUE : {
- isSameRmOverrideValue = elementAsBoolean(reader);
- break;
- }
- case NO_TX_SEPARATE_POOLS : {
- noTxSeparatePool = elementAsBoolean(reader);
- break;
- }
- case PAD_XID : {
- padXid = elementAsBoolean(reader);
- break;
- }
- case WRAP_XA_RESOURCE : {
- wrapXaDataSource = elementAsBoolean(reader);
- break;
- }
default :
throw new ParserException("Unexpected element:" + reader.getLocalName());
}
@@ -323,7 +288,6 @@
throw new ParserException("Reached end of xml document unexpectedly");
}
-
private DataSource parseDataSource(XMLStreamReader reader) throws XMLStreamException, ParserException
{
Integer minPoolSize = null;
@@ -340,6 +304,7 @@
String urlDelimiter = null;
String urlSelectorStrategyClassName = null;
String newConnectionSql = null;
+ Pool pool = null;
//attributes reading
boolean useJavaContext = false;
@@ -381,11 +346,11 @@
if (DataSources.Tag.forName(reader.getLocalName()) == DataSources.Tag.DATASOURCE)
{
- return new DataSourceImpl(minPoolSize, maxPoolSize, prefill, connectionUrl,
- driverClass, transactionIsolation, connectionProperties,
- timeOutSettings, securitySettings, statementSettings,
- validationSettings, urlDelimiter, urlSelectorStrategyClassName,
- newConnectionSql, useJavaContext, poolName, enabled, jndiName);
+ return new DataSourceImpl(connectionUrl, driverClass, transactionIsolation,
+ connectionProperties, timeOutSettings, securitySettings,
+ statementSettings, validationSettings, urlDelimiter,
+ urlSelectorStrategyClassName, newConnectionSql, useJavaContext,
+ poolName, enabled, jndiName, pool);
}
else
{
@@ -411,22 +376,14 @@
driverClass = elementAsString(reader);
break;
}
- case MAXPOOLSIZE : {
- maxPoolSize = elementAsInteger(reader);
+ case POOL : {
+ pool = parsePool(reader);
break;
}
- case MIN_POOL_SIZE : {
- minPoolSize = elementAsInteger(reader);
- break;
- }
case NEWCONNECTIONSQL : {
newConnectionSql = elementAsString(reader);
break;
}
- case PREFILL : {
- prefill = elementAsBoolean(reader);
- break;
- }
case URLDELIMITER : {
urlDelimiter = elementAsString(reader);
break;
@@ -465,6 +422,145 @@
throw new ParserException("Reached end of xml document unexpectedly");
}
+ private XaPool parseXaPool(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ Integer minPoolSize = null;
+ Integer maxPoolSize = null;
+ boolean prefill = false;
+ boolean interleaving = false;
+ boolean isSameRmOverrideValue = false;
+ boolean padXid = false;
+ boolean noTxSeparatePool = false;
+ boolean wrapXaDataSource = false;
+ boolean useStrictMin = false;
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.XA_POOL)
+ {
+
+ return new XaPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin, isSameRmOverrideValue,
+ interleaving, padXid, wrapXaDataSource, noTxSeparatePool);
+
+ }
+ else
+ {
+ if (XaPool.Tag.forName(reader.getLocalName()) == XaPool.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (XaPool.Tag.forName(reader.getLocalName()))
+ {
+ case MAXPOOLSIZE : {
+ maxPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case MIN_POOL_SIZE : {
+ minPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case INTERLEAVING : {
+ interleaving = elementAsBoolean(reader);
+ break;
+ }
+ case ISSAMERMOVERRIDEVALUE : {
+ isSameRmOverrideValue = elementAsBoolean(reader);
+ break;
+ }
+ case NO_TX_SEPARATE_POOLS : {
+ noTxSeparatePool = elementAsBoolean(reader);
+ break;
+ }
+ case PAD_XID : {
+ padXid = elementAsBoolean(reader);
+ break;
+ }
+ case WRAP_XA_RESOURCE : {
+ wrapXaDataSource = elementAsBoolean(reader);
+ break;
+ }
+ case PREFILL : {
+ prefill = elementAsBoolean(reader);
+ break;
+ }
+ case USE_STRICT_MIN : {
+ useStrictMin = elementAsBoolean(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private Pool parsePool(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ Integer minPoolSize = null;
+ Integer maxPoolSize = null;
+ boolean prefill = false;
+ boolean useStrictMin = false;
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.POOL)
+ {
+
+ return new PoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin);
+
+ }
+ else
+ {
+ if (Pool.Tag.forName(reader.getLocalName()) == Pool.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (Pool.Tag.forName(reader.getLocalName()))
+ {
+ case MAXPOOLSIZE : {
+ maxPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case MIN_POOL_SIZE : {
+ minPoolSize = elementAsInteger(reader);
+ break;
+ }
+
+ case PREFILL : {
+ prefill = elementAsBoolean(reader);
+ break;
+ }
+ case USE_STRICT_MIN : {
+ useStrictMin = elementAsBoolean(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
private Validation parseValidationSetting(XMLStreamReader reader) throws XMLStreamException, ParserException
{
boolean validateOnMatch = false;
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/PoolImpl.java (from rev 107993, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/CommonDataSource.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/PoolImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/PoolImpl.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.ds.Pool;
+
+/**
+ *
+ * A PoolImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class PoolImpl implements Pool
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8705723067326455982L;
+
+ /**
+ * minPoolSize
+ */
+ protected final Integer minPoolSize;
+
+ /**
+ * maxPoolSize
+ */
+ protected final Integer maxPoolSize;
+
+ /**
+ * prefill
+ */
+ protected final boolean prefill;
+
+ /**
+ * use-strict-min
+ */
+ protected final boolean useStrictMin;
+
+ /**
+ * Create a new PoolImpl.
+ *
+ * @param minPoolSize minPoolSize
+ * @param maxPoolSize maxPoolSize
+ * @param prefill prefill
+ * @param useStrictMin useStrictMin
+ */
+ public PoolImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, boolean useStrictMin)
+ {
+ super();
+ this.minPoolSize = minPoolSize;
+ this.maxPoolSize = maxPoolSize;
+ this.prefill = prefill;
+ this.useStrictMin = useStrictMin;
+ }
+
+ /**
+ * Get the minPoolSize.
+ *
+ * @return the minPoolSize.
+ */
+ @Override
+ public final Integer getMinPoolSize()
+ {
+ return minPoolSize;
+ }
+
+ /**
+ * Get the maxPoolSize.
+ *
+ * @return the maxPoolSize.
+ */
+ @Override
+ public final Integer getMaxPoolSize()
+ {
+ return maxPoolSize;
+ }
+
+ /**
+ * Get the prefill.
+ *
+ * @return the prefill.
+ */
+ @Override
+ public final boolean isPrefill()
+ {
+ return prefill;
+ }
+
+ /**
+ * Get the useStrictMin.
+ *
+ * @return the useStrictMin.
+ */
+ @Override
+ public final boolean isUseStrictMin()
+ {
+ return useStrictMin;
+ }
+
+}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -27,6 +27,7 @@
import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
import org.jboss.jca.common.api.metadata.ds.Validation;
import org.jboss.jca.common.api.metadata.ds.XaDataSource;
+import org.jboss.jca.common.api.metadata.ds.XaPool;
import java.util.Collections;
import java.util.HashMap;
@@ -48,53 +49,37 @@
private final String xaDataSourceClass;
- private final boolean isSameRmOverride;
-
- private final boolean interleaving;
-
private final String newConnectionSql;
- private final boolean padXid;
+ private final XaPool xaPool;
- private final boolean wrapXaDataSource;
-
- private final boolean noTxSeparatePool;
-
/**
* Create a new XADataSourceImpl.
*
- * @param minPoolSize minPoolSize
- * @param maxPoolSize maxPoolSize
- * @param prefill prefill
- * @param xaDataSourceProperty xaDataSoourceProperty
- * @param xaDataSourceClass xaDataSourceClass
* @param transactionIsolation transactionIsolation
- * @param isSameRmOverride isSameRmOverride
- * @param interleaving interleaving
* @param timeOut timeOut
* @param security security
* @param statement statement
* @param validation validation
* @param urlDelimiter urlDelimiter
* @param urlSelectorStrategyClassName urlSelectorStrategyClassName
- * @param newConnectionSql newConnectionSql
* @param useJavaContext useJavaContext
* @param poolName poolName
* @param enabled enabled
* @param jndiName jndiName
- * @param padXid padXid
- * @param wrapXaDataSource wrapXaDataSource
- * @param noTxSeparatePool noTxSeparatePool
+ * @param xaDataSourceProperty xaDataSourceProperty
+ * @param xaDataSourceClass xaDataSourceClass
+ * @param newConnectionSql newConnectionSql
+ * @param xaPool xaPool
*/
- public XADataSourceImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill,
- Map<String, String> xaDataSourceProperty, String xaDataSourceClass,
- TransactionIsolation transactionIsolation, boolean isSameRmOverride, boolean interleaving, TimeOut timeOut,
- Security security, Statement statement, Validation validation, String urlDelimiter,
- String urlSelectorStrategyClassName, String newConnectionSql, boolean useJavaContext, String poolName,
- boolean enabled, String jndiName, boolean padXid, boolean wrapXaDataSource, boolean noTxSeparatePool)
+ public XADataSourceImpl(TransactionIsolation transactionIsolation, TimeOut timeOut, Security security,
+ Statement statement, Validation validation, String urlDelimiter, String urlSelectorStrategyClassName,
+ boolean useJavaContext, String poolName, boolean enabled, String jndiName,
+ Map<String, String> xaDataSourceProperty, String xaDataSourceClass, String newConnectionSql,
+ XaPool xaPool)
{
- super(minPoolSize, maxPoolSize, prefill, transactionIsolation, timeOut, security, statement, validation,
- urlDelimiter, urlSelectorStrategyClassName, useJavaContext, poolName, enabled, jndiName);
+ super(transactionIsolation, timeOut, security, statement, validation, urlDelimiter,
+ urlSelectorStrategyClassName, useJavaContext, poolName, enabled, jndiName);
if (xaDataSourceProperty != null)
{
this.xaDataSourceProperty = new HashMap<String, String>(xaDataSourceProperty.size());
@@ -105,12 +90,8 @@
this.xaDataSourceProperty = new HashMap<String, String>(0);
}
this.xaDataSourceClass = xaDataSourceClass;
- this.isSameRmOverride = isSameRmOverride;
- this.interleaving = interleaving;
this.newConnectionSql = newConnectionSql;
- this.padXid = padXid;
- this.wrapXaDataSource = wrapXaDataSource;
- this.noTxSeparatePool = noTxSeparatePool;
+ this.xaPool = xaPool;
}
/**
@@ -125,28 +106,6 @@
}
/**
- * Get the isSameRmOverride.
- *
- * @return the isSameRmOverride.
- */
- @Override
- public final boolean isSameRmOverride()
- {
- return isSameRmOverride;
- }
-
- /**
- * Get the interleaving.
- *
- * @return the interleaving.
- */
- @Override
- public final boolean isInterleaving()
- {
- return interleaving;
- }
-
- /**
* Get the statement.
*
* @return the statement.
@@ -195,14 +154,10 @@
{
final int prime = 31;
int result = 1;
- result = prime * result + (interleaving ? 1231 : 1237);
- result = prime * result + (isSameRmOverride ? 1231 : 1237);
result = prime * result + ((newConnectionSql == null) ? 0 : newConnectionSql.hashCode());
- result = prime * result + (noTxSeparatePool ? 1231 : 1237);
- result = prime * result + (padXid ? 1231 : 1237);
- result = prime * result + (wrapXaDataSource ? 1231 : 1237);
result = prime * result + ((xaDataSourceClass == null) ? 0 : xaDataSourceClass.hashCode());
result = prime * result + ((xaDataSourceProperty == null) ? 0 : xaDataSourceProperty.hashCode());
+ result = prime * result + ((xaPool == null) ? 0 : xaPool.hashCode());
return result;
}
@@ -216,10 +171,6 @@
if (!(obj instanceof XADataSourceImpl))
return false;
XADataSourceImpl other = (XADataSourceImpl) obj;
- if (interleaving != other.interleaving)
- return false;
- if (isSameRmOverride != other.isSameRmOverride)
- return false;
if (newConnectionSql == null)
{
if (other.newConnectionSql != null)
@@ -227,12 +178,6 @@
}
else if (!newConnectionSql.equals(other.newConnectionSql))
return false;
- if (noTxSeparatePool != other.noTxSeparatePool)
- return false;
- if (padXid != other.padXid)
- return false;
- if (wrapXaDataSource != other.wrapXaDataSource)
- return false;
if (xaDataSourceClass == null)
{
if (other.xaDataSourceClass != null)
@@ -247,6 +192,13 @@
}
else if (!xaDataSourceProperty.equals(other.xaDataSourceProperty))
return false;
+ if (xaPool == null)
+ {
+ if (other.xaPool != null)
+ return false;
+ }
+ else if (!xaPool.equals(other.xaPool))
+ return false;
return true;
}
@@ -254,9 +206,11 @@
public String toString()
{
return "XADataSourceImpl [xaDataSourceProperty=" + xaDataSourceProperty + ", xaDataSourceClass=" +
- xaDataSourceClass + ", isSameRmOverride=" + isSameRmOverride + ", interleaving=" + interleaving +
- ", newConnectionSql=" + newConnectionSql + ", padXid=" + padXid + ", wrapXaDataSource=" +
- wrapXaDataSource + ", noTxSeparatePool=" + noTxSeparatePool + "]";
+ xaDataSourceClass + ", newConnectionSql=" + newConnectionSql + ", xaPool=" + xaPool +
+ ", transactionIsolation=" + transactionIsolation + ", timeOut=" + timeOut + ", security=" + security +
+ ", statement=" + statement + ", validation=" + validation + ", urlDelimiter=" + urlDelimiter +
+ ", urlSelectorStrategyClassName=" + urlSelectorStrategyClassName + ", useJavaContext=" +
+ useJavaContext + ", poolName=" + poolName + ", enabled=" + enabled + ", jndiName=" + jndiName + "]";
}
/**
@@ -270,36 +224,15 @@
return Collections.unmodifiableMap(xaDataSourceProperty);
}
- /**
- * Get the padXid.
- *
- * @return the padXid.
- */
- @Override
- public final boolean isPadXid()
- {
- return padXid;
- }
/**
- * Get the wrapXaDataSource.
+ * Get the xaPool.
*
- * @return the wrapXaDataSource.
+ * @return the xaPool.
*/
@Override
- public final boolean isWrapXaDataSource()
+ public final XaPool getXaPool()
{
- return wrapXaDataSource;
+ return xaPool;
}
-
- /**
- * Get the noTxSeparatePool.
- *
- * @return the noTxSeparatePool.
- */
- @Override
- public final boolean isNoTxSeparatePool()
- {
- return noTxSeparatePool;
- }
}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XaPoolImpl.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -0,0 +1,178 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.ds;
+
+import org.jboss.jca.common.api.metadata.ds.XaPool;
+
+/**
+ *
+ * A XaPoolImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class XaPoolImpl extends PoolImpl implements XaPool
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 3261597366235425250L;
+
+ private final boolean isSameRmOverride;
+
+ private final boolean interleaving;
+
+ private final boolean padXid;
+
+ private final boolean wrapXaDataSource;
+
+ private final boolean noTxSeparatePool;
+
+
+
+ /**
+ * Create a new XaPoolImpl.
+ *
+ * @param minPoolSize minPoolSize
+ * @param maxPoolSize maxPoolSize
+ * @param prefill prefill
+ * @param useStrictMin useStrictMin
+ * @param isSameRmOverride isSameRmOverride
+ * @param interleaving interleaving
+ * @param padXid padXid
+ * @param wrapXaDataSource wrapXaDataSource
+ * @param noTxSeparatePool noTxSeparatePool
+ */
+ public XaPoolImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, boolean useStrictMin,
+ boolean isSameRmOverride, boolean interleaving, boolean padXid, boolean wrapXaDataSource,
+ boolean noTxSeparatePool)
+ {
+ super(minPoolSize, maxPoolSize, prefill, useStrictMin);
+ this.isSameRmOverride = isSameRmOverride;
+ this.interleaving = interleaving;
+ this.padXid = padXid;
+ this.wrapXaDataSource = wrapXaDataSource;
+ this.noTxSeparatePool = noTxSeparatePool;
+ }
+
+ /**
+ * Get the isSameRmOverride.
+ *
+ * @return the isSameRmOverride.
+ */
+ @Override
+ public final boolean isSameRmOverride()
+ {
+ return isSameRmOverride;
+ }
+
+ /**
+ * Get the interleaving.
+ *
+ * @return the interleaving.
+ */
+ @Override
+ public final boolean isInterleaving()
+ {
+ return interleaving;
+ }
+
+ /**
+ * Get the padXid.
+ *
+ * @return the padXid.
+ */
+ @Override
+ public final boolean isPadXid()
+ {
+ return padXid;
+ }
+
+ /**
+ * Get the wrapXaDataSource.
+ *
+ * @return the wrapXaDataSource.
+ */
+ @Override
+ public final boolean isWrapXaDataSource()
+ {
+ return wrapXaDataSource;
+ }
+
+ /**
+ * Get the noTxSeparatePool.
+ *
+ * @return the noTxSeparatePool.
+ */
+ @Override
+ public final boolean isNoTxSeparatePool()
+ {
+ return noTxSeparatePool;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (interleaving ? 1231 : 1237);
+ result = prime * result + (isSameRmOverride ? 1231 : 1237);
+ result = prime * result + (noTxSeparatePool ? 1231 : 1237);
+ result = prime * result + (padXid ? 1231 : 1237);
+ result = prime * result + (wrapXaDataSource ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof XaPoolImpl))
+ return false;
+ XaPoolImpl other = (XaPoolImpl) obj;
+ if (interleaving != other.interleaving)
+ return false;
+ if (isSameRmOverride != other.isSameRmOverride)
+ return false;
+ if (noTxSeparatePool != other.noTxSeparatePool)
+ return false;
+ if (padXid != other.padXid)
+ return false;
+ if (wrapXaDataSource != other.wrapXaDataSource)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "XaPoolImpl [isSameRmOverride=" + isSameRmOverride + ", interleaving=" + interleaving + ", padXid=" +
+ padXid + ", wrapXaDataSource=" + wrapXaDataSource + ", noTxSeparatePool=" + noTxSeparatePool +
+ ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill +
+ ", useStrictMin=" + useStrictMin + "]";
+ }
+
+
+
+}
+
Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd 2010-09-06 15:39:36 UTC (rev 107999)
@@ -34,63 +34,51 @@
</xs:complexType>
<xs:complexType name="datasourceType" mixed="false">
<xs:sequence>
- <xs:element name="min-pool-size" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:element name="connection-url" type="xs:token">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- The min-pool-size element indicates the minimum number of connections
- a pool should hold. These are not created until a Subject is known from a
- request for a connection. This default to 0. Ex: <min-pool-size>1</min-pool-size>
- ]]>
+ The JDBC driver connection URL string Ex: <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
+ ]]>
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="max-pool-size" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:element name="driver-class" type="xs:token">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- The max-pool-size element indicates the maximum number of connections
- for a pool. No more than MaxSize connections will be created in each sub-pool.
- This defaults to 20.
- ]]>
+ The fully qualifed name of the JDBC driver class Ex: <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ ]]>
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="security" type="securityType" minOccurs="0">
- </xs:element>
- <xs:element name="prefill" type="xs:boolean" minOccurs="0">
+ <xs:element name="connection-property" type="connection-propertyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- Whether to attempt to prefill the connection pool. Empty element denotes
- a true value. e.g. <prefill>true</prefill>.
- Default is true
+ The connection-property element allows you to pass in arbitrary connection
+ properties to the Driver.connect(url, props) method. Each connection-property
+ specifies a string name/value pair with the property name coming from the
+ name attribute and the value coming from the element content. Ex: <connection-property
+ name="char.encoding">UTF-8</connection-property>
]]>
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="connection-url" type="xs:token">
+ <xs:element name="new-connection-sql" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
- <![CDATA[[
- The JDBC driver connection URL string Ex: <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
- ]]>
+ <![CDATA[[
+ Specify an SQL statement to execute whenever a connection is added
+ to the connection pool.
+ ]]>
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="driver-class" type="xs:token">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The fully qualifed name of the JDBC driver class Ex: <driver-class>org.hsqldb.jdbcDriver</driver-class>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
<xs:element name="transaction-isolation" type="transaction-isolationType" minOccurs="0">
<xs:annotation>
<xs:documentation>
- <![CDATA[[
+ <![CDATA[[
Set java.sql.Connection transaction isolation level to use. The constants
defined by transaction-isolation-values are the possible transaction isolation
levels and include: TRANSACTION_READ_UNCOMMITTED TRANSACTION_READ_COMMITTED
@@ -99,23 +87,6 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="connection-property" type="connection-propertyType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The connection-property element allows you to pass in arbitrary connection
- properties to the Driver.connect(url, props) method. Each connection-property
- specifies a string name/value pair with the property name coming from the
- name attribute and the value coming from the element content. Ex: <connection-property
- name="char.encoding">UTF-8</connection-property>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="time-out" type="time-outType" minOccurs="0" />
- <xs:element name="statement" type="statementType" minOccurs="0">
- </xs:element>
- <xs:element name="validation" type="validationType" minOccurs="0" />
<xs:element name="url-delimiter" type="xs:token" minOccurs="0">
<xs:annotation>
<xs:documentation>
@@ -134,59 +105,20 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="new-connection-sql" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify an SQL statement to execute whenever a connection is added
- to the connection pool.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
+ <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1"></xs:element>
+ <xs:element name="security" type="xs:string" minOccurs="0"></xs:element>
+ <xs:element name="validation" type="validationType" minOccurs="0" />
+ <xs:element name="time-out" type="time-outType" minOccurs="0" />
+ <xs:element name="statement" type="statementType" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attributeGroup ref="common-datasourceAttributes" />
</xs:complexType>
<xs:complexType name="xa-datasourceType">
<xs:sequence>
- <xs:element name="min-pool-size" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:element name="xa-datasource-property" type="xa-datasource-propertyType" minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- The min-pool-size element indicates the minimum number of connections
- a pool should hold. These are not created until a Subject is known from a
- request for a connection. This default to 0. Ex: <min-pool-size>1</min-pool-size>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="max-pool-size" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The max-pool-size element indicates the maximum number of connections
- for a pool. No more than MaxSize connections will be created in each sub-pool.
- This defaults to 20.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="security" type="securityType" minOccurs="0"></xs:element>
- <xs:element name="prefill" type="xs:boolean" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Whether to attempt to prefill the connection pool. Empty element denotes
- a false value. e.g. <prefill>true</prefill>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="xa-datasource-property" type="xa-datasource-propertyType" minOccurs="1"
- maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
InSpecify a property to assign to the XADataSource implementation class.
Each property is identified by the name attribute and the property value
is given by the xa-datasource-property element content. The property is mapped
@@ -212,39 +144,49 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="transaction-isolation" type="transaction-isolationType" minOccurs="0">
+ <xs:element name="url-delimiter" type="xs:token" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- Set java.sql.Connection transaction isolation level to use. The constants
- defined by transaction-isolation-values are the possible transaction isolation
- levels and include: TRANSACTION_READ_UNCOMMITTED TRANSACTION_READ_COMMITTED
- TRANSACTION_REPEATABLE_READ TRANSACTION_SERIALIZABLE TRANSACTION_NONE
- ]]>
+ Specifies the delimeter for URLs in connection-url for ha datasources
+ ]]>
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="is-same-rm-override" type="xs:boolean" minOccurs="0">
+ <xs:element name="url-selector-strategy-class-name" type="xs:token" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- The isSameRM-override-value element allows one to unconditionally
- set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns
- true or false. Ex: <isSameRM-override-value>true</isSameRM-override-value>
+ A class that implements org.jboss.resource.adapter.jdbc.URLSelectorStrategy
]]>
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="interleaving" type="boolean-presenceType" minOccurs="0">
+ <xs:element name="new-connection-sql" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
- An element to enable interleaving for XA connection factories Ex:
- <interleaving/>
+ Specify an SQL statement to execute whenever a connection is added
+ to the connection pool.
]]>
</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="transaction-isolation" type="transaction-isolationType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Set java.sql.Connection transaction isolation level to use. The constants
+ defined by transaction-isolation-values are the possible transaction isolation
+ levels and include: TRANSACTION_READ_UNCOMMITTED TRANSACTION_READ_COMMITTED
+ TRANSACTION_REPEATABLE_READ TRANSACTION_SERIALIZABLE TRANSACTION_NONE
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="xa-pool" type="xa-poolType" minOccurs="0" maxOccurs="1"></xs:element>
+ <xs:element name="security" type="xs:string" minOccurs="0"></xs:element>
+ <xs:element name="validation" type="validationType" minOccurs="0" />
<xs:element name="time-out" type="time-outType" minOccurs="0" />
<xs:element name="statement" minOccurs="0">
<xs:complexType>
@@ -286,38 +228,6 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validation" type="validationType" minOccurs="0" />
- <xs:element name="url-delimiter" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the delimeter for URLs in connection-url for ha datasources
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="url-selector-strategy-class-name" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- A class that implements org.jboss.resource.adapter.jdbc.URLSelectorStrategy
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="new-connection-sql" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify an SQL statement to execute whenever a connection is added
- to the connection pool.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="pad-xid" type="xs:boolean" default="false" minOccurs="0" />
- <xs:element name="wrap-xa-resource" type="xs:boolean" default="false" minOccurs="0" />
- <xs:element name="no-tx-separate-pools" type="boolean-presenceType" minOccurs="0" />
</xs:sequence>
<xs:attributeGroup ref="common-datasourceAttributes" />
</xs:complexType>
@@ -364,34 +274,11 @@
<xs:enumeration value="NONE" />
</xs:restriction>
</xs:simpleType>
- <xs:complexType name="securityType">
- <xs:sequence>
- <xs:element name="user-name" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify the default username used when creating a new connection.
- Ex: <user-name>sa</user-name>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="password" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify the default password used when creating a new connection.
- Ex: <password>sa-pass</password>]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="xa-datasource-propertyType" mixed="true">
- <xs:attribute use="required" name="name" type="xs:token" />
+ <xs:attribute name="name" use="required" type="xs:token" />
</xs:complexType>
<xs:complexType name="connection-propertyType" mixed="true">
- <xs:attribute use="required" name="name" type="xs:token" />
+ <xs:attribute name="name" use="required" type="xs:token" />
</xs:complexType>
<xs:complexType name="validationType">
<xs:sequence>
@@ -602,4 +489,78 @@
</xs:element>
</xs:sequence>
</xs:complexType>
-</xs:schema>
+ <xs:complexType name="poolType">
+ <xs:sequence>
+ <xs:element name="min-pool-size" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The min-pool-size element indicates the minimum number of connections
+ a pool should hold. These are not created until a Subject is known from a
+ request for a connection. This default to 0. Ex: <min-pool-size>1</min-pool-size>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="max-pool-size" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The max-pool-size element indicates the maximum number of connections
+ for a pool. No more than MaxSize connections will be created in each sub-pool.
+ This defaults to 20.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="prefill" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Whether to attempt to prefill the connection pool. Empty element denotes
+ a true value. e.g. <prefill>true</prefill>.
+ Default is true
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="use-strict-min" type="xs:boolean" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>Define if the min-pool-size should be considered a strictly.
+Default false</xs:documentation>
+ </xs:annotation></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="xa-poolType">
+ <xs:complexContent>
+ <xs:extension base="poolType">
+ <xs:sequence>
+ <xs:element name="is-same-rm-override" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The isSameRM-override-value element allows one to unconditionally
+ set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns
+ true or false. Ex: <isSameRM-override-value>true</isSameRM-override-value>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="interleaving" type="boolean-presenceType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An element to enable interleaving for XA connection factories Ex:
+ <interleaving/>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="no-tx-separate-pools" type="boolean-presenceType" minOccurs="0" />
+ <xs:element name="pad-xid" type="xs:boolean" default="false" minOccurs="0" />
+ <xs:element name="wrap-xa-resource" type="xs:boolean" default="false" minOccurs="0" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/db2-400-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/db2-400-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/db2-400-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -2,12 +2,15 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="DB2-400" pool-name="DB2-400">
- <min-pool-size>0</min-pool-size>
+ <connection-url>jdbc:as400://[systemname]/[schema];extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</connection-url>
+ <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
+ <pool>
+ <min-pool-size>0</min-pool-size>
+ </pool>
<security>
<user-name>[username]</user-name>
<password>[password]</password>
</security>
- <connection-url>jdbc:as400://[systemname]/[schema];extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</connection-url>
- <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
+
</datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/db2-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/db2-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/db2-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -2,15 +2,17 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="DB2DS" pool-name="DB2DS">
- <min-pool-size>0</min-pool-size>
- <max-pool-size>50</max-pool-size>
+ <connection-url>jdbc:db2:yourdatabase</connection-url>
+ <driver-class>COM.ibm.db2.jdbc.app.DB2Driver</driver-class>
+ <pool>
+ <min-pool-size>0</min-pool-size>
+ <max-pool-size>50</max-pool-size>
+ </pool>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:db2:yourdatabase</connection-url>
- <driver-class>COM.ibm.db2.jdbc.app.DB2Driver</driver-class>
-
+
<!-- DB2 Universal Driver Note connection URL is in form of
jdbc:db2://host:port:dbname
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/db2-jcc-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/db2-jcc-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/db2-jcc-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -14,9 +14,10 @@
<xa-datasource-property name="PortNumber">your_port_number</xa-datasource-property>
<xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
<!-- Must be set if using multiple DB2 XA resources in same transaction -->
- <is-same-rm-override>false</is-same-rm-override>
- <interleaving/>
-
+ <xa-pool>
+ <is-same-rm-override>false</is-same-rm-override>
+ <interleaving/>
+ </xa-pool>
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/db2-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/db2-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/db2-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -7,9 +7,11 @@
<xa-datasource-property name="User">your_user</xa-datasource-property>
<xa-datasource-property name="Password">your_password</xa-datasource-property>
<xa-datasource-class>COM.ibm.db2.jdbc.DB2XADataSource</xa-datasource-class>
- <!-- uncomment to enable interleaving <interleaving/> -->
- <is-same-rm-override>false</is-same-rm-override>
- <!-- <interleaving/> -->
+ <xa-pool>
+ <!-- uncomment to enable interleaving <interleaving/> -->
+ <is-same-rm-override>false</is-same-rm-override>
+ <!-- <interleaving/> -->
+ </xa-pool>
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/derby-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/derby-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/derby-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,20 +5,22 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="DerbyDS" pool-name="DerbyDS">
- <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
- <min-pool-size>5</min-pool-size>
- <!-- The maximum connections in a pool/sub-pool -->
- <max-pool-size>20</max-pool-size>
- <!-- The login and password -->
- <security>
- <user-name>sa</user-name>
- <password></password>
- </security>
<!-- for in-process persistent db, saved when jboss stops. The org.jboss.jdbc.DerbyDatabase mbean is necessary for properly
db shutdown -->
<connection-url>jdbc:derby:${jboss.server.data.dir}${/}derby${/}localDB;create=true</connection-url>
<!-- The driver class -->
<driver-class>org.apache.derby.jdbc.EmbeddedDriver</driver-class>
+ <pool>
+ <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+ <min-pool-size>5</min-pool-size>
+ <!-- The maximum connections in a pool/sub-pool -->
+ <max-pool-size>20</max-pool-size>
+ </pool>
+ <security>
+ <!-- The login and password -->
+ <user-name>sa</user-name>
+ <password></password>
+ </security>
<time-out>
<!-- The time before an unused connection is destroyed -->
<idle-timeout-minutes>5</idle-timeout-minutes>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/derby-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/derby-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/derby-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -10,7 +10,9 @@
<xa-datasource-property name="CreateDatabase">create</xa-datasource-property>
<xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
- <!-- uncomment to enable interleaving <interleaving/> -->
- <is-same-rm-override>false</is-same-rm-override>
+ <xa-pool>
+ <!-- uncomment to enable interleaving <interleaving/> -->
+ <is-same-rm-override>false</is-same-rm-override>
+ </xa-pool>
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/hsqldb-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/hsqldb-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/hsqldb-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,11 +5,16 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="DefaultDS" pool-name="DefaultDS">
- <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
- <min-pool-size>5</min-pool-size>
- <!-- The maximum connections in a pool/sub-pool -->
- <max-pool-size>20</max-pool-size>
- <!-- The login and password -->
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ <!-- The driver class -->
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <pool>
+ <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+ <min-pool-size>5</min-pool-size>
+ <!-- The maximum connections in a pool/sub-pool -->
+ <max-pool-size>20</max-pool-size>
+ <!-- The login and password -->
+ </pool>
<security>
<user-name>sa</user-name>
<password></password>
@@ -20,9 +25,6 @@
proper db shutdown <connection-url>jdbc:hsqldb:.</connection-url> -->
<!-- For in-process persistent db, saved when jboss stops. The org.jboss.jdbc.HypersonicDatabase mbean is required for
proper db shutdown -->
- <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
- <!-- The driver class -->
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
<time-out>
<!-- The time before an unused connection is destroyed -->
<!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/informix-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/informix-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/informix-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -3,18 +3,18 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="InformixDS" pool-name="InformixDS">
+ <connection-url>jdbc:informix-sqli://myhost.mydomain.com:1557/mydb:INFORMIXSERVER=myserver</connection-url>
+ <driver-class>com.informix.jdbc.IfxDriver</driver-class>
+ <!-- sql to call when connection is created -->
+ <new-connection-sql>some arbitrary sql</new-connection-sql>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:informix-sqli://myhost.mydomain.com:1557/mydb:INFORMIXSERVER=myserver</connection-url>
- <driver-class>com.informix.jdbc.IfxDriver</driver-class>
<validation>
<!-- sql to call on an existing pooled connection when it is obtained from pool -->
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
</validation>
- <!-- sql to call when connection is created -->
- <new-connection-sql>some arbitrary sql</new-connection-sql>
</datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/informix-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/informix-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/informix-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -10,12 +10,12 @@
<xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
<xa-datasource-property name="ServerName">myserver</xa-datasource-property>
<xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
+ <!-- sql to call when connection is created -->
+ <new-connection-sql>some arbitrary sql</new-connection-sql>
<validation>
<!-- sql to call on an existing pooled connection when it is obtained from pool -->
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
</validation>
- <!-- sql to call when connection is created -->
- <new-connection-sql>some arbitrary sql</new-connection-sql>
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/jdatastore-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/jdatastore-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/jdatastore-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -9,11 +9,11 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="JDataStoreDS" pool-name="JDataStoreDS">
+ <connection-url>jdbc:borland:dslocal:/home/brent/JBuilder6/samples/JDataStore/datastores/employee.jds</connection-url>
+ <driver-class>com.borland.datastore.jdbc.DataStoreDriver</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:borland:dslocal:/home/brent/JBuilder6/samples/JDataStore/datastores/employee.jds</connection-url>
- <driver-class>com.borland.datastore.jdbc.DataStoreDriver</driver-class>
</datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/jsql-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/jsql-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/jsql-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,12 +5,12 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="JSQLDS" pool-name="JSQLDS">
+ <connection-url>jdbc:JSQLConnect://localhost:1433/databaseName=testdb</connection-url>
+ <driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:JSQLConnect://localhost:1433/databaseName=testdb</connection-url>
- <driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
<!-- sql to call on an existing pooled connection when it is obtained from pool
<validation>
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,14 +5,16 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="MimerDS" pool-name="MimerDS">
- <min-pool-size>5</min-pool-size>
- <max-pool-size>100</max-pool-size>
+ <connection-url>jdbc:mimer:multi1</connection-url>
+ <driver-class>com.mimer.jdbc.Driver</driver-class>
+ <pool>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>100</max-pool-size>
+ </pool>
<security>
<user-name>changeme</user-name>
<password>changeme</password>
</security>
- <connection-url>jdbc:mimer:multi1</connection-url>
- <driver-class>com.mimer.jdbc.Driver</driver-class>
<time-out>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/mimer-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -2,16 +2,18 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<xa-datasource jndi-name="XAMimerDS" pool-name="XAMimerDS">
- <min-pool-size>5</min-pool-size>
- <max-pool-size>100</max-pool-size>
+ <xa-datasource-property name="DatabaseName">multi1</xa-datasource-property>
+ <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
+ <xa-datasource-property name="PortNumber">1360</xa-datasource-property>
+ <xa-datasource-class>com.mimer.jdbc.MimerXADataSource</xa-datasource-class>
+ <xa-pool>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>100</max-pool-size>
+ </xa-pool>
<security>
<user-name>changeme</user-name>
<password>changeme</password>
</security>
- <xa-datasource-property name="DatabaseName">multi1</xa-datasource-property>
- <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
- <xa-datasource-property name="PortNumber">1360</xa-datasource-property>
- <xa-datasource-class>com.mimer.jdbc.MimerXADataSource</xa-datasource-class>
<time-out>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/msaccess-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/msaccess-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/msaccess-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,12 +5,12 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="MSAccessDS" pool-name="MSAccessDS">
+ <!-- format of URL is "jdbc:odbc:DSNNAME" -->
+ <connection-url>jdbc:odbc:INsightDSN</connection-url>
+ <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <!-- format of URL is "jdbc:odbc:DSNNAME" -->
- <connection-url>jdbc:odbc:INsightDSN</connection-url>
- <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
</datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,12 +5,12 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="MSSQLDS" pool-name="MSSQLDS">
+ <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url>
+ <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url>
- <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<!-- sql to call on an existing pooled connection when it is obtained from pool
<validation>
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/mssql-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -8,7 +8,9 @@
<xa-datasource-property name="User">myuser</xa-datasource-property>
<xa-datasource-property name="Password">mypassword</xa-datasource-property>
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
- <!-- uncomment to enable interleaving <interleaving/> -->
- <is-same-rm-override>false</is-same-rm-override>
+ <xa-pool>
+ <!-- uncomment to enable interleaving <interleaving/> -->
+ <is-same-rm-override>false</is-same-rm-override>
+ </xa-pool>
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/mysql-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/mysql-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/mysql-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -4,12 +4,12 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="MySqlDS" pool-name="MySqlDS">
+ <connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
+ <driver-class>com.mysql.jdbc.Driver</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
- <driver-class>com.mysql.jdbc.Driver</driver-class>
<validation>
<!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool -->
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -5,15 +5,15 @@
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="OracleDS" pool-name="OracleDS">
- <security>
- <user-name>x</user-name>
- <password>y</password>
- </security>
<connection-url>jdbc:oracle:thin:@youroraclehost:1521:yoursid</connection-url>
<!-- Here are a couple of the possible OCI configurations. For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm
<connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url> or <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
Clearly, its better to have TNS set up properly. -->
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
+ <security>
+ <user-name>x</user-name>
+ <password>y</password>
+ </security>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<validation>
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name -->
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/oracle-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -9,8 +9,11 @@
<xa-datasource-property name="User">scott</xa-datasource-property>
<xa-datasource-property name="Password">tiger</xa-datasource-property>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- <!-- uncomment to enable interleaving <interleaving/> -->
- <is-same-rm-override>false</is-same-rm-override>
+ <xa-pool>
+ <!-- uncomment to enable interleaving <interleaving/> -->
+ <is-same-rm-override>false</is-same-rm-override>
+ <no-tx-separate-pools />
+ </xa-pool>
<validation>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name -->
@@ -19,6 +22,5 @@
<!-- Checks the Oracle error codes and messages for fatal errors -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
</validation>
- <no-tx-separate-pools />
</xa-datasource>
</datasources>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="DefaultDS" pool-name="DefaultDS">
+ <connection-url>jdbc:pointbase:server://@pointbase.server@:@pointbase.port/pointbase.dbName@,new</connection-url>
+ <driver-class>com.pointbase.jdbc.jdbcUniversalDriver</driver-class>
+ <!-- sql to call when connection is created <new-connection-sql>some arbitrary sql</new-connection-sql> -->
<security>
<user-name>@pointbase.user@</user-name>
<password>@pointbase.passwd@</password>
</security>
- <connection-url>jdbc:pointbase:server://@pointbase.server@:@pointbase.port/pointbase.dbName@,new</connection-url>
- <driver-class>com.pointbase.jdbc.jdbcUniversalDriver</driver-class>
- <!-- sql to call when connection is created <new-connection-sql>some arbitrary sql</new-connection-sql> -->
</datasource>
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/pointbase-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<xa-datasource jndi-name="PointbaseXA" pool-name="PointbaseXA">
+ <xa-datasource-property name="ServerName">@pointbase.server@</xa-datasource-property>
+ <xa-datasource-property name="DatabaseName">9092</xa-datasource-property>
+ <xa-datasource-class>com.pointbase.xa.xaDataSource</xa-datasource-class>
<security>
<user-name>@pointbase.user@</user-name>
<password>@pointbase.passwd@</password>
</security>
- <xa-datasource-property name="ServerName">@pointbase.server@</xa-datasource-property>
- <xa-datasource-property name="DatabaseName">9092</xa-datasource-property>
- <xa-datasource-class>com.pointbase.xa.xaDataSource</xa-datasource-class>
</xa-datasource>
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/postgres-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/postgres-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/postgres-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -1,18 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!-- ===================================================================== -->
<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
<!-- ===================================================================== -->
-
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="PostgresDS" pool-name="PostgresDS">
+ <connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url>
+ <driver-class>org.postgresql.Driver</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
- </security>
- <connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url>
- <driver-class>org.postgresql.Driver</driver-class>
+ </security>
</datasource>
-
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/progress-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/progress-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/progress-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -2,14 +2,13 @@
<!-- ===================================================================== -->
<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
<!-- ==================================================================== -->
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="ProgressDS" pool-name="ProgressDS">
+ <connection-url>jdbc:JdbcProgress:T:dbserver:3305:liveappl</connection-url>
+ <driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
<security>
<user-name>user</user-name>
<password>password</password>
</security>
- <connection-url>jdbc:JdbcProgress:T:dbserver:3305:liveappl</connection-url>
- <driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
</datasource>
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/sapdb-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/sapdb-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/sapdb-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -2,14 +2,13 @@
<!-- ===================================================================== -->
<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
<!-- ===================================================================== -->
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="SapdbDS" pool-name="SapdbDS">
+ <connection-url>jdbc:sapdb://127.0.0.1/DB_NAME</connection-url>
+ <driver-class>com.sap.dbtech.jdbc.DriverSapDB</driver-class>
<security>
<user-name>x</user-name>
<password>y</password>
</security>
- <connection-url>jdbc:sapdb://127.0.0.1/DB_NAME</connection-url>
- <driver-class>com.sap.dbtech.jdbc.DriverSapDB</driver-class>
</datasource>
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -2,22 +2,22 @@
<!-- ===================================================================== -->
<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about datasource -->
<!-- ===================================================================== -->
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<datasource jndi-name="jdbc/SybaseDB" pool-name="jdbc/SybaseDB">
- <security>
- <user-name>x</user-name>
- <password>y</password>
- </security>
<!-- Sybase jConnect URL for the database. NOTE: The hostname and port are made up values. The optional database name
is provided, as well as some additinal Driver parameters. -->
<connection-url>jdbc:sybase:Tds:host.at.some.domain:5000/db_name?JCONNECT_VERSION=6</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
- <validation>
- <!-- sql to call on an existing pooled connection when it is obtained from pool <check-valid-connection-sql>some arbitrary
+ <security>
+ <user-name>x</user-name>
+ <password>y</password>
+ </security>
+ <validation>
+ <!-- sql to call on an existing pooled connection when it is obtained from pool <check-valid-connection-sql>some arbitrary
sql</check-valid-connection-sql> -->
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
+ </exception-sorter-class-name>
</validation>
<!-- sql to call when connection is created <new-connection-sql>some arbitrary sql</new-connection-sql> -->
</datasource>
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-xa-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-xa-ds.xml 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/sybase-xa-ds.xml 2010-09-06 15:39:36 UTC (rev 107999)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
<!-- TODO: add driver name, version and download url here -->
<!-- The example posted in the forums uses a security domain. What is the user/password xa-datasource-property? try javap
com.sybase.jdbc3.jdbc.SybXADataSource For the security domain. Add something like the following to conf/login-config.xml
@@ -9,9 +8,6 @@
<module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=SybaseXADS</module-option> </login-module>
</application-policy> -->
<xa-datasource jndi-name="SybaseXADS" pool-name="SybaseXADS">
- <min-pool-size>1</min-pool-size>
- <max-pool-size>20</max-pool-size>
- <!-- uncomment to enable interleaving <interleaving/> -->
<xa-datasource-property name="NetworkProtocol">Tds</xa-datasource-property>
<xa-datasource-property name="ServerName">myserver</xa-datasource-property>
<xa-datasource-property name="PortNumber">4100</xa-datasource-property>
@@ -19,12 +15,18 @@
<xa-datasource-property name="User">user</xa-datasource-property>
<xa-datasource-property name="Password">password</xa-datasource-property>
<xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>
+ <xa-pool>
+ <min-pool-size>1</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <!-- uncomment to enable interleaving <interleaving/> -->
+ </xa-pool>
<time-out>
<idle-timeout-minutes>15</idle-timeout-minutes>
</time-out>
<validation>
<check-valid-connection-sql>select 1 from mytable</check-valid-connection-sql>
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
+ </exception-sorter-class-name>
</validation>
</xa-datasource>
-</datasources>
+</datasources>
\ No newline at end of file
Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java 2010-09-06 14:55:23 UTC (rev 107998)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java 2010-09-06 15:39:36 UTC (rev 107999)
@@ -201,7 +201,7 @@
return null;
log.debug("Deploying: " + url.toExternalForm());
-
+
ClassLoader oldTCCL = SecurityActions.getThreadContextClassLoader();
InputStream is = null;
try
@@ -269,7 +269,7 @@
else
{
if (dataSources.getDataSource() != null && dataSources.getDataSource().size() > 0)
- log.error("Deployment of datasources disabled since jdbc-local.rar couldn't be found");
+ log.error("Deployment of datasources disabled since jdbc-local.rar couldn't be found");
}
if (urlJdbcXA != null)
@@ -304,13 +304,13 @@
else
{
if (dataSources.getXaDataSource() != null && dataSources.getXaDataSource().size() > 0)
- log.error("Deployment of XA datasources disabled since jdbc-xa.rar couldn't be found");
+ log.error("Deployment of XA datasources disabled since jdbc-xa.rar couldn't be found");
}
-
- return new DsXmlDeployment(url,
- deploymentName,
+
+ return new DsXmlDeployment(url,
+ deploymentName,
cfs.toArray(new Object[cfs.size()]),
- jndis.toArray(new String[jndis.size()]),
+ jndis.toArray(new String[jndis.size()]),
parent);
}
catch (DeployException de)
@@ -368,12 +368,12 @@
cd.getConfigProperties(),
cl);
// Create the pool
- Integer minSize = ds.getMinPoolSize();
- Integer maxSize = ds.getMaxPoolSize();
+ Integer minSize = ds.getPool() == null ? null : ds.getPool().getMinPoolSize();
+ Integer maxSize = ds.getPool() == null ? null : ds.getPool().getMaxPoolSize();
Long blockingTimeout = ds.getTimeOut() != null ? ds.getTimeOut().getBlockingTimeoutMillis() : null;
Long idleTimeout = ds.getTimeOut() != null ? ds.getTimeOut().getIdleTimeoutMinutes() : null;
Long backgroundValidationInterval = null; // TODO
- Boolean prefill = ds.isPrefill();
+ Boolean prefill = ds.getPool() == null ? false : ds.getPool().isPrefill();
Boolean strictMin = null; // TODO
Boolean useFastFail = ds.getValidation() != null ? ds.getValidation().isUseFastFail() : null;
@@ -396,7 +396,7 @@
// ConnectionFactory
Object cf = mcf.createConnectionFactory(cm);
-
+
return cf;
}
@@ -428,12 +428,12 @@
cd.getConfigProperties(),
cl);
// Create the pool
- Integer minSize = ds.getMinPoolSize();
- Integer maxSize = ds.getMaxPoolSize();
+ Integer minSize = ds.getXaPool() == null ? null : ds.getXaPool().getMinPoolSize();
+ Integer maxSize = ds.getXaPool() == null ? null : ds.getXaPool().getMaxPoolSize();
Long blockingTimeout = ds.getTimeOut() != null ? ds.getTimeOut().getBlockingTimeoutMillis() : null;
Long idleTimeout = ds.getTimeOut() != null ? ds.getTimeOut().getIdleTimeoutMinutes() : null;
Long backgroundValidationInterval = null; // TODO
- Boolean prefill = ds.isPrefill();
+ Boolean prefill = ds.getXaPool() == null ? false : ds.getXaPool().isPrefill();
Boolean strictMin = null; // TODO
Boolean useFastFail = ds.getValidation() != null ? ds.getValidation().isUseFastFail() : null;
@@ -456,7 +456,7 @@
// ConnectionFactory
Object cf = mcf.createConnectionFactory(cm);
-
+
return cf;
}
More information about the jboss-cvs-commits
mailing list