You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2004/09/28 09:19:54 UTC
svn commit: rev 47394 - in geronimo/trunk/modules/client-builder/src: schema test-resources/plans test/org/apache/geronimo/client/builder
Author: djencks
Date: Tue Sep 28 00:19:53 2004
New Revision: 47394
Added:
geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml
Modified:
geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd
geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
Log:
fix and test including connector vendor dd literally
Modified: geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd
==============================================================================
--- geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd (original)
+++ geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd Tue Sep 28 00:19:53 2004
@@ -67,7 +67,7 @@
<xs:element name="external-rar" type="xs:string"/>
<xs:element name="internal-rar" type="xs:string"/>
</xs:choice>
- <xs:element name="connector" type="connector:connectorType"/>
+ <xs:element ref="connector:connector"/>
</xs:sequence>
</xs:complexType>
Added: geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml Tue Sep 28 00:19:53 2004
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
+ configId="client"
+ parentId="org/apache/geronimo/DefaultDatabase">
+ <resource-ref>
+ <ref-name>jdbc/DB1</ref-name>
+ <target-name>DefaultDatabase</target-name>
+ </resource-ref>
+ <resource>
+ <external-rar>tranql/rars/tranql-connector-1.0-SNAPSHOT</external-rar>
+ <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+ version="1.5"
+ configId="org/apache/geronimo/DefaultDatabase"
+ parentId="org/apache/geronimo/Server">
+
+ <dependency>
+ <uri>axion/jars/axion-${axion_version}.jar</uri>
+ </dependency>
+ <dependency>
+ <uri>commons-collections/jars/commons-collections-${commons_collections_version}.jar</uri>
+ </dependency>
+
+ <dependency>
+ <uri>commons-primitives/jars/commons-primitives-${commons_primitives_version}.jar</uri>
+ </dependency>
+
+ <dependency>
+ <uri>regexp/jars/regexp-${regexp_version}.jar</uri>
+ </dependency>
+
+ <resourceadapter>
+ <outbound-resourceadapter>
+ <connection-definition>
+ <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+ <connectiondefinition-instance>
+ <name>DefaultDatasource</name>
+ <config-property-setting name="UserName"></config-property-setting>
+ <config-property-setting name="Password"></config-property-setting>
+ <config-property-setting name="Driver">org.axiondb.jdbc.AxionDriver</config-property-setting>
+ <config-property-setting name="ConnectionURL">jdbc:axiondb:DefaultDatabase</config-property-setting>
+ <config-property-setting name="CommitBeforeAutocommit">true</config-property-setting>
+ <connectionmanager>
+ <local-transaction/>
+ <single-pool>
+ <max-size>10</max-size>
+ <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+ <match-one/>
+ </single-pool>
+ </connectionmanager>
+ <global-jndi-name>tranql/axion</global-jndi-name>
+ <!--credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface-->
+ </connectiondefinition-instance>
+ </connection-definition>
+ </outbound-resourceadapter>
+ </resourceadapter>
+
+ </connector>
+
+ </resource>
+</application-client>
Modified: geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
==============================================================================
--- geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java (original)
+++ geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java Tue Sep 28 00:19:53 2004
@@ -32,6 +32,14 @@
ref.setTargetName("target");
SchemaConversionUtils.validateDD(appClient);
- System.out.println(appClient.toString());
+// System.out.println(appClient.toString());
+ }
+
+ public void testConnectorInclude() throws Exception {
+ File resourcePlan = new File(basedir, "src/test-resources/plans/plan2.xml");
+ assertTrue(resourcePlan.exists());
+ GerApplicationClientType appClient = builder.getApplicationClientType(resourcePlan, null, null, null);
+ assertEquals(1, appClient.getResourceRefArray().length);
+ assertEquals(1, appClient.getResourceArray().length);
}
}