[jboss-cvs] JBossAS SVN: r79338 - in projects/metadata/trunk/src: main/resources/dtd and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 10 05:46:24 EDT 2008
Author: jeff.zhang
Date: 2008-10-10 05:46:23 -0400 (Fri, 10 Oct 2008)
New Revision: 79338
Added:
projects/metadata/trunk/src/main/resources/dtd/jboss-ds_5_0.dtd
projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java
projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml
Modified:
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java
projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JbossRA10UnitTestCase.java
Log:
[JBMETA-114] add ds testcase and ds.dtd
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java 2008-10-10 09:29:39 UTC (rev 79337)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java 2008-10-10 09:46:23 UTC (rev 79338)
@@ -23,24 +23,32 @@
import java.io.Serializable;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
/**
* A ManagedConnectionFactoryDeploymentGroup.
*
* @author <a href="weston.price at jboss.org">Weston Price</a>
* @author Scott.Stark at jboss.org
* @author Jeff Zhang
- * @version $Revision: 1.1 $
+ * @version $Revision: $
*/
- at XmlAccessorType(XmlAccessType.NONE)
+ at XmlRootElement(name="datasources", namespace="")
+ at JBossXmlSchema(
+ xmlns={@XmlNs(namespaceURI = "", prefix = "")},
+ namespace="",
+ elementFormDefault=XmlNsForm.UNSET,
+ normalizeSpace=true)
+//@XmlType(name="datasources", namespace="")
public class ManagedConnectionFactoryDeploymentGroup implements Serializable
{
/** The serialVersionUID */
@@ -52,11 +60,11 @@
/** The deployments */
@XmlElements({@XmlElement(name="local-tx-datasource", type=LocalDataSourceDeploymentMetaData.class),
- @XmlElement(name="no-tx-datasource", type=NoTxDataSourceDeploymentMetaData.class),
- @XmlElement(name="xa-datasource", type=XADataSourceDeploymentMetaData.class),
- @XmlElement(name="no-tx-connection-factory", type=NoTxConnectionFactoryDeploymentMetaData.class),
- @XmlElement(name="tx-connection-factory",type=TxConnectionFactoryDeploymentMetaData.class)})
- private List<ManagedConnectionFactoryDeploymentMetaData> deployments = new ArrayList<ManagedConnectionFactoryDeploymentMetaData>();
+ @XmlElement(name="no-tx-datasource", type=NoTxDataSourceDeploymentMetaData.class),
+ @XmlElement(name="xa-datasource", type=XADataSourceDeploymentMetaData.class),
+ @XmlElement(name="no-tx-connection-factory", type=NoTxConnectionFactoryDeploymentMetaData.class),
+ @XmlElement(name="tx-connection-factory",type=TxConnectionFactoryDeploymentMetaData.class)})
+ private List<ManagedConnectionFactoryDeploymentMetaData> deployments;// = new ArrayList<ManagedConnectionFactoryDeploymentMetaData>();
//TODO ingore loaderRepositoryAdapter and ServiceMetaDataAdapter for avoiding package depends.
/** The services
@@ -69,6 +77,7 @@
@XmlJavaTypeAdapter(LoaderRepositoryAdapter.class)
private LoaderRepositoryConfig loaderRepositoryConfig;
*/
+
public void addManagedConnectionFactoryDeployment(ManagedConnectionFactoryDeploymentMetaData deployment)
{
this.deployments.add(deployment);
@@ -80,6 +89,15 @@
}
/**
+ * Set the deployments.
+ *
+ * @param deployments The deployments to set.
+ */
+ public void setDeployments(List<ManagedConnectionFactoryDeploymentMetaData> deployments)
+ {
+ this.deployments = deployments;
+ }
+ /**
* Get the fileUrl.
*
* @return the fileUrl.
@@ -99,14 +117,5 @@
this.fileUrl = fileUrl;
}
- /**
- * Set the deployments.
- *
- * @param deployments The deployments to set.
- */
- public void setDeployments(List<ManagedConnectionFactoryDeploymentMetaData> deployments)
- {
- this.deployments = deployments;
- }
}
Added: projects/metadata/trunk/src/main/resources/dtd/jboss-ds_5_0.dtd
===================================================================
--- projects/metadata/trunk/src/main/resources/dtd/jboss-ds_5_0.dtd (rev 0)
+++ projects/metadata/trunk/src/main/resources/dtd/jboss-ds_5_0.dtd 2008-10-10 09:46:23 UTC (rev 79338)
@@ -0,0 +1,500 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!-- DTD for the JCA 1.5 datasources and connection factory configurations (*-ds.xml) in JBoss-5.0.x,
+ transformed by ConnectionFactoryTemplate.xsl
+
+DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 5.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_5_0.dtd"
+
+DOCTYPE connection-factories
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 5.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_5_0.dtd"
+
+$Id: jboss-ds_5_0.dtd 76316 2008-07-28 17:24:52Z adrian at jboss.org $
+-->
+
+<!--
+The datasources element is the root of the jdbc datasource configuration
+-->
+<!ELEMENT datasources (loader-repository? , (mbean | local-tx-datasource | xa-datasource | no-tx-datasource |
+ ha-local-tx-datasource | ha-xa-datasource)*)>
+
+<!-- Specify a jca-jdbc non-XADatasource (local) wrapper, using no transactions
+-->
+<!ELEMENT no-tx-datasource (jndi-name , use-java-context?, connection-url ,
+url-delimiter?, url-selector-strategy-class-name?,
+driver-class , connection-property* , user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes? , idle-timeout-minutes?,
+validate-on-match?, new-connection-sql?, check-valid-connection-sql?, valid-connection-checker-class-name?,
+exception-sorter-class-name?, stale-connection-checker-class-name?, track-statements?,
+prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?, use-try-lock?,
+metadata?, type-mapping?, depends*)>
+
+<!-- Specify a jca-jdbc non-XADatasource (local) wrapper, using local
+transactions
+-->
+<!ELEMENT local-tx-datasource (jndi-name , use-java-context?, connection-url ,
+url-delimiter?, url-selector-strategy-class-name?,
+driver-class, transaction-isolation? , connection-property* , user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?,
+validate-on-match?, idle-timeout-minutes? ,
+no-tx-separate-pools? , new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , stale-connection-checker-class-name?, track-statements? ,
+prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?, use-try-lock?,
+metadata?, type-mapping?, depends*)>
+
+<!-- Specify a jca-jdbc XADatasource wrapper
+-->
+<!ELEMENT xa-datasource (jndi-name , use-java-context?, track-connection-by-tx?, interleaving?, xa-datasource-class,
+xa-datasource-property* , url-property?, url-delimiter?, url-selector-strategy-class-name?,
+isSameRM-override-value? , transaction-isolation? , user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes? , idle-timeout-minutes? ,
+validate-on-match?, no-tx-separate-pools? , xa-resource-timeout?, new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , stale-connection-checker-class-name?, track-statements? ,
+prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?, use-try-lock?,
+metadata?, type-mapping?, depends*)>
+
+<!-- The JNDI name under which the DataSource wrapper will be bound. Note that
+this name is relative to the "java:/" prefix unless use-java-context is false.
+Ex:
+<jndi-name>DefaultDS</jndi-name>
+-->
+<!ELEMENT jndi-name (#PCDATA)>
+
+<!-- Setting this to false will bind the DataSource into global jndi
+Ex:
+<use-java-context>false</use-java-context>
+-->
+<!ELEMENT use-java-context (#PCDATA)>
+
+<!-- The JDBC driver connection URL string
+Ex:
+<connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
+-->
+<!ELEMENT connection-url (#PCDATA)>
+
+<!-- The fully qualifed name of the JDBC driver class
+ Ex:
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+-->
+<!ELEMENT driver-class (#PCDATA)>
+
+<!-- Set java.sql.Connection transaction isolation level to use.
+The constants defined in the interface Connection are the possible transaction
+isolation levels and include:
+ TRANSACTION_READ_UNCOMMITTED
+ TRANSACTION_READ_COMMITTED
+ TRANSACTION_REPEATABLE_READ
+ TRANSACTION_SERIALIZABLE
+ TRANSACTION_NONE
+
+ Ex:
+ <transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isoation>
+-->
+<!ELEMENT transaction-isolation (#PCDATA)>
+
+<!-- Specify the default username used when creating a new connection.
+ Ex:
+ <user-name>sa</user-name>
+-->
+<!ELEMENT user-name (#PCDATA)>
+
+<!-- Specify the default password used when creating a new connection.
+ Ex:
+ <password>sa-pass</password>
+-->
+<!ELEMENT password (#PCDATA)>
+
+<!-- Indicates that app supplied parameters (such as from getConnection(user, pw))
+are used to distinguish connections in the pool.
+ Ex:
+ <application-managed-security/>
+-->
+<!ELEMENT application-managed-security EMPTY>
+
+<!-- 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>
+-->
+<!ELEMENT security-domain (#PCDATA)>
+
+<!-- Indicates that either app supplied parameters (such as from
+getConnection(user, pw)) or 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-and-application>HsqlDbRealm</security-domain-and-application>
+-->
+<!ELEMENT security-domain-and-application (#PCDATA)>
+
+<!-- Whether to use separete pools for connection retrieved in a transaction
+ and those retieved outside a transaction
+e.g.
+ <no-tx-separate-pools/>
+-->
+<!ELEMENT no-tx-separate-pools EMPTY>
+
+<!-- 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>
+-->
+<!ELEMENT min-pool-size (#PCDATA)>
+
+<!-- The max-pool-size element indicates the maximum number of connections for a
+pool. No more than MaxSize connections will be created in each sub-pool. This
+defaults to 20.
+-->
+<!ELEMENT max-pool-size (#PCDATA)>
+
+<!-- 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).
+-->
+<!ELEMENT blocking-timeout-millis (#PCDATA)>
+
+<!-- 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.
+-->
+<!ELEMENT idle-timeout-minutes (#PCDATA)>
+
+<!-- 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 -->
+
+<!ELEMENT validate-on-match (#PCDATA)>
+
+<!-- An element to specify that connections should be validated on a background thread versus being validated
+ prior to use-->
+<!ELEMENT background-validation (#PCDATA)>
+
+<!-- The background-validation-minutes element specifies the amount of time, in minutes, that background validation
+ will run. -->
+<!ELEMENT background-validation-minutes (#PCDATA)>
+
+<!-- An element to specify that all intermediate end(suspend) and
+start(resume) calls. Also, all work on one tx will go through one
+connection.
+A side effect of this (currently at least) is that a connection will only
+be usable by one tx until the tx commits.
+ Ex:
+ <track-connection-by-tx/>
+DEPRECATED: this element is now deprecated (it is assumed to present by default, also see <interleaving/>)
+-->
+<!ELEMENT track-connection-by-tx EMPTY>
+
+<!-- An element to enable interleaving for XA connection factories
+ Ex:
+ <interleaving/>
+-->
+<!ELEMENT interleaving EMPTY>
+
+<!-- The fully qualifed name of the javax.sql.XADataSource implementation class.
+ Ex:
+ <xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
+-->
+<!ELEMENT xa-datasource-class (#PCDATA)>
+
+<!-- Specify 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>
+-->
+<!ELEMENT xa-datasource-property (#PCDATA)>
+
+<!-- The xa-datasource-property name attribute specifies the name of the
+XADataSource attribute the xa-datasource-property element content provides
+the value of.
+-->
+<!ATTLIST xa-datasource-property name CDATA #REQUIRED>
+
+<!-- The isSameRM-override-value element allows one to unconditionally set
+whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns
+true or false.
+
+Ex:
+<isSameRM-override-value>true</isSameRM-override-value>
+-->
+<!ELEMENT isSameRM-override-value (#PCDATA)>
+
+<!-- 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>
+-->
+<!ELEMENT connection-property (#PCDATA)>
+
+<!-- The connection-property name attribute gives the name of the connection
+property.
+-->
+<!ATTLIST connection-property name CDATA #REQUIRED>
+
+<!-- Specify an SQL statement to execute whenever a connection is added to
+the connection pool.
+-->
+<!ELEMENT new-connection-sql (#PCDATA)>
+
+<!-- Specify an SQL statement to check validity of a pool connection. This
+may be called when managed connection is taken from pool for use.
+-->
+<!ELEMENT check-valid-connection-sql (#PCDATA)>
+
+<!-- An org.jboss.resource.adapter.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.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
+</exception-sorter-class-name>
+-->
+<!ELEMENT valid-connection-checker-class-name (#PCDATA)>
+
+<!-- An org.jboss.resource.adapter.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.resource.adapter.jdbc.vendor.OracleExceptionSorter
+</exception-sorter-class-name>
+<exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
+</exception-sorter-class-name>
+-->
+<!ELEMENT exception-sorter-class-name (#PCDATA)>
+
+<!-- An org.jboss.resource.adapter.jdbc.StaleConnectionChecker that provides
+a boolean isStaleConnection(SQLException e) method which if it it returns
+true will wrap the exception in an
+org.jboss.resource.adapter.jdbc.StaleConnectionException
+which is a subclass of SQLException.
+
+Ex:
+<stale-connection-checker-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.OracleStaleConnectionChecker
+</stale-connection-checker-class-name>
+-->
+<!ELEMENT stale-connection-checker-class-name (#PCDATA)>
+
+<!-- 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>
+-->
+<!ELEMENT track-statements EMPTY>
+
+<!-- Whether to attempt to prefill the connection pool. Empty element denotes a false value.
+ e.g.
+ <prefill>true</prefill>
+ -->
+<!ELEMENT prefill (#PCDATA) >
+
+<!-- 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>
+ -->
+<!ELEMENT use-fast-fail (#PCDATA) >
+
+<!-- The number of prepared statements per connection in an LRU cache
+-->
+<!ELEMENT prepared-statement-cache-size (#PCDATA)>
+
+<!-- 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/>
+-->
+<!ELEMENT share-prepared-statements EMPTY>
+
+<!-- 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/>
+-->
+<!ELEMENT set-tx-query-timeout EMPTY>
+
+<!-- Any configured query timeout in seconds
+
+ The default is no timeout
+ e.g. 5 minutes
+ <query-timeout>300</query-timeout>
+-->
+<!ELEMENT query-timeout (#PCDATA)>
+
+<!-- Any configured timeout for internal locks on the resource adapter objects in milli-seconds
+
+ The default is a 60 second timeout
+ e.g. 5 minutes
+ <use-try-lock>300000</use-try-lock>
+-->
+<!ELEMENT use-try-lock (#PCDATA)>
+
+<!-- The depends element specifies the JMX ObjectName string of a service
+that the connection manager services depend on.
+
+ Ex:
+ <depends>jboss:service=Hypersonic</depends>
+-->
+<!ELEMENT depends (#PCDATA)>
+
+<!-- The connection-factories element is the root of the generic jca adaptor section
+-->
+<!ELEMENT connection-factories (loader-repository? , (mbean | tx-connection-factory | no-tx-connection-factory)*)>
+
+<!-- The loader repository -->
+<!ELEMENT loader-repository ANY>
+
+<!-- Any embedded mbean -->
+<!ELEMENT mbean ANY>
+
+<!-- The tx-connection-factory element is used to configure generic resource
+adapters supporting transactions
+-->
+<!ELEMENT tx-connection-factory (jndi-name , (local-transaction | xa-transaction) ,
+track-connection-by-tx? , rar-name?, connection-definition?, config-property* ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes? , idle-timeout-minutes? ,
+no-tx-separate-pools?, prefill?, use-fast-fail?, xa-resource-timeout?,
+metadata?, type-mapping?, depends*)>
+
+<!-- The no-tx-connection-factory element is used to configure generic resource
+adapters that do not support transactions
+-->
+<!ELEMENT no-tx-connection-factory (jndi-name , rar-name?, connection-definition? , config-property* ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes? , idle-timeout-minutes? ,
+prefill?, use-fast-fail?, metadata?, type-mapping?, depends*)>
+
+<!-- The rar deployment to associate with the connection manager mbean.
+e.g. jms-ra.rar or myapplication.ear#my.rar for nested rars
+-->
+<!ELEMENT rar-name (#PCDATA)>
+
+<!-- The connection definition inside the rar deployment uniquely identified by the
+connection factory interface, e.g. javax.sql.DataSource
+-->
+<!ELEMENT connection-definition (#PCDATA)>
+
+<!-- Passed to XAResource.setTransactionTimeout()
+
+ Default is zero which does not invoke the setter
+ e.g. 5 minutes
+ <xa-resource-timeout>300</xa-resource-timeout>
+-->
+<!ELEMENT xa-resource-timeout (#PCDATA)>
+
+<!-- The xa-transaction element is used to mark that the tx-connection-factory
+supports XA transactions.
+-->
+<!ELEMENT xa-transaction EMPTY>
+
+<!-- The local-transaction element is used to mark that the tx-connection-factory
+supports local transactions.
+-->
+<!ELEMENT local-transaction EMPTY>
+
+<!-- The config-property specifies a mannaged connection factory property.
+-->
+<!ELEMENT config-property (#PCDATA)>
+
+<!-- The config-property name attribute gives the name of the connection
+factory property.
+-->
+<!ATTLIST config-property name CDATA #REQUIRED>
+
+<!-- The config-property type attribute gives the name of the connection
+factory property.
+-->
+<!ATTLIST config-property type CDATA #REQUIRED>
+
+<!-- The type mapping from conf/standardjboss.xml -->
+<!ELEMENT type-mapping (#PCDATA)>
+
+<!-- For backwards compatibility use type-mapping -->
+<!ELEMENT metadata (type-mapping)>
+
+<!--
+Use local-tx-datasource
+-->
+<!ELEMENT ha-local-tx-datasource (jndi-name, use-java-context?, connection-url, url-delimiter,
+driver-class, transaction-isolation? , connection-property* , user-name? , password?,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , idle-timeout-minutes? ,
+no-tx-separate-pools? , new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , track-statements? ,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?, use-try-lock?,
+metadata?, type-mapping?, depends*)>
+
+<!--
+Use xa-datasource
+-->
+<!ELEMENT ha-xa-datasource (jndi-name , use-java-context?, track-connection-by-tx , xa-datasource-class ,
+xa-datasource-property* , url-property, url-delimiter, isSameRM-override-value? , transaction-isolation? ,
+user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , idle-timeout-minutes? ,
+no-tx-separate-pools? , xa-resource-timeout? ,
+new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , track-statements? ,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?, use-try-lock?,
+type-mapping?, depends*)>
+
+<!-- Specifies the delimeter for URLs in connection-url for ha datasources
+-->
+<!ELEMENT url-delimiter (#PCDATA)>
+
+<!-- A class that implements org.jboss.resource.adapter.jdbc.URLSelectorStrategy
+-->
+<!ELEMENT url-selector-strategy-class-name (#PCDATA)>
+
+<!-- For HA XA datasource specifies the name of an xa-datasource-property that contains a list of URLs
+-->
+<!ELEMENT url-property (#PCDATA)>
Modified: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JbossRA10UnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JbossRA10UnitTestCase.java 2008-10-10 09:29:39 UTC (rev 79337)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JbossRA10UnitTestCase.java 2008-10-10 09:46:23 UTC (rev 79338)
@@ -1,3 +1,24 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.metadata.rar;
import org.jboss.metadata.rar.jboss.JBossRAMetaData;
Added: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java (rev 0)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/rar/JcaDs50UnitTestCase.java 2008-10-10 09:46:23 UTC (rev 79338)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.metadata.rar;
+
+import org.jboss.metadata.rar.jboss.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.test.metadata.javaee.AbstractJavaEEMetaDataTest;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+
+public class JcaDs50UnitTestCase extends AbstractJavaEEMetaDataTest
+{
+ public static SchemaBindingResolver initResolver()
+ {
+ DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+ //resolver.addClassBinding("", ManagedConnectionFactoryDeploymentGroup.class);
+ resolver.addClassBindingForLocation("jboss-ds_5_0.dtd", ManagedConnectionFactoryDeploymentGroup.class);
+ return resolver;
+ }
+
+ public JcaDs50UnitTestCase(String name) {
+ super(name);
+ }
+
+
+ public void testBasic() throws Exception
+ {
+ //TODO DTD test case fail
+ //ManagedConnectionFactoryDeploymentGroup ds = unmarshal(ManagedConnectionFactoryDeploymentGroup.class);
+ //assertNotNull(ds);
+
+ }
+
+}
+
Added: projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml (rev 0)
+++ projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/rar/JcaDs50_testBasic.xml 2008-10-10 09:46:23 UTC (rev 79338)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources PUBLIC
+"-//JBoss//DTD JBOSS JCA Config 5.0//EN"
+"http://www.jboss.org/j2ee/dtd/jboss-ds_5_0.dtd">
+
+<datasources>
+ <local-tx-datasource>
+
+ <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+ <!-- Datasources are not available outside the virtual machine -->
+ <jndi-name>DefaultDS</jndi-name>
+
+ <!-- For server mode db, allowing other processes to use hsqldb over tcp.
+ This requires the org.jboss.jdbc.HypersonicDatabase mbean.
+ <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
+ -->
+ <!-- For totally in-memory db, not saved when jboss stops.
+ The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ -->
+ <!-- For in-process persistent db, saved when jboss stops.
+ The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+ -->
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+
+ <!-- The driver class -->
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+ <!-- The login and password -->
+ <user-name>sa</user-name>
+ <password></password>
+
+ <!--example of how to specify class that determines if exception means connection should be destroyed-->
+ <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+ <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+ <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+ <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+ <min-pool-size>5</min-pool-size>
+
+ <!-- The maximum connections in a pool/sub-pool -->
+ <max-pool-size>20</max-pool-size>
+
+ <!-- The time before an unused connection is destroyed -->
+ <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+ <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+
+ <!-- sql to call when connection is created
+ <new-connection-sql>some arbitrary sql</new-connection-sql>
+ -->
+
+ <!-- sql to call on an existing pooled connection when it is obtained from pool
+ <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+ -->
+
+ <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+ <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+ -->
+
+ <!-- Whether to check all statements are closed when the connection is returned to the pool,
+ this is a debugging feature that should be turned off in production -->
+ <track-statements/>
+
+ <!-- Use the getConnection(user, pw) for logins
+ <application-managed-security/>
+ -->
+
+ <!-- Use the security domain defined in conf/login-config.xml -->
+ <security-domain>HsqlDbRealm</security-domain>
+
+ <!-- Use the security domain defined in conf/login-config.xml or the
+ getConnection(user, pw) for logins. The security domain takes precedence.
+ <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+ -->
+
+ <!-- HSQL DB benefits from prepared statement caching -->
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Hypersonic SQL</type-mapping>
+ </metadata>
+
+ <!-- When using in-process (standalone) mode -->
+ <depends>jboss:service=Hypersonic,database=localDB</depends>
+ <!-- Uncomment when using hsqldb in server mode
+ <depends>jboss:service=Hypersonic</depends>
+ -->
+ </local-tx-datasource>
+
+</datasources>
More information about the jboss-cvs-commits
mailing list