Author: shawkins
Date: 2010-08-30 13:14:35 -0400 (Mon, 30 Aug 2010)
New Revision: 2504
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/test/java/org/teiid/jdbc/TestSocketProfile.java
branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java
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/using-hibernate.xml
Log:
TEIID-1230 no longer allowing jdbc:metamatrix
Modified: branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html 2010-08-30 16:25:41
UTC (rev 2503)
+++ branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html 2010-08-30 17:14:35
UTC (rev 2504)
@@ -39,6 +39,7 @@
</ul>
<h4>from 7.1</h4>
<ul>
+ <li>The jdbc:metamatrix JDBC URL prefix is no longer accepted. Use jdbc:teiid
instead.
<li>Model visibility no longer restricts access to tables and procedures.
Setting visible to false will only hide entries from system tables. Data roles should be
used to restrict data access.
</ul>
<h4>from 7.0</h4>
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-08-30
16:25:41 UTC (rev 2503)
+++ branches/7.1.x/client/src/main/java/org/teiid/jdbc/SocketProfile.java 2010-08-30
17:14:35 UTC (rev 2504)
@@ -61,7 +61,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 URL_PATTERN =
"jdbc:(metamatrix|teiid):([\\w-\\.]+)@mm[s]?://"+HOST_PORT_PATTERN+"(,"+HOST_PORT_PATTERN+")*(;.*)?";
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ 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/test/java/org/teiid/jdbc/TestSocketProfile.java
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-08-30
16:25:41 UTC (rev 2503)
+++ branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-08-30
17:14:35 UTC (rev 2504)
@@ -38,7 +38,7 @@
/** Valid format of urls*/
@Test public void testAcceptsURL1() throws Exception {
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:jvdb@mm://localhost:1234"));
//$NON-NLS-1$
-
assertTrue(SocketProfile.acceptsURL("jdbc:metamatrix:jvdb@mm://localhost:1234"));
//$NON-NLS-1$
+
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:jvdb@mm://localhost:1234"));
//$NON-NLS-1$
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234;version=x"));
//$NON-NLS-1$
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234"));
//$NON-NLS-1$
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
@@ -58,8 +58,8 @@
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://my-host.mydomain.com:53535,127.0.0.1:1234"));
//$NON-NLS-1$
assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://123.123.123.123:53535,127.0.0.1:1234"));
//$NON-NLS-1$
-
assertTrue(!SocketProfile.acceptsURL("jdbc:metamatrix:jvdb@localhost:1234"));
//$NON-NLS-1$
assertTrue(!SocketProfile.acceptsURL("jdbc:teiid:jvdb@localhost:1234"));
//$NON-NLS-1$
+
assertTrue(!SocketProfile.acceptsURL("jdbc:teiid:jvdb@localhost:1234"));
//$NON-NLS-1$
//DQP type
assertTrue(!SocketProfile.acceptsURL("jdbc:teiid:jvdb@c:/dqp.properties;version=1"));
//$NON-NLS-1$
Modified: branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java 2010-08-30
16:25:41 UTC (rev 2503)
+++ branches/7.1.x/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java 2010-08-30
17:14:35 UTC (rev 2504)
@@ -56,42 +56,42 @@
/** Valid format of urls*/
@Test public void testAcceptsURL1() throws Exception {
- assertTrue(drv.acceptsURL("jdbc:metamatrix:jvdb@mm://localhost:1234"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234;version=x"));
//$NON-NLS-1$
- assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mms://localhost:1234;logLevel=1;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@mm://localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log;autoCommitTxn=OFF;paritalResultsMode=true"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:jvdb@mms://localhost:1234"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234;version=x"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mms://localhost:1234,localhost2:12342,localhost3:12343;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mms://localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log;autoCommitTxn=OFF;paritalResultsMode=true"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://127.0.0.1:1234;logLevel=2"));
//$NON-NLS-1$
- assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mms://127.0.0.1:1234"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://127.0.0.1:1234,localhost.mydomain.com:63636;logLevel=2"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://my-host.mydomain.com:53535,127.0.0.1:1234"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://123.123.123.123:53535,127.0.0.1:1234"));
//$NON-NLS-1$
+ assertTrue(drv.acceptsURL("jdbc:teiid:jvdb@mm://localhost:1234"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234;version=x"));
//$NON-NLS-1$
+ assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mms://localhost:1234;logLevel=1;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@mm://localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log;autoCommitTxn=OFF;paritalResultsMode=true"));
//$NON-NLS-1$
+ assertTrue(drv.acceptsURL("jdbc:teiid:jvdb@mms://localhost:1234"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234;version=x"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mms://localhost:1234,localhost2:12342,localhost3:12343;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mms://localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log;autoCommitTxn=OFF;paritalResultsMode=true"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://127.0.0.1:1234;logLevel=2"));
//$NON-NLS-1$
+ assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mms://127.0.0.1:1234"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://127.0.0.1:1234,localhost.mydomain.com:63636;logLevel=2"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://my-host.mydomain.com:53535,127.0.0.1:1234"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://123.123.123.123:53535,127.0.0.1:1234"));
//$NON-NLS-1$
//DQP type
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:jvdb@c:/dqp.properties;version=1"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:jvdb@/foo/dqp.properties;version=1"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:jvdb@../foo/dqp.properties;version=1"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:jvdb@c:/dqp.properties;version=1"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:jvdb@/foo/dqp.properties;version=1"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:jvdb@../foo/dqp.properties;version=1"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:jvdb@mm://localhost:port"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:vdb@localhost:port;version=x"));
//$NON-NLS-1$
- assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234,localhost2:12342,localhost3:12343;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234;logLevel=1;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log;autoCommitTxn=OFF;paritalResultsMode=true"));
//$NON-NLS-1$
-
assertTrue(!drv.acceptsURL("jdbc:metamatrix:@localhost:1234;stickyConnections=false;socketsPerVM=4"));
//$NON-NLS-1$
-
assertTrue(drv.acceptsURL("jdbc:metamatrix:vdb@mm://my_host.mydomain.com:53535,127.0.0.1:1234"));
//$NON-NLS-1$
+ assertTrue(!drv.acceptsURL("jdbc:teiid:jvdb@mm://localhost:port"));
//$NON-NLS-1$
+ assertTrue(!drv.acceptsURL("jdbc:teiid:vdb@localhost:port;version=x"));
//$NON-NLS-1$
+ assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234,localhost2:12342,localhost3:12343"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234,localhost2:12342,localhost3:12343;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234;logLevel=1;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234;logLevel=2;logFile=D:\\metamatrix\\work\\DQP\\log\\jdbcLogFile.log;autoCommitTxn=OFF;paritalResultsMode=true"));
//$NON-NLS-1$
+
assertTrue(!drv.acceptsURL("jdbc:teiid:@localhost:1234;stickyConnections=false;socketsPerVM=4"));
//$NON-NLS-1$
+
assertTrue(drv.acceptsURL("jdbc:teiid:vdb@mm://my_host.mydomain.com:53535,127.0.0.1:1234"));
//$NON-NLS-1$
}
/** Invalid format of urls*/
@@ -104,7 +104,7 @@
@Test public void testParseURL() throws Exception{
Properties p = new Properties();
- SocketProfile.parseURL("jdbc:metamatrix:BQT@mm://slwxp157:1234", p);
//$NON-NLS-1$
+ SocketProfile.parseURL("jdbc:teiid:BQT@mm://slwxp157:1234", p);
//$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT"));
//$NON-NLS-1$
assertTrue(p.getProperty(TeiidURL.CONNECTION.SERVER_URL).equals("mm://slwxp157:1234"));
//$NON-NLS-1$
assertEquals(3, p.size());
@@ -112,7 +112,7 @@
@Test public void testParseURL2() throws Exception {
Properties p = new Properties();
-
SocketProfile.parseURL("jdbc:metamatrix:BQT@mms://slwxp157:1234;version=3", p);
//$NON-NLS-1$
+ SocketProfile.parseURL("jdbc:teiid:BQT@mms://slwxp157: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://slwxp157:1234"));
//$NON-NLS-1$
@@ -123,7 +123,7 @@
@Test public void testParseURL3() throws Exception{
Properties p = new Properties();
-
SocketProfile.parseURL("jdbc:metamatrix:BQT@mm://slwxp157:1234,slntmm01:43401,sluxmm09:43302;version=4;autoCommitTxn=ON;partialResultsMode=YES;ApplicationName=Client",
p); //$NON-NLS-1$
+
SocketProfile.parseURL("jdbc:teiid:BQT@mm://slwxp157:1234,slntmm01:43401,sluxmm09:43302;version=4;autoCommitTxn=ON;partialResultsMode=YES;ApplicationName=Client",
p); //$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT"));
//$NON-NLS-1$
assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("4"));
//$NON-NLS-1$
assertTrue(p.getProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP).equals("ON"));
//$NON-NLS-1$
@@ -135,7 +135,7 @@
}
@Test public void testGetPropertyInfo1() throws Exception {
- DriverPropertyInfo info[] =
drv.getPropertyInfo("jdbc:metamatrix:vdb@mm://localhost:12345;applicationName=x",
null); //$NON-NLS-1$
+ DriverPropertyInfo info[] =
drv.getPropertyInfo("jdbc:teiid:vdb@mm://localhost:12345;applicationName=x",
null); //$NON-NLS-1$
assertEquals(19, info.length);
assertEquals(false, info[0].required);
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-08-30
16:25:41 UTC (rev 2503)
+++
branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2010-08-30
17:14:35 UTC (rev 2504)
@@ -444,7 +444,7 @@
<programlisting><![CDATA[<datasources>
<local-tx-datasource>
<jndi-name>TEIID-DS</jndi-name>
-
<connection-url>jdbc:metamatrix:myVDB@mm://localhost:31000</connection-url>
+ <connection-url>jdbc:teiid:myVDB@mm://localhost:31000</connection-url>
<driver-class>org.teiid.jdbc.TeiidDriver</driver-class>
<user-name>admin</user-name>
<password>teiid</password>
@@ -515,7 +515,7 @@
<programlisting><![CDATA[<datasources>
<local-tx-datasource>
<jndi-name>TEIID-DS</jndi-name>
-
<connection-url>jdbc:metamatrix:myVDB@mm://localhost:31000,mm://localhost:32000</connection-url>
+
<connection-url>jdbc:teiid:myVDB@mm://localhost:31000,mm://localhost:32000</connection-url>
<driver-class>org.teiid.jdbc.TeiidDriver</driver-class>
<user-name>admin</user-name>
<password>teiid</password>
Modified:
branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/using-hibernate.xml
===================================================================
---
branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/using-hibernate.xml 2010-08-30
16:25:41 UTC (rev 2503)
+++
branches/7.1.x/documentation/client-developers-guide/src/main/docbook/en-US/content/using-hibernate.xml 2010-08-30
17:14:35 UTC (rev 2504)
@@ -43,7 +43,7 @@
(replacing terms in angle brackets with the appropriate values):
<programlisting><![CDATA[<property
name="connection.url">
- jdbc:metamatrix:<vdb-name>@mm://<host>:<port>;user=<user-name>;password=<password>
+ jdbc:teiid:<vdb-name>@mm://<host>:<port>;user=<user-name>;password=<password>
</property>]]></programlisting></para>
</listitem>
<listitem>