teiid SVN: r2593 - branches/7.1.x/client/src/main/java/org/teiid/adminapi.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-21 13:39:11 -0400 (Tue, 21 Sep 2010)
New Revision: 2593
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java
Log:
TEIID-1270 fixing the proxy so that object methods don't get forwarded
Modified: branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java 2010-09-20 19:54:38 UTC (rev 2592)
+++ branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java 2010-09-21 17:39:11 UTC (rev 2593)
@@ -53,11 +53,9 @@
private Admin target;
private ServerConnection registry;
- private Properties p;
private boolean closed;
public AdminProxy(Properties p) throws ConnectionException, CommunicationException {
- this.p = p;
this.registry = serverConnectionFactory.getConnection(p);
this.target = registry.getService(Admin.class);
}
@@ -76,6 +74,9 @@
close();
return null;
}
+ if (!method.getDeclaringClass().equals(Admin.class)) {
+ return method.invoke(this, args);
+ }
try {
return method.invoke(getTarget(), args);
} catch (InvocationTargetException e) {
14 years, 3 months
teiid SVN: r2592 - branches/7.1.x/test-integration/db.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-20 15:54:38 -0400 (Mon, 20 Sep 2010)
New Revision: 2592
Modified:
branches/7.1.x/test-integration/db/pom.xml
Log:
TEIID-1264: Pulling up the assembly plugin version to the parent pom to be consistent across all the projects.
Modified: branches/7.1.x/test-integration/db/pom.xml
===================================================================
--- branches/7.1.x/test-integration/db/pom.xml 2010-09-20 19:11:02 UTC (rev 2591)
+++ branches/7.1.x/test-integration/db/pom.xml 2010-09-20 19:54:38 UTC (rev 2592)
@@ -192,7 +192,6 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
<configuration>
<descriptors>
<descriptor>src/assembly/binaries.xml</descriptor>
14 years, 3 months
teiid SVN: r2591 - branches/7.1.x/build/kits/jboss-container/conf.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-20 15:11:02 -0400 (Mon, 20 Sep 2010)
New Revision: 2591
Modified:
branches/7.1.x/build/kits/jboss-container/conf/jboss-teiid-log4j.xml
Log:
TEIID-1266
Modified: branches/7.1.x/build/kits/jboss-container/conf/jboss-teiid-log4j.xml
===================================================================
--- branches/7.1.x/build/kits/jboss-container/conf/jboss-teiid-log4j.xml 2010-09-20 16:05:56 UTC (rev 2590)
+++ branches/7.1.x/build/kits/jboss-container/conf/jboss-teiid-log4j.xml 2010-09-20 19:11:02 UTC (rev 2591)
@@ -62,7 +62,7 @@
-->
<!-- un-comment to enable Teiid COMMAND log
- <appender name="COMMAND" class="org.apache.log4j.RollingFileAppender">
+ <appender name="COMMAND" class="org.jboss.logging.appender.RollingFileAppender">
<param name="File" value="${jboss.server.log.dir}/teiid-command.log"/>
<param name="MaxFileSize" value="1000KB"/>
<param name="MaxBackupIndex" value="25"/>
14 years, 3 months
teiid SVN: r2590 - in branches/7.1.x: build and 1 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-20 12:05:56 -0400 (Mon, 20 Sep 2010)
New Revision: 2590
Modified:
branches/7.1.x/build/pom.xml
branches/7.1.x/pom.xml
branches/7.1.x/test-integration/db/pom.xml
Log:
TEIID-1264: Pulling up the assembly plugin version to the parent pom to be consistent across all the projects.
Modified: branches/7.1.x/build/pom.xml
===================================================================
--- branches/7.1.x/build/pom.xml 2010-09-17 22:13:20 UTC (rev 2589)
+++ branches/7.1.x/build/pom.xml 2010-09-20 16:05:56 UTC (rev 2590)
@@ -38,7 +38,6 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-6-m1-jboss</version>
</plugin>
</plugins>
</pluginManagement>
Modified: branches/7.1.x/pom.xml
===================================================================
--- branches/7.1.x/pom.xml 2010-09-17 22:13:20 UTC (rev 2589)
+++ branches/7.1.x/pom.xml 2010-09-20 16:05:56 UTC (rev 2590)
@@ -97,6 +97,10 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-6-m1-jboss</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
Modified: branches/7.1.x/test-integration/db/pom.xml
===================================================================
--- branches/7.1.x/test-integration/db/pom.xml 2010-09-17 22:13:20 UTC (rev 2589)
+++ branches/7.1.x/test-integration/db/pom.xml 2010-09-20 16:05:56 UTC (rev 2590)
@@ -509,7 +509,6 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
<configuration>
<descriptors>
<descriptor>src/assembly/binaries.xml</descriptor>
14 years, 3 months
teiid SVN: r2589 - in branches/7.1.x: client/src/main/java/org/teiid/jdbc and 4 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-17 18:13:20 -0400 (Fri, 17 Sep 2010)
New Revision: 2589
Added:
branches/7.1.x/client/src/test/java/org/teiid/net/TestTeiidURL.java
Removed:
branches/7.1.x/client/src/test/java/org/teiid/net/TestMMURL.java
Modified:
branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html
branches/7.1.x/client/src/main/java/org/teiid/jdbc/SocketProfile.java
branches/7.1.x/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java
branches/7.1.x/client/src/main/java/org/teiid/net/TeiidURL.java
branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java
branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
Log:
TEIID-951: adding support for IPv6 address based URLs in the JDBC URL. The IPv6 addresses must be escaped with square brackets. like [address] in the URL.
Modified: branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html 2010-09-17 22:13:20 UTC (rev 2589)
@@ -33,7 +33,8 @@
<LI><B>Simplified Role Usage</B> - a role can now be assigned to any authenticated user via the any-authenticated attribute on the data-role element.
<LI><B>Materialized View Performance</B> - materialized view tables will now automatically create and use non-unique secondary indexes for unique constraints and indexes defined on the view.
<LI><B>Binary Web Service Calls</B> - the ws translator now provides an invokeHttp procedure to return the blob contents and string content type of an http/https call.
- <LI><B>Improved clustering support</B> - see the Admin Guide chapter on clustering.
+ <LI><B>Improved clustering support</B> - see the Admin Guide chapter on clustering.
+ <LI><B>IPv6 support</B> - Teiid can started using IPv6 bind address and can be used with JDBC connection.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
Modified: branches/7.1.x/client/src/main/java/org/teiid/jdbc/SocketProfile.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/jdbc/SocketProfile.java 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/client/src/main/java/org/teiid/jdbc/SocketProfile.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -60,7 +60,7 @@
*/
// This host/port pattern allows just a . or a - to be in the host part.
- static final String HOST_PORT_PATTERN = "[\\p{Alnum}\\.\\-\\_]+:\\d+"; //$NON-NLS-1$
+ static final String HOST_PORT_PATTERN = "\\[?[\\p{Alnum}\\.\\-\\_:]+\\]?:\\d+"; //$NON-NLS-1$
static final String URL_PATTERN = "jdbc:teiid:([\\w-\\.]+)@mm[s]?://"+HOST_PORT_PATTERN+"(,"+HOST_PORT_PATTERN+")*(;.*)?"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
static Pattern urlPattern = Pattern.compile(URL_PATTERN);
Modified: branches/7.1.x/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -136,23 +136,42 @@
// Format: "mm://server1:port,server2:port,..."
String serverURL = ""; //$NON-NLS-1$
- serverURL = "" + ( this.secure ? TeiidURL.SECURE_PROTOCOL : TeiidURL.DEFAULT_PROTOCOL ); //$NON-NLS-1$
- serverURL += "" + this.serverName; //$NON-NLS-1$
+ serverURL = "" + ( this.secure ? TeiidURL.SECURE_PROTOCOL : TeiidURL.DEFAULT_PROTOCOL ); //$NON-NLS-1$
+
+ if (this.serverName.indexOf(':') != -1) {
+ serverURL += "["; //$NON-NLS-1$
+ }
+
+ serverURL += "" + this.serverName; //$NON-NLS-1$
+
+ if (this.serverName.indexOf(':') != -1) {
+ serverURL += "]"; //$NON-NLS-1$
+ }
+
if ( this.portNumber != 0 )
- serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
+ serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
+
if ( this.alternateServers.length() > 0 ) {
String[] as = this.alternateServers.split( TeiidURL.COMMA_DELIMITER);
- for ( int i = 0; i < as.length; i++ ) {
- String[] server = as[i].split( TeiidURL.COLON_DELIMITER );
-
- if ( server.length > 0 ) {
- serverURL += TeiidURL.COMMA_DELIMITER + server[0];
- if ( server.length > 1 ) {
- serverURL += TeiidURL.COLON_DELIMITER + server[1];
- } else {
- serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
- }
+ for ( int i = 0; i < as.length; i++ ) {
+ if (as[i].startsWith("[") && as[i].endsWith("]:")) { //$NON-NLS-1$ //$NON-NLS-2$
+ serverURL += (TeiidURL.COMMA_DELIMITER + as[i]);
+ }
+ else if (as[i].startsWith("[") && as[i].endsWith("]")) { //$NON-NLS-1$ //$NON-NLS-2$
+ serverURL += (TeiidURL.COMMA_DELIMITER +as[i] + TeiidURL.COLON_DELIMITER + this.portNumber);
+ }
+ else {
+ String[] server = as[i].split(TeiidURL.COLON_DELIMITER );
+
+ if ( server.length > 0 ) {
+ serverURL += TeiidURL.COMMA_DELIMITER + server[0];
+ if ( server.length > 1 ) {
+ serverURL += TeiidURL.COLON_DELIMITER + server[1];
+ } else {
+ serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
+ }
+ }
}
}
}
Modified: branches/7.1.x/client/src/main/java/org/teiid/net/TeiidURL.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/net/TeiidURL.java 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/client/src/main/java/org/teiid/net/TeiidURL.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -125,6 +125,9 @@
public TeiidURL(String host, int port, boolean secure) {
usingSSL = secure;
+ if(host.startsWith("[")) { //$NON-NLS-1$
+ host = host.substring(1, host.indexOf(']'));
+ }
hosts.add(new HostInfo(host, port));
}
@@ -232,13 +235,29 @@
throw new IllegalArgumentException(exceptionMessage);
}
while (st.hasMoreTokens()) {
- st2 = new StringTokenizer(st.nextToken(), COLON_DELIMITER);
+ String nextToken = st.nextToken();
try {
- String host = st2.nextToken().trim();
- String port = st2.nextToken().trim();
+ String host = ""; //$NON-NLS-1$
+ String port = ""; //$NON-NLS-1$
+ if (nextToken.startsWith("[")) { //$NON-NLS-1$
+ int hostEnd = nextToken.indexOf("]:"); //$NON-NLS-1$
+ host = nextToken.substring(1, hostEnd);
+ port = nextToken.substring(hostEnd+2);
+ }
+ else {
+ st2 = new StringTokenizer(nextToken, COLON_DELIMITER);
+ host = st2.nextToken().trim();
+ port = st2.nextToken().trim();
+ }
+
if (host.equals("")) { //$NON-NLS-1$
throw new IllegalArgumentException("hostname can't be empty"); //$NON-NLS-1$
}
+
+ if (port.equals("")) { //$NON-NLS-1$
+ throw new IllegalArgumentException("port can't be empty"); //$NON-NLS-1$
+ }
+
int portNumber;
try {
portNumber = Integer.parseInt(port);
@@ -250,11 +269,13 @@
}
HostInfo hostInfo = new HostInfo(host, portNumber);
hosts.add(hostInfo);
+
} catch (NoSuchElementException nsee) {
throw new IllegalArgumentException(exceptionMessage);
} catch (NullPointerException ne) {
throw new IllegalArgumentException(exceptionMessage);
}
+
}
}
@@ -275,7 +296,15 @@
Iterator<HostInfo> iter = hosts.iterator();
while (iter.hasNext()) {
HostInfo host = iter.next();
+
+ boolean ipv6HostName = host.getHostName().indexOf(':') != -1;
+ if (ipv6HostName) {
+ sb.append('[');
+ }
sb.append(host.getHostName());
+ if (ipv6HostName) {
+ sb.append(']');
+ }
sb.append(COLON_DELIMITER);
sb.append(host.getPortNumber());
if (iter.hasNext()) {
Modified: branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -118,4 +118,27 @@
assertTrue(p.getProperty(BaseDataSource.APP_NAME).equals("Client")); //$NON-NLS-1$
assertEquals(7, p.size());
}
+
+ @Test
+ public void testIPV6() throws SQLException{
+ assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://[::1]:53535,127.0.0.1:1234")); //$NON-NLS-1$
+ assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://[3ffe:ffff:0100:f101::1]:53535,127.0.0.1:1234")); //$NON-NLS-1$
+
+ Properties p = new Properties();
+ SocketProfile.parseURL("jdbc:teiid:BQT@mms://[3ffe:ffff:0100:f101::1]:1234;version=3", p); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("3")); //$NON-NLS-1$
+ assertTrue(p.getProperty(TeiidURL.CONNECTION.SERVER_URL).equals("mms://[3ffe:ffff:0100:f101::1]:1234")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VERSION).equals("3")); //$NON-NLS-1$
+ }
+
+ @Test
+ public void testIPV6MultipleHosts() throws SQLException{
+ Properties p = new Properties();
+ SocketProfile.parseURL("jdbc:teiid:BQT@mms://[3ffe:ffff:0100:f101::1]:1234,[::1]:31000,127.0.0.1:2134;version=3", p); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("3")); //$NON-NLS-1$
+ assertTrue(p.getProperty(TeiidURL.CONNECTION.SERVER_URL).equals("mms://[3ffe:ffff:0100:f101::1]:1234,[::1]:31000,127.0.0.1:2134")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VERSION).equals("3")); //$NON-NLS-1$
+ }
}
Modified: branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -483,6 +483,43 @@
"jdbc:teiid:vdbName@mm://hostname:7001;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1.2.3;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
}
+ public void testBuildingIPv6() {
+ final String serverName = "3ffe:ffff:0100:f101::1"; //$NON-NLS-1$
+ final String vdbName = "vdbName"; //$NON-NLS-1$
+ final String vdbVersion = "1"; //$NON-NLS-1$
+ final int portNumber = 7001;
+ final String transactionAutoWrap = null;
+ final String partialMode = "true"; //$NON-NLS-1$
+ final boolean secure = false;
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:teiid:vdbName@mm://[3ffe:ffff:0100:f101::1]:7001;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ }
+
+ public void testBuildingIPv6WithBrackets() {
+ final String serverName = "[3ffe:ffff:0100:f101::1]"; //$NON-NLS-1$
+ final String vdbName = "vdbName"; //$NON-NLS-1$
+ final String vdbVersion = "1"; //$NON-NLS-1$
+ final int portNumber = 7001;
+ final String transactionAutoWrap = null;
+ final String partialMode = "true"; //$NON-NLS-1$
+ final boolean secure = false;
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:teiid:vdbName@mm://[3ffe:ffff:0100:f101::1]:7001;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ }
+
+ public void testBuildingIPv6Alternate() {
+ final String serverName = "3ffe:ffff:0100:f101::1"; //$NON-NLS-1$
+ final String vdbName = "vdbName"; //$NON-NLS-1$
+ final String vdbVersion = "1"; //$NON-NLS-1$
+ final int portNumber = 7001;
+ final String transactionAutoWrap = null;
+ final String partialMode = "true"; //$NON-NLS-1$
+ final boolean secure = false;
+ final String alternates = "[::1],127.0.0.1:1234"; //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternates,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:teiid:vdbName@mm://[3ffe:ffff:0100:f101::1]:7001,[::1]:7001,127.0.0.1:1234;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ }
+
public void testBuildingURL2() {
final String serverName = "hostName"; //$NON-NLS-1$
final String vdbName = "vdbName"; //$NON-NLS-1$
Deleted: branches/7.1.x/client/src/test/java/org/teiid/net/TestMMURL.java
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/net/TestMMURL.java 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/client/src/test/java/org/teiid/net/TestMMURL.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -1,262 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library 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 library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.net;
-
-import java.util.List;
-
-import org.teiid.net.HostInfo;
-import org.teiid.net.TeiidURL;
-
-import junit.framework.TestCase;
-
-
-
-/**
- * @since 4.2
- */
-public class TestMMURL extends TestCase {
-
- public static final String REQUIRED_URL = TeiidURL.FORMAT_SERVER;
-
- /**
- * Constructor for TestMMURL.
- * @param name
- */
- public TestMMURL(String name) {
- super(name);
- }
-
- public final void testMMURL() {
- String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- }
-
- public final void testBogusProtocol() {
- String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
- } catch (RuntimeException e) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
- }
- }
- public final void testBogusProtocol1() {
- String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
- } catch (RuntimeException e) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
- }
- }
-
- public final void testMMURLSecure() {
- String SERVER_URL = "mms://localhost:31000"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- }
-
- public final void testMMURLBadProtocolMM() {
- String SERVER_URL = "mmm://localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLWrongSlash() {
- String SERVER_URL = "mm:\\\\localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLOneSlash() {
- String SERVER_URL = "mm:/localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLNoHost() {
- String SERVER_URL = "mm://:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLNoHostAndPort() {
- String SERVER_URL = "mm://:"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLNoHostAndPort2() {
- String SERVER_URL = "mm://"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLBadPort() {
- String SERVER_URL = "mm://localhost:port"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an Exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- }
- }
-
- public final void testMMURL2Hosts() {
- String SERVER_URL = "mm://localhost:31000,localhost:31001"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 2 Host", hosts ); //$NON-NLS-1$
- assertEquals(2,hosts.size());
- }
-
- public final void testMMURL3Hosts() {
- String SERVER_URL = "mm://localhost:31000,localhost:31001,localhost:31002"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 3 Host", hosts ); //$NON-NLS-1$
- assertEquals(3,hosts.size());
- }
-
- public final void testGetHostInfo() {
- String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- assertNotNull(url.getHostInfo() );
- }
-
- public final void testGetProtocolStandalone() {
- TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
- assertNotNull(url);
- assertEquals("mm://localhost:31000",url.getAppServerURL()); //$NON-NLS-1$
- }
-
- public final void testHasMoreElements() {
- TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
- assertNotNull(url);
- assertFalse(url.getHostInfo().isEmpty());
- }
-
- public final void testNextElement() {
- TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
- assertEquals(2, url.getHostInfo().size());
- }
-
- public final void testHostInfoEquals() {
- HostInfo expectedResults = new HostInfo("localhost",31000); //$NON-NLS-1$
- TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- }
-
- public final void testWithEmbeddedSpaces() {
- HostInfo expectedResults = new HostInfo("localhost",12345); //$NON-NLS-1$
-
- TeiidURL url = new TeiidURL("mm://localhost : 12345"); //$NON-NLS-1$
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- }
-
- public final void testHostPortConstructor() {
- HostInfo expectedResults = new HostInfo("myhost", 12345); //$NON-NLS-1$
-
- TeiidURL url = new TeiidURL("myhost", 12345, false); //$NON-NLS-1$
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- assertEquals("mm://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
- }
-
- public final void testHostPortConstructorSSL() {
- HostInfo expectedResults = new HostInfo("myhost",12345); //$NON-NLS-1$
-
- TeiidURL url = new TeiidURL("myhost", 12345, true); //$NON-NLS-1$
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- assertEquals("mms://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
- }
-
-}
Copied: branches/7.1.x/client/src/test/java/org/teiid/net/TestTeiidURL.java (from rev 2585, branches/7.1.x/client/src/test/java/org/teiid/net/TestMMURL.java)
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/net/TestTeiidURL.java (rev 0)
+++ branches/7.1.x/client/src/test/java/org/teiid/net/TestTeiidURL.java 2010-09-17 22:13:20 UTC (rev 2589)
@@ -0,0 +1,298 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library 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 library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.net;
+
+import java.util.List;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+
+public class TestTeiidURL {
+
+ public static final String REQUIRED_URL = TeiidURL.FORMAT_SERVER;
+
+ @Test
+ public final void testTeiidURL() {
+ String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ }
+
+ @Test
+ public final void testTeiidURLIPv6() {
+ String SERVER_URL = "mm://[3ffe:ffff:0100:f101::1]:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List<HostInfo> hosts = url.getHostInfo();
+ assertNotNull("TeiidURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ assertEquals("3ffe:ffff:0100:f101::1", hosts.get(0).getHostName()); //$NON-NLS-1$
+ assertEquals(31000, hosts.get(0).getPortNumber());
+ }
+
+ @Test
+ public final void testBogusProtocol() {
+ String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
+ } catch (RuntimeException e) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testBogusProtocol1() {
+ String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
+ } catch (RuntimeException e) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLSecure() {
+ String SERVER_URL = "mms://localhost:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ }
+
+ @Test
+ public final void testTeiidURLBadProtocolMM() {
+ String SERVER_URL = "mmm://localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLWrongSlash() {
+ String SERVER_URL = "mm:\\\\localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLOneSlash() {
+ String SERVER_URL = "mm:/localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLNoHost() {
+ String SERVER_URL = "mm://:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLNoHostAndPort() {
+ String SERVER_URL = "mm://:"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLNoHostAndPort2() {
+ String SERVER_URL = "mm://"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLBadPort() {
+ String SERVER_URL = "mm://localhost:port"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an Exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ }
+ }
+
+ @Test
+ public final void testTeiidURL2Hosts() {
+ String SERVER_URL = "mm://localhost:31000,localhost:31001"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 2 Host", hosts ); //$NON-NLS-1$
+ assertEquals(2,hosts.size());
+ }
+
+ @Test
+ public final void testTeiidIPv6URL2Hosts() {
+ String SERVER_URL = "mm://[3ffe:ffff:0100:f101::1]:31000,[::1]:31001, 127.0.0.1:31003"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List<HostInfo> hosts = url.getHostInfo();
+ assertNotNull("TeiidURL should have 3 Host", hosts ); //$NON-NLS-1$
+ assertEquals(3, hosts.size());
+
+ assertEquals("3ffe:ffff:0100:f101::1", hosts.get(0).getHostName());//$NON-NLS-1$
+ assertEquals(31001, hosts.get(1).getPortNumber());
+ assertEquals("127.0.0.1", hosts.get(2).getHostName());//$NON-NLS-1$
+ }
+
+ @Test
+ public final void testTeiidURL3Hosts() {
+ String SERVER_URL = "mm://localhost:31000,localhost:31001,localhost:31002"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 3 Host", hosts ); //$NON-NLS-1$
+ assertEquals(3,hosts.size());
+ }
+
+ @Test
+ public final void testGetHostInfo() {
+ String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ assertNotNull(url.getHostInfo() );
+ }
+
+ @Test
+ public final void testGetProtocolStandalone() {
+ TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
+ assertNotNull(url);
+ assertEquals("mm://localhost:31000",url.getAppServerURL()); //$NON-NLS-1$
+ }
+
+ @Test
+ public final void testHasMoreElements() {
+ TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
+ assertNotNull(url);
+ assertFalse(url.getHostInfo().isEmpty());
+ }
+
+ @Test
+ public final void testNextElement() {
+ TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
+ assertEquals(2, url.getHostInfo().size());
+ }
+
+ @Test
+ public final void testHostInfoEquals() {
+ HostInfo expectedResults = new HostInfo("localhost",31000); //$NON-NLS-1$
+ TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ }
+
+ @Test
+ public final void testWithEmbeddedSpaces() {
+ HostInfo expectedResults = new HostInfo("localhost",12345); //$NON-NLS-1$
+
+ TeiidURL url = new TeiidURL("mm://localhost : 12345"); //$NON-NLS-1$
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ }
+
+ @Test
+ public final void testHostPortConstructor() {
+ HostInfo expectedResults = new HostInfo("myhost", 12345); //$NON-NLS-1$
+
+ TeiidURL url = new TeiidURL("myhost", 12345, false); //$NON-NLS-1$
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ assertEquals("mm://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
+ }
+
+ @Test
+ public final void testHostPortConstructorSSL() {
+ HostInfo expectedResults = new HostInfo("myhost",12345); //$NON-NLS-1$
+
+ TeiidURL url = new TeiidURL("myhost", 12345, true); //$NON-NLS-1$
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ assertEquals("mms://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
+ }
+
+}
Modified: branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
===================================================================
--- branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2010-09-17 14:51:27 UTC (rev 2588)
+++ branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2010-09-17 22:13:20 UTC (rev 2589)
@@ -53,7 +53,7 @@
the "version" property at the same time is not allowed.
</para></listitem>
<listitem><para>mm - defines Teiid JDBC protocol, mms defines a secure channel (see the <link linkend="ssl">SSL chapter</link> for more)</para></listitem>
- <listitem><para><host> - defines the server where the Teiid Server is installed</para></listitem>
+ <listitem><para><host> - defines the server where the Teiid Server is installed. If you are using IPv6 binding address as the host name, place it in square brackets. ex:[::1]</para></listitem>
<listitem><para><port> - defines the port on which the Teiid Server is listening for incoming JDBC connections.</para></listitem>
<listitem><para>[prop-name=prop-value] - additionally you can supply any number of name value pairs separated by semi-colon
[;]. All supported URL properties are defined in the <link linkend="connection_properties">connection properties section</link>. Property values should be URL encoded if they contain reserved characters, e.g. ('?', '=', ';', etc.)</para></listitem>
@@ -276,7 +276,8 @@
<entry>
<code>String</code>
</entry>
- <entry>Server where the Teiid runtime installed</entry>
+ <entry>Server hostname where the Teiid runtime installed. If you are using IPv6 binding address as the host name,
+ place it in square brackets. ex:[::1]</entry>
</row>
<row>
<entry>
@@ -285,7 +286,9 @@
<entry>
<code>String</code>
</entry>
- <entry>Optional delimited list of host:port entries. See the <link linkend="multiple_hosts">multiple hosts</link> section for more information.</entry>
+ <entry>Optional delimited list of host:port entries. See the <link linkend="multiple_hosts">multiple hosts</link>
+ section for more information. If you are using IPv6 binding address as the host name,
+ place them in square brackets. ex:[::1]</entry>
</row>
<row>
<entry>
14 years, 3 months
teiid SVN: r2588 - in branches/7.1.x/documentation: reference/src/main/docbook/en-US/content and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-17 10:51:27 -0400 (Fri, 17 Sep 2010)
New Revision: 2588
Modified:
branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml
branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml
Log:
TEIID-1263 consolidated/updated the partial results docs into the client guide and hopefully made it clearer
Modified: branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml
===================================================================
--- branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml 2010-09-16 21:48:33 UTC (rev 2587)
+++ branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml 2010-09-17 14:51:27 UTC (rev 2588)
@@ -292,26 +292,53 @@
<para>For each source that is excluded from the query, a warning will be generated
describing the source and the failure. These warnings can be obtained from the
- <code>ResultSet.getWarnings()</code> method. This method returns a <code>SQLWarning</code> object but
+ <code>Statement.getWarnings()</code> method. This method returns a <code>SQLWarning</code> object but
in the case of "partial results" warnings, this will be an object of
type <code>org.teiid.jdbc.PartialResultsWarning</code> class. This class can be
used to obtain a list of all the failed sources by name and to obtain
the specific exception thrown by each resource adaptor. </para>
- <para>Below is an example of printing the list of failed sources:</para>
- <programlisting><![CDATA[statement.setExecutionProperty(ExecutionProperties.PROP_PARTIAL_RESULTS_MODE, “true”);
-ResultSet results = statement.executeQuery(“SELECT Name FROM Accounts”);
-SQLWarning warning = results.getWarnings();
-if(warning instanceof PartialResultsWarning) {
- PartialResultsWarning partialWarning = (PartialResultsWarning) warning;
- Collection failedConnectors = partialWarning.getFailedConnectors();
- Iterator iter = failedConnectors.iterator();
- while(iter.hasNext()) {
- String connectorName = (String) iter.next();
- SQLException connectorException = partialWarning.getConnectorException(connectorName);
- System.out.println(connectorName + “: “ +ConnectorException.getMessage();
- }
-}]]></programlisting>
+ <note>
+ <para> Since Teiid supports cursoring before the entire result is formed, it is
+ possible that a data source failure will not
+ be determined until after the first batch of results have
+ been returned to the client. This can happen in the case of
+ unions, but not joins. To ensure that all warnings have been accumulated, the
+ statement should be checked after the entire result set has been read.</para>
+ </note>
+
+ <para>
+ Partial results mode is off by default but can be turned on for all queries in a Connection with either
+ setPartialResultsMode("true") on a DataSource or
+ partialResultsMode=true on a JDBC URL. In either case, partial
+ results mode may be toggled later with a <link linkend="set_statement">set statement</link>.
+ </para>
+ <example>
+ <title>Setting Partial Results Mode</title>
+ <programlisting>Statement statement = ...obtain statement from Connection...
+statement.execute("set partialResultsMode true");</programlisting>
+ </example>
+
+ <example>
+ <title>Getting Partial Results Warnings
+ </title>
+ <programlisting>statement.execute("set partialResultsMode true");
+ResultSet results = statement.executeQuery("SELECT Name FROM Accounts");
+while (results.next()) {
+ ... //process the result set
+}
+SQLWarning warning = statement.getWarnings();
+if(warning instanceof PartialResultsWarning) {
+ PartialResultsWarning partialWarning = (PartialResultsWarning)warning;
+ Collection failedConnectors = partialWarning.getFailedConnectors();
+ Iterator iter = failedConnectors.iterator();
+ while(iter.hasNext()) {
+ String connectorName = (String) iter.next();
+ SQLException connectorException = partialWarning.getConnectorException(connectorName);
+ System.out.println(connectorName + ": " + ConnectorException.getMessage();
+ }
+}</programlisting>
+ </example>
</section>
<section>
Modified: branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml
===================================================================
--- branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml 2010-09-16 21:48:33 UTC (rev 2587)
+++ branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml 2010-09-17 14:51:27 UTC (rev 2588)
@@ -284,80 +284,17 @@
<section>
<title>Partial Results</title>
<para>Teiid provides the capability to obtain "partial
- results" in the event of data source unavailability. This is
+ results" in the event of data source unavailability or failure. This is
especially useful when unioning information from multiple
sources, or when doing a left outer join, where you are
'appending' columns to a master record but still want the record
- if the extra info is not available.</para>
- <para> If one or more data sources are unavailable to return
- results, then the result set obtained from the remaining
- available sources will be returned. In the case of joins, an
- unavailable data source essentially contributes zero tuples to
- the result set.</para>
- <section>
- <title>Setting Partial Results Mode</title>
- <para>
- Partial results mode is off by default but can be turned on by
- default for all queries in a Connection with either
- setPartialResultsMode("true") on a DataSource or
- partialResultsMode=true on a JDBC URL. In either case, partial
- results mode may be overridden with a set statement.
- </para>
- <example>
- <title>Example - Setting Partial Results Mode</title>
- <programlisting>Statement statement = ...obtain statement from Connection...
-statement.execute("set partialResultsMode true");</programlisting>
- </example>
- </section>
- <section>
- <title>Source Unavailability</title>
+ if the extra information is not available.</para>
+
<para>A source is considered to be 'unavailable' if the
connection factory associated with the source issues an
exception in response to a query. The exception will be
propagated to the query processor, where it will become a
- warning in the result set.</para>
- <warning>
- <para> Since Teiid supports multi-source cursoring, it is
- possible that the unavailability of a data source will not
- be determined until after the first batch of results have
- been returned to the client. This can happen in the case of
- unions, but not joins. In this situation, there will be no
- warnings in the result set when the client is processing the
- first batch of results. The client will be responsible for
- periodically checking the status of warnings in the results
- object as results are being processed, to see if a new
- warning has been added due to the detection of an
- unavailable source. [Note that client applications have no
- notion of ‘batches’, which are purely a server-side entity.
- Client apps deal only with records.]</para>
- </warning>
- <para> For each source that is excluded from a query, a warning
- will be generated describing the source and the failure. These
- warnings can be obtained from the Statement.getWarnings()
- method. This method returns a SQLWarning object but in the
- case of "partial results" warnings, this will be an object of
- type org.teiid.jdbc.PartialResultsWarning. This class
- can be used to obtain a list of all the failed connectors by
- name and to obtain the specific exception thrown by each
- connector.</para>
- <example>
- <title>Example - Printing List of Failed Sources
- </title>
- <programlisting>statement.execute("set partialResultsMode true");
-ResultSet results = statement.executeQuery("SELECT Name FROM Accounts");
-SQLWarning warning = statement.getWarnings();
-if(warning instanceof PartialResultsWarning) {
- PartialResultsWarning partialWarning = (PartialResultsWarning)warning;
- Collection failedConnectors = partialWarning.getFailedConnectors();
- Iterator iter = failedConnectors.iterator();
- while(iter.hasNext()) {
- String connectorName = (String) iter.next();
- SQLException connectorException = partialWarning.getConnectorException(connectorName);
- System.out.println(connectorName + ": " + ConnectorException.getMessage();
- }
-}</programlisting>
- </example>
- </section>
+ warning on the statement. See the Client Guide for more on Partial Results Mode and SQLWarnings.</para>
</section>
</section>
<section id="query_plan">
14 years, 3 months
teiid SVN: r2587 - branches/7.1.x.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-16 17:48:33 -0400 (Thu, 16 Sep 2010)
New Revision: 2587
Modified:
branches/7.1.x/pom.xml
Log:
TEIID-1264: Removing the dev as active profile; we do not want any active profiles for sake for faster time to build and test
Modified: branches/7.1.x/pom.xml
===================================================================
--- branches/7.1.x/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
+++ branches/7.1.x/pom.xml 2010-09-16 21:48:33 UTC (rev 2587)
@@ -82,9 +82,6 @@
This is to enable faster build for development time.
-->
<id>dev</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
<modules>
<module>build</module>
</modules>
14 years, 3 months
teiid SVN: r2586 - in branches/7.1.x: adminshell and 17 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-16 17:31:28 -0400 (Thu, 16 Sep 2010)
New Revision: 2586
Removed:
branches/7.1.x/build/assembly/bin.xml
Modified:
branches/7.1.x/adminshell/pom.xml
branches/7.1.x/api/pom.xml
branches/7.1.x/build/assembly/adminshell/adminshell-dist.xml
branches/7.1.x/build/assembly/client-jar.xml
branches/7.1.x/build/assembly/docs.xml
branches/7.1.x/build/assembly/jboss-container/dist.xml
branches/7.1.x/build/assembly/src.xml
branches/7.1.x/build/pom.xml
branches/7.1.x/cache-jbosscache/pom.xml
branches/7.1.x/client/pom.xml
branches/7.1.x/common-core/pom.xml
branches/7.1.x/connectors/pom.xml
branches/7.1.x/console/pom.xml
branches/7.1.x/documentation/pom.xml
branches/7.1.x/engine/pom.xml
branches/7.1.x/hibernate-dialect/pom.xml
branches/7.1.x/jboss-integration/pom.xml
branches/7.1.x/metadata/pom.xml
branches/7.1.x/pom.xml
branches/7.1.x/runtime/pom.xml
branches/7.1.x/test-integration/pom.xml
Log:
TEIID-1264: With the changes the "build" project will build all the assemblies for the Teiid. This also installs all the assemblies into maven repository.
Modified: branches/7.1.x/adminshell/pom.xml
===================================================================
--- branches/7.1.x/adminshell/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/adminshell/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/api/pom.xml
===================================================================
--- branches/7.1.x/api/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/api/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/build/assembly/adminshell/adminshell-dist.xml
===================================================================
--- branches/7.1.x/build/assembly/adminshell/adminshell-dist.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/assembly/adminshell/adminshell-dist.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -12,6 +12,7 @@
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
+ <useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-adminshell</include>
@@ -39,7 +40,7 @@
<fileSets>
<fileSet>
- <directory>build/target/kits/adminshell</directory>
+ <directory>target/kits/adminshell</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*.sh</include>
@@ -48,7 +49,7 @@
</fileSet>
<fileSet>
- <directory>build/target/kits/adminshell</directory>
+ <directory>target/kits/adminshell</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>**/*.sh</exclude>
@@ -57,7 +58,7 @@
</fileSet>
<fileSet>
- <directory>target/distribution</directory>
+ <directory>target</directory>
<includes>
<include>teiid-${version}-client.jar</include>
</includes>
@@ -69,9 +70,9 @@
<files>
<file>
- <source>target/distribution/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
+ <source>target/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
<fileMode>0644</fileMode>
</file>
</files>
-</assembly>
\ No newline at end of file
+</assembly>
Deleted: branches/7.1.x/build/assembly/bin.xml
===================================================================
--- branches/7.1.x/build/assembly/bin.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/assembly/bin.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,35 +0,0 @@
-<!--This script builds a JAR for a Teiid Embedded Server Installation -->
-<assembly>
-
- <id>bin</id>
-
- <formats>
- <format>zip</format>
- </formats>
-
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
- <includes>
- <include>*.txt</include>
- </includes>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- </fileSets>
-
- <moduleSets>
- <moduleSet>
- <includeSubModules>true</includeSubModules>
- <binaries>
- <includeDependencies>false</includeDependencies>
- <unpack>false</unpack>
- <outputDirectory></outputDirectory>
- <includes>
- <include>:jar:*</include>
- </includes>
- </binaries>
- </moduleSet>
- </moduleSets>
-
-</assembly>
\ No newline at end of file
Modified: branches/7.1.x/build/assembly/client-jar.xml
===================================================================
--- branches/7.1.x/build/assembly/client-jar.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/assembly/client-jar.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -13,7 +13,8 @@
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid:teiid-client</include>
<include>org.jboss.teiid:teiid-common-core</include>
Modified: branches/7.1.x/build/assembly/docs.xml
===================================================================
--- branches/7.1.x/build/assembly/docs.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/assembly/docs.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -12,7 +12,8 @@
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid.documentation:admin-guide</include>
<include>org.jboss.teiid.documentation:reference</include>
Modified: branches/7.1.x/build/assembly/jboss-container/dist.xml
===================================================================
--- branches/7.1.x/build/assembly/jboss-container/dist.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/assembly/jboss-container/dist.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -13,7 +13,7 @@
<fileSets>
<fileSet>
- <directory>build/target/kits/jboss-container</directory>
+ <directory>target/kits/jboss-container</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*.sh</include>
@@ -23,7 +23,7 @@
</fileSet>
<fileSet>
- <directory>build/target/kits/jboss-container</directory>
+ <directory>target/kits/jboss-container</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>**/*.sh</exclude>
@@ -34,7 +34,7 @@
<!-- only true dependency file for any client -->
<fileSet>
- <directory>target/distribution</directory>
+ <directory>target</directory>
<includes>
<include>teiid-${version}-client.jar</include>
</includes>
@@ -44,7 +44,7 @@
</fileSet>
<fileSet>
- <directory>client/src/main/resources</directory>
+ <directory>../client/src/main/resources</directory>
<includes>
<include>vdb-deployer.xsd</include>
</includes>
@@ -70,32 +70,32 @@
<files>
<file>
- <source>target/distribution/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
+ <source>target/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/reference/en-US/pdf/teiid_reference.pdf</source>
+ <source>target/teiid-${version}-docs/reference/en-US/pdf/teiid_reference.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/quick-start-example/en-US/pdf/teiid_quick_start_example.pdf</source>
+ <source>target/teiid-${version}-docs/quick-start-example/en-US/pdf/teiid_quick_start_example.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/developer-guide/en-US/pdf/teiid_developer_guide.pdf</source>
+ <source>target/teiid-${version}-docs/developer-guide/en-US/pdf/teiid_developer_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/client-developers-guide/en-US/pdf/teiid_client_developers_guide.pdf</source>
+ <source>target/teiid-${version}-docs/client-developers-guide/en-US/pdf/teiid_client_developers_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/caching-guide/en-US/pdf/teiid_caching_guide.pdf</source>
+ <source>target/teiid-${version}-docs/caching-guide/en-US/pdf/teiid_caching_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
@@ -104,7 +104,9 @@
<!-- these have external dependent clients like connectors-->
<moduleSets>
+
<moduleSet>
+ <useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-hibernate-dialect</include>
</includes>
@@ -118,6 +120,7 @@
<!-- These are Teiid internal dependencies; to make JCA work -->
<moduleSet>
<includeSubModules>true</includeSubModules>
+ <useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-jboss-integration</include>
@@ -142,7 +145,8 @@
<!-- These are built in connectors -->
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid.connectors:connector-file:rar</include>
<include>org.jboss.teiid.connectors:connector-ldap:rar</include>
@@ -171,7 +175,8 @@
<!-- These are built in translators -->
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid.connectors:translator-jdbc</include>
<include>org.jboss.teiid.connectors:translator-loopback</include>
@@ -201,7 +206,8 @@
<!-- Include the JOPR plugin -->
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid:teiid-console</include>
</includes>
@@ -215,4 +221,4 @@
</moduleSet>
</moduleSets>
-</assembly>
\ No newline at end of file
+</assembly>
Modified: branches/7.1.x/build/assembly/src.xml
===================================================================
--- branches/7.1.x/build/assembly/src.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/assembly/src.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -11,7 +11,7 @@
<fileSets>
<fileSet>
- <directory>${project.basedir}</directory>
+ <directory>${project.basedir}/..</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>teiid</outputDirectory>
<excludes>
Modified: branches/7.1.x/build/pom.xml
===================================================================
--- branches/7.1.x/build/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/build/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,11 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>build</artifactId>
+ <artifactId>teiid</artifactId>
<name>Build</name>
<description>Teiid Build</description>
<build>
@@ -34,5 +34,61 @@
</excludes>
</resource>
</resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-6-m1-jboss</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/client-jar.xml</descriptor>
+ <descriptor>assembly/jboss-container/dist.xml</descriptor>
+ <descriptor>assembly/adminshell/adminshell-dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>create-assemblies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
+
+ <profiles>
+ <profile>
+ <!--
+ This profile is activated manually, as in "mvn ... -P release ..."
+ -->
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/src.xml</descriptor>
+ <descriptor>assembly/docs.xml</descriptor>
+ <descriptor>assembly/client-jar.xml</descriptor>
+ <descriptor>assembly/jboss-container/dist.xml</descriptor>
+ <descriptor>assembly/adminshell/adminshell-dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Modified: branches/7.1.x/cache-jbosscache/pom.xml
===================================================================
--- branches/7.1.x/cache-jbosscache/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/cache-jbosscache/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/client/pom.xml
===================================================================
--- branches/7.1.x/client/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/client/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/common-core/pom.xml
===================================================================
--- branches/7.1.x/common-core/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/common-core/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/connectors/pom.xml
===================================================================
--- branches/7.1.x/connectors/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/connectors/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/console/pom.xml
===================================================================
--- branches/7.1.x/console/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/console/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/documentation/pom.xml
===================================================================
--- branches/7.1.x/documentation/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/documentation/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version> </parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/7.1.x/engine/pom.xml
===================================================================
--- branches/7.1.x/engine/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/engine/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/hibernate-dialect/pom.xml
===================================================================
--- branches/7.1.x/hibernate-dialect/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/hibernate-dialect/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/jboss-integration/pom.xml
===================================================================
--- branches/7.1.x/jboss-integration/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/jboss-integration/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/metadata/pom.xml
===================================================================
--- branches/7.1.x/metadata/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/metadata/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/pom.xml
===================================================================
--- branches/7.1.x/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
<version>7.1.1</version>
@@ -67,61 +67,28 @@
</developer>
</developers>
<profiles>
- <profile>
- <!--
+ <profile>
+ <!--
This profile is activated manually, as in "mvn ... -P release ..."
-->
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- <configuration>
- <descriptors>
- <descriptor>build/assembly/src.xml</descriptor>
- <descriptor>build/assembly/docs.xml</descriptor>
- <descriptor>build/assembly/client-jar.xml</descriptor>
- <descriptor>build/assembly/jboss-container/dist.xml</descriptor>
- <descriptor>build/assembly/adminshell/adminshell-dist.xml</descriptor>
- </descriptors>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>build</module>
- <module>documentation</module>
- </modules>
- </profile>
- <profile>
- <!--
+ <id>release</id>
+ <modules>
+ <module>documentation</module>
+ <module>build</module>
+ </modules>
+ </profile>
+ <profile>
+ <!--
This is to enable faster build for development time.
-->
- <id>dev</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- <configuration>
- <descriptors>
- <descriptor>build/assembly/client-jar.xml</descriptor>
- <descriptor>build/assembly/jboss-container/dist.xml</descriptor>
- <descriptor>build/assembly/adminshell/adminshell-dist.xml</descriptor>
- </descriptors>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>build</module>
- </modules>
- </profile>
+ <id>dev</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>build</module>
+ </modules>
+ </profile>
</profiles>
<build>
<!-- This section defines the default plugin settings inherited by child projects. -->
@@ -504,7 +471,7 @@
<module>hibernate-dialect</module>
<module>jboss-integration</module>
<module>test-integration</module>
- </modules>
+ </modules>
<distributionManagement>
<repository>
<id>jboss-releases-repository</id>
@@ -517,4 +484,4 @@
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
-</project>
+</project>
\ No newline at end of file
Modified: branches/7.1.x/runtime/pom.xml
===================================================================
--- branches/7.1.x/runtime/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/runtime/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
Modified: branches/7.1.x/test-integration/pom.xml
===================================================================
--- branches/7.1.x/test-integration/pom.xml 2010-09-16 19:37:03 UTC (rev 2585)
+++ branches/7.1.x/test-integration/pom.xml 2010-09-16 21:31:28 UTC (rev 2586)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.1.1</version>
</parent>
14 years, 3 months
teiid SVN: r2585 - branches/7.1.x/documentation/reference/src/main/docbook/en-US/content.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-16 15:37:03 -0400 (Thu, 16 Sep 2010)
New Revision: 2585
Modified:
branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml
Log:
TEIID-1261: Adding the transactional behavior of the Teiid runtime under JBoss AS when using different types of data sources that are available.
Modified: branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml
===================================================================
--- branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml 2010-09-16 18:11:10 UTC (rev 2584)
+++ branches/7.1.x/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml 2010-09-16 19:37:03 UTC (rev 2585)
@@ -175,9 +175,7 @@
Global - the XAResource interface provided by an XAConnection is
used to control the transaction. Note that XAConnections are
available only if Teiid is consumed through its XADataSource,
- <classname>org.teiid.jdbc.TeiidDataSource
- </classname>
- . JEE containers or data access APIs typically control XA
+ <classname>org.teiid.jdbc.TeiidDataSource</classname>. JEE containers or data access APIs typically control XA
transactions on behalf of application code.
</para>
</listitem>
@@ -211,6 +209,129 @@
portable fashion requires some kind of transaction support.</para>
</section>
</section>
+ <section>
+ <title>Transactional Behavior with JBoss Data Source Types</title>
+ <para>JBoss AS allows creation of different types of data sources, based on their transactional capabilities. The type
+ of data source you create for your VDB's sources also dictates if that data source will be participating the
+ distributed transaction or not, irrespective of the transaction scope you selected from above. Here are different types of data sources</para>
+ <itemizedlist>
+ <listitem>
+ <para>xa-datasource: Capable of participating in the distributed transaction using XA. This is recommended
+ type be used with any Teiid sources.</para>
+ </listitem>
+ <listitem>
+ <para>local-datasource: Does not participate in XA, unless this is the <emphasis>only</emphasis> source that is
+ local-datasource that is participating among other xa-datasources in the current distributed transaction. This technique is
+ called last commit optimization. However, if you have more then one local-datasources participating in a transaction, then
+ the transaction manager will end up with <emphasis>"Could not enlist in transaction on entering meta-aware object!;"</emphasis>
+ exception.</para>
+ </listitem>
+ <listitem>
+ <para>no-tx-datasource: Does not participate in distributed transaction at all. In the scope of Teiid command over multiple sources,
+ you can include this type of datasource in the same distributed transaction context, however this source will be it
+ will not be subject to any transactional participation. Any changes done on this source as part of the transaction scope,
+ can not be rolled back.</para>
+ </listitem>
+ </itemizedlist>
+ <para>If you have three different sources A, B, C and they are being used in Teiid. Here are some variations
+ on how they behave with different types of data sources. The suffixes "xa", "local", "no-tx" define different type of sources used.</para>
+ <itemizedlist>
+ <listitem>
+ <para>A-xa B-xa, C-xa : Can participate in all transactional scopes. No restrictions.</para>
+ </listitem>
+ <listitem>
+ <para>A-xa, B-xa, c-local: Can participate in all transactional scopes. Note that there is only one single source
+ is "local". It is assumed that in the Global scope, the third party datasource, other than Teiid Datasource is also XA.</para>
+ </listitem>
+ <listitem>
+ <para>A-xa, B-xa, C-no-tx : Can participate in all transactional scopes. Note "C" is not a
+ really bound by any transactional contract. A and B are the only participents in XA transaction.</para>
+ </listitem>
+ <listitem>
+ <para>A-xa, B-local, C-no-tx : Can participate in all transactional scopes. Note "C" is not a
+ really bound by any transactional contract, and there is only single "local" source.</para>
+ </listitem>
+ <listitem>
+ <para>If any two or more sources are "local" : They can only participate in Command mode with "autoCommitTxn=OFF".
+ Otherwise will end with exception as "Could not enlist in transaction on entering meta-aware object!;" exception, as it is
+ not possible to do a XA transaction with "local" datasources.</para>
+ </listitem>
+ <listitem>
+ <para>A-no-tx, B-no-tx, C-no-tx : Can participate in all transaction scopes, but none of the sources will be
+ bound by transactional terms. This is equivalent to not using transactions or setting Command mode with "autoCommitTxn=OFF".</para>
+ </listitem>
+ </itemizedlist>
+ <note><para>Teiid Designer creates "local" data source by default which is not optimal for the XA transactions.
+ Teiid would like this to be creating a XA data sources, however with current limitations with DTP that feature is
+ currently not available. To create XA data source, look in JBoss AS "doc" directory for example templates,
+ or use the "admin-console" to create the XA data sources.</para></note>
+
+ <para>If your datasource is not XA, and not the only local source and can not use "no-tx", then you can look into
+ extending the source to implement the compensating XA implementation. i.e. define your own resource manager for
+ your source and manage the transaction the way you want it to behave. Note that this could be complicated if not
+ impossible if your source natively does not support distributed XA protocol. In summay</para>
+ <itemizedlist>
+ <listitem>
+ <para>Use XA datasource if possible</para>
+ </listitem>
+ <listitem>
+ <para>Use no-tx datasource if applicable</para>
+ </listitem>
+ <listitem>
+ <para>Use autoCommitTxn = OFF, and let go distributed transactions, though not recommended</para>
+ </listitem>
+ <listitem>
+ <para>Write a compensating XA based implementation.</para>
+ </listitem>
+ </itemizedlist>
+
+ <table>
+ <title>Teiid Transaction Participation</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Teiid-Tx-Scope</entry>
+ <entry>XA source</entry>
+ <entry>Local Source</entry>
+ <entry>No-Tx SOurce</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Local</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Global</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Auto-commit=true, AutoCommitTxn=ON</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Auto-commit=true, AutoCommitTxn=OFF</entry>
+ <entry>never</entry>
+ <entry>never</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Auto-commit=true, AutoCommitTxn=DETECT</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
<section>
<title>Limitations and Workarounds</title>
<itemizedlist>
14 years, 3 months