[jboss-cvs] JBossAS SVN: r110864 - in projects/jboss-jca/trunk/common/src: main/java/org/jboss/jca/common/api/metadata/ds and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 9 07:18:54 EST 2011
Author: maeste
Date: 2011-03-09 07:18:53 -0500 (Wed, 09 Mar 2011)
New Revision: 110864
Added:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Credential.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Extension.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CredentialImpl.java
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/datasources_1_0.xsd
projects/jboss-jca/trunk/common/src/test/resources/ironjacamar/xa-pool-recovery-ironjacamar.xml
projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/recovery-ra.xml
Removed:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DsSecurity.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Extension.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsSecurityImpl.java
projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd
Modified:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java
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/Recovery.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Validation.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/AbstractParser.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.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/ValidationImpl.java
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/merge/Merger.java
projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd
projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForRecoveryTestCase.java
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ironjacamar/IronJacamarParserTestCase.java
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java
projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xa-resource-with-recovery-ds.xml
Log:
JBJCA-509 xsd changes and metadata implementation
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/CommonXaPool.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -22,6 +22,8 @@
package org.jboss.jca.common.api.metadata.common;
+import org.jboss.jca.common.api.metadata.ds.Recovery;
+
import java.util.HashMap;
import java.util.Map;
@@ -71,6 +73,13 @@
public Boolean isNoTxSeparatePool();
/**
+ * Get the recovery settings.
+ *
+ * @return the recovery settings.
+ */
+ public Recovery getRecovery();
+
+ /**
*
* A Tag.
*
@@ -123,8 +132,11 @@
/**
* no-tx-separate-pools tag
*/
- NO_TX_SEPARATE_POOLS("no-tx-separate-pools");
+ NO_TX_SEPARATE_POOLS("no-tx-separate-pools"),
+ /** recovery tag */
+ RECOVERY("recovery");
+
private final String name;
/**
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Credential.java (from rev 110856, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DsSecurity.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Credential.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Credential.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -0,0 +1,141 @@
+/*
+ * 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.common;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+import org.jboss.jca.common.api.metadata.ValidatableMetadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A Security.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public interface Credential extends JCAMetadata, ValidatableMetadata
+{
+ /**
+ * Get the userName.
+ *
+ * @return the userName.
+ */
+ public String getUserName();
+
+ /**
+ * Get the password.
+ *
+ * @return the password.
+ */
+ public String getPassword();
+
+ /**
+ *
+ * get the security domain for pure security-domain security management
+ *
+ * @return the security-domain to use
+ */
+ public String getSecurityDomain();
+
+ /**
+ *
+ * A Tag.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Tag
+ {
+ /** always first
+ *
+ */
+ UNKNOWN(null),
+
+ /**
+ * userName tag
+ */
+ USERNAME("user-name"),
+ /**
+ * password tag
+ */
+ PASSWORD("password"),
+
+ /**
+ * security-domain tag
+ */
+ SECURITY_DOMAIN("security-domain");
+
+ 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;
+ }
+
+ }
+
+}
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Extension.java (from rev 110856, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Extension.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Extension.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/common/Extension.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -0,0 +1,258 @@
+/*
+ * 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.common;
+
+import org.jboss.jca.common.api.metadata.JCAMetadata;
+import org.jboss.jca.common.api.metadata.ValidatableMetadata;
+import org.jboss.jca.common.api.validator.ValidateException;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A JdbcAdapterExtension.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public final class Extension implements JCAMetadata, ValidatableMetadata
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -6275984008991105644L;
+
+ private final String className;
+
+ private final Map<String, String> configPropertiesMap;
+
+ /**
+ * Create a new JdbcAdapterExtension.
+ *
+ * @param className the className
+ * @param configPropertiesMap configPropertiesMap
+ * @throws ValidateException ValidateException
+ */
+ public Extension(String className, Map<String, String> configPropertiesMap) throws ValidateException
+ {
+ super();
+ this.className = className;
+ if (configPropertiesMap != null)
+ {
+ this.configPropertiesMap = new HashMap<String, String>(configPropertiesMap.size());
+ this.configPropertiesMap.putAll(configPropertiesMap);
+ }
+ else
+ {
+ this.configPropertiesMap = Collections.emptyMap();
+ }
+ this.validate();
+ }
+
+ /**
+ * Get the className.
+ *
+ * @return the className.
+ */
+ public final String getClassName()
+ {
+ return className;
+ }
+
+ /**
+ * Get the configPropertiesMap.
+ *
+ * @return the configPropertiesMap.
+ */
+ public final Map<String, String> getConfigPropertiesMap()
+ {
+ return Collections.unmodifiableMap(configPropertiesMap);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "JdbcAdapterExtension [className=" + className + ", configPropertiesMap=" + configPropertiesMap + "]";
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((className == null) ? 0 : className.hashCode());
+ result = prime * result + ((configPropertiesMap == null) ? 0 : configPropertiesMap.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof Extension))
+ return false;
+ Extension other = (Extension) obj;
+ if (className == null)
+ {
+ if (other.className != null)
+ return false;
+ }
+ else if (!className.equals(other.className))
+ return false;
+ if (configPropertiesMap == null)
+ {
+ if (other.configPropertiesMap != null)
+ return false;
+ }
+ else if (!configPropertiesMap.equals(other.configPropertiesMap))
+ return false;
+ return true;
+ }
+
+ /**
+ *
+ * A Tag.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Tag
+ {
+ /** always first
+ *
+ */
+ UNKNOWN(null),
+
+ /**
+ * pool tag
+
+ /**
+ * config-property tag
+ */
+ CONFIG_PROPERTY("config-property");
+
+ 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;
+ }
+
+ }
+
+ /**
+ *
+ * A Attribute.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Attribute
+ {
+
+ /** class-name attribute
+ *
+ */
+ CLASS_NAME("class-name");
+
+ private final String name;
+
+ /**
+ *
+ * Create a new Tag.
+ *
+ * @param name a name
+ */
+ Attribute(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+
+ }
+
+ @Override
+ public void validate() throws ValidateException
+ {
+ if (this.className == null || className.trim().length() == 0)
+ throw new ValidateException("className (xml attribute " + Attribute.CLASS_NAME + ") is required in " +
+ this.getClass().getCanonicalName());
+ }
+
+}
+
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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/CommonDataSource.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -23,6 +23,7 @@
import org.jboss.jca.common.api.metadata.JCAMetadata;
import org.jboss.jca.common.api.metadata.ValidatableMetadata;
+import org.jboss.jca.common.api.metadata.common.Credential;
/**
*
@@ -56,7 +57,7 @@
* @return the security.
*/
- public DsSecurity getSecurity();
+ public Credential getSecurity();
/**
* Get the validation.
Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DsSecurity.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DsSecurity.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/DsSecurity.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -1,141 +0,0 @@
-/*
- * 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 org.jboss.jca.common.api.metadata.ValidatableMetadata;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * A Security.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
-public interface DsSecurity extends JCAMetadata, ValidatableMetadata
-{
- /**
- * Get the userName.
- *
- * @return the userName.
- */
- public String getUserName();
-
- /**
- * Get the password.
- *
- * @return the password.
- */
- public String getPassword();
-
- /**
- *
- * get the security domain for pure security-domain security management
- *
- * @return the security-domain to use
- */
- public String getSecurityDomain();
-
- /**
- *
- * A Tag.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
- public enum Tag
- {
- /** always first
- *
- */
- UNKNOWN(null),
-
- /**
- * userName tag
- */
- USERNAME("user-name"),
- /**
- * password tag
- */
- PASSWORD("password"),
-
- /**
- * security-domain tag
- */
- SECURITY_DOMAIN("security-domain");
-
- 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;
- }
-
- }
-
-}
Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Extension.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Extension.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Extension.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -1,258 +0,0 @@
-/*
- * 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 org.jboss.jca.common.api.metadata.ValidatableMetadata;
-import org.jboss.jca.common.api.validator.ValidateException;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * A JdbcAdapterExtension.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
-public final class Extension implements JCAMetadata, ValidatableMetadata
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = -6275984008991105644L;
-
- private final String className;
-
- private final Map<String, String> configPropertiesMap;
-
- /**
- * Create a new JdbcAdapterExtension.
- *
- * @param className the className
- * @param configPropertiesMap configPropertiesMap
- * @throws ValidateException ValidateException
- */
- public Extension(String className, Map<String, String> configPropertiesMap) throws ValidateException
- {
- super();
- this.className = className;
- if (configPropertiesMap != null)
- {
- this.configPropertiesMap = new HashMap<String, String>(configPropertiesMap.size());
- this.configPropertiesMap.putAll(configPropertiesMap);
- }
- else
- {
- this.configPropertiesMap = Collections.emptyMap();
- }
- this.validate();
- }
-
- /**
- * Get the className.
- *
- * @return the className.
- */
- public final String getClassName()
- {
- return className;
- }
-
- /**
- * Get the configPropertiesMap.
- *
- * @return the configPropertiesMap.
- */
- public final Map<String, String> getConfigPropertiesMap()
- {
- return Collections.unmodifiableMap(configPropertiesMap);
- }
-
- @Override
- public String toString()
- {
- return "JdbcAdapterExtension [className=" + className + ", configPropertiesMap=" + configPropertiesMap + "]";
- }
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((className == null) ? 0 : className.hashCode());
- result = prime * result + ((configPropertiesMap == null) ? 0 : configPropertiesMap.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof Extension))
- return false;
- Extension other = (Extension) obj;
- if (className == null)
- {
- if (other.className != null)
- return false;
- }
- else if (!className.equals(other.className))
- return false;
- if (configPropertiesMap == null)
- {
- if (other.configPropertiesMap != null)
- return false;
- }
- else if (!configPropertiesMap.equals(other.configPropertiesMap))
- return false;
- return true;
- }
-
- /**
- *
- * A Tag.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
- public enum Tag
- {
- /** always first
- *
- */
- UNKNOWN(null),
-
- /**
- * pool tag
-
- /**
- * config-property tag
- */
- CONFIG_PROPERTY("config-property");
-
- 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;
- }
-
- }
-
- /**
- *
- * A Attribute.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
- public enum Attribute
- {
-
- /** class-name attribute
- *
- */
- CLASS_NAME("class-name");
-
- private final String name;
-
- /**
- *
- * Create a new Tag.
- *
- * @param name a name
- */
- Attribute(final String name)
- {
- this.name = name;
- }
-
- /**
- * Get the local name of this element.
- *
- * @return the local name
- */
- public String getLocalName()
- {
- return name;
- }
-
- }
-
- @Override
- public void validate() throws ValidateException
- {
- if (this.className == null || className.trim().length() == 0)
- throw new ValidateException("className (xml attribute " + Attribute.CLASS_NAME + ") is required in " +
- this.getClass().getCanonicalName());
- }
-
-}
-
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Recovery.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Recovery.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Recovery.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -23,6 +23,8 @@
import org.jboss.jca.common.api.metadata.JCAMetadata;
import org.jboss.jca.common.api.metadata.ValidatableMetadata;
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.metadata.common.Extension;
import org.jboss.jca.common.api.validator.ValidateException;
import java.util.HashMap;
@@ -40,7 +42,7 @@
/** The serialVersionUID */
private static final long serialVersionUID = -7425365995463321893L;
- private final DsSecurity security;
+ private final Credential security;
private final Extension plugin;
@@ -54,7 +56,7 @@
* @param noRecovery niRecovery
* @throws ValidateException in case of not valid metadata creation
*/
- public Recovery(DsSecurity security, Extension plugin, Boolean noRecovery) throws ValidateException
+ public Recovery(Credential security, Extension plugin, Boolean noRecovery) throws ValidateException
{
super();
this.security = security;
@@ -68,7 +70,7 @@
*
* @return the security.
*/
- public final DsSecurity getSecurity()
+ public final Credential getSecurity()
{
return security;
}
@@ -170,7 +172,7 @@
/**
* config-property tag
*/
- SECURITY("security"),
+ RECOVER_CREDENTIAL("recover-credential"),
/** plugin tag */
PLUGIN("plugin");
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Validation.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Validation.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/Validation.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -23,6 +23,7 @@
import org.jboss.jca.common.api.metadata.ValidatableMetadata;
+import org.jboss.jca.common.api.metadata.common.Extension;
import java.util.HashMap;
import java.util.Map;
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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/ds/XaDataSource.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -93,9 +93,9 @@
public CommonXaPool getXaPool();
/**
- * Get the xaPool.
+ * Get the recovery settings.
*
- * @return the xaPool.
+ * @return the recovery settings.
*/
public Recovery getRecovery();
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/AbstractParser.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -24,24 +24,32 @@
import org.jboss.jca.common.api.metadata.common.CommonPool;
import org.jboss.jca.common.api.metadata.common.CommonSecurity;
import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.metadata.common.Extension;
import org.jboss.jca.common.api.metadata.ds.DataSource;
+import org.jboss.jca.common.api.metadata.ds.Recovery;
+import org.jboss.jca.common.api.metadata.ds.Validation;
import org.jboss.jca.common.api.metadata.ds.XaDataSource;
import org.jboss.jca.common.api.validator.ValidateException;
import org.jboss.jca.common.metadata.common.CommonPoolImpl;
import org.jboss.jca.common.metadata.common.CommonSecurityImpl;
import org.jboss.jca.common.metadata.common.CommonXaPoolImpl;
+import org.jboss.jca.common.metadata.common.CredentialImpl;
import java.io.File;
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
+import org.jboss.logging.Logger;
+
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-import org.jboss.logging.Logger;
/**
*
@@ -373,6 +381,7 @@
boolean noTxSeparatePool = false;
boolean wrapXaDataSource = false;
boolean useStrictMin = false;
+ Recovery recovery = null;
while (reader.hasNext())
{
@@ -383,7 +392,7 @@
{
return new CommonXaPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin, isSameRmOverrideValue,
- interleaving, padXid, wrapXaDataSource, noTxSeparatePool);
+ interleaving, padXid, wrapXaDataSource, noTxSeparatePool, recovery);
}
else
@@ -434,6 +443,10 @@
useStrictMin = elementAsBoolean(reader);
break;
}
+ case RECOVERY : {
+ recovery = parseRecovery(reader);
+ break;
+ }
default :
throw new ParserException("Unexpected element:" + reader.getLocalName());
}
@@ -519,6 +532,290 @@
return input;
}
+ /**
+ *
+ * parse credential tag
+ *
+ * @param reader reader
+ * @return the parse Object
+ * @throws XMLStreamException in case of error
+ * @throws ParserException in case of error
+ * @throws ValidateException in case of error
+ */
+ protected Credential parseCredential(XMLStreamReader reader) throws XMLStreamException, ParserException,
+ ValidateException
+ {
+
+ String userName = null;
+ String password = null;
+ String securityDomain = null;
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.SECURITY ||
+ Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.RECOVER_CREDENTIAL)
+ {
+
+ return new CredentialImpl(userName, password, securityDomain);
+ }
+ else
+ {
+ if (Credential.Tag.forName(reader.getLocalName()) == Credential.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (Credential.Tag.forName(reader.getLocalName()))
+ {
+ case PASSWORD : {
+ password = elementAsString(reader);
+ break;
+ }
+ case USERNAME : {
+ userName = elementAsString(reader);
+ break;
+ }
+ case SECURITY_DOMAIN : {
+ securityDomain = elementAsString(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ /**
+ *
+ * Parse recovery tag
+ *
+ * @param reader reader
+ * @return the parsed recovery object
+ * @throws XMLStreamException in case of error
+ * @throws ParserException in case of error
+ * @throws ValidateException in case of error
+ */
+ protected Recovery parseRecovery(XMLStreamReader reader) throws XMLStreamException, ParserException,
+ ValidateException
+ {
+
+ Boolean noRecovery = null;
+ Credential security = null;
+ Extension plugin = null;
+
+ for (Recovery.Attribute attribute : Recovery.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case NO_RECOVERY : {
+ noRecovery = attributeAsBoolean(reader, attribute.getLocalName(), false);
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.RECOVERY)
+ {
+ return new Recovery(security, plugin, noRecovery);
+ }
+ else
+ {
+ if (Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ Recovery.Tag tag = Recovery.Tag.forName(reader.getLocalName());
+ switch (tag)
+ {
+ case RECOVER_CREDENTIAL : {
+ security = parseCredential(reader);
+ break;
+ }
+ case PLUGIN : {
+ plugin = parseExtension(reader, tag);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ /**
+ *
+ * parse the Extension tag
+ *
+ * @param reader reader
+ * @param enclosingTag enclosingTag
+ * @return the parsed extension object
+ * @throws XMLStreamException in case of error
+ * @throws ParserException in case of error
+ * @throws ValidateException in case of error
+ */
+ protected Extension parseExtension(XMLStreamReader reader, Validation.Tag enclosingTag) throws XMLStreamException,
+ ParserException,
+ ValidateException
+ {
+
+ String className = null;
+ Map<String, String> properties = null;
+
+ for (Extension.Attribute attribute : Extension.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case CLASS_NAME : {
+ className = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (Validation.Tag.forName(reader.getLocalName()) == enclosingTag)
+ {
+ if (className == null)
+ {
+ throw new ParserException("mandatory class-name attribute missing in " +
+ enclosingTag.getLocalName());
+ }
+
+ return new Extension(className, properties);
+ }
+ else
+ {
+ if (Extension.Tag.forName(reader.getLocalName()) == Extension.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (Extension.Tag.forName(reader.getLocalName()))
+ {
+ case CONFIG_PROPERTY : {
+ if (properties == null)
+ properties = new HashMap<String, String>();
+ properties.put(attributeAsString(reader, "name"), elementAsString(reader));
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ /**
+ *
+ * parse the Extension tag
+ *
+ * @param reader reader
+ * @param enclosingTag enclosingTag
+ * @return the parsed extension object
+ * @throws XMLStreamException in case of error
+ * @throws ParserException in case of error
+ * @throws ValidateException in case of error
+ */
+ protected Extension parseExtension(XMLStreamReader reader, Recovery.Tag enclosingTag) throws XMLStreamException,
+ ParserException,
+ ValidateException
+ {
+
+ String className = null;
+ Map<String, String> properties = null;
+
+ for (Extension.Attribute attribute : Extension.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case CLASS_NAME : {
+ className = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (Recovery.Tag.forName(reader.getLocalName()) == enclosingTag)
+ {
+ if (className == null)
+ {
+ throw new ParserException("mandatory class-name attribute missing in " +
+ enclosingTag.getLocalName());
+ }
+
+ return new Extension(className, properties);
+ }
+ else
+ {
+ if (Extension.Tag.forName(reader.getLocalName()) == Extension.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (Extension.Tag.forName(reader.getLocalName()))
+ {
+ case CONFIG_PROPERTY : {
+ if (properties == null)
+ properties = new HashMap<String, String>();
+ properties.put(attributeAsString(reader, "name"), elementAsString(reader));
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
private static class SecurityActions
{
/**
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonXaPoolImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -22,6 +22,7 @@
package org.jboss.jca.common.metadata.common;
import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+import org.jboss.jca.common.api.metadata.ds.Recovery;
import org.jboss.jca.common.api.validator.ValidateException;
/**
@@ -46,6 +47,8 @@
private final Boolean noTxSeparatePool;
+ private final Recovery recovery;
+
/**
* Create a new XaPoolImpl.
*
@@ -58,11 +61,12 @@
* @param padXid padXid
* @param wrapXaDataSource wrapXaDataSource
* @param noTxSeparatePool noTxSeparatePool
+ * @param recovery recovery
* @throws ValidateException ValidateException
*/
public CommonXaPoolImpl(Integer minPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin,
Boolean isSameRmOverride, Boolean interleaving, Boolean padXid, Boolean wrapXaDataSource,
- Boolean noTxSeparatePool) throws ValidateException
+ Boolean noTxSeparatePool, Recovery recovery) throws ValidateException
{
super(minPoolSize, maxPoolSize, prefill, useStrictMin);
this.isSameRmOverride = isSameRmOverride;
@@ -70,6 +74,7 @@
this.padXid = padXid;
this.wrapXaDataSource = wrapXaDataSource;
this.noTxSeparatePool = noTxSeparatePool;
+ this.recovery = recovery;
}
/**
@@ -136,6 +141,7 @@
result = prime * result + ((isSameRmOverride == null) ? 0 : isSameRmOverride.hashCode());
result = prime * result + ((noTxSeparatePool == null) ? 0 : noTxSeparatePool.hashCode());
result = prime * result + ((padXid == null) ? 0 : padXid.hashCode());
+ result = prime * result + ((recovery == null) ? 0 : recovery.hashCode());
result = prime * result + ((wrapXaDataSource == null) ? 0 : wrapXaDataSource.hashCode());
return result;
}
@@ -178,6 +184,13 @@
}
else if (!padXid.equals(other.padXid))
return false;
+ if (recovery == null)
+ {
+ if (other.recovery != null)
+ return false;
+ }
+ else if (!recovery.equals(other.recovery))
+ return false;
if (wrapXaDataSource == null)
{
if (other.wrapXaDataSource != null)
@@ -191,12 +204,16 @@
@Override
public String toString()
{
- return "XaPoolImpl [isSameRmOverride=" + isSameRmOverride + ", interleaving=" + interleaving + ", padXid=" +
- padXid + ", wrapXaDataSource=" + wrapXaDataSource + ", noTxSeparatePool=" + noTxSeparatePool +
- ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill +
- ", useStrictMin=" + useStrictMin + "]";
+ return "CommonXaPoolImpl [isSameRmOverride=" + isSameRmOverride + ", interleaving=" + interleaving +
+ ", padXid=" + padXid + ", wrapXaDataSource=" + wrapXaDataSource + ", noTxSeparatePool=" +
+ noTxSeparatePool + ", recovery=" + recovery + "]";
}
+ @Override
+ public Recovery getRecovery()
+ {
+ return recovery;
+ }
}
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CredentialImpl.java (from rev 110856, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsSecurityImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CredentialImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CredentialImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -0,0 +1,156 @@
+/*
+ * 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.common;
+
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.validator.ValidateException;
+
+
+/**
+ *
+ * A SecurityImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class CredentialImpl implements Credential
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -5842402120520191086L;
+
+ private final String userName;
+
+ private final String password;
+
+ private final String securityDomain;
+
+ /**
+ * Create a new SecurityImpl.
+ *
+ * @param userName userName
+ * @param password password
+ * @param securityDomain securityDomain
+ * @throws ValidateException ValidateException
+ */
+ public CredentialImpl(String userName, String password, String securityDomain) throws ValidateException
+ {
+ super();
+ this.userName = userName;
+ this.password = password;
+ this.securityDomain = securityDomain;
+ this.validate();
+ }
+
+ /**
+ * Get the userName.
+ *
+ * @return the userName.
+ */
+ @Override
+ public final String getUserName()
+ {
+ return userName;
+ }
+
+ /**
+ * Get the password.
+ *
+ * @return the password.
+ */
+ @Override
+ public final String getPassword()
+ {
+ return password;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((password == null) ? 0 : password.hashCode());
+ result = prime * result + ((securityDomain == null) ? 0 : securityDomain.hashCode());
+ result = prime * result + ((userName == null) ? 0 : userName.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof CredentialImpl))
+ return false;
+ CredentialImpl other = (CredentialImpl) obj;
+ if (password == null)
+ {
+ if (other.password != null)
+ return false;
+ }
+ else if (!password.equals(other.password))
+ return false;
+ if (securityDomain == null)
+ {
+ if (other.securityDomain != null)
+ return false;
+ }
+ else if (!securityDomain.equals(other.securityDomain))
+ return false;
+ if (userName == null)
+ {
+ if (other.userName != null)
+ return false;
+ }
+ else if (!userName.equals(other.userName))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "DsSecurityImpl [userName=" + userName + ", password=" + password + ", securityDomain=" +
+ securityDomain + "]";
+ }
+
+ /**
+ * Get the securityDomainManaged.
+ *
+ * @return the securityDomainManaged.
+ */
+ @Override
+ public final String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+
+
+ @Override
+ public void validate() throws ValidateException
+ {
+ //always valid, no data ara mandatory
+ }
+}
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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceAbstractImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -21,9 +21,9 @@
*/
package org.jboss.jca.common.metadata.ds;
+import org.jboss.jca.common.api.metadata.common.Credential;
import org.jboss.jca.common.api.metadata.ds.CommonDataSource;
import org.jboss.jca.common.api.metadata.ds.DataSource;
-import org.jboss.jca.common.api.metadata.ds.DsSecurity;
import org.jboss.jca.common.api.metadata.ds.Statement;
import org.jboss.jca.common.api.metadata.ds.TimeOut;
import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
@@ -56,7 +56,7 @@
/**
* security
*/
- protected final DsSecurity security;
+ protected final Credential security;
/**
* statement
@@ -121,7 +121,7 @@
* @throws ValidateException ValidateException
*/
protected DataSourceAbstractImpl(TransactionIsolation transactionIsolation, TimeOut timeOut,
- DsSecurity security, Statement statement, Validation validation, String urlDelimiter,
+ Credential security, Statement statement, Validation validation, String urlDelimiter,
String urlSelectorStrategyClassName, Boolean useJavaContext, String poolName, Boolean enabled, String jndiName,
boolean spy)
throws ValidateException
@@ -173,7 +173,7 @@
*/
@Override
- public final DsSecurity getSecurity()
+ public final Credential getSecurity()
{
return security;
}
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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DataSourceImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -22,8 +22,8 @@
package org.jboss.jca.common.metadata.ds;
import org.jboss.jca.common.api.metadata.common.CommonPool;
+import org.jboss.jca.common.api.metadata.common.Credential;
import org.jboss.jca.common.api.metadata.ds.DataSource;
-import org.jboss.jca.common.api.metadata.ds.DsSecurity;
import org.jboss.jca.common.api.metadata.ds.Statement;
import org.jboss.jca.common.api.metadata.ds.TimeOut;
import org.jboss.jca.common.api.metadata.ds.TransactionIsolation;
@@ -83,7 +83,7 @@
*/
public DataSourceImpl(String connectionUrl, String driverClass, String module,
TransactionIsolation transactionIsolation, Map<String, String> connectionProperties, TimeOut timeOut,
- DsSecurity security, Statement statement, Validation validation, String urlDelimiter,
+ Credential security, Statement statement, Validation validation, String urlDelimiter,
String urlSelectorStrategyClassName, String newConnectionSql, boolean useJavaContext, String poolName,
boolean enabled, String jndiName, boolean spy, CommonPool pool) throws ValidateException
{
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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsParser.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -23,10 +23,10 @@
import org.jboss.jca.common.api.metadata.common.CommonPool;
import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.metadata.common.Extension;
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.DsSecurity;
-import org.jboss.jca.common.api.metadata.ds.Extension;
import org.jboss.jca.common.api.metadata.ds.Recovery;
import org.jboss.jca.common.api.metadata.ds.Statement;
import org.jboss.jca.common.api.metadata.ds.Statement.TrackStatementsEnum;
@@ -178,7 +178,7 @@
TransactionIsolation transactionIsolation = null;
Map<String, String> xaDataSourceProperty = new HashMap<String, String>();
TimeOut timeOutSettings = null;
- DsSecurity securitySettings = null;
+ Credential securitySettings = null;
Statement statementSettings = null;
Validation validationSettings = null;
String urlDelimiter = null;
@@ -287,7 +287,7 @@
break;
}
case SECURITY : {
- securitySettings = parseDsSecuritySettings(reader);
+ securitySettings = parseCredential(reader);
break;
}
case STATEMENT : {
@@ -325,7 +325,7 @@
TransactionIsolation transactionIsolation = null;
Map<String, String> connectionProperties = new HashMap<String, String>();
TimeOut timeOutSettings = null;
- DsSecurity securitySettings = null;
+ Credential securitySettings = null;
Statement statementSettings = null;
Validation validationSettings = null;
String urlDelimiter = null;
@@ -433,7 +433,7 @@
break;
}
case SECURITY : {
- securitySettings = parseDsSecuritySettings(reader);
+ securitySettings = parseCredential(reader);
break;
}
case STATEMENT : {
@@ -458,58 +458,6 @@
throw new ParserException("Reached end of xml document unexpectedly");
}
- private DsSecurity parseDsSecuritySettings(XMLStreamReader reader) throws XMLStreamException, ParserException,
- ValidateException
- {
-
- String userName = null;
- String password = null;
- String securityDomain = null;
-
- while (reader.hasNext())
- {
- switch (reader.nextTag())
- {
- case END_ELEMENT : {
- if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.SECURITY)
- {
-
- return new DsSecurityImpl(userName, password, securityDomain);
- }
- else
- {
- if (DsSecurity.Tag.forName(reader.getLocalName()) == DsSecurity.Tag.UNKNOWN)
- {
- throw new ParserException("unexpected end tag" + reader.getLocalName());
- }
- }
- break;
- }
- case START_ELEMENT : {
- switch (DsSecurity.Tag.forName(reader.getLocalName()))
- {
- case PASSWORD : {
- password = elementAsString(reader);
- break;
- }
- case USERNAME : {
- userName = elementAsString(reader);
- break;
- }
- case SECURITY_DOMAIN : {
- securityDomain = elementAsString(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,
ValidateException
{
@@ -590,193 +538,6 @@
throw new ParserException("Reached end of xml document unexpectedly");
}
- private Recovery parseRecovery(XMLStreamReader reader)
- throws XMLStreamException, ParserException, ValidateException
- {
-
- Boolean noRecovery = null;
- DsSecurity security = null;
- Extension plugin = null;
-
- for (Recovery.Attribute attribute : Recovery.Attribute.values())
- {
- switch (attribute)
- {
- case NO_RECOVERY : {
- noRecovery = attributeAsBoolean(reader, attribute.getLocalName(), false);
- break;
- }
- default :
- break;
- }
- }
-
- while (reader.hasNext())
- {
- switch (reader.nextTag())
- {
- case END_ELEMENT : {
- if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.RECOVERY)
- {
- return new Recovery(security, plugin, noRecovery);
- }
- else
- {
- if (Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.UNKNOWN)
- {
- throw new ParserException("unexpected end tag" + reader.getLocalName());
- }
- }
- break;
- }
- case START_ELEMENT : {
- Recovery.Tag tag = Recovery.Tag.forName(reader.getLocalName());
- switch (tag)
- {
- case SECURITY : {
- security = parseDsSecuritySettings(reader);
- break;
- }
- case PLUGIN : {
- plugin = parseExtension(reader, tag);
- break;
- }
- default :
- throw new ParserException("Unexpected element:" + reader.getLocalName());
- }
- break;
- }
- }
- }
- throw new ParserException("Reached end of xml document unexpectedly");
- }
-
- private Extension parseExtension(XMLStreamReader reader, Validation.Tag enclosingTag)
- throws XMLStreamException, ParserException, ValidateException
- {
-
- String className = null;
- Map<String, String> properties = null;
-
- for (Extension.Attribute attribute : Extension.Attribute.values())
- {
- switch (attribute)
- {
- case CLASS_NAME : {
- className = attributeAsString(reader, attribute.getLocalName());
- break;
- }
- default :
- break;
- }
- }
-
- while (reader.hasNext())
- {
- switch (reader.nextTag())
- {
- case END_ELEMENT : {
- if (Validation.Tag.forName(reader.getLocalName()) == enclosingTag)
- {
- if (className == null)
- {
- throw new ParserException("mandatory class-name attribute missing in " +
- enclosingTag.getLocalName());
- }
-
- return new Extension(className, properties);
- }
- else
- {
- if (Extension.Tag.forName(reader.getLocalName()) == Extension.Tag.UNKNOWN)
- {
- throw new ParserException("unexpected end tag" + reader.getLocalName());
- }
- }
- break;
- }
- case START_ELEMENT : {
- switch (Extension.Tag.forName(reader.getLocalName()))
- {
- case CONFIG_PROPERTY : {
- if (properties == null) properties = new HashMap<String, String>();
- properties.put(attributeAsString(reader, "name"), elementAsString(reader));
- break;
- }
- default :
- throw new ParserException("Unexpected element:" + reader.getLocalName());
- }
- break;
- }
- }
- }
- throw new ParserException("Reached end of xml document unexpectedly");
- }
-
-
- private Extension parseExtension(XMLStreamReader reader, Recovery.Tag enclosingTag)
- throws XMLStreamException, ParserException, ValidateException
- {
-
- String className = null;
- Map<String, String> properties = null;
-
- for (Extension.Attribute attribute : Extension.Attribute.values())
- {
- switch (attribute)
- {
- case CLASS_NAME : {
- className = attributeAsString(reader, attribute.getLocalName());
- break;
- }
- default :
- break;
- }
- }
-
- while (reader.hasNext())
- {
- switch (reader.nextTag())
- {
- case END_ELEMENT : {
- if (Recovery.Tag.forName(reader.getLocalName()) == enclosingTag)
- {
- if (className == null)
- {
- throw new ParserException("mandatory class-name attribute missing in " +
- enclosingTag.getLocalName());
- }
-
- return new Extension(className, properties);
- }
- else
- {
- if (Extension.Tag.forName(reader.getLocalName()) == Extension.Tag.UNKNOWN)
- {
- throw new ParserException("unexpected end tag" + reader.getLocalName());
- }
- }
- break;
- }
- case START_ELEMENT : {
- switch (Extension.Tag.forName(reader.getLocalName()))
- {
- case CONFIG_PROPERTY : {
- if (properties == null)
- properties = new HashMap<String, String>();
- properties.put(attributeAsString(reader, "name"), elementAsString(reader));
- break;
- }
- default :
- throw new ParserException("Unexpected element:" + reader.getLocalName());
- }
- break;
- }
- }
- }
- throw new ParserException("Reached end of xml document unexpectedly");
- }
-
private TimeOut parseTimeOutSettings(XMLStreamReader reader) throws XMLStreamException, ParserException,
ValidateException
{
Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsSecurityImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsSecurityImpl.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/DsSecurityImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -1,156 +0,0 @@
-/*
- * 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.DsSecurity;
-import org.jboss.jca.common.api.validator.ValidateException;
-
-
-/**
- *
- * A SecurityImpl.
- *
- * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
- *
- */
-public class DsSecurityImpl implements DsSecurity
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = -5842402120520191086L;
-
- private final String userName;
-
- private final String password;
-
- private final String securityDomain;
-
- /**
- * Create a new SecurityImpl.
- *
- * @param userName userName
- * @param password password
- * @param securityDomain securityDomain
- * @throws ValidateException ValidateException
- */
- public DsSecurityImpl(String userName, String password, String securityDomain) throws ValidateException
- {
- super();
- this.userName = userName;
- this.password = password;
- this.securityDomain = securityDomain;
- this.validate();
- }
-
- /**
- * Get the userName.
- *
- * @return the userName.
- */
- @Override
- public final String getUserName()
- {
- return userName;
- }
-
- /**
- * Get the password.
- *
- * @return the password.
- */
- @Override
- public final String getPassword()
- {
- return password;
- }
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((password == null) ? 0 : password.hashCode());
- result = prime * result + ((securityDomain == null) ? 0 : securityDomain.hashCode());
- result = prime * result + ((userName == null) ? 0 : userName.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof DsSecurityImpl))
- return false;
- DsSecurityImpl other = (DsSecurityImpl) obj;
- if (password == null)
- {
- if (other.password != null)
- return false;
- }
- else if (!password.equals(other.password))
- return false;
- if (securityDomain == null)
- {
- if (other.securityDomain != null)
- return false;
- }
- else if (!securityDomain.equals(other.securityDomain))
- return false;
- if (userName == null)
- {
- if (other.userName != null)
- return false;
- }
- else if (!userName.equals(other.userName))
- return false;
- return true;
- }
-
- @Override
- public String toString()
- {
- return "DsSecurityImpl [userName=" + userName + ", password=" + password + ", securityDomain=" +
- securityDomain + "]";
- }
-
- /**
- * Get the securityDomainManaged.
- *
- * @return the securityDomainManaged.
- */
- @Override
- public final String getSecurityDomain()
- {
- return securityDomain;
- }
-
-
-
- @Override
- public void validate() throws ValidateException
- {
- //always valid, no data ara mandatory
- }
-}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/ValidationImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/ValidationImpl.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/ValidationImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -21,7 +21,7 @@
*/
package org.jboss.jca.common.metadata.ds;
-import org.jboss.jca.common.api.metadata.ds.Extension;
+import org.jboss.jca.common.api.metadata.common.Extension;
import org.jboss.jca.common.api.metadata.ds.Validation;
import org.jboss.jca.common.api.validator.ValidateException;
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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/ds/XADataSourceImpl.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -22,7 +22,7 @@
package org.jboss.jca.common.metadata.ds;
import org.jboss.jca.common.api.metadata.common.CommonXaPool;
-import org.jboss.jca.common.api.metadata.ds.DsSecurity;
+import org.jboss.jca.common.api.metadata.common.Credential;
import org.jboss.jca.common.api.metadata.ds.Recovery;
import org.jboss.jca.common.api.metadata.ds.Statement;
import org.jboss.jca.common.api.metadata.ds.TimeOut;
@@ -82,7 +82,7 @@
* @param recovery recovery
* @throws ValidateException ValidateException
*/
- public XADataSourceImpl(TransactionIsolation transactionIsolation, TimeOut timeOut, DsSecurity security,
+ public XADataSourceImpl(TransactionIsolation transactionIsolation, TimeOut timeOut, Credential security,
Statement statement, Validation validation, String urlDelimiter, String urlSelectorStrategyClassName,
boolean useJavaContext, String poolName, boolean enabled, String jndiName, boolean spy,
Map<String, String> xaDataSourceProperty, String xaDataSourceClass, String module, String newConnectionSql,
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/merge/Merger.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/merge/Merger.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/merge/Merger.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -24,10 +24,10 @@
import org.jboss.jca.common.api.metadata.common.CommonAdminObject;
import org.jboss.jca.common.api.metadata.common.CommonConnDef;
import org.jboss.jca.common.api.metadata.common.CommonIronJacamar;
+import org.jboss.jca.common.api.metadata.common.Credential;
import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
import org.jboss.jca.common.api.metadata.ds.CommonDataSource;
import org.jboss.jca.common.api.metadata.ds.DataSource;
-import org.jboss.jca.common.api.metadata.ds.DsSecurity;
import org.jboss.jca.common.api.metadata.ds.XaDataSource;
import org.jboss.jca.common.api.metadata.ra.AdminObject;
import org.jboss.jca.common.api.metadata.ra.AuthenticationMechanism;
@@ -448,7 +448,7 @@
case USERNAME : {
if (ds != null)
{
- DsSecurity security = ds.getSecurity();
+ Credential security = ds.getSecurity();
if (security != null && security.getUserName() != null &&
!security.getUserName().trim().equals(""))
{
@@ -462,7 +462,7 @@
case PASSWORD : {
if (ds != null)
{
- DsSecurity security = ds.getSecurity();
+ Credential security = ds.getSecurity();
if (security != null && security.getPassword() != null &&
!security.getPassword().trim().equals(""))
{
Deleted: 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 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd 2011-03-09 12:18:53 UTC (rev 110864)
@@ -1,815 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://www.jboss.org/ironjacamar/schema"
- xmlns="http://www.jboss.org/ironjacamar/schema">
-
- <xs:element name="datasources" type="datasourcesType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The datasources element is the root of the JDBC datasource configuration
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:complexType name="datasourcesType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="datasource" type="datasourceType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies a non-XA datasource, using local transactions
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="xa-datasource" type="xa-datasourceType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies a XA datasource
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:choice>
- </xs:complexType>
- <xs:complexType name="datasourceType" mixed="false">
- <xs:sequence>
- <xs:element name="connection-url" type="xs:token">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The JDBC driver connection URL Ex: <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
- ]]>
- </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="module" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- An unique reference to the classloader module which contains the JDBC driver
- ]]>
- </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="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="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="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.jca.adapters.jdbc.URLSelectorStrategy
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the pooling settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="security" type="securityType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the security settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="validation" type="validationType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the validation settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="time-out" type="time-outType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the time out settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="statement" type="statementType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the statement settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attributeGroup ref="common-datasourceAttributes" />
- </xs:complexType>
- <xs:complexType name="xa-datasourceType">
- <xs:sequence>
- <xs:element name="xa-datasource-property" type="xa-datasource-propertyType" minOccurs="1" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies 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
- onto the XADataSource implementation by looking for a JavaBeans style getter
- method for the property name. If found, the value of the property is set
- using the JavaBeans setter with the element text translated to the true property
- type using the java.beans.PropertyEditor for the type. Ex:
- <xa-datasource-property name="IfxWAITTIME">10</xa-datasource-property>
- <xa-datasource-property name="IfxIFXHOST">myhost.mydomain.com</xa-datasource-property>
- <xa-datasource-property name="PortNumber">1557</xa-datasource-property>
- <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
- <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="xa-datasource-class" type="xs:token">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The fully qualifed name of the javax.sql.XADataSource implementation
- class. Ex: <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="module" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- An unique reference to the classloader module which contains the JDBC driver
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="url-delimiter" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the delimeter for URLs in the 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.jca.adapters.jdbc.URLSelectorStrategy
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="new-connection-sql" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies 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:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the pooling settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="security" type="securityType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the security settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="validation" type="validationType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the validation settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="time-out" type="time-outType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the time out settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="statement" type="statementType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the statement settings
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="recovery" type="recoverType" minOccurs="0" maxOccurs="1"></xs:element>
- </xs:sequence>
- <xs:attributeGroup ref="common-datasourceAttributes" />
- </xs:complexType>
- <xs:complexType name="boolean-presenceType" />
- <xs:attributeGroup name="common-datasourceAttributes">
- <xs:attribute name="jndi-name" type="xs:token" use="required">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the JNDI name for the datasource
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="pool-name" type="xs:token" use="required">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the pool name for the datasource used for management
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="enabled" type="xs:boolean" default="true" form="unqualified" use="optional">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies if the datasource should be enabled
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute default="true" name="use-java-context" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Setting this to false will bind the DataSource into global JNDI
- Ex: use-java-context="true"
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute default="false" name="spy" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Enable spy functionality on the JDBC layer - e.g. log all JDBC traffic to the datasource.
- Remember to enable the logging category (org.jboss.jdbc) too.
- Ex: spy="true"
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:attributeGroup>
- <xs:simpleType name="transaction-isolationType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Define constants used as the possible transaction isolation levels in transaction-isolation
- type. Include: TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ,
- TRANSACTION_SERIALIZABLE, TRANSACTION_NONE
- ]]>
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="TRANSACTION_READ_UNCOMMITTED" />
- <xs:enumeration value="TRANSACTION_READ_COMMITTED" />
- <xs:enumeration value="TRANSACTION_REPEATABLE_READ" />
- <xs:enumeration value="TRANSACTION_SERIALIZABLE" />
- <xs:enumeration value="TRANSACTION_NONE" />
- </xs:restriction>
- </xs:simpleType>
- <xs:complexType name="xa-datasource-propertyType" mixed="true">
- <xs:attribute name="name" use="required" type="xs:token" />
- </xs:complexType>
- <xs:complexType name="connection-propertyType" mixed="true">
- <xs:attribute name="name" use="required" type="xs:token" />
- </xs:complexType>
- <xs:complexType name="validationType">
- <xs:sequence>
- <xs:element name="valid-connection-checker" type="extensionType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- An org.jboss.jca.adapters.jdbc.ValidConnectionChecker that provides
- a SQLException isValidConnection(Connection e) method to validate is a connection
- is valid. An exception means the connection is destroyed. This overrides
- the check-valid-connection-sql when present. Ex:
- <exception-sorter-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</exception-sorter-class-name>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
-
- <xs:element name="check-valid-connection-sql" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify an SQL statement to check validity of a pool connection. This
- may be called when managed connection is taken from pool for use.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="validate-on-match" type="xs:boolean" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The validate-on-match element indicates whether or not connection
- level validation should be done when a connection factory attempts to match
- a managed connection for a given set. This is typically exclusive to the
- use of background validation
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="background-validation" type="xs:boolean" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- An element to specify that connections should be validated on a background
- thread versus being validated prior to use
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="background-validation-minutes" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The background-validation-minutes element specifies the amount of
- time, in minutes, that background validation will run.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="use-fast-fail" type="xs:boolean" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Whether fail a connection allocation on the first connection if it
- is invalid (true) or keep trying until the pool is exhausted of all potential
- connections (false) default false. e.g. <use-fast-fail>true</use-fast-fail>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="0" name="stale-connection-checker" type="extensionType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- An org.jboss.jca.adapters.jdbc.StaleConnectionChecker that provides
- a boolean isStaleConnection(SQLException e) method which if it it returns
- true will wrap the exception in an org.jboss.jca.adapters.jdbc.StaleConnectionException
- which is a subclass of SQLException. Ex:
- <stale-connection-checker-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleStaleConnectionChecker</stale-connection-checker-class-name>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="exception-sorter" type="extensionType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- An org.jboss.jca.adapters.jdbc.ExceptionSorter that provides a
- boolean isExceptionFatal(SQLException e) method to validate is an exception
- should be broadcast to all javax.resource.spi.ConnectionEventListener as
- a connectionErrorOccurred message. Ex:
- <exception-sorter-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="time-outType">
- <xs:sequence>
- <xs:element name="blocking-timeout-millis" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The blocking-timeout-millis element indicates the maximum time in
- milliseconds to block while waiting for a connection before throwing an exception.
- Note that this blocks only while waiting for a permit for a connection, and
- will never throw an exception if creating a new connection takes an inordinately
- long time. The default is 30000 (30 seconds).
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="idle-timeout-minutes" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The idle-timeout-minutes elements indicates the maximum time in minutes
- a connection may be idle before being closed. The actual maximum time depends
- also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes
- of any pool.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="set-tx-query-timeout" type="boolean-presenceType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Whether to set the query timeout based on the time remaining until
- transaction timeout, any configured query timeout will be used if there is
- no transaction. The default is false. e.g. <set-tx-query-timeout/>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="query-timeout" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Any configured query timeout in seconds The default is no timeout
- e.g. 5 minutes <query-timeout>300</query-timeout>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="use-try-lock" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Any configured timeout for internal locks on the resource adapter
- objects in seconds The default is a 60 second timeout e.g. 5 minutes <use-try-lock>300</use-try-lock>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="allocation-retry" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The allocation retry element indicates the number of times that allocating
- a connection should be tried before throwing an exception. The default is 0.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="allocation-retry-wait-millis" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The allocation retry wait millis element indicates the time in milliseconds
- to wait between retrying to allocate a connection. The default is 5000 (5 seconds).
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="xa-resource-timeout" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Passed to XAResource.setTransactionTimeout() Default is zero which
- does not invoke the setter. In seconds e.g. 5 minutes <xa-resource-timeout>300</xa-resource-timeout>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:simpleType name="track-statementsType">
- <xs:restriction base="xs:token">
- <xs:enumeration value="true" />
- <xs:enumeration value="false" />
- <xs:enumeration value="nowarn" />
- </xs:restriction>
- </xs:simpleType>
- <xs:complexType name="statementType">
- <xs:sequence>
- <xs:element name="track-statements" type="track-statementsType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Whether to check for unclosed statements when a connection is returned
- to the pool and result sets are closed when a statement is closed/return
- to the prepared statement cache. valid values are: false - do not track statements
- and results true - track statements and result sets and warn when they are
- not closed nowarn - track statements but do no warn about them being unclosed
- (the default) e.g. <track-statements>nowarn</track-statements>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="prepared-statement-cache-size" type="xs:nonNegativeInteger" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- The number of prepared statements per connection in an LRU cache
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="share-prepared-statements" type="boolean-presenceType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Whether to share prepare statements, i.e. whether asking for same
- statement twice without closing uses the same underlying prepared statement.
- The default is false. e.g. <share-prepared-statements/>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <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 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>
- <![CDATA[[
- 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 is-same-rm-override element allows one to unconditionally
- set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns
- true or false. Ex: <is-same-rm-override>true</is-same-rm-override>
- ]]>
- </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:annotation>
- <xs:documentation>
- <![CDATA[[
- Oracle does not like XA connections getting used both inside and outside a JTA transaction.
- To workaround the problem you can create separate sub-pools for the different contexts
- using <no-tx-separate-pools/>
- Ex: <no-tx-separate-pools/>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="pad-xid" type="xs:boolean" default="false" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Should the Xid be padded
- Ex: <pad-xid>true</pad-xid>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="wrap-xa-resource" type="xs:boolean" default="false" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper
- instance
- Ex: <wrap-xa-resource>true</wrap-xa-resource>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="securityType">
- <xs:sequence>
- <xs:element name="user-name" type="xs:token" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify the 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 password used when creating a new connection.
- Ex: <password>sa-pass</password>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="security-domain" type="xs:token" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Indicates Subject (from security domain) are used to distinguish connections in the pool.
- The content of the security-domain is the name of the JAAS security manager that will handle
- authentication. This name correlates to the JAAS login-config.xml descriptor
- application-policy/name attribute.
- Ex:
- <security-domain>HsqlDbRealm</security-domain>
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="extensionType">
- <xs:sequence>
- <xs:element name="config-property" type="config-propertyType"></xs:element>
- </xs:sequence>
- <xs:attribute name="class-name" type="xs:token" use="required"></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="config-propertyType" mixed="true">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies a Java bean property value
- ]]>
- </xs:documentation>
- </xs:annotation>
- <xs:simpleContent>
- <xs:extension base="xs:token">
- <xs:attribute use="required" name="name" type="xs:token">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the name of the config-property
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="recoverType">
- <xs:sequence>
- <xs:element name="security" type="securityType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the security options used when creating a connection during recovery.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="plugin" type="extensionType">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specifies the extension plugin used in spi (core.spi.xa)
- which can be implemented by various plugins to provide better feedback to the XA recovery system.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="no-recovery" type="xs:boolean" default="false" use="optional">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[[
- Specify if the xa-datasource should be excluded from recovery.
- Default false.
- ]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
-
-</xs:schema>
Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/ironjacamar_1_0.xsd 2011-03-09 12:18:53 UTC (rev 110864)
@@ -448,6 +448,7 @@
</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="recovery" type="recoverType" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -532,6 +533,85 @@
</xs:element>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="recoverType">
+ <xs:sequence>
+ <xs:element name="recover-credential" type="credentialType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the security options used when creating a connection during recovery.
+ Note: if this credential are not specified the security credential are used for recover too
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="plugin" type="extensionType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the extension plugin used in spi (core.spi.xa)
+ which can be implemented by various plugins to provide better feedback to the XA recovery system.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="no-recovery" type="xs:boolean" default="false" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify if the xa-datasource should be excluded from recovery.
+ Default false.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="extensionType">
+ <xs:sequence>
+ <xs:element name="config-property" type="config-propertyType"></xs:element>
+ </xs:sequence>
+ <xs:attribute name="class-name" type="xs:token" use="required"></xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="credentialType">
+ <xs:sequence>
+ <xs:element name="user-name" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify the 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 password used when creating a new connection.
+ Ex: <password>sa-pass</password>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="security-domain" type="xs:token" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Indicates Subject (from security domain) are used to distinguish connections in the pool.
+ The content of the security-domain is the name of the JAAS security manager that will handle
+ authentication. This name correlates to the JAAS login-config.xml descriptor
+ application-policy/name attribute.
+ Ex:
+ <security-domain>HsqlDbRealm</security-domain>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
<xs:element name="ironjacamar" type="ironjacamarType">
<xs:annotation>
Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapters_1_0.xsd 2011-03-09 12:18:53 UTC (rev 110864)
@@ -480,6 +480,7 @@
</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="recovery" type="recoverType" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -563,5 +564,83 @@
</xs:element>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="recoverType">
+ <xs:sequence>
+ <xs:element name="recover-credential" type="credentialType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the security options used when creating a connection during recovery.
+ Note: if this credential are not specified the security credential are used for recover too
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="plugin" type="extensionType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the extension plugin used in spi (core.spi.xa)
+ which can be implemented by various plugins to provide better feedback to the XA recovery system.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="no-recovery" type="xs:boolean" default="false" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify if the xa-datasource should be excluded from recovery.
+ Default false.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="extensionType">
+ <xs:sequence>
+ <xs:element name="config-property" type="config-propertyType"></xs:element>
+ </xs:sequence>
+ <xs:attribute name="class-name" type="xs:token" use="required"></xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="credentialType">
+ <xs:sequence>
+ <xs:element name="user-name" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify the 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 password used when creating a new connection.
+ Ex: <password>sa-pass</password>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="security-domain" type="xs:token" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Indicates Subject (from security domain) are used to distinguish connections in the pool.
+ The content of the security-domain is the name of the JAAS security manager that will handle
+ authentication. This name correlates to the JAAS login-config.xml descriptor
+ application-policy/name attribute.
+ Ex:
+ <security-domain>HsqlDbRealm</security-domain>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
</xs:schema>
Modified: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForRecoveryTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForRecoveryTestCase.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForRecoveryTestCase.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -21,9 +21,9 @@
*/
package org.jboss.jca.common.metadata.ds;
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.metadata.common.Extension;
import org.jboss.jca.common.api.metadata.ds.DataSources;
-import org.jboss.jca.common.api.metadata.ds.DsSecurity;
-import org.jboss.jca.common.api.metadata.ds.Extension;
import org.jboss.jca.common.api.metadata.ds.Recovery;
import org.jboss.jca.common.api.metadata.ds.XaDataSource;
import org.jboss.jca.common.api.validator.ValidateException;
@@ -89,7 +89,7 @@
Recovery recovery = ds.getRecovery();
assertThat(recovery, not(isNull()));
assertThat(recovery.getNoRecovery(), is(false));
- DsSecurity security = recovery.getSecurity();
+ Credential security = recovery.getSecurity();
Extension plugin = recovery.getPlugin();
assertThat(security.getUserName(), is("myUserName"));
assertThat(security.getPassword(), is("myPassword"));
Modified: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ironjacamar/IronJacamarParserTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ironjacamar/IronJacamarParserTestCase.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ironjacamar/IronJacamarParserTestCase.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -26,7 +26,11 @@
import org.jboss.jca.common.api.metadata.common.CommonSecurity;
import org.jboss.jca.common.api.metadata.common.CommonTimeOut;
import org.jboss.jca.common.api.metadata.common.CommonValidation;
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.metadata.common.Extension;
import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+import org.jboss.jca.common.api.metadata.ds.Recovery;
import org.jboss.jca.common.api.metadata.ironjacamar.IronJacamar;
import org.jboss.jca.common.metadata.ParserException;
@@ -43,6 +47,7 @@
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;
+import static org.mockito.Matchers.isNull;
/**
*
@@ -575,4 +580,51 @@
}
}
+ /** shouldParseXalPoolWithRecovery
+ * @throws Exception in case of error
+ */
+ @Test
+ public void shouldParseXalPoolWithRecovery() throws Exception
+ {
+ FileInputStream is = null;
+
+ //given
+ File directory = new File(Thread.currentThread().getContextClassLoader().getResource("ironjacamar").toURI());
+ for (File xmlFile : directory
+ .listFiles(new FilenamePrefixFilter("xa-pool--recovery-ironjacamar.xml")))
+ {
+ try
+ {
+ is = new FileInputStream(xmlFile);
+ IronJacamarParser parser = new IronJacamarParser();
+ //when
+ IronJacamar ij = parser.parse(is);
+ //then
+ CommonConnDef connDef = ij.getConnectionDefinitions().get(0);
+
+ //pool default
+ assertThat(connDef.isXa(), is(true));
+
+ CommonXaPool xaPool = (CommonXaPool) connDef.getPool();
+ Recovery recovery = xaPool.getRecovery();
+ assertThat(recovery, not(isNull()));
+ assertThat(recovery.getNoRecovery(), is(false));
+ Credential security = recovery.getSecurity();
+ Extension plugin = recovery.getPlugin();
+ assertThat(security.getUserName(), is("myUserName"));
+ assertThat(security.getPassword(), is("myPassword"));
+ assertThat(security.getSecurityDomain(), is("mySecurityDomain"));
+ assertThat(plugin.getClassName(), is("myClassName"));
+ assertThat(plugin.getConfigPropertiesMap().size(), is(1));
+ assertThat(plugin.getConfigPropertiesMap().get("MyProperty"), is("MyPropertyValue"));
+
+ }
+ finally
+ {
+ if (is != null)
+ is.close();
+ }
+ }
+ }
+
}
Modified: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java 2011-03-09 12:18:53 UTC (rev 110864)
@@ -23,7 +23,11 @@
import org.jboss.jca.common.api.metadata.common.CommonAdminObject;
import org.jboss.jca.common.api.metadata.common.CommonConnDef;
+import org.jboss.jca.common.api.metadata.common.CommonXaPool;
+import org.jboss.jca.common.api.metadata.common.Credential;
+import org.jboss.jca.common.api.metadata.common.Extension;
import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+import org.jboss.jca.common.api.metadata.ds.Recovery;
import org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapter;
import org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapters;
@@ -39,7 +43,9 @@
import org.junit.Test;
import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;
+import static org.mockito.Matchers.isNull;
/**
*
@@ -122,4 +128,49 @@
}
}
+
+ /**
+ *
+ * shouldParseRaWithRecovery
+ * @throws Exception in case of error
+ */
+ @Test
+ public void shouldParseRaWithRecovery() throws Exception
+ {
+ FileInputStream is = null;
+
+ //given
+ File directory = new File(Thread.currentThread().getContextClassLoader().getResource("resource-adapter")
+ .toURI());
+ File xmlFile = directory.listFiles(new FilenamePrefixFilter("recovery-ra.xml"))[0];
+ try
+ {
+ is = new FileInputStream(xmlFile);
+ ResourceAdapterParser parser = new ResourceAdapterParser();
+ //when
+ ResourceAdapters ra = parser.parse(is);
+ //then
+ assertThat(ra.getResourceAdapters().size() == 1, is(true));
+ ResourceAdapter res = ra.getResourceAdapters().get(0);
+ CommonXaPool xaPool = (CommonXaPool) res.getConnectionDefinitions().get(0).getPool();
+ Recovery recovery = xaPool.getRecovery();
+ assertThat(recovery, not(isNull()));
+ assertThat(recovery.getNoRecovery(), is(false));
+ Credential security = recovery.getSecurity();
+ Extension plugin = recovery.getPlugin();
+ assertThat(security.getUserName(), is("myUserName"));
+ assertThat(security.getPassword(), is("myPassword"));
+ assertThat(security.getSecurityDomain(), is("mySecurityDomain"));
+ assertThat(plugin.getClassName(), is("myClassName"));
+ assertThat(plugin.getConfigPropertiesMap().size(), is(1));
+ assertThat(plugin.getConfigPropertiesMap().get("MyProperty"), is("MyPropertyValue"));
+
+ }
+ finally
+ {
+ if (is != null)
+ is.close();
+ }
+
+ }
}
Copied: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/datasources_1_0.xsd (from rev 110856, projects/jboss-jca/trunk/common/src/main/resources/schema/datasources_1_0.xsd)
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/datasources_1_0.xsd (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/datasources_1_0.xsd 2011-03-09 12:18:53 UTC (rev 110864)
@@ -0,0 +1,816 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://www.jboss.org/ironjacamar/schema"
+ xmlns="http://www.jboss.org/ironjacamar/schema">
+
+ <xs:element name="datasources" type="datasourcesType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The datasources element is the root of the JDBC datasource configuration
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="datasourcesType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="datasource" type="datasourceType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies a non-XA datasource, using local transactions
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="xa-datasource" type="xa-datasourceType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies a XA datasource
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="datasourceType" mixed="false">
+ <xs:sequence>
+ <xs:element name="connection-url" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The JDBC driver connection URL Ex: <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
+ ]]>
+ </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="module" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An unique reference to the classloader module which contains the JDBC driver
+ ]]>
+ </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="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="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="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.jca.adapters.jdbc.URLSelectorStrategy
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pool" type="poolType" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the pooling settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="security" type="credentialType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the security settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="validation" type="validationType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the validation settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="time-out" type="time-outType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the time out settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="statement" type="statementType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the statement settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attributeGroup ref="common-datasourceAttributes" />
+ </xs:complexType>
+ <xs:complexType name="xa-datasourceType">
+ <xs:sequence>
+ <xs:element name="xa-datasource-property" type="xa-datasource-propertyType" minOccurs="1" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies 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
+ onto the XADataSource implementation by looking for a JavaBeans style getter
+ method for the property name. If found, the value of the property is set
+ using the JavaBeans setter with the element text translated to the true property
+ type using the java.beans.PropertyEditor for the type. Ex:
+ <xa-datasource-property name="IfxWAITTIME">10</xa-datasource-property>
+ <xa-datasource-property name="IfxIFXHOST">myhost.mydomain.com</xa-datasource-property>
+ <xa-datasource-property name="PortNumber">1557</xa-datasource-property>
+ <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
+ <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="xa-datasource-class" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The fully qualifed name of the javax.sql.XADataSource implementation
+ class. Ex: <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="module" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An unique reference to the classloader module which contains the JDBC driver
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="url-delimiter" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the delimeter for URLs in the 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.jca.adapters.jdbc.URLSelectorStrategy
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="new-connection-sql" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies 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:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the pooling settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="security" type="credentialType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the security settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="validation" type="validationType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the validation settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="time-out" type="time-outType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the time out settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="statement" type="statementType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the statement settings
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="recovery" type="recoverType" minOccurs="0" maxOccurs="1"></xs:element>
+ </xs:sequence>
+ <xs:attributeGroup ref="common-datasourceAttributes" />
+ </xs:complexType>
+ <xs:complexType name="boolean-presenceType" />
+ <xs:attributeGroup name="common-datasourceAttributes">
+ <xs:attribute name="jndi-name" type="xs:token" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the JNDI name for the datasource
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="pool-name" type="xs:token" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the pool name for the datasource used for management
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="enabled" type="xs:boolean" default="true" form="unqualified" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies if the datasource should be enabled
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute default="true" name="use-java-context" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Setting this to false will bind the DataSource into global JNDI
+ Ex: use-java-context="true"
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute default="false" name="spy" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Enable spy functionality on the JDBC layer - e.g. log all JDBC traffic to the datasource.
+ Remember to enable the logging category (org.jboss.jdbc) too.
+ Ex: spy="true"
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:simpleType name="transaction-isolationType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Define constants used as the possible transaction isolation levels in transaction-isolation
+ type. Include: TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ,
+ TRANSACTION_SERIALIZABLE, TRANSACTION_NONE
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="TRANSACTION_READ_UNCOMMITTED" />
+ <xs:enumeration value="TRANSACTION_READ_COMMITTED" />
+ <xs:enumeration value="TRANSACTION_REPEATABLE_READ" />
+ <xs:enumeration value="TRANSACTION_SERIALIZABLE" />
+ <xs:enumeration value="TRANSACTION_NONE" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="xa-datasource-propertyType" mixed="true">
+ <xs:attribute name="name" use="required" type="xs:token" />
+ </xs:complexType>
+ <xs:complexType name="connection-propertyType" mixed="true">
+ <xs:attribute name="name" use="required" type="xs:token" />
+ </xs:complexType>
+ <xs:complexType name="validationType">
+ <xs:sequence>
+ <xs:element name="valid-connection-checker" type="extensionType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An org.jboss.jca.adapters.jdbc.ValidConnectionChecker that provides
+ a SQLException isValidConnection(Connection e) method to validate is a connection
+ is valid. An exception means the connection is destroyed. This overrides
+ the check-valid-connection-sql when present. Ex:
+ <exception-sorter-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</exception-sorter-class-name>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="check-valid-connection-sql" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify an SQL statement to check validity of a pool connection. This
+ may be called when managed connection is taken from pool for use.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="validate-on-match" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The validate-on-match element indicates whether or not connection
+ level validation should be done when a connection factory attempts to match
+ a managed connection for a given set. This is typically exclusive to the
+ use of background validation
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="background-validation" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An element to specify that connections should be validated on a background
+ thread versus being validated prior to use
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="background-validation-minutes" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The background-validation-minutes element specifies the amount of
+ time, in minutes, that background validation will run.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="use-fast-fail" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Whether fail a connection allocation on the first connection if it
+ is invalid (true) or keep trying until the pool is exhausted of all potential
+ connections (false) default false. e.g. <use-fast-fail>true</use-fast-fail>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element minOccurs="0" name="stale-connection-checker" type="extensionType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An org.jboss.jca.adapters.jdbc.StaleConnectionChecker that provides
+ a boolean isStaleConnection(SQLException e) method which if it it returns
+ true will wrap the exception in an org.jboss.jca.adapters.jdbc.StaleConnectionException
+ which is a subclass of SQLException. Ex:
+ <stale-connection-checker-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleStaleConnectionChecker</stale-connection-checker-class-name>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="exception-sorter" type="extensionType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ An org.jboss.jca.adapters.jdbc.ExceptionSorter that provides a
+ boolean isExceptionFatal(SQLException e) method to validate is an exception
+ should be broadcast to all javax.resource.spi.ConnectionEventListener as
+ a connectionErrorOccurred message. Ex:
+ <exception-sorter-class-name>org.jboss.jca.adapters.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="time-outType">
+ <xs:sequence>
+ <xs:element name="blocking-timeout-millis" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The blocking-timeout-millis element indicates the maximum time in
+ milliseconds to block while waiting for a connection before throwing an exception.
+ Note that this blocks only while waiting for a permit for a connection, and
+ will never throw an exception if creating a new connection takes an inordinately
+ long time. The default is 30000 (30 seconds).
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="idle-timeout-minutes" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The idle-timeout-minutes elements indicates the maximum time in minutes
+ a connection may be idle before being closed. The actual maximum time depends
+ also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes
+ of any pool.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="set-tx-query-timeout" type="boolean-presenceType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Whether to set the query timeout based on the time remaining until
+ transaction timeout, any configured query timeout will be used if there is
+ no transaction. The default is false. e.g. <set-tx-query-timeout/>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="query-timeout" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Any configured query timeout in seconds The default is no timeout
+ e.g. 5 minutes <query-timeout>300</query-timeout>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="use-try-lock" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Any configured timeout for internal locks on the resource adapter
+ objects in seconds The default is a 60 second timeout e.g. 5 minutes <use-try-lock>300</use-try-lock>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="allocation-retry" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The allocation retry element indicates the number of times that allocating
+ a connection should be tried before throwing an exception. The default is 0.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="allocation-retry-wait-millis" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The allocation retry wait millis element indicates the time in milliseconds
+ to wait between retrying to allocate a connection. The default is 5000 (5 seconds).
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="xa-resource-timeout" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Passed to XAResource.setTransactionTimeout() Default is zero which
+ does not invoke the setter. In seconds e.g. 5 minutes <xa-resource-timeout>300</xa-resource-timeout>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="track-statementsType">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true" />
+ <xs:enumeration value="false" />
+ <xs:enumeration value="nowarn" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="statementType">
+ <xs:sequence>
+ <xs:element name="track-statements" type="track-statementsType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Whether to check for unclosed statements when a connection is returned
+ to the pool and result sets are closed when a statement is closed/return
+ to the prepared statement cache. valid values are: false - do not track statements
+ and results true - track statements and result sets and warn when they are
+ not closed nowarn - track statements but do no warn about them being unclosed
+ (the default) e.g. <track-statements>nowarn</track-statements>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="prepared-statement-cache-size" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ The number of prepared statements per connection in an LRU cache
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="share-prepared-statements" type="boolean-presenceType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Whether to share prepare statements, i.e. whether asking for same
+ statement twice without closing uses the same underlying prepared statement.
+ The default is false. e.g. <share-prepared-statements/>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <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 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>
+ <![CDATA[[
+ 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 is-same-rm-override element allows one to unconditionally
+ set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns
+ true or false. Ex: <is-same-rm-override>true</is-same-rm-override>
+ ]]>
+ </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:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Oracle does not like XA connections getting used both inside and outside a JTA transaction.
+ To workaround the problem you can create separate sub-pools for the different contexts
+ using <no-tx-separate-pools/>
+ Ex: <no-tx-separate-pools/>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pad-xid" type="xs:boolean" default="false" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Should the Xid be padded
+ Ex: <pad-xid>true</pad-xid>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="wrap-xa-resource" type="xs:boolean" default="false" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper
+ instance
+ Ex: <wrap-xa-resource>true</wrap-xa-resource>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="credentialType">
+ <xs:sequence>
+ <xs:element name="user-name" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify the 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 password used when creating a new connection.
+ Ex: <password>sa-pass</password>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="security-domain" type="xs:token" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Indicates Subject (from security domain) are used to distinguish connections in the pool.
+ The content of the security-domain is the name of the JAAS security manager that will handle
+ authentication. This name correlates to the JAAS login-config.xml descriptor
+ application-policy/name attribute.
+ Ex:
+ <security-domain>HsqlDbRealm</security-domain>
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="extensionType">
+ <xs:sequence>
+ <xs:element name="config-property" type="config-propertyType"></xs:element>
+ </xs:sequence>
+ <xs:attribute name="class-name" type="xs:token" use="required"></xs:attribute>
+ </xs:complexType>
+
+ <xs:complexType name="config-propertyType" mixed="true">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies a Java bean property value
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleContent>
+ <xs:extension base="xs:token">
+ <xs:attribute use="required" name="name" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the name of the config-property
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="recoverType">
+ <xs:sequence>
+ <xs:element name="recover-credential" type="credentialType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the security options used when creating a connection during recovery.
+ Note: if this credential are not specified the security credential are used for recover too
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="plugin" type="extensionType">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specifies the extension plugin used in spi (core.spi.xa)
+ which can be implemented by various plugins to provide better feedback to the XA recovery system.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="no-recovery" type="xs:boolean" default="false" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ <![CDATA[[
+ Specify if the xa-datasource should be excluded from recovery.
+ Default false.
+ ]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+
+</xs:schema>
Modified: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xa-resource-with-recovery-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xa-resource-with-recovery-ds.xml 2011-03-09 09:00:03 UTC (rev 110863)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/xa-resource-with-recovery-ds.xml 2011-03-09 12:18:53 UTC (rev 110864)
@@ -16,11 +16,11 @@
<xa-resource-timeout>1</xa-resource-timeout>
</timeout>
<recovery>
- <security>
+ <recover-credential>
<user-name>myUserName</user-name>
<password>myPassword</password>
<security-domain>mySecurityDomain</security-domain>
- </security>
+ </recover-credential>
<plugin class-name="myClassName">
<config-property name="MyProperty">MyPropertyValue</config-property>
</plugin>
Added: projects/jboss-jca/trunk/common/src/test/resources/ironjacamar/xa-pool-recovery-ironjacamar.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ironjacamar/xa-pool-recovery-ironjacamar.xml (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ironjacamar/xa-pool-recovery-ironjacamar.xml 2011-03-09 12:18:53 UTC (rev 110864)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<ironjacamar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../../../main/resources/schema/ironjacamar_1_0.xsd">
+ <transaction-support>NoTransaction</transaction-support>
+ <connection-definitions>
+ <connection-definition class-name="token" enabled="true" jndi-name="aSAPXcess" pool-name="aSAPXcess">
+ <config-property name="LogConfigFile">ASAP_SAP_1_0.xml</config-property>
+ <xa-pool>
+ <min-pool-size>0</min-pool-size>
+ <max-pool-size>64</max-pool-size>
+ <recovery>
+ <recover-credential>
+ <user-name>myUserName</user-name>
+ <password>myPassword</password>
+ <security-domain>mySecurityDomain</security-domain>
+ </recover-credential>
+ <plugin class-name="myClassName">
+ <config-property name="MyProperty">MyPropertyValue</config-property>
+ </plugin>
+ </recovery>
+ </xa-pool>
+ </connection-definition>
+ </connection-definitions>
+ <admin-objects>
+ <admin-object class-name="token" enabled="true" jndi-name="token" use-java-context="false">
+ <config-property name="token" />
+ </admin-object>
+ </admin-objects>
+</ironjacamar>
\ No newline at end of file
Added: projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/recovery-ra.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/recovery-ra.xml (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/recovery-ra.xml 2011-03-09 12:18:53 UTC (rev 110864)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- configuration for aSAPXcess SAP adapter for jboss 3.2 -->
+<!-- ==================================================================== -->
+<!-- aSAPXcess adapter configuration for SAP R3 -->
+<!-- Contact: aif_support at asapsolutions.com -->
+<!-- -->
+<!-- ==================================================================== -->
+<resource-adapters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../../../main/resources/schema/resource-adapter_1_0.xsd">
+ <resource-adapter>
+ <archive>token</archive>
+ <transaction-support>NoTransaction</transaction-support>
+ <connection-definitions>
+ <connection-definition class-name="token" enabled="true" jndi-name="aSAPXcess" pool-name="aSAPXcess">
+ <config-property name="LogConfigFile">ASAP_SAP_1_0.xml</config-property>
+ <config-property name="RootLogContext">ASAP_SAP_1_0</config-property>
+ <config-property name="LogLevel">WARN</config-property>
+ <config-property name="MessageBundleBase">ASAP_SAP_1_0</config-property>
+ <config-property name="LanguageCode">en</config-property>
+ <config-property name="CountryCode">US</config-property>
+ <config-property name="UserName"></config-property>
+ <config-property name="Password"></config-property>
+ <config-property name="ClientNumber"></config-property>
+ <config-property name="ServerName"></config-property>
+ <config-property name="SystemNumber"></config-property>
+ <config-property name="GatewayServerName"></config-property>
+ <config-property name="GatewayServiceNumber"></config-property>
+ <config-property name="SystemName"></config-property>
+ <config-property name="MessageServerName"></config-property>
+ <config-property name="GroupName"></config-property>
+ <config-property name="ConnectionURL"></config-property>
+ <xa-pool>
+ <min-pool-size>0</min-pool-size>
+ <max-pool-size>64</max-pool-size>
+ <recovery>
+ <recover-credential>
+ <user-name>myUserName</user-name>
+ <password>myPassword</password>
+ <security-domain>mySecurityDomain</security-domain>
+ </recover-credential>
+ <plugin class-name="myClassName">
+ <config-property name="MyProperty">MyPropertyValue</config-property>
+ </plugin>
+ </recovery>
+ </xa-pool>
+ <security>
+ <application />
+ </security>
+ <timeout>
+ <blocking-timeout-millis>5000</blocking-timeout-millis>
+ <idle-timeout-minutes>15</idle-timeout-minutes>
+ </timeout>
+ </connection-definition>
+ </connection-definitions>
+ <admin-objects>
+ <admin-object class-name="token" enabled="true" jndi-name="token" use-java-context="false">
+ <config-property name="token" />
+ </admin-object>
+ </admin-objects>
+ </resource-adapter>
+</resource-adapters>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list