[jboss-cvs] JBossAS SVN: r90826 - in projects/metadata/rar/trunk/src: main/java/org/jboss/metadata/rar/spec and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 6 03:47:32 EDT 2009
Author: jeff.zhang
Date: 2009-07-06 03:47:31 -0400 (Mon, 06 Jul 2009)
New Revision: 90826
Added:
projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/jboss/JBossRA10MetaData.java
projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA15DTDMetaData.java
projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA16DTDMetaData.java
projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA15DTDUnitTestCase.java
projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA16DTDUnitTestCase.java
projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA15DTD_testEverything.xml
projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA16DTD_testEverything.xml
Modified:
projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_5.dtd
projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_6.dtd
projects/metadata/rar/trunk/src/test/resources/schema2class.properties
Log:
[JBMETA-213] update dtd files and add testcase
Added: projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/jboss/JBossRA10MetaData.java
===================================================================
--- projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/jboss/JBossRA10MetaData.java (rev 0)
+++ projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/jboss/JBossRA10MetaData.java 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.metadata.rar.jboss;
+
+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 JBossRA10MetaData.
+ *
+ * @author Jeff Zhang
+ * @version $Revision:$
+ */
+ at XmlRootElement(name="jboss-ra", namespace="http://www.jboss.org/schema/ra")
+ at JBossXmlSchema(
+ xmlns={@XmlNs(namespaceURI = "http://www.jboss.org/schema/ra", prefix = "ra")},
+ ignoreUnresolvedFieldOrClass=false,
+ namespace="http://www.jboss.org/schema/ra",
+ elementFormDefault=XmlNsForm.QUALIFIED,
+ normalizeSpace=true)
+public class JBossRA10MetaData extends JBossRAMetaData
+{
+
+}
+
+
Property changes on: projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/jboss/JBossRA10MetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA15DTDMetaData.java
===================================================================
--- projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA15DTDMetaData.java (rev 0)
+++ projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA15DTDMetaData.java 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.metadata.rar.spec;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.metadata.javaee.spec.JavaEEMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * Connector default namespace meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision:$
+ */
+ at XmlRootElement(name="connector")
+ at JBossXmlSchema(
+ ignoreUnresolvedFieldOrClass=false,
+ elementFormDefault=XmlNsForm.QUALIFIED,
+ normalizeSpace=true,
+ strict=false)
+ at XmlType(name="connectorType", propOrder={"descriptionGroup", "vendorName", "EISType", "RAVersion", "license", "ra"})
+public class JCA15DTDMetaData extends ConnectorMetaData
+{
+ private static final long serialVersionUID = 7047138842344140262L;
+}
Property changes on: projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA15DTDMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA16DTDMetaData.java
===================================================================
--- projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA16DTDMetaData.java (rev 0)
+++ projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA16DTDMetaData.java 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,78 @@
+/*
+ * 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.metadata.rar.spec;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.metadata.javaee.spec.JavaEEMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * Connector default namespace meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision:$
+ */
+ at XmlRootElement(name="connector")
+ at JBossXmlSchema(
+ ignoreUnresolvedFieldOrClass=false,
+ elementFormDefault=XmlNsForm.QUALIFIED,
+ normalizeSpace=true,
+ strict=false)
+ at XmlType(name="connectorType", propOrder={"descriptionGroup", "vendorName", "EISType", "RAVersion", "license", "ra", "requiredWorkContexts"})
+public class JCA16DTDMetaData extends ConnectorMetaData
+{
+ private static final long serialVersionUID = 7047130842344140262L;
+
+ private boolean metadataComplete;
+ private List<String> requiredWorkContexts;
+
+
+ public boolean isMetadataComplete()
+ {
+ return metadataComplete;
+ }
+
+ @XmlAttribute(required=true)
+ public void setMetadataComplete(boolean metadataComplete)
+ {
+ this.metadataComplete = metadataComplete;
+ }
+
+ public List<String> getRequiredWorkContexts()
+ {
+ return requiredWorkContexts;
+ }
+
+ @XmlElement(name = "required-work-context")
+ public void setRequiredWorkContexts(List<String> requiredWorkContexts)
+ {
+ this.requiredWorkContexts = requiredWorkContexts;
+ }
+}
Property changes on: projects/metadata/rar/trunk/src/main/java/org/jboss/metadata/rar/spec/JCA16DTDMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Modified: projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_5.dtd
===================================================================
--- projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_5.dtd 2009-07-06 07:20:02 UTC (rev 90825)
+++ projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_5.dtd 2009-07-06 07:47:31 UTC (rev 90826)
@@ -73,10 +73,21 @@
implementation of the resource adapter library as specified through
the element resourceadapter.
-->
-<!ELEMENT connector (display-name?, description?, icon?, vendor-name,
-spec-version, eis-type, version, license?, resourceadapter)>
+<!ELEMENT connector (description*, display-name*, icon*, vendor-name,
+eis-type, resourceadapter-version, license?, resourceadapter)>
<!--
+The attribute version specifies the version of the connector
+architecture specification that is supported by this resource
+adapter. This information enables deployer to configure the resource
+adapter to support deployment and runtime requirements of the
+corresponding connector architecture specification.
+
+Used in: connector
+-->
+<!ATTLIST connector version NMTOKEN #REQUIRED >
+
+<!--
The element activationspec specifies an activation specification.
The information includes fully qualified Java class name of an activation
specification and a set of required configuration property names.
@@ -147,7 +158,7 @@
Used in: outbound-resourceadapter
-->
<!ELEMENT authentication-mechanism (
-description?, authentication-mechanism-type, credential-interface)>
+description*, authentication-mechanism-type, credential-interface)>
<!--
The element authentication-mechanism-type specifies type of an authentication
@@ -181,7 +192,7 @@
Used in: adminobject, connection-definition, resourceadapter
-->
-<!ELEMENT config-property (description?, config-property-name,
+<!ELEMENT config-property (description*, config-property-name,
config-property-type, config-property-value?)>
<!--
@@ -326,6 +337,7 @@
required-config-property, security-permission
-->
<!ELEMENT description (#PCDATA)>
+<!ATTLIST description xml:lang NMTOKEN #IMPLIED >
<!--
The display-name element contains a short name that is intended to be
@@ -338,6 +350,7 @@
<display-name>Employee Self Service</display-name>
-->
<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name xml:lang NMTOKEN #IMPLIED >
<!--
The element eis-type contains information about the type of the
@@ -359,6 +372,7 @@
Used in: connector
-->
<!ELEMENT icon (small-icon?, large-icon?)>
+<!ATTLIST icon xml:lang NMTOKEN #IMPLIED >
<!--
The element inbound-resourceadapter specifies information about an inbound
@@ -396,7 +410,7 @@
Used in: connector
-->
-<!ELEMENT license (description?, license-required)>
+<!ELEMENT license (description*, license-required)>
<!--
The element license-required specifies whether a license is required
@@ -475,7 +489,7 @@
-->
<!ELEMENT outbound-resourceadapter (
connection-definition+, transaction-support,
-authentication-mechanism*, reauthentication-support, security-permission*)>
+authentication-mechanism*, reauthentication-support)>
<!--
The element reauthentication-support specifies whether the resource
@@ -500,7 +514,7 @@
Example: <required-config-property>Destination
</required-config-property>
-->
-<!ELEMENT required-config-property (description?, config-property-name)>
+<!ELEMENT required-config-property (description*, config-property-name)>
<!--
The element resourceadapter specifies information about the resource
@@ -513,7 +527,7 @@
Used in: connector
-->
<!ELEMENT resourceadapter (resourceadapter-class?, config-property*,
-outbound-resourceadapter?, inbound-resourceadapter?, adminobject*)>
+outbound-resourceadapter?, inbound-resourceadapter?, adminobject*, security-permission*)>
<!--
The element resourceadapter-class specifies the fully qualified
@@ -542,7 +556,7 @@
Used in: outbound-resourceadapter
-->
-<!ELEMENT security-permission (description?, security-permission-spec)>
+<!ELEMENT security-permission (description*, security-permission-spec)>
<!--
The element permission-spec specifies a security permission based
@@ -573,20 +587,6 @@
<!ELEMENT small-icon (#PCDATA)>
<!--
-The element spec-version specifies the version of the connector
-architecture specification that is supported by this resource
-adapter. This information enables deployer to configure the resource
-adapter to support deployment and runtime requirements of the
-corresponding connector architecture specification.
-
-Used in: connector
-
-Example:
- <spec-version>1.5</spec-version>
--->
-<!ELEMENT spec-version (#PCDATA)>
-
-<!--
The transaction-support element specifies the level of transaction
support provided by the resource adapter.
The value of transaction-support must be one of the following:
@@ -610,15 +610,15 @@
<!ELEMENT vendor-name (#PCDATA)>
<!--
-The element version specifies a string-based version of the
+The element resourceadapter-version specifies a string-based version of the
resource adapter from the resource adapter provider.
Used in: connector
Example:
- <version>1.5</version>
+ <resourceadapter-version>1.5</resourceadapter-version>
-->
-<!ELEMENT version (#PCDATA)>
+<!ELEMENT resourceadapter-version (#PCDATA)>
<!--
The ID mechanism is to allow tools that produce additional deployment
@@ -672,4 +672,5 @@
<!ATTLIST spec-version id ID #IMPLIED>
<!ATTLIST transaction-support id ID #IMPLIED>
<!ATTLIST vendor-name id ID #IMPLIED>
-<!ATTLIST version id ID #IMPLIED>
+
+
Modified: projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_6.dtd
===================================================================
--- projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_6.dtd 2009-07-06 07:20:02 UTC (rev 90825)
+++ projects/metadata/rar/trunk/src/main/resources/dtd/connector_1_6.dtd 2009-07-06 07:47:31 UTC (rev 90826)
@@ -73,11 +73,22 @@
implementation of the resource adapter library as specified through
the element resourceadapter.
-->
-<!ELEMENT connector (display-name?, description?, icon?, vendor-name,
-spec-version, eis-type, version, license?, required-inflow-context*,
-resourceadapter, metadata-complete?)>
+<!ELEMENT connector (description*, display-name*, icon*, vendor-name,
+eis-type, resourceadapter-version, license?,
+resourceadapter, required-work-context*)>
<!--
+The attribute version specifies the version of the connector
+architecture specification that is supported by this resource
+adapter. This information enables deployer to configure the resource
+adapter to support deployment and runtime requirements of the
+corresponding connector architecture specification.
+
+Used in: connector
+-->
+<!ATTLIST connector version NMTOKEN #REQUIRED >
+<!ATTLIST connector metadata-complete CDATA #IMPLIED >
+<!--
The element activationspec specifies an activation specification.
The information includes fully qualified Java class name of an activation
specification and a set of required configuration property names.
@@ -149,7 +160,7 @@
Used in: outbound-resourceadapter
-->
<!ELEMENT authentication-mechanism (
-description?, authentication-mechanism-type, credential-interface)>
+description*, authentication-mechanism-type, credential-interface)>
<!--
The element authentication-mechanism-type specifies type of an authentication
@@ -183,7 +194,7 @@
Used in: activationspec, adminobject, connection-definition, resourceadapter
-->
-<!ELEMENT config-property (description?, config-property-name,
+<!ELEMENT config-property (description*, config-property-name,
config-property-type, config-property-value?, config-property-ignore?)>
<!--
@@ -342,6 +353,7 @@
required-config-property, security-permission
-->
<!ELEMENT description (#PCDATA)>
+<!ATTLIST description xml:lang NMTOKEN #IMPLIED >
<!--
The display-name element contains a short name that is intended to be
@@ -354,6 +366,7 @@
<display-name>Employee Self Service</display-name>
-->
<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name xml:lang NMTOKEN #IMPLIED >
<!--
The element eis-type contains information about the type of the
@@ -375,6 +388,7 @@
Used in: connector
-->
<!ELEMENT icon (small-icon?, large-icon?)>
+<!ATTLIST icon xml:lang NMTOKEN #IMPLIED >
<!--
The element inbound-resourceadapter specifies information about an inbound
@@ -412,7 +426,7 @@
Used in: connector
-->
-<!ELEMENT license (description?, license-required)>
+<!ELEMENT license (description*, license-required)>
<!--
The element license-required specifies whether a license is required
@@ -517,7 +531,7 @@
-->
<!ELEMENT outbound-resourceadapter (
connection-definition+, transaction-support,
-authentication-mechanism*, reauthentication-support, security-permission*)>
+authentication-mechanism*, reauthentication-support)>
<!--
The element reauthentication-support specifies whether the resource
@@ -549,7 +563,7 @@
Example: <required-config-property>Destination
</required-config-property>
-->
-<!ELEMENT required-config-property (description?, config-property-name)>
+<!ELEMENT required-config-property (description*, config-property-name)>
<!--
The element resourceadapter specifies information about the resource
@@ -562,7 +576,7 @@
Used in: connector
-->
<!ELEMENT resourceadapter (resourceadapter-class?, config-property*,
-outbound-resourceadapter?, inbound-resourceadapter?, adminobject*)>
+outbound-resourceadapter?, inbound-resourceadapter?, adminobject*, security-permission*)>
<!--
The element resourceadapter-class specifies the fully qualified
@@ -591,7 +605,7 @@
Used in: outbound-resourceadapter
-->
-<!ELEMENT security-permission (description?, security-permission-spec)>
+<!ELEMENT security-permission (description*, security-permission-spec)>
<!--
The element permission-spec specifies a security permission based
@@ -622,20 +636,6 @@
<!ELEMENT small-icon (#PCDATA)>
<!--
-The element spec-version specifies the version of the connector
-architecture specification that is supported by this resource
-adapter. This information enables deployer to configure the resource
-adapter to support deployment and runtime requirements of the
-corresponding connector architecture specification.
-
-Used in: connector
-
-Example:
- <spec-version>1.5</spec-version>
--->
-<!ELEMENT spec-version (#PCDATA)>
-
-<!--
The transaction-support element specifies the level of transaction
support provided by the resource adapter.
The value of transaction-support must be one of the following:
@@ -659,24 +659,24 @@
<!ELEMENT vendor-name (#PCDATA)>
<!--
-The element version specifies a string-based version of the
+The element resourceadapter-version specifies a string-based version of the
resource adapter from the resource adapter provider.
Used in: connector
Example:
- <version>1.5</version>
+ <resourceadapter-version>1.5</resourceadapter-version>
-->
-<!ELEMENT version (#PCDATA)>
+<!ELEMENT resourceadapter-version (#PCDATA)>
<!--
-The element required-inflow-contexts specifies a comma-separated
-list of fully qualified class names that implements the InflowContext
+The element required-work-context specifies a comma-separated
+list of fully qualified class names that implements the WorkContext
interface that a resource adapter requires the application server to support.
Used in: connector
-->
-<!ELEMENT required-inflow-contexts (#PCDATA)>
+<!ELEMENT required-work-context (#PCDATA)>
<!--
The ID mechanism is to allow tools that produce additional deployment
@@ -730,4 +730,3 @@
<!ATTLIST spec-version id ID #IMPLIED>
<!ATTLIST transaction-support id ID #IMPLIED>
<!ATTLIST vendor-name id ID #IMPLIED>
-<!ATTLIST version id ID #IMPLIED>
Added: projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA15DTDUnitTestCase.java
===================================================================
--- projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA15DTDUnitTestCase.java (rev 0)
+++ projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA15DTDUnitTestCase.java 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,80 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.spec.ActivationspecMetaData;
+import org.jboss.metadata.rar.spec.ConnectorMetaData;
+import org.jboss.metadata.rar.spec.JCA15DTDMetaData;
+import org.jboss.test.metadata.common.MetaDataSchemaResolverFactory;
+import org.jboss.xb.binding.resolver.MutableSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+
+/**
+ * Test ResourceAdapter ra.xml metadata.
+ *
+ * @author Jeff Zhang
+ * @version $Revision: 88255 $
+ */
+public class RA15DTDUnitTestCase extends BaseRAUnitTestCase
+{
+ /*
+ public static SchemaBindingResolver initResolver()
+ {
+ MutableSchemaResolver resolver = MetaDataSchemaResolverFactory.createSchemaResolver();
+ resolver.mapLocationToClass("connector_1_5.dtd", JCA15DTDMetaData.class);
+ return resolver;
+ }
+*/
+ public RA15DTDUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testEverything() throws Exception
+ {
+ ConnectorMetaData connector = unmarshal();
+ assertNotNull(connector);
+ assertEverything(connector);
+ }
+
+ protected ConnectorMetaData unmarshal() throws Exception
+ {
+ return unmarshal(ConnectorMetaData.class);
+ }
+
+ protected void assertEverything(ConnectorMetaData connector) throws Exception
+ {
+ assertDescriptionGroup("connector", connector.getDescriptionGroup());
+ assertGeneralInfo(connector);
+ assertRA(connector.getRa());
+ }
+ @Override
+ protected String getRAVersion()
+ {
+ return "5.0";
+ }
+ @Override
+ protected void assertConfigPropsInAS(ActivationspecMetaData as)
+ {
+ }
+}
Property changes on: projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA15DTDUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA16DTDUnitTestCase.java
===================================================================
--- projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA16DTDUnitTestCase.java (rev 0)
+++ projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA16DTDUnitTestCase.java 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.spec.ActivationspecMetaData;
+import org.jboss.metadata.rar.spec.JCA16DTDMetaData;
+
+/**
+ * Test ResourceAdapter ra.xml metadata.
+ *
+ * @author Jeff Zhang
+ * @version $Revision: 89782 $
+ */
+public class RA16DTDUnitTestCase extends BaseRAUnitTestCase
+{
+ public RA16DTDUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testEverything() throws Exception
+ {
+ JCA16DTDMetaData connector = unmarshal();
+ assertNotNull(connector);
+ assertEverything(connector);
+ }
+
+ protected JCA16DTDMetaData unmarshal() throws Exception
+ {
+ return unmarshal(JCA16DTDMetaData.class);
+ }
+
+ protected void assertEverything(JCA16DTDMetaData connector) throws Exception
+ {
+ assertDescriptionGroup("connector", connector.getDescriptionGroup());
+ assertGeneralInfo(connector);
+ assertTrue(connector.isMetadataComplete());
+ assertRA(connector.getRa());
+ assertEquals(connector.getRequiredWorkContexts().size(), 2);
+ assertEquals(connector.getRequiredWorkContexts().get(0), "java.work.Context1");
+ }
+
+ @Override
+ protected String getRAVersion()
+ {
+ return "6.0";
+ }
+
+ @Override
+ protected void assertConfigPropsInAS(ActivationspecMetaData as)
+ {
+ assertNotNull(as.getConfigProps());
+ assertFalse(as.getConfigProps().isEmpty());
+ }
+
+}
Property changes on: projects/metadata/rar/trunk/src/test/java/org/jboss/test/metadata/rar/RA16DTDUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA15DTD_testEverything.xml
===================================================================
--- projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA15DTD_testEverything.xml (rev 0)
+++ projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA15DTD_testEverything.xml 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
+
+<!DOCTYPE connector PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Connector 1.5//EN"
+ "http://java.sun.com/dtd/connector_1_5.dtd">
+
+<connector version="1.5">
+
+ <!-- description group -->
+ <description>en-connector-desc</description>
+ <description xml:lang="fr">fr-connector-desc</description>
+ <description xml:lang="de">de-connector-desc</description>
+ <display-name>en-connector-disp</display-name>
+ <display-name xml:lang="fr">fr-connector-disp</display-name>
+ <display-name xml:lang="de">de-connector-disp</display-name>
+
+ <icon id="en-connector-icon-id">
+ <small-icon>en-connector-small-icon</small-icon>
+ <large-icon>en-connector-large-icon</large-icon>
+ </icon>
+ <icon xml:lang="fr" id="fr-connector-icon-id">
+ <small-icon>fr-connector-small-icon</small-icon>
+ <large-icon>fr-connector-large-icon</large-icon>
+ </icon>
+ <icon xml:lang="de" id="de-connector-icon-id">
+ <small-icon>de-connector-small-icon</small-icon>
+ <large-icon>de-connector-large-icon</large-icon>
+ </icon>
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>JMS 1.1 Server</eis-type>
+ <resourceadapter-version>5.0</resourceadapter-version>
+
+ <license>
+ <description>
+ JBoss, Home of Professional Open Source.
+ Copyright 2006, 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.
+ </description>
+ <license-required>true</license-required>
+ </license>
+
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.resource.adapter.jms.JmsResourceAdapter</resourceadapter-class>
+
+ <config-property>
+ <description>Log level</description>
+ <config-property-name>logLevel</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>DEBUG</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.resource.adapter.jms.JmsManagedConnectionFactory</managedconnectionfactory-class>
+ <config-property>
+ <description>The jndi name of the provider of connection factories</description>
+ <config-property-name>JmsProviderAdapterJNDI</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>java:DefaultJMSProvider</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The default session type</description>
+ <config-property-name>SessionDefaultType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>javax.jms.Topic</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The user name used to login to the jms server</description>
+ <config-property-name>UserName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The password used to login to the jms server</description>
+ <config-property-name>Password</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The client id for this connection factory</description>
+ <config-property-name>ClientID</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <config-property-name>Strict</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value>true</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Maximum wait for a lock</description>
+ <config-property-name>UseTryLock</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ </config-property>
+ <connectionfactory-interface>org.jboss.resource.adapter.jms.JmsConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.jboss.resource.adapter.jms.JmsSession</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <authentication-mechanism id="amid">
+ <description>authentication-mechanism</description>
+ <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+ <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+ <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+ <activationspec>
+ <activationspec-class>org.jboss.resource.adapter.jms.inflow.JmsActivationSpec</activationspec-class>
+ <required-config-property>
+ <config-property-name>destination</config-property-name>
+ </required-config-property>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
+
+ <adminobject id="aoid">
+ <adminobject-interface>org.jboss.test.jca.adminobject.TestInterface</adminobject-interface>
+ <adminobject-class>org.jboss.test.jca.adminobject.TestImplementation</adminobject-class>
+ <config-property>
+ <config-property-name>StringProperty</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ </config-property>
+ <config-property>
+ <config-property-name>IntegerProperty</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ </config-property>
+ </adminobject>
+ <security-permission>
+ <description></description>
+ <security-permission-spec>sa</security-permission-spec>
+ </security-permission>
+ </resourceadapter>
+</connector>
Property changes on: projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA15DTD_testEverything.xml
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Added: projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA16DTD_testEverything.xml
===================================================================
--- projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA16DTD_testEverything.xml (rev 0)
+++ projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA16DTD_testEverything.xml 2009-07-06 07:47:31 UTC (rev 90826)
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
+
+<!DOCTYPE connector PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Connector 1.6//EN"
+ "http://java.sun.com/dtd/connector_1_6.dtd">
+
+<connector version="1.6" metadata-complete="true">
+
+ <!-- description group -->
+ <description>en-connector-desc</description>
+ <description xml:lang="fr">fr-connector-desc</description>
+ <description xml:lang="de">de-connector-desc</description>
+ <display-name>en-connector-disp</display-name>
+ <display-name xml:lang="fr">fr-connector-disp</display-name>
+ <display-name xml:lang="de">de-connector-disp</display-name>
+ <icon id="en-connector-icon-id">
+ <small-icon>en-connector-small-icon</small-icon>
+ <large-icon>en-connector-large-icon</large-icon>
+ </icon>
+ <icon xml:lang="fr" id="fr-connector-icon-id">
+ <small-icon>fr-connector-small-icon</small-icon>
+ <large-icon>fr-connector-large-icon</large-icon>
+ </icon>
+ <icon xml:lang="de" id="de-connector-icon-id">
+ <small-icon>de-connector-small-icon</small-icon>
+ <large-icon>de-connector-large-icon</large-icon>
+ </icon>
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>JMS 1.1 Server</eis-type>
+ <resourceadapter-version>6.0</resourceadapter-version>
+
+ <license>
+ <description>
+ JBoss, Home of Professional Open Source.
+ Copyright 2006, 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.
+ </description>
+ <license-required>true</license-required>
+ </license>
+
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.resource.adapter.jms.JmsResourceAdapter</resourceadapter-class>
+
+ <config-property>
+ <description>Log level</description>
+ <config-property-name>logLevel</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>DEBUG</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.resource.adapter.jms.JmsManagedConnectionFactory</managedconnectionfactory-class>
+ <config-property>
+ <description>The jndi name of the provider of connection factories</description>
+ <config-property-name>JmsProviderAdapterJNDI</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>java:DefaultJMSProvider</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The default session type</description>
+ <config-property-name>SessionDefaultType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>javax.jms.Topic</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The user name used to login to the jms server</description>
+ <config-property-name>UserName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The password used to login to the jms server</description>
+ <config-property-name>Password</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The client id for this connection factory</description>
+ <config-property-name>ClientID</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <config-property-name>Strict</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value>true</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Maximum wait for a lock</description>
+ <config-property-name>UseTryLock</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ </config-property>
+ <connectionfactory-interface>org.jboss.resource.adapter.jms.JmsConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.jboss.resource.adapter.jms.JmsSession</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <authentication-mechanism id="amid">
+ <description>authentication-mechanism</description>
+ <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+ <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+ <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+ <activationspec>
+ <activationspec-class>org.jboss.resource.adapter.jms.inflow.JmsActivationSpec</activationspec-class>
+ <required-config-property>
+ <config-property-name>destination</config-property-name>
+ </required-config-property>
+ <config-property>
+ <config-property-name>StringProperty</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ </config-property>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
+
+ <adminobject id="aoid">
+ <adminobject-interface>org.jboss.test.jca.adminobject.TestInterface</adminobject-interface>
+ <adminobject-class>org.jboss.test.jca.adminobject.TestImplementation</adminobject-class>
+ <config-property>
+ <config-property-name>StringProperty</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ </config-property>
+ <config-property>
+ <config-property-name>IntegerProperty</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ </config-property>
+ </adminobject>
+ <security-permission>
+ <description></description>
+ <security-permission-spec>sa</security-permission-spec>
+ </security-permission>
+ </resourceadapter>
+ <required-work-context>java.work.Context1</required-work-context>
+ <required-work-context>java.work.Context2</required-work-context>
+</connector>
Property changes on: projects/metadata/rar/trunk/src/test/resources/org/jboss/test/metadata/rar/RA16DTD_testEverything.xml
___________________________________________________________________
Name: svn:keywords
+ Id Reversion Date
Modified: projects/metadata/rar/trunk/src/test/resources/schema2class.properties
===================================================================
--- projects/metadata/rar/trunk/src/test/resources/schema2class.properties 2009-07-06 07:20:02 UTC (rev 90825)
+++ projects/metadata/rar/trunk/src/test/resources/schema2class.properties 2009-07-06 07:47:31 UTC (rev 90826)
@@ -1,5 +1,7 @@
# RA
connector_1_5.xsd org.jboss.metadata.rar.spec.JCA15MetaData
+connector_1_5.dtd org.jboss.metadata.rar.spec.JCA15DTDMetaData
connector_1_6.xsd org.jboss.metadata.rar.spec.JCA16MetaData
+connector_1_6.dtd org.jboss.metadata.rar.spec.JCA16DTDMetaData
jboss-ra_1_0.xsd org.jboss.metadata.rar.jboss.JBossRAMetaData
jboss-ds_5_0.xsd org.jboss.metadata.rar.jboss.mcf.ManagedConnectionFactoryDeploymentGroup, org.jboss.metadata.rar.jboss.mcf.ConnectionFactoryDeploymentGroup
More information about the jboss-cvs-commits
mailing list