teiid SVN: r2854 - in trunk: adminshell and 35 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-01-19 12:11:48 -0500 (Wed, 19 Jan 2011)
New Revision: 2854
Modified:
trunk/adminshell/pom.xml
trunk/api/pom.xml
trunk/build/pom.xml
trunk/cache-jbosscache/pom.xml
trunk/client/pom.xml
trunk/common-core/pom.xml
trunk/connectors/connector-file/pom.xml
trunk/connectors/connector-ldap/pom.xml
trunk/connectors/connector-salesforce/pom.xml
trunk/connectors/connector-ws/pom.xml
trunk/connectors/pom.xml
trunk/connectors/salesforce-api/pom.xml
trunk/connectors/sandbox/pom.xml
trunk/connectors/sandbox/translator-yahoo/pom.xml
trunk/connectors/translator-file/pom.xml
trunk/connectors/translator-jdbc/pom.xml
trunk/connectors/translator-ldap/pom.xml
trunk/connectors/translator-loopback/pom.xml
trunk/connectors/translator-salesforce/pom.xml
trunk/connectors/translator-ws/pom.xml
trunk/console/pom.xml
trunk/documentation/admin-guide/pom.xml
trunk/documentation/caching-guide/pom.xml
trunk/documentation/client-developers-guide/pom.xml
trunk/documentation/developer-guide/pom.xml
trunk/documentation/pom.xml
trunk/documentation/quick-start-example/pom.xml
trunk/documentation/reference/pom.xml
trunk/engine/pom.xml
trunk/hibernate-dialect/pom.xml
trunk/jboss-integration/pom.xml
trunk/metadata/pom.xml
trunk/pom.xml
trunk/runtime/pom.xml
trunk/test-integration/common/pom.xml
trunk/test-integration/db/pom.xml
trunk/test-integration/pom.xml
Log:
[maven-release-plugin] prepare release teiid-parent-7.3.0.CR1
Modified: trunk/adminshell/pom.xml
===================================================================
--- trunk/adminshell/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/adminshell/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-adminshell</artifactId>
Modified: trunk/api/pom.xml
===================================================================
--- trunk/api/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/api/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-api</artifactId>
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/build/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid</artifactId>
Modified: trunk/cache-jbosscache/pom.xml
===================================================================
--- trunk/cache-jbosscache/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/cache-jbosscache/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-cache-jbosscache</artifactId>
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/client/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client</artifactId>
Modified: trunk/common-core/pom.xml
===================================================================
--- trunk/common-core/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/common-core/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-common-core</artifactId>
Modified: trunk/connectors/connector-file/pom.xml
===================================================================
--- trunk/connectors/connector-file/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/connector-file/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-file</artifactId>
Modified: trunk/connectors/connector-ldap/pom.xml
===================================================================
--- trunk/connectors/connector-ldap/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/connector-ldap/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ldap</artifactId>
Modified: trunk/connectors/connector-salesforce/pom.xml
===================================================================
--- trunk/connectors/connector-salesforce/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/connector-salesforce/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-salesforce</artifactId>
Modified: trunk/connectors/connector-ws/pom.xml
===================================================================
--- trunk/connectors/connector-ws/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/connector-ws/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ws</artifactId>
Modified: trunk/connectors/pom.xml
===================================================================
--- trunk/connectors/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/connectors/salesforce-api/pom.xml
===================================================================
--- trunk/connectors/salesforce-api/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/salesforce-api/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>salesforce-api</artifactId>
Modified: trunk/connectors/sandbox/pom.xml
===================================================================
--- trunk/connectors/sandbox/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/sandbox/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid.connectors</groupId>
Modified: trunk/connectors/sandbox/translator-yahoo/pom.xml
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/sandbox/translator-yahoo/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-yahoo</artifactId>
Modified: trunk/connectors/translator-file/pom.xml
===================================================================
--- trunk/connectors/translator-file/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/translator-file/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-file</artifactId>
Modified: trunk/connectors/translator-jdbc/pom.xml
===================================================================
--- trunk/connectors/translator-jdbc/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/translator-jdbc/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-jdbc</artifactId>
Modified: trunk/connectors/translator-ldap/pom.xml
===================================================================
--- trunk/connectors/translator-ldap/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/translator-ldap/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ldap</artifactId>
Modified: trunk/connectors/translator-loopback/pom.xml
===================================================================
--- trunk/connectors/translator-loopback/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/translator-loopback/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-loopback</artifactId>
Modified: trunk/connectors/translator-salesforce/pom.xml
===================================================================
--- trunk/connectors/translator-salesforce/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/translator-salesforce/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-salesforce</artifactId>
Modified: trunk/connectors/translator-ws/pom.xml
===================================================================
--- trunk/connectors/translator-ws/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/connectors/translator-ws/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ws</artifactId>
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/console/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/documentation/admin-guide/pom.xml
===================================================================
--- trunk/documentation/admin-guide/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/admin-guide/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>admin-guide</artifactId>
Modified: trunk/documentation/caching-guide/pom.xml
===================================================================
--- trunk/documentation/caching-guide/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/caching-guide/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>caching-guide</artifactId>
Modified: trunk/documentation/client-developers-guide/pom.xml
===================================================================
--- trunk/documentation/client-developers-guide/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/client-developers-guide/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>client-developers-guide</artifactId>
Modified: trunk/documentation/developer-guide/pom.xml
===================================================================
--- trunk/documentation/developer-guide/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/developer-guide/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>developer-guide</artifactId>
Modified: trunk/documentation/pom.xml
===================================================================
--- trunk/documentation/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/documentation/quick-start-example/pom.xml
===================================================================
--- trunk/documentation/quick-start-example/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/quick-start-example/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quick-start-example</artifactId>
Modified: trunk/documentation/reference/pom.xml
===================================================================
--- trunk/documentation/reference/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/documentation/reference/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>reference</artifactId>
Modified: trunk/engine/pom.xml
===================================================================
--- trunk/engine/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/engine/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-engine</artifactId>
Modified: trunk/hibernate-dialect/pom.xml
===================================================================
--- trunk/hibernate-dialect/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/hibernate-dialect/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-hibernate-dialect</artifactId>
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/jboss-integration/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/metadata/pom.xml
===================================================================
--- trunk/metadata/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/metadata/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-metadata</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -5,15 +5,15 @@
<artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
<description>Federated SQL and XML query engine.</description>
<properties>
<ant.version>1.7.0</ant.version>
<site.url>http://www.jboss.org/teiid</site.url>
</properties>
<scm>
- <connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/teiid/trunk</developerConnection>
+ <connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/tags/teiid-parent-7.3.0.CR1</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/teiid/tags/teiid-parent-7.3.0.CR1</developerConnection>
</scm>
<licenses>
<license>
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/runtime/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/test-integration/common/pom.xml
===================================================================
--- trunk/test-integration/common/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/test-integration/common/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-integration-common</artifactId>
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/test-integration/db/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -9,7 +9,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2011-01-19 16:19:44 UTC (rev 2853)
+++ trunk/test-integration/pom.xml 2011-01-19 17:11:48 UTC (rev 2854)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.3.0.CR1-SNAPSHOT</version>
+ <version>7.3.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-test-integration</artifactId>
13 years, 3 months
teiid SVN: r2853 - in trunk: cache-jbosscache/src/main/java/org/teiid/cache/jboss and 12 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-19 11:19:44 -0500 (Wed, 19 Jan 2011)
New Revision: 2853
Added:
trunk/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java
trunk/console/src/main/java/org/teiid/rhq/plugin/objects/RequestMetadata.java
trunk/console/src/main/java/org/teiid/rhq/plugin/objects/SessionMetadata.java
trunk/console/src/main/java/org/teiid/rhq/plugin/objects/TransactionMetadata.java
Removed:
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java
trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java
trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
trunk/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java
trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
trunk/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java
trunk/console/src/main/resources/META-INF/rhq-plugin.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java
trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
Log:
forward merge of 7.1.1 and TEIID-1444 fix
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-01-19 16:19:44 UTC (rev 2853)
@@ -51,6 +51,7 @@
<h4>from 7.2</h4>
<ul>
<li>The default JDBC credentials are user/user - not admin/teiid
+ <li>Unordered limits are no longer pushed through conditions, dup removal, or UNION not all. This prevents the possibility of getting less results than the logical intent of the limit.
</ul>
<h4>from 7.1</h4>
<ul>
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -21,6 +21,9 @@
*/
package org.teiid.cache.jboss;
+import java.util.HashSet;
+import java.util.Set;
+
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
@@ -47,4 +50,20 @@
child.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
return (V)child.put(key, value);
}
+
+ @Override
+ public Set<K> keys() {
+ HashSet keys = new HashSet();
+ Node<K, V> node = getRootNode();
+ Set<Node<K, V>> children = node.getChildren();
+ for (Node<K, V> child:children) {
+ for (K key:child.getData().keySet()) {
+ if ((key instanceof String) && (key.equals(ExpirationAlgorithmConfig.EXPIRATION_KEY))) {
+ continue;
+ }
+ keys.add(key);
+ }
+ }
+ return keys;
+ }
}
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -78,9 +78,12 @@
@Override
public V remove(K key) {
Node<K, V> node = getRootNode();
- Node child = node.getChild(getFqn(key));
+ Fqn<String> fqn = getFqn(key);
+ Node child = node.getChild(fqn);
if (child != null) {
- return (V)child.remove(key);
+ V value = (V)child.remove(key);
+ node.removeChild(fqn);
+ return value;
}
return null;
}
@@ -88,7 +91,14 @@
@Override
public int size() {
Node<K, V> node = getRootNode();
- return node.getChildren().size();
+ int size = 0;
+ Set<Node<K,V>> nodes = new HashSet<Node<K, V>>(node.getChildren());
+ for (Node<K, V> child : nodes) {
+ if (!child.getData().isEmpty()) {
+ size++;
+ }
+ }
+ return size;
}
@Override
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -36,7 +36,7 @@
import org.jboss.metatype.spi.values.MetaMapper;
public class TransactionMetadataMapper extends MetaMapper<TransactionMetadata> {
- private static final String XID = "xid"; //$NON-NLS-1$
+ private static final String ID = "id"; //$NON-NLS-1$
private static final String SCOPE = "scope"; //$NON-NLS-1$
private static final String CREATED_TIME = "createdTime"; //$NON-NLS-1$
private static final String ASSOCIATED_SESSION = "associatedSession"; //$NON-NLS-1$
@@ -48,7 +48,7 @@
metaType.addItem(ASSOCIATED_SESSION, ASSOCIATED_SESSION, SimpleMetaType.STRING);
metaType.addItem(CREATED_TIME, CREATED_TIME, SimpleMetaType.LONG_PRIMITIVE);
metaType.addItem(SCOPE, SCOPE, SimpleMetaType.STRING);
- metaType.addItem(XID, XID, SimpleMetaType.STRING);
+ metaType.addItem(ID, ID, SimpleMetaType.STRING);
metaType.freeze();
}
@@ -73,7 +73,7 @@
transaction.set(ASSOCIATED_SESSION, SimpleValueSupport.wrap(object.getAssociatedSession()));
transaction.set(CREATED_TIME, SimpleValueSupport.wrap(object.getCreatedTime()));
transaction.set(SCOPE, SimpleValueSupport.wrap(object.getScope()));
- transaction.set("id", SimpleValueSupport.wrap(object.getId())); //$NON-NLS-1$
+ transaction.set(ID, SimpleValueSupport.wrap(object.getId()));
return transaction;
}
@@ -92,7 +92,7 @@
transaction.setAssociatedSession((String) metaValueFactory.unwrap(compositeValue.get(ASSOCIATED_SESSION)));
transaction.setCreatedTime((Long) metaValueFactory.unwrap(compositeValue.get(CREATED_TIME)));
transaction.setScope((String) metaValueFactory.unwrap(compositeValue.get(SCOPE)));
- transaction.setId((String) metaValueFactory.unwrap(compositeValue.get("id"))); //$NON-NLS-1$
+ transaction.setId((String) metaValueFactory.unwrap(compositeValue.get(ID)));
return transaction;
}
throw new IllegalStateException("Unable to unwrap TransactionMetadata " + metaValue); //$NON-NLS-1$
Copied: trunk/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java (from rev 2852, branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java)
===================================================================
--- trunk/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java (rev 0)
+++ trunk/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,45 @@
+/*
+ * 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.adminapi.impl;
+
+import static org.junit.Assert.*;
+
+import org.jboss.metatype.api.values.MetaValue;
+import org.junit.Test;
+
+@SuppressWarnings("nls")
+public class TestTransactionMetadata {
+
+ @Test public void testMapping() {
+ TransactionMetadata tm = new TransactionMetadata();
+ tm.setAssociatedSession("x");
+
+ TransactionMetadataMapper tmm = new TransactionMetadataMapper();
+ MetaValue mv = tmm.createMetaValue(tmm.getMetaType(), tm);
+
+ TransactionMetadata tm1 = tmm.unwrapMetaValue(mv);
+
+ assertEquals(tm.getAssociatedSession(), tm1.getAssociatedSession());
+ }
+
+}
Modified: trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -40,6 +40,7 @@
import org.jboss.managed.plugins.ManagedObjectImpl;
import org.jboss.metatype.api.types.MetaType;
import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.CompositeValue;
import org.jboss.metatype.api.values.CompositeValueSupport;
import org.jboss.metatype.api.values.GenericValueSupport;
import org.jboss.metatype.api.values.MetaValue;
@@ -47,15 +48,12 @@
import org.jboss.metatype.api.values.SimpleValueSupport;
import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
import org.teiid.adminapi.Admin;
-import org.teiid.adminapi.Request;
-import org.teiid.adminapi.Session;
-import org.teiid.adminapi.Transaction;
+import org.teiid.adminapi.Request.ProcessingState;
import org.teiid.adminapi.VDB.Status;
-import org.teiid.adminapi.impl.RequestMetadata;
-import org.teiid.adminapi.impl.RequestMetadataMapper;
-import org.teiid.adminapi.impl.SessionMetadataMapper;
-import org.teiid.adminapi.impl.TransactionMetadataMapper;
import org.teiid.rhq.plugin.objects.ExecutedResult;
+import org.teiid.rhq.plugin.objects.RequestMetadata;
+import org.teiid.rhq.plugin.objects.SessionMetadata;
+import org.teiid.rhq.plugin.objects.TransactionMetadata;
import org.teiid.rhq.plugin.util.DeploymentUtils;
import org.teiid.rhq.plugin.util.PluginConstants;
import org.teiid.rhq.plugin.util.ProfileServiceUtil;
@@ -68,7 +66,32 @@
private static final Log LOG = LogFactory.getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);
private static final String VDB_EXT = ".vdb"; //$NON-NLS-1$
+
+ //Session metadata fields
+ private static final String SECURITY_DOMAIN = "securityDomain"; //$NON-NLS-1$
+ private static final String VDB_VERSION = "VDBVersion"; //$NON-NLS-1$
+ private static final String VDB_NAME = "VDBName"; //$NON-NLS-1$
+ private static final String USER_NAME = "userName"; //$NON-NLS-1$
+ private static final String SESSION_ID = "sessionId"; //$NON-NLS-1$
+ private static final String LAST_PING_TIME = "lastPingTime"; //$NON-NLS-1$
+ private static final String IP_ADDRESS = "IPAddress"; //$NON-NLS-1$
+ private static final String CLIENT_HOST_NAME = "clientHostName"; //$NON-NLS-1$
+ private static final String CREATED_TIME = "createdTime"; //$NON-NLS-1$
+ private static final String APPLICATION_NAME = "applicationName"; //$NON-NLS-1$
+ //Request metadata fields
+ private static final String TRANSACTION_ID = "transactionId"; //$NON-NLS-1$
+ private static final String NODE_ID = "nodeId"; //$NON-NLS-1$
+ private static final String SOURCE_REQUEST = "sourceRequest"; //$NON-NLS-1$
+ private static final String COMMAND = "command"; //$NON-NLS-1$
+ private static final String START_TIME = "startTime"; //$NON-NLS-1$
+ private static final String EXECUTION_ID = "executionId"; //$NON-NLS-1$
+ private static final String STATE = "processingState"; //$NON-NLS-1$
+
+ //Transaction metadata fields
+ private static final String SCOPE = "scope"; //$NON-NLS-1$
+ private static final String ASSOCIATED_SESSION = "associatedSession"; //$NON-NLS-1$
+
public DQPManagementView() {
}
@@ -77,7 +100,7 @@
*/
public Object getMetric(ProfileServiceConnection connection,
String componentType, String identifier, String metric,
- Map<String, Object> valueMap) {
+ Map<String, Object> valueMap) throws Exception {
Object resultObject = new Object();
if (componentType.equals(PluginConstants.ComponentType.Platform.NAME)) {
@@ -89,7 +112,7 @@
}
private Object getPlatformMetric(ProfileServiceConnection connection,
- String componentType, String metric, Map<String, Object> valueMap) {
+ String componentType, String metric, Map<String, Object> valueMap) throws Exception {
Object resultObject = new Object();
@@ -98,7 +121,7 @@
} else if (metric.equals(PluginConstants.ComponentType.Platform.Metrics.SESSION_COUNT)) {
resultObject = new Double(getSessionCount(connection).doubleValue());
} else if (metric.equals(PluginConstants.ComponentType.Platform.Metrics.LONG_RUNNING_QUERIES)) {
- Collection<Request> longRunningQueries = new ArrayList<Request>();
+ Collection<RequestMetadata> longRunningQueries = new ArrayList<RequestMetadata>();
getRequestCollectionValue(getLongRunningQueries(connection), longRunningQueries);
resultObject = new Double(longRunningQueries.size());
} else if (metric.equals(PluginConstants.ComponentType.Platform.Metrics.BUFFER_USAGE)) {
@@ -126,7 +149,7 @@
private Object getVdbMetric(ProfileServiceConnection connection,
String componentType, String identifier, String metric,
- Map<String, Object> valueMap) {
+ Map<String, Object> valueMap) throws Exception {
Object resultObject = new Object();
@@ -141,7 +164,7 @@
} else if (metric.equals(PluginConstants.ComponentType.VDB.Metrics.SESSION_COUNT)) {
resultObject = new Double(getSessionCount(connection).doubleValue());
} else if (metric.equals(PluginConstants.ComponentType.VDB.Metrics.LONG_RUNNING_QUERIES)) {
- Collection<Request> longRunningQueries = new ArrayList<Request>();
+ Collection<RequestMetadata> longRunningQueries = new ArrayList<RequestMetadata>();
getRequestCollectionValue(getLongRunningQueries(connection), longRunningQueries);
resultObject = new Double(longRunningQueries.size());
}
@@ -164,10 +187,10 @@
private void executePlatformOperation(ProfileServiceConnection connection,
ExecutedResult operationResult, final String operationName,
- final Map<String, Object> valueMap) {
- Collection<Request> resultObject = new ArrayList<Request>();
- Collection<Session> activeSessionsCollection = new ArrayList<Session>();
- Collection<Transaction> transactionsCollection = new ArrayList<Transaction>();
+ final Map<String, Object> valueMap) throws Exception {
+ Collection<RequestMetadata> resultObject = new ArrayList<RequestMetadata>();
+ Collection<SessionMetadata> activeSessionsCollection = new ArrayList<SessionMetadata>();
+ Collection<TransactionMetadata> transactionsCollection = new ArrayList<TransactionMetadata>();
if (operationName.equals(Platform.Operations.GET_LONGRUNNINGQUERIES)) {
List<String> fieldNameList = operationResult.getFieldNameList();
@@ -221,15 +244,8 @@
} else if (operationName.equals(Platform.Operations.DEPLOY_VDB_BY_URL)) {
String vdbUrl = (String) valueMap.get(Operation.Value.VDB_URL);
String deployName = (String) valueMap.get(Operation.Value.VDB_DEPLOY_NAME);
- Object vdbVersion = valueMap.get(Operation.Value.VDB_VERSION);
- // strip off vdb extension if user added it
- if (deployName.endsWith(VDB_EXT)) {
- deployName = deployName.substring(0, deployName.lastIndexOf(VDB_EXT));
- }
- if (vdbVersion != null) {
- deployName = deployName + "." + ((Integer) vdbVersion).toString() + VDB_EXT; //$NON-NLS-1$
- }
- // add vdb extension if there was no version
+
+ // add vdb extension if missing
if (!deployName.endsWith(VDB_EXT)) {
deployName = deployName + VDB_EXT;
}
@@ -249,8 +265,8 @@
ExecutedResult operationResult, final String operationName,
final Map<String, Object> valueMap) throws Exception {
Collection<ArrayList<String>> sqlResultsObject = new ArrayList<ArrayList<String>>();
- Collection<Request> resultObject = new ArrayList<Request>();
- Collection<Session> activeSessionsCollection = new ArrayList<Session>();
+ Collection<RequestMetadata> resultObject = new ArrayList<RequestMetadata>();
+ Collection<SessionMetadata> activeSessionsCollection = new ArrayList<SessionMetadata>();
String vdbName = (String) valueMap.get(PluginConstants.ComponentType.VDB.NAME);
vdbName = formatVdbName(vdbName);
String vdbVersion = (String) valueMap.get(PluginConstants.ComponentType.VDB.VERSION);
@@ -565,12 +581,12 @@
throw new Exception("No property found with given name =" + property); //$NON-NLS-1$
}
- private Integer getQueryCount(ProfileServiceConnection connection) {
+ private Integer getQueryCount(ProfileServiceConnection connection) throws Exception {
Integer count = new Integer(0);
MetaValue requests = null;
- Collection<Request> requestsCollection = new ArrayList<Request>();
+ Collection<RequestMetadata> requestsCollection = new ArrayList<RequestMetadata>();
requests = getRequests(connection);
@@ -583,9 +599,9 @@
return count;
}
- private Integer getSessionCount(ProfileServiceConnection connection) {
+ private Integer getSessionCount(ProfileServiceConnection connection) throws Exception {
- Collection<Session> activeSessionsCollection = new ArrayList<Session>();
+ Collection<SessionMetadata> activeSessionsCollection = new ArrayList<SessionMetadata>();
MetaValue sessionMetaValue = getSessions(connection);
getSessionCollectionValue(sessionMetaValue, activeSessionsCollection);
return activeSessionsCollection.size();
@@ -677,13 +693,12 @@
return usedBufferSpace;
}
- private void getRequestCollectionValue(MetaValue pValue, Collection<Request> list) {
+ private void getRequestCollectionValue(MetaValue pValue, Collection<RequestMetadata> list) throws Exception {
MetaType metaType = pValue.getMetaType();
if (metaType.isCollection()) {
for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
if (value.getMetaType().isComposite()) {
- RequestMetadataMapper rmm = new RequestMetadataMapper();
- RequestMetadata request = rmm.unwrapMetaValue(value);
+ RequestMetadata request = unwrapRequestMetaValue(value);
list.add(request);
} else {
throw new IllegalStateException(pValue + " is not a Composite type"); //$NON-NLS-1$
@@ -722,13 +737,12 @@
}
}
- public static <T> void getTransactionCollectionValue(MetaValue pValue, Collection<Transaction> list) {
+ public <T> void getTransactionCollectionValue(MetaValue pValue, Collection<TransactionMetadata> list) throws Exception {
MetaType metaType = pValue.getMetaType();
if (metaType.isCollection()) {
for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
if (value.getMetaType().isComposite()) {
- TransactionMetadataMapper tmm = new TransactionMetadataMapper();
- Transaction transaction = tmm.unwrapMetaValue(value);
+ TransactionMetadata transaction = unwrapTransactionMetaValue(value);
list.add(transaction);
} else {
throw new IllegalStateException(pValue
@@ -738,13 +752,12 @@
}
}
- public static <T> void getSessionCollectionValue(MetaValue pValue,Collection<Session> list) {
+ public <T> void getSessionCollectionValue(MetaValue pValue,Collection<SessionMetadata> list) throws Exception {
MetaType metaType = pValue.getMetaType();
if (metaType.isCollection()) {
for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
if (value.getMetaType().isComposite()) {
- SessionMetadataMapper rmm = new SessionMetadataMapper();
- Session session = rmm.unwrapMetaValue(value);
+ SessionMetadata session = unwrapSessionMetaValue(value);
list.add(session);
} else {
throw new IllegalStateException(pValue
@@ -754,14 +767,13 @@
}
}
- public static <T> void getSessionCollectionValueForVDB(MetaValue pValue,Collection<Session> list, String vdbName) throws Exception {
+ public <T> void getSessionCollectionValueForVDB(MetaValue pValue,Collection<SessionMetadata> list, String vdbName) throws Exception {
MetaType metaType = pValue.getMetaType();
if (metaType.isCollection()) {
for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
if (value.getMetaType().isComposite()) {
if (ProfileServiceUtil.stringValue(((CompositeValueSupport)value).get("VDBName")).equals(vdbName)) { //$NON-NLS-1$
- SessionMetadataMapper rmm = new SessionMetadataMapper();
- Session session = rmm.unwrapMetaValue(value);
+ SessionMetadata session = unwrapSessionMetaValue(value);
list.add(session);
}
} else {
@@ -819,5 +831,66 @@
}
return reportResultList;
}
+
+ public SessionMetadata unwrapSessionMetaValue(MetaValue metaValue) throws Exception {
+ if (metaValue == null)
+ return null;
+ if (metaValue instanceof CompositeValue) {
+ CompositeValueSupport compositeValue = (CompositeValueSupport) metaValue;
+
+ SessionMetadata session = new SessionMetadata();
+ session.setApplicationName((String) ProfileServiceUtil.stringValue(compositeValue.get(APPLICATION_NAME)));
+ session.setCreatedTime((Long) ProfileServiceUtil.longValue(compositeValue.get(CREATED_TIME)));
+ session.setClientHostName((String) ProfileServiceUtil.stringValue(compositeValue.get(CLIENT_HOST_NAME)));
+ session.setIPAddress((String) ProfileServiceUtil.stringValue(compositeValue.get(IP_ADDRESS)));
+ session.setLastPingTime((Long) ProfileServiceUtil.longValue(compositeValue.get(LAST_PING_TIME)));
+ session.setSessionId((String) ProfileServiceUtil.stringValue(compositeValue.get(SESSION_ID)));
+ session.setUserName((String) ProfileServiceUtil.stringValue(compositeValue.get(USER_NAME)));
+ session.setVDBName((String) ProfileServiceUtil.stringValue(compositeValue.get(VDB_NAME)));
+ session.setVDBVersion((Integer) ProfileServiceUtil.integerValue(compositeValue.get(VDB_VERSION)));
+ session.setSecurityDomain((String) ProfileServiceUtil.stringValue(compositeValue.get(SECURITY_DOMAIN)));
+ return session;
+ }
+ throw new IllegalStateException("Unable to unwrap session " + metaValue); //$NON-NLS-1$
+ }
+
+ public RequestMetadata unwrapRequestMetaValue(MetaValue metaValue) throws Exception {
+ if (metaValue == null)
+ return null;
+
+ if (metaValue instanceof CompositeValue) {
+ CompositeValue compositeValue = (CompositeValue) metaValue;
+
+ RequestMetadata request = new RequestMetadata();
+ request.setExecutionId((Long) ProfileServiceUtil.longValue(compositeValue.get(EXECUTION_ID)));
+ request.setSessionId((String) ProfileServiceUtil.stringValue(compositeValue.get(SESSION_ID)));
+ request.setStartTime((Long) ProfileServiceUtil.longValue(compositeValue.get(START_TIME)));
+ request.setCommand((String) ProfileServiceUtil.stringValue(compositeValue.get(COMMAND)));
+ request.setSourceRequest((Boolean) ProfileServiceUtil.booleanValue(compositeValue.get(SOURCE_REQUEST)));
+ request.setNodeId((Integer) ProfileServiceUtil.integerValue(compositeValue.get(NODE_ID)));
+ request.setTransactionId((String) ProfileServiceUtil.stringValue(compositeValue.get(TRANSACTION_ID)));
+ request.setState((ProcessingState) ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), ProcessingState.class));
+ return request;
+ }
+ throw new IllegalStateException("Unable to unwrap RequestMetadata " + metaValue); //$NON-NLS-1$
+ }
+
+ public TransactionMetadata unwrapTransactionMetaValue(MetaValue metaValue) throws Exception {
+ if (metaValue == null)
+ return null;
+
+ if (metaValue instanceof CompositeValue) {
+ CompositeValue compositeValue = (CompositeValue) metaValue;
+
+ TransactionMetadata transaction = new TransactionMetadata();
+ transaction.setAssociatedSession((String) ProfileServiceUtil.stringValue(compositeValue.get(ASSOCIATED_SESSION)));
+ transaction.setCreatedTime((Long) ProfileServiceUtil.longValue(compositeValue.get(CREATED_TIME)));
+ transaction.setScope((String) (String) ProfileServiceUtil.stringValue(compositeValue.get(SCOPE)));
+ transaction.setId((String) (String) ProfileServiceUtil.stringValue(compositeValue.get("id"))); //$NON-NLS-1$
+ return transaction;
+ }
+ throw new IllegalStateException("Unable to unwrap TransactionMetadata " + metaValue); //$NON-NLS-1$
+ }
+
}
Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -80,6 +80,8 @@
import org.rhq.plugins.jbossas5.ProfileServiceComponent;
import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
import org.teiid.rhq.admin.DQPManagementView;
+import org.teiid.rhq.plugin.deployer.Deployer;
+import org.teiid.rhq.plugin.deployer.RemoteDeployer;
import org.teiid.rhq.plugin.objects.ExecutedOperationResultImpl;
import org.teiid.rhq.plugin.objects.ExecutedResult;
import org.teiid.rhq.plugin.util.DeploymentUtils;
@@ -792,44 +794,15 @@
protected void createContentBasedResource(
CreateResourceReport createResourceReport) {
+
+ getDeployer().deploy(createResourceReport, createResourceReport.getResourceType());
- ResourcePackageDetails details = createResourceReport
- .getPackageDetails();
- PackageDetailsKey key = details.getKey();
- // This is the full path to a temporary file which was written by the UI
- // layer.
- String archivePath = key.getName();
-
- try {
- File archiveFile = new File(archivePath);
-
- if (!DeploymentUtils.hasCorrectExtension(archiveFile.getName(),
- resourceContext.getResourceType())) {
- createResourceReport.setStatus(CreateResourceStatus.FAILURE);
- createResourceReport
- .setErrorMessage("Incorrect extension specified on filename [" //$NON-NLS-1$
- + archivePath + "]"); //$NON-NLS-1$
-
- }
-
- DeploymentManager deploymentManager = getConnection()
- .getDeploymentManager();
- DeploymentUtils
- .deployArchive(deploymentManager, archiveFile, false);
-
- deploymentName = archivePath;
- createResourceReport.setResourceName(archivePath);
- createResourceReport.setResourceKey(archivePath);
- createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
-
- } catch (Throwable t) {
- log.error("Error deploying application for report: " //$NON-NLS-1$
- + createResourceReport, t);
- createResourceReport.setStatus(CreateResourceStatus.FAILURE);
- createResourceReport.setException(t);
- }
-
}
+
+ private Deployer getDeployer() {
+ ProfileServiceConnection profileServiceConnection = getConnection();
+ return new RemoteDeployer(profileServiceConnection, this.resourceContext);
+ }
private static String getResourceName(Configuration pluginConfig,
Configuration resourceConfig) {
Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -104,7 +104,6 @@
} else if (name.equals(Platform.Operations.DEPLOY_VDB_BY_URL)) {
valueMap.put(Operation.Value.VDB_URL, configuration.getSimple(Operation.Value.VDB_URL).getStringValue());
valueMap.put(Operation.Value.VDB_DEPLOY_NAME, configuration.getSimple(Operation.Value.VDB_DEPLOY_NAME).getStringValue());
- valueMap.put(Operation.Value.VDB_VERSION, configuration.getSimple(Operation.Value.VDB_VERSION).getIntegerValue());
}
}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer)
Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -1,126 +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.rhq.plugin.deployer;
-
-import java.io.File;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.content.PackageDetailsKey;
-import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.resource.CreateResourceStatus;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
-import org.teiid.rhq.plugin.util.DeploymentUtils;
-
-/**
- * Abstract base class capturing the common deploy functionality for embedded
- * and remote scenarios.
- *
- */
-public abstract class AbstractDeployer implements Deployer {
-
- private final Log log = LogFactory.getLog(this.getClass());
-
- private ProfileServiceConnection profileServiceConnection;
-
- protected AbstractDeployer(ProfileServiceConnection profileService) {
- this.profileServiceConnection = profileService;
- }
-
- public void deploy(CreateResourceReport createResourceReport, ResourceType resourceType) {
- File archiveFile = null;
- try {
- ResourcePackageDetails details = createResourceReport.getPackageDetails();
- PackageDetailsKey key = details.getKey();
-
- archiveFile = prepareArchive(key, resourceType);
-
- String archiveName = key.getName();
-
- if (!DeploymentUtils.hasCorrectExtension(archiveName, resourceType)) {
- createResourceReport.setStatus(CreateResourceStatus.FAILURE);
- createResourceReport.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]");
- return;
- }
-
- // abortIfApplicationAlreadyDeployed(resourceType, archiveFile);
-
- Configuration deployTimeConfig = details.getDeploymentTimeConfiguration();
- @SuppressWarnings( { "ConstantConditions" })
-
- DeploymentManager deploymentManager = this.profileServiceConnection.getDeploymentManager();
-
- DeploymentUtils.deployArchive(deploymentManager, archiveFile, false);
-
- // Deployment was successful!
- createResourceReport.setResourceName(archiveName);
- createResourceReport.setResourceKey(archiveName);
- createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
-
- } catch (Throwable t) {
- log.error("Error deploying application for request [" + createResourceReport + "].", t);
- createResourceReport.setStatus(CreateResourceStatus.FAILURE);
- createResourceReport.setException(t);
- } finally {
- if (archiveFile != null) {
- destroyArchive(archiveFile);
- }
- }
-
- }
-
- protected Log getLog() {
- return log;
- }
-
- protected ProfileServiceConnection getProfileServiceConnection() {
- return profileServiceConnection;
- }
-
- protected abstract File prepareArchive(PackageDetailsKey key,
- ResourceType resourceType);
-
- protected abstract void destroyArchive(File archive);
-
- // private void abortIfApplicationAlreadyDeployed(ResourceType resourceType,
- // File archiveFile) throws Exception {
- // String archiveFileName = archiveFile.getName();
- // KnownDeploymentTypes deploymentType =
- // ConversionUtils.getDeploymentType(resourceType);
- // String deploymentTypeString = deploymentType.getType();
- // ManagementView managementView =
- // profileServiceConnection.getManagementView();
- // managementView.load();
- // Set<ManagedDeployment> managedDeployments =
- // managementView.getDeploymentsForType(deploymentTypeString);
- // for (ManagedDeployment managedDeployment : managedDeployments) {
- // if (managedDeployment.getSimpleName().equals(archiveFileName))
- // throw new IllegalArgumentException("An application named '" +
- // archiveFileName
- // + "' is already deployed.");
- // }
- // }
-}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/AbstractDeployer.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,126 @@
+/*
+ * 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.rhq.plugin.deployer;
+
+import java.io.File;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.deployers.spi.management.deploy.DeploymentManager;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
+import org.teiid.rhq.plugin.util.DeploymentUtils;
+
+/**
+ * Abstract base class capturing the common deploy functionality for embedded
+ * and remote scenarios.
+ *
+ */
+public abstract class AbstractDeployer implements Deployer {
+
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ private ProfileServiceConnection profileServiceConnection;
+
+ protected AbstractDeployer(ProfileServiceConnection profileService) {
+ this.profileServiceConnection = profileService;
+ }
+
+ public void deploy(CreateResourceReport createResourceReport, ResourceType resourceType) {
+ File archiveFile = null;
+ try {
+ ResourcePackageDetails details = createResourceReport.getPackageDetails();
+ PackageDetailsKey key = details.getKey();
+
+ archiveFile = prepareArchive(key, resourceType);
+
+ String archiveName = key.getName();
+
+ if (!DeploymentUtils.hasCorrectExtension(archiveName, resourceType)) {
+ createResourceReport.setStatus(CreateResourceStatus.FAILURE);
+ createResourceReport.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]");
+ return;
+ }
+
+ // abortIfApplicationAlreadyDeployed(resourceType, archiveFile);
+
+ Configuration deployTimeConfig = details.getDeploymentTimeConfiguration();
+ @SuppressWarnings( { "ConstantConditions" })
+
+ DeploymentManager deploymentManager = this.profileServiceConnection.getDeploymentManager();
+
+ DeploymentUtils.deployArchive(deploymentManager, archiveFile, false);
+
+ // Deployment was successful!
+ createResourceReport.setResourceName(archiveName);
+ createResourceReport.setResourceKey(archiveName);
+ createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
+
+ } catch (Throwable t) {
+ log.error("Error deploying application for request [" + createResourceReport + "].", t);
+ createResourceReport.setStatus(CreateResourceStatus.FAILURE);
+ createResourceReport.setException(t);
+ } finally {
+ if (archiveFile != null) {
+ destroyArchive(archiveFile);
+ }
+ }
+
+ }
+
+ protected Log getLog() {
+ return log;
+ }
+
+ protected ProfileServiceConnection getProfileServiceConnection() {
+ return profileServiceConnection;
+ }
+
+ protected abstract File prepareArchive(PackageDetailsKey key,
+ ResourceType resourceType);
+
+ protected abstract void destroyArchive(File archive);
+
+ // private void abortIfApplicationAlreadyDeployed(ResourceType resourceType,
+ // File archiveFile) throws Exception {
+ // String archiveFileName = archiveFile.getName();
+ // KnownDeploymentTypes deploymentType =
+ // ConversionUtils.getDeploymentType(resourceType);
+ // String deploymentTypeString = deploymentType.getType();
+ // ManagementView managementView =
+ // profileServiceConnection.getManagementView();
+ // managementView.load();
+ // Set<ManagedDeployment> managedDeployments =
+ // managementView.getDeploymentsForType(deploymentTypeString);
+ // for (ManagedDeployment managedDeployment : managedDeployments) {
+ // if (managedDeployment.getSimpleName().equals(archiveFileName))
+ // throw new IllegalArgumentException("An application named '" +
+ // archiveFileName
+ // + "' is already deployed.");
+ // }
+ // }
+}
Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -1,41 +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.rhq.plugin.deployer;
-
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-
-/**
- * An abstraction of the deployment process.
- *
- */
-public interface Deployer {
-
- /**
- * Handles the deployment process end to end and updates the createResourceReport with
- * appropriate results.
- *
- * @param createResourceReport the report to get the deployment from
- * @param resourceType the target resource type
- */
- void deploy(CreateResourceReport createResourceReport, ResourceType resourceType);
-}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/Deployer.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,41 @@
+/*
+ * 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.rhq.plugin.deployer;
+
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+
+/**
+ * An abstraction of the deployment process.
+ *
+ */
+public interface Deployer {
+
+ /**
+ * Handles the deployment process end to end and updates the createResourceReport with
+ * appropriate results.
+ *
+ * @param createResourceReport the report to get the deployment from
+ * @param resourceType the target resource type
+ */
+ void deploy(CreateResourceReport createResourceReport, ResourceType resourceType);
+}
Deleted: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -1,140 +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.rhq.plugin.deployer;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.rhq.core.domain.content.PackageDetailsKey;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.pluginapi.content.ContentContext;
-import org.rhq.core.pluginapi.content.ContentServices;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
-import org.rhq.plugins.jbossas5.util.ManagedComponentUtils;
-
-/**
- *
- */
-public class RemoteDeployer extends AbstractDeployer {
-
- private ResourceContext<?> resourceContext;
-
- /**
- * @param profileServiceConnection
- */
- public RemoteDeployer(ProfileServiceConnection profileServiceConnection, ResourceContext<?> resourceContext) {
- super(profileServiceConnection);
- this.resourceContext = resourceContext;
- }
-
- @Override
- protected void destroyArchive(File archive) {
- File tempDir = archive.getParentFile();
- archive.delete();
- tempDir.delete();
- }
-
- @Override
- protected File prepareArchive(PackageDetailsKey key, ResourceType resourceType) {
- //we're running in the agent. During the development of this functionality, there was
- //a time when the deployment only worked from within the JBossAS server home.
- //Further investigation never confirmed the problem again but since we have access to
- //server home directory anyway, why not stay on the safe side... ;)
- OutputStream os = null;
-
- try {
- File tempDir = createTempDirectory("teiid-deploy-content", null, getServerTempDirectory());
-
- File archiveFile = new File(key.getName());
-
- //this is to ensure that we only get the filename part no matter whether the key contains
- //full path or not.
- File contentCopy = new File(tempDir, archiveFile.getName());
-
- os = new BufferedOutputStream(new FileOutputStream(contentCopy));
- ContentContext contentContext = resourceContext.getContentContext();
- ContentServices contentServices = contentContext.getContentServices();
- contentServices.downloadPackageBitsForChildResource(contentContext, resourceType.getName(), key, os);
-
- return contentCopy;
- } catch (IOException e) {
- throw new IllegalStateException("Failed to copy the deployed archive to destination.", e);
- } finally {
- if (os != null) {
- try {
- os.close();
- } catch (IOException e) {
- getLog().warn("Failed to close the stream when copying deployment to destination.");
- }
- }
- }
- }
-
- private File getServerTempDirectory() {
- ManagementView managementView = getProfileServiceConnection().getManagementView();
- ManagedComponent serverConfigComponent = ManagedComponentUtils.getSingletonManagedComponent(managementView,
- new ComponentType("MCBean", "ServerConfig"));
- String serverTempDir = (String) ManagedComponentUtils.getSimplePropertyValue(serverConfigComponent,
- "serverTempDir");
-
- return new File(serverTempDir);
- }
-
- /**
- * TODO this should go somewhere nice...
- *
- * Creates a temporary directory in a given directory.
- * Reuses the logic of {@link File#createTempFile(String, String, File)} but the returned
- * file is a directory instead of a regular file.
- *
- * @param prefix the unique name prefix
- * @param suffix the unique name suffix
- * @param parentDirectory the parent directory to create the temp dir in
- *
- * @return the temporary directory
- *
- * @throws IOException on error
- */
- private static File createTempDirectory(String prefix, String suffix, File parentDirectory) throws IOException {
- // Let's reuse the algorithm the JDK uses to determine a unique name:
- // 1) create a temp file to get a unique name using JDK createTempFile
- // 2) then quickly delete the file and...
- // 3) convert it to a directory
-
- File tmpDir = File.createTempFile(prefix, suffix, parentDirectory); // create file with unique name
- boolean deleteOk = tmpDir.delete(); // delete the tmp file and...
- boolean mkdirsOk = tmpDir.mkdirs(); // ...convert it to a directory
-
- if (!deleteOk || !mkdirsOk) {
- throw new IOException("Failed to create temp directory named [" + tmpDir + "]");
- }
-
- return tmpDir;
- }
-}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/deployer/RemoteDeployer.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,140 @@
+/*
+ * 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.rhq.plugin.deployer;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pluginapi.content.ContentContext;
+import org.rhq.core.pluginapi.content.ContentServices;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
+import org.rhq.plugins.jbossas5.util.ManagedComponentUtils;
+
+/**
+ *
+ */
+public class RemoteDeployer extends AbstractDeployer {
+
+ private ResourceContext<?> resourceContext;
+
+ /**
+ * @param profileServiceConnection
+ */
+ public RemoteDeployer(ProfileServiceConnection profileServiceConnection, ResourceContext<?> resourceContext) {
+ super(profileServiceConnection);
+ this.resourceContext = resourceContext;
+ }
+
+ @Override
+ protected void destroyArchive(File archive) {
+ File tempDir = archive.getParentFile();
+ archive.delete();
+ tempDir.delete();
+ }
+
+ @Override
+ protected File prepareArchive(PackageDetailsKey key, ResourceType resourceType) {
+ //we're running in the agent. During the development of this functionality, there was
+ //a time when the deployment only worked from within the JBossAS server home.
+ //Further investigation never confirmed the problem again but since we have access to
+ //server home directory anyway, why not stay on the safe side... ;)
+ OutputStream os = null;
+
+ try {
+ File tempDir = createTempDirectory("teiid-deploy-content", null, getServerTempDirectory());
+
+ File archiveFile = new File(key.getName());
+
+ //this is to ensure that we only get the filename part no matter whether the key contains
+ //full path or not.
+ File contentCopy = new File(tempDir, archiveFile.getName());
+
+ os = new BufferedOutputStream(new FileOutputStream(contentCopy));
+ ContentContext contentContext = resourceContext.getContentContext();
+ ContentServices contentServices = contentContext.getContentServices();
+ contentServices.downloadPackageBitsForChildResource(contentContext, resourceType.getName(), key, os);
+
+ return contentCopy;
+ } catch (IOException e) {
+ throw new IllegalStateException("Failed to copy the deployed archive to destination.", e);
+ } finally {
+ if (os != null) {
+ try {
+ os.close();
+ } catch (IOException e) {
+ getLog().warn("Failed to close the stream when copying deployment to destination.");
+ }
+ }
+ }
+ }
+
+ private File getServerTempDirectory() {
+ ManagementView managementView = getProfileServiceConnection().getManagementView();
+ ManagedComponent serverConfigComponent = ManagedComponentUtils.getSingletonManagedComponent(managementView,
+ new ComponentType("MCBean", "ServerConfig"));
+ String serverTempDir = (String) ManagedComponentUtils.getSimplePropertyValue(serverConfigComponent,
+ "serverTempDir");
+
+ return new File(serverTempDir);
+ }
+
+ /**
+ * TODO this should go somewhere nice...
+ *
+ * Creates a temporary directory in a given directory.
+ * Reuses the logic of {@link File#createTempFile(String, String, File)} but the returned
+ * file is a directory instead of a regular file.
+ *
+ * @param prefix the unique name prefix
+ * @param suffix the unique name suffix
+ * @param parentDirectory the parent directory to create the temp dir in
+ *
+ * @return the temporary directory
+ *
+ * @throws IOException on error
+ */
+ private static File createTempDirectory(String prefix, String suffix, File parentDirectory) throws IOException {
+ // Let's reuse the algorithm the JDK uses to determine a unique name:
+ // 1) create a temp file to get a unique name using JDK createTempFile
+ // 2) then quickly delete the file and...
+ // 3) convert it to a directory
+
+ File tmpDir = File.createTempFile(prefix, suffix, parentDirectory); // create file with unique name
+ boolean deleteOk = tmpDir.delete(); // delete the tmp file and...
+ boolean mkdirsOk = tmpDir.mkdirs(); // ...convert it to a directory
+
+ if (!deleteOk || !mkdirsOk) {
+ throw new IOException("Failed to create temp directory named [" + tmpDir + "]");
+ }
+
+ return tmpDir;
+ }
+}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/objects/RequestMetadata.java (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/objects/RequestMetadata.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/objects/RequestMetadata.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/objects/RequestMetadata.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,151 @@
+/*
+ * 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.rhq.plugin.objects;
+
+import java.util.Date;
+
+import org.teiid.adminapi.Request.ProcessingState;
+import org.teiid.adminapi.Request.ThreadState;
+import org.teiid.core.util.HashCodeUtil;
+
+
+
+public class RequestMetadata {
+
+ private static final long serialVersionUID = -2779106368517784259L;
+
+ private long executionId;
+ private String sessionId;
+ private String command;
+ private long startTime;
+ private boolean sourceRequest;
+ private Integer nodeID;
+ private String transactionId;
+ private ProcessingState processingState = ProcessingState.PROCESSING;
+ private ThreadState threadState = ThreadState.RUNNING;
+
+ public long getExecutionId() {
+ return executionId;
+ }
+
+ public void setExecutionId(long id) {
+ this.executionId = id;
+ }
+
+ public ProcessingState getState() {
+ return processingState;
+ }
+
+ public void setState(ProcessingState state) {
+ this.processingState = state;
+ }
+
+ public ThreadState getThreadState() {
+ return threadState;
+ }
+
+ public void setThreadState(ThreadState threadState) {
+ this.threadState = threadState;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public void setSessionId(String session) {
+ this.sessionId = session;
+ }
+
+ public long getStartTime() {
+ return this.startTime;
+ }
+
+ public void setStartTime(long time) {
+ this.startTime = time;
+ }
+
+ public String getCommand() {
+ return this.command;
+ }
+
+ public void setCommand(String cmd) {
+ this.command = cmd;
+ }
+
+ public boolean sourceRequest() {
+ return sourceRequest;
+ }
+
+ public void setSourceRequest(boolean sourceRequest) {
+ this.sourceRequest = sourceRequest;
+ }
+
+ public Integer getNodeId() {
+ return this.nodeID;
+ }
+
+ public void setNodeId(Integer nodeID) {
+ this.nodeID = nodeID;
+ }
+
+ public String getTransactionId() {
+ return this.transactionId;
+ }
+
+ public void setTransactionId(String id) {
+ this.transactionId = id;
+ }
+
+ public boolean equals(Object obj) {
+ if (!(obj instanceof RequestMetadata)) {
+ return false;
+ }
+ RequestMetadata value = (RequestMetadata)obj;
+ if (!sourceRequest()) {
+ return sessionId == value.sessionId && executionId == value.executionId;
+ }
+ return sessionId == value.sessionId && executionId == value.executionId && nodeID.equals(value.nodeID);
+ }
+
+ public int hashCode() {
+ return HashCodeUtil.hashCode((int)executionId, sessionId);
+ }
+
+ @SuppressWarnings("nls")
+ public String toString() {
+ StringBuilder str = new StringBuilder();
+ str.append("Request: sessionid=").append(sessionId);
+ str.append("; executionId=").append(executionId);
+ if (nodeID != null) {
+ str.append("; nodeId=").append(nodeID);
+ }
+ if (transactionId != null) {
+ str.append("; transactionId=").append(transactionId);
+ }
+ str.append("; sourceRequest=").append(sourceRequest);
+ str.append("; processingTime=").append(new Date(startTime));
+ str.append("; command=").append(command);
+
+ return str.toString();
+ }
+}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/objects/SessionMetadata.java (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/objects/SessionMetadata.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/objects/SessionMetadata.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/objects/SessionMetadata.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,198 @@
+/*
+ * 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.rhq.plugin.objects;
+
+import java.util.Date;
+
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginContext;
+
+import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.client.security.SessionToken;
+
+
+
+/**
+ * Add and delete properties also in the Mapper class for correct wrapping for profile service.
+ */
+public class SessionMetadata {
+
+ private static final long serialVersionUID = 918638989081830034L;
+ private String applicationName;
+ private long lastPingTime = System.currentTimeMillis();
+ private long createdTime;
+ private String ipAddress;
+ private String clientHostName;
+ private String userName;
+ private String vdbName;
+ private int vdbVersion;
+ private String sessionId;
+ private String securityDomain;
+
+ //server session state
+ private transient VDBMetaData vdb;
+ private transient SessionToken sessionToken;
+ private transient LoginContext loginContext;
+ private transient Object securityContext;
+ private transient boolean embedded;
+
+ public String getApplicationName() {
+ return this.applicationName;
+ }
+
+ public void setApplicationName(String applicationName) {
+ this.applicationName = applicationName;
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public void setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ public String getClientHostName() {
+ return this.clientHostName;
+ }
+
+ public void setClientHostName(String clientHostname) {
+ this.clientHostName = clientHostname;
+ }
+
+ public String getIPAddress() {
+ return this.ipAddress;
+ }
+
+ public void setIPAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ }
+
+ public long getLastPingTime() {
+ return this.lastPingTime;
+ }
+
+ public void setLastPingTime(long lastPingTime) {
+ this.lastPingTime = lastPingTime;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public void setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getVDBName() {
+ return this.vdbName;
+ }
+
+ public void setVDBName(String vdbName) {
+ this.vdbName = vdbName;
+ }
+
+ public int getVDBVersion() {
+ return this.vdbVersion;
+ }
+
+ public void setVDBVersion(int vdbVersion) {
+ this.vdbVersion = vdbVersion;
+ }
+
+ public String getSecurityDomain() {
+ return this.securityDomain;
+ }
+
+ public void setSecurityDomain(String domain) {
+ this.securityDomain = domain;
+ }
+
+ @SuppressWarnings("nls")
+ public String toString() {
+ StringBuilder str = new StringBuilder();
+ str.append("session: sessionid=").append(sessionId);
+ str.append("; userName=").append(userName);
+ str.append("; vdbName=").append(vdbName);
+ str.append("; vdbVersion=").append(vdbVersion);
+ str.append("; createdTime=").append(new Date(createdTime));
+ str.append("; applicationName=").append(applicationName);
+ str.append("; clientHostName=").append(clientHostName);
+ str.append("; IPAddress=").append(ipAddress);
+ str.append("; securityDomain=").append(securityDomain);
+ str.append("; lastPingTime=").append(new Date(lastPingTime));
+ return str.toString();
+ }
+
+ public VDBMetaData getVdb() {
+ return vdb;
+ }
+
+ public void setVdb(VDBMetaData vdb) {
+ this.vdb = vdb;
+ }
+
+ public SessionToken getSessionToken() {
+ return sessionToken;
+ }
+
+ public void setSessionToken(SessionToken sessionToken) {
+ this.sessionToken = sessionToken;
+ }
+
+ public LoginContext getLoginContext() {
+ return loginContext;
+ }
+
+ public void setLoginContext(LoginContext loginContext) {
+ this.loginContext = loginContext;
+ }
+
+ public Object getSecurityContext() {
+ return securityContext;
+ }
+
+ public void setSecurityContext(Object securityContext) {
+ this.securityContext = securityContext;
+ }
+
+ public Subject getSubject() {
+ return this.loginContext.getSubject();
+ }
+
+ public void setEmbedded(boolean embedded) {
+ this.embedded = embedded;
+ }
+
+ public boolean isEmbedded() {
+ return embedded;
+ }
+
+}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/objects/TransactionMetadata.java (from rev 2852, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/objects/TransactionMetadata.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/objects/TransactionMetadata.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/objects/TransactionMetadata.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -0,0 +1,82 @@
+/*
+ * 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.rhq.plugin.objects;
+
+import java.util.Date;
+
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.metatype.api.annotations.MetaMapping;
+import org.teiid.adminapi.Transaction;
+
+
+public class TransactionMetadata {
+
+ private static final long serialVersionUID = -8588785315218789068L;
+ private String associatedSession;
+ private String scope;
+ private String id;
+ private long createdTime;
+
+ public String getAssociatedSession() {
+ return associatedSession;
+ }
+
+ public void setAssociatedSession(String associatedSession) {
+ this.associatedSession = associatedSession;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(long time) {
+ this.createdTime = time;
+ }
+
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+ result.append("Associated Session:").append(associatedSession); //$NON-NLS-1$
+ result.append("Scope:").append(scope); //$NON-NLS-1$
+ result.append("Id:").append(id); //$NON-NLS-1$
+ result.append("CreatedTime:").append(new Date(createdTime)); //$NON-NLS-1$
+ return result.toString();
+ }
+
+}
Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/util/ProfileServiceUtil.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -286,11 +286,35 @@
SimpleValue simple = (SimpleValue) v1;
return Double.valueOf(simple.getValue().toString());
}
- throw new Exception("Failed to convert value to boolean value"); //$NON-NLS-1$
+ throw new Exception("Failed to convert value to double value"); //$NON-NLS-1$
}
return null;
}
+ public static Long longValue(MetaValue v1) throws Exception {
+ if (v1 != null) {
+ MetaType type = v1.getMetaType();
+ if (type instanceof SimpleMetaType) {
+ SimpleValue simple = (SimpleValue) v1;
+ return Long.valueOf(simple.getValue().toString());
+ }
+ throw new Exception("Failed to convert value to long value"); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ public static Integer integerValue(MetaValue v1) throws Exception {
+ if (v1 != null) {
+ MetaType type = v1.getMetaType();
+ if (type instanceof SimpleMetaType) {
+ SimpleValue simple = (SimpleValue) v1;
+ return Integer.valueOf(simple.getValue().toString());
+ }
+ throw new Exception("Failed to convert value to integer value"); //$NON-NLS-1$
+ }
+ return null;
+ }
+
public static <T> T getSimpleValue(ManagedComponent mc, String prop,
Class<T> expectedType) {
ManagedProperty mp = mc.getProperty(prop);
@@ -310,6 +334,24 @@
return null;
}
+ public static <T> T getSimpleValue(MetaValue prop,
+ Class<T> expectedType) {
+ if (prop != null) {
+ MetaType metaType = prop.getMetaType();
+ if (metaType.isSimple()) {
+ SimpleValue simpleValue = (SimpleValue) prop;
+ return expectedType.cast((simpleValue != null) ? simpleValue
+ .getValue() : null);
+ } else if (metaType.isEnum()) {
+ EnumValue enumValue = (EnumValue) prop;
+ return expectedType.cast((enumValue != null) ? enumValue
+ .getValue() : null);
+ }
+ throw new IllegalStateException(prop + " is not a simple type"); //$NON-NLS-1$
+ }
+ return null;
+ }
+
public static <T> T getSimpleValue(ManagedCommon mc, String prop,
Class<T> expectedType) {
ManagedProperty mp = mc.getProperty(prop);
Modified: trunk/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2011-01-19 16:19:44 UTC (rev 2853)
@@ -159,13 +159,10 @@
description="Deploy a VDB using a URL">
<parameters>
<c:simple-property displayName="VDB URL" name="vdbUrl"
- type="file" required="true" description="The URL of the VDB to deploy" />
+ type="file" required="true" description="The URL of the VDB's source file" />
<c:simple-property displayName="VDB Deploy File Name"
name="vdbDeployName" type="string" required="true"
description="The deployment file name to use. Must match the VDB Name you are deploying." />
- <c:simple-property displayName="VDB Version" name="vdbVersion"
- type="integer" required="false"
- description="The version to use for the deployed VDB (leave blank for overwrite of version one)" />
</parameters>
</operation>
@@ -515,7 +512,7 @@
</operation>
<operation name="reloadMaterializedView" displayName="Refresh a Materialized View"
- description="Refresh a given any Materialized View for this VDB">
+ description="Refresh a given Materialized View for this VDB">
<parameters>
<c:simple-property displayName="Materialized View Schema"
name="schema" type="string" required="true"
@@ -713,7 +710,7 @@
<service name="Translators" description="Teiid Translators"
class="TranslatorComponent" discovery="TranslatorDiscoveryComponent"
- createDeletePolicy="both" creationDataType="configuration">
+ createDeletePolicy="neither" creationDataType="configuration">
<resource-configuration>
<c:simple-property name="name" displayName="Name"
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -97,7 +97,7 @@
this.lobChunkSizeInKB = lobChunkSizeInKB;
}
- @ManagementProperty(description="The maximum number of query plans that are cached. Note: this is a memory based cache. (default 250)")
+ @ManagementProperty(description="The maximum number of query plans that are cached. Note: this is a memory based cache. (default 512)")
public int getPreparedPlanCacheMaxCount() {
return this.preparedPlanCacheMaxCount;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -695,7 +695,8 @@
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
if (cacheFactory.isReplicated()) {
- matTables = new SessionAwareCache<CachedResults>();
+ matTables = new SessionAwareCache<CachedResults>(this.cacheFactory, Cache.Type.RESULTSET, new CacheConfiguration(Policy.LRU, -1, -1));
+ matTables.setBufferManager(this.bufferManager);
}
dataTierMgr = new TempTableDataManager(new DataTierManagerImpl(this,
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -74,7 +74,7 @@
SessionAwareCache (final CacheFactory cacheFactory, final Cache.Type type, final CacheConfiguration config){
this.maxSize = config.getMaxEntries();
if(this.maxSize < 0){
- this.maxSize = DEFAULT_MAX_SIZE_TOTAL;
+ this.maxSize = Integer.MAX_VALUE;
}
this.localCache = new DefaultCache<CacheID, T>("local", maxSize, config.getMaxAgeInSeconds()*1000); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -131,13 +131,11 @@
assertEquals(0, cache.getTotalCacheEntries());
}
- // set init size to negative number, which should default to 100 (default)
+ // set init size to negative number, which should default to max
@Test public void testNegativeSizeCacheUsesDefault() {
- SessionAwareCache<PreparedPlan> negativeSizedCache = new SessionAwareCache<PreparedPlan>(-1000);
- SessionAwareCache<PreparedPlan> defaultSizedCache = new SessionAwareCache<PreparedPlan>();
+ SessionAwareCache<PreparedPlan> negativeSizedCache = new SessionAwareCache<PreparedPlan>(-1);
- assertEquals(defaultSizedCache.getSpaceAllowed(), negativeSizedCache.getSpaceAllowed());
- assertEquals(SessionAwareCache.DEFAULT_MAX_SIZE_TOTAL, negativeSizedCache.getSpaceAllowed());
+ assertEquals(Integer.MAX_VALUE, negativeSizedCache.getSpaceAllowed());
}
//====Help methods====//
Modified: trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -58,6 +58,7 @@
import org.teiid.query.resolver.QueryResolver;
import org.teiid.query.rewriter.QueryRewriter;
import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.lang.SPParameter;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.unittest.FakeMetadataFacade;
import org.teiid.query.unittest.FakeMetadataFactory;
@@ -82,7 +83,7 @@
ValidatorReport report = Validator.validate(userCommand, metadata);
if (report.hasItems()) {
- ValidatorFailure firstFailure = (ValidatorFailure) report.getItems().iterator().next();
+ ValidatorFailure firstFailure = report.getItems().iterator().next();
throw new QueryValidatorException(firstFailure.getMessage());
}
QueryRewriter.rewrite(userCommand, metadata, new CommandContext());
@@ -2661,5 +2662,40 @@
helpTestProcess(plan, expected, dataMgr, metadata);
}
+ @Test public void testNonQueryPushdownValidation() throws Exception {
+
+ FakeMetadataFacade metadata = FakeMetadataFactory.example1();
+
+ FakeMetadataObject pm1 = metadata.getStore().findObject("pm1",FakeMetadataObject.MODEL); //$NON-NLS-1$
+
+ FakeMetadataObject rs2 = FakeMetadataFactory.createResultSet("pm1.rs1", pm1, new String[] { "e1" }, new String[] { DataTypeManager.DefaultDataTypes.STRING }); //$NON-NLS-1$ //$NON-NLS-2$
+ FakeMetadataObject rs2p1 = FakeMetadataFactory.createParameter("ret", 1, ParameterInfo.RESULT_SET, DataTypeManager.DefaultDataTypes.OBJECT, rs2); //$NON-NLS-1$
+ FakeMetadataObject in = FakeMetadataFactory.createParameter("pm1.sq1.in1", 2, SPParameter.IN, DataTypeManager.DefaultDataTypes.INTEGER, null); //$NON-NLS-1$
+
+ StringBuffer procedure = new StringBuffer("CREATE VIRTUAL PROCEDURE \n"); //$NON-NLS-1$
+ procedure.append("BEGIN\n"); //$NON-NLS-1$
+ procedure.append("create local temporary table x (y string);\n"); //$NON-NLS-1$
+ procedure.append("update x set y = in1 || 'foo';\n"); //$NON-NLS-1$
+ procedure.append("update pm1.g1 set e1 = lookup('pm1.g1', 'e1', 'e2', in1);\n"); //$NON-NLS-1$
+ procedure.append("exec pm1.sq2(in1 || 'foo');\n"); //$NON-NLS-1$
+ procedure.append("END"); //$NON-NLS-1$
+
+ QueryNode sq2n1 = new QueryNode("pm1.sq1", procedure.toString()); //$NON-NLS-1$
+ FakeMetadataObject sq1 = FakeMetadataFactory.createVirtualProcedure("pm1.sq1", pm1, Arrays.asList(new FakeMetadataObject[] { in, rs2p1 }), sq2n1); //$NON-NLS-1$
+
+ metadata.getStore().addObject(rs2);
+ metadata.getStore().addObject(sq1);
+
+ String userUpdateStr = "EXEC pm1.sq1(1)"; //$NON-NLS-1$
+
+ FakeDataManager dataMgr = exampleDataManager(metadata);
+
+ ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
+
+ //Create expected results
+ List[] expected = new List[0];
+ helpTestProcess(plan, expected, dataMgr, metadata);
+ }
+
private static final boolean DEBUG = false;
}
Modified: trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-01-19 01:59:26 UTC (rev 2852)
+++ trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-01-19 16:19:44 UTC (rev 2853)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.StringReader;
-import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -36,6 +35,7 @@
import java.util.regex.Pattern;
import org.teiid.jdbc.ConnectionImpl;
+import org.teiid.jdbc.TeiidDriver;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.runtime.RuntimePlugin;
@@ -169,7 +169,12 @@
@Override
public void logon(String databaseName, String user, String password) {
try {
- this.connection = (ConnectionImpl)DriverManager.getConnection("jdbc:teiid:"+databaseName+";ApplicationName=ODBC", user, password); //$NON-NLS-1$ //$NON-NLS-2$
+ java.util.Properties info = new java.util.Properties();
+ String url = "jdbc:teiid:"+databaseName+";ApplicationName=ODBC"; //$NON-NLS-1$ //$NON-NLS-2$
+ TeiidDriver driver = new TeiidDriver();
+ info.put("user", user); //$NON-NLS-1$
+ info.put("password", password); //$NON-NLS-1$
+ this.connection = (ConnectionImpl)driver.connect(url, info);
int hash = this.connection.getConnectionId().hashCode();
this.client.authenticationSucess(hash, hash);
sync();
13 years, 3 months
teiid SVN: r2852 - branches/7.1.x/build/kits/jboss-container.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-18 20:59:26 -0500 (Tue, 18 Jan 2011)
New Revision: 2852
Modified:
branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html
Log:
TEIID-1422 fix for pushing limits too far
Modified: branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html 2011-01-19 01:57:17 UTC (rev 2851)
+++ branches/7.1.x/build/kits/jboss-container/teiid-releasenotes.html 2011-01-19 01:59:26 UTC (rev 2852)
@@ -55,7 +55,8 @@
<li>Admin API "getWorkManagerStats" methods renamed to "getWorkerPoolStats". Also, "setRuntimeProperty" and "getProcesses" methods were removed.
<li>By default the "ENV" system function is now turned off. To enable it, edit the teiid-jboss-beans.xml configuration file.
<li>The use of VARIABLES.ROWCOUNT is now reserved.
- <li>Direct assignments in virtual procedures using stored procedures (e.g. var = EXEC foo()) are only valid if the procedure has a return parameter and no result set.
+ <li>Direct assignments in virtual procedures using stored procedures (e.g. var = EXEC foo()) are only valid if the procedure has a return parameter and no result set.
+ <li>Unordered limits are no longer pushed through conditions, dup removal, or UNION not all. This prevents the possibility of getting less results than the logical intent of the limit.
</ul>
<h4>from 7.0</h4>
<ul>
13 years, 3 months
teiid SVN: r2851 - in trunk: engine/src/main/java/org/teiid/query/function/metadata and 5 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-18 20:57:17 -0500 (Tue, 18 Jan 2011)
New Revision: 2851
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java
trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidatorFailure.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/query/validator/TestUpdateValidator.java
Log:
refinement of the update validation api for designer integration
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-01-19 01:57:17 UTC (rev 2851)
@@ -38,7 +38,7 @@
<LI><B>Predicate Optimization</B> - expanded optimizations for detecting always false conditions when using IS NULL, IN, or comparison predicates with literal values.
<LI><B>Partition-wise Optimizations</B> - Views defined by partitioned unions (union alls where each branch has a projected literal or an IN predicate that makes its values mutually exclusive from the other branches) can
be used in aggregation or joins and the optimizer will take advantage of the partitioning information. For example, when a partitioned union is joined against another partitioned union, the optimizer will reorganize the join of unions into a union of joins.
- <LI><B>Delegate Translator</B> - A new translator added that is capable of delegating all the calls to another configured translator.
+ <LI><B>Delegate Translator</B> - A new translator base class was added that is capable of delegating all the calls to another configured translator.
<LI><B>JDBC Reauthentication</B> - Teiid connections (defined by the org.teiid.jdbc.TeiidConnection interface) now support the changeUser method to reauthenticate a given connection.
<LI><B>Lob Caching</B> - Lobs are allowed to cache to disk as part of ResultSet caching. Distributed lob caching is not allowed.
</UL>
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -23,7 +23,6 @@
package org.teiid.query.function.metadata;
import java.util.Collection;
-import java.util.Iterator;
import org.teiid.api.exception.query.FunctionMetadataException;
import org.teiid.core.types.DataTypeManager;
@@ -56,11 +55,9 @@
* @param methods Collection of {@link FunctionMethod} objects
* @param report Report to store validation errors
*/
- public static final void validateFunctionMethods(Collection methods, ActivityReport report) {
+ public static final void validateFunctionMethods(Collection<FunctionMethod> methods, ActivityReport report) {
if(methods != null) {
- Iterator methodIter = methods.iterator();
- while(methodIter.hasNext()) {
- FunctionMethod method = (FunctionMethod) methodIter.next();
+ for (FunctionMethod method : methods) {
validateFunctionMethod(method, report);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -25,16 +25,15 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
-import org.teiid.query.QueryPlugin;
+import org.teiid.core.util.Assertion;
/**
* A report holds the output of some activity. The report collects information during the activity, such
* as failures or successes.
*/
-public class ActivityReport implements Serializable {
+public class ActivityReport<R extends ReportItem> implements Serializable {
/**
* Type of report
@@ -44,13 +43,8 @@
/**
* Holder for report items. Holds collection of {@link ReportItem}s.
*/
- private Collection items = new ArrayList();
+ private Collection<R> items = new ArrayList<R>();
- /**
- * Holder for report item types. Holds collection of {@link java.lang.String}s.
- */
- private Collection types = new ArrayList();
-
/**
* Construct new report of given type
* @param reportType Type of report
@@ -71,77 +65,28 @@
* Add a new item to the report.
* @param item Item being added
*/
- public void addItem(ReportItem item) {
- if(item == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.007.0001")); //$NON-NLS-1$
- }
-
+ public void addItem(R item) {
+ Assertion.isNotNull(item);
this.items.add(item);
- this.types.add(item.getType());
}
/**
* Add a new collection of items to the report.
* @param items Items being added
*/
- public void addItems(Collection items) {
- if(items == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.007.0001")); //$NON-NLS-1$
+ public void addItems(Collection<R> items) {
+ Assertion.isNotNull(items);
+ for (R r : items) {
+ addItem(r);
}
-
- Iterator iter = items.iterator();
- while(iter.hasNext()) {
- addItem((ReportItem)iter.next());
- }
}
public boolean hasItems() {
return (this.items.size() > 0);
}
-
- public Collection getItems() {
+
+ public Collection<R> getItems() {
return items;
}
- public Collection getItemsByType(String type) {
- Collection typedItems = new ArrayList();
-
- Iterator iter = this.items.iterator();
- while(iter.hasNext()) {
- ReportItem item = (ReportItem) iter.next();
- if(item.getType().equals(type)) {
- typedItems.add(item);
- }
- }
-
- return typedItems;
- }
-
- public Collection getItemTypes() {
- return types;
- }
-
- public String toString() {
- StringBuffer str = new StringBuffer();
- str.append(getReportType());
- str.append("\n"); //$NON-NLS-1$
-
- Iterator typeIter = getItemTypes().iterator();
- while (typeIter.hasNext()) {
- String type = (String) typeIter.next();
- str.append(type);
- str.append(" items:\n"); //$NON-NLS-1$
-
- Collection typeItems = getItemsByType(type);
- Iterator itemIter = typeItems.iterator();
- while(itemIter.hasNext()) {
- ReportItem item = (ReportItem) itemIter.next();
- str.append("\t"); //$NON-NLS-1$
- str.append(item.toString());
- str.append("\n"); //$NON-NLS-1$
- }
- }
-
- return str.toString();
- }
}
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -30,6 +30,7 @@
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.StringUtil;
import org.teiid.language.SQLConstants;
import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
@@ -54,6 +55,7 @@
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.validator.UpdateValidator;
import org.teiid.query.validator.UpdateValidator.UpdateInfo;
+import org.teiid.query.validator.UpdateValidator.UpdateType;
public abstract class ProcedureContainerResolver implements CommandResolver {
@@ -276,15 +278,25 @@
UpdateInfo info = (UpdateInfo)metadata.getFromMetadataCache(group.getMetadataID(), "UpdateInfo"); //$NON-NLS-1$
if (info == null) {
List<ElementSymbol> elements = ResolverUtil.resolveElementsInGroup(group, metadata);
- UpdateValidator validator = new UpdateValidator(metadata, updatePlan, deletePlan, insertPlan);
+ UpdateValidator validator = new UpdateValidator(metadata, determineType(insertPlan), determineType(updatePlan), determineType(deletePlan));
info = validator.getUpdateInfo();
- if (info.isInherentDelete() || info.isInherentInsert() || info.isInherentUpdate()) {
- validator.validate(UpdateProcedureResolver.getQueryTransformCmd(group, metadata), elements);
- }
+ validator.validate(UpdateProcedureResolver.getQueryTransformCmd(group, metadata), elements);
metadata.addToMetadataCache(group.getMetadataID(), "UpdateInfo", info); //$NON-NLS-1$
}
return info;
}
+
+ private static UpdateType determineType(String plan) {
+ UpdateType type = UpdateType.INHERENT;
+ if (plan != null) {
+ if (StringUtil.startsWithIgnoreCase(plan, SQLConstants.Reserved.CREATE)) {
+ type = UpdateType.UPDATE_PROCEDURE;
+ } else {
+ type = UpdateType.INSTEAD_OF;
+ }
+ }
+ return type;
+ }
/**
* @param metadata
Modified: trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -34,8 +34,6 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryValidatorException;
import org.teiid.core.TeiidComponentException;
-import org.teiid.core.util.StringUtil;
-import org.teiid.language.SQLConstants;
import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
@@ -249,28 +247,20 @@
}
private QueryMetadataInterface metadata;
+ private UpdateInfo updateInfo = new UpdateInfo();
+
private ValidatorReport report = new ValidatorReport();
- private UpdateInfo updateInfo = new UpdateInfo();
-
- public UpdateValidator(QueryMetadataInterface qmi, String updatePlan, String deletePlan, String insertPlan) {
+ private ValidatorReport insertReport = new ValidatorReport();
+ private ValidatorReport updateReport = new ValidatorReport();
+ private ValidatorReport deleteReport = new ValidatorReport();
+
+ public UpdateValidator(QueryMetadataInterface qmi, UpdateType insertType, UpdateType updateType, UpdateType deleteType) {
this.metadata = qmi;
- this.updateInfo.deleteType = determineType(deletePlan);
- this.updateInfo.insertType = determineType(insertPlan);
- this.updateInfo.updateType = determineType(updatePlan);
+ this.updateInfo.deleteType = deleteType;
+ this.updateInfo.insertType = insertType;
+ this.updateInfo.updateType = updateType;
}
-
- private UpdateType determineType(String plan) {
- UpdateType type = UpdateType.INHERENT;
- if (plan != null) {
- if (StringUtil.startsWithIgnoreCase(plan, SQLConstants.Reserved.CREATE)) {
- type = UpdateType.UPDATE_PROCEDURE;
- } else {
- type = UpdateType.INSTEAD_OF;
- }
- }
- return type;
- }
-
+
public UpdateInfo getUpdateInfo() {
return updateInfo;
}
@@ -279,14 +269,41 @@
return report;
}
+ public ValidatorReport getDeleteReport() {
+ return deleteReport;
+ }
+
+ public ValidatorReport getInsertReport() {
+ return insertReport;
+ }
+
+ public ValidatorReport getUpdateReport() {
+ return updateReport;
+ }
+
private void handleValidationError(String error, boolean update, boolean insert, boolean delete) {
- report.handleValidationError(error);
+ if (update && insert && delete) {
+ report.handleValidationError(error);
+ } else {
+ if (update) {
+ updateReport.handleValidationError(error);
+ }
+ if (insert) {
+ insertReport.handleValidationError(error);
+ }
+ if (delete) {
+ deleteReport.handleValidationError(error);
+ }
+ }
updateInfo.updateValidationError |= update;
updateInfo.insertValidationError |= insert;
updateInfo.deleteValidationError |= delete;
}
public void validate(Command command, List<ElementSymbol> viewSymbols) throws QueryMetadataException, TeiidComponentException {
+ if (this.updateInfo.deleteType != UpdateType.INHERENT && this.updateInfo.updateType != UpdateType.INHERENT && this.updateInfo.insertType != UpdateType.INHERENT) {
+ return;
+ }
if (command instanceof SetQuery) {
SetQuery setQuery = (SetQuery)command;
if (setQuery.getLimit() != null) {
@@ -327,6 +344,15 @@
return;
}
internalValidate(command, viewSymbols);
+ if (this.updateInfo.deleteType != UpdateType.INHERENT) {
+ this.deleteReport.getItems().clear();
+ }
+ if (this.updateInfo.updateType != UpdateType.INHERENT) {
+ this.updateReport.getItems().clear();
+ }
+ if (this.updateInfo.insertType != UpdateType.INHERENT) {
+ this.insertReport.getItems().clear();
+ }
}
private void internalValidate(Command command, List<ElementSymbol> viewSymbols) throws QueryMetadataException, TeiidComponentException {
@@ -343,7 +369,9 @@
}
if (query.getWith() != null) {
- report.handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0002")); //$NON-NLS-1$
+ String warning = QueryPlugin.Util.getString("ERR.015.012.0002"); //$NON-NLS-1$
+ updateReport.handleValidationWarning(warning);
+ deleteReport.handleValidationWarning(warning);
updateInfo.isSimple = false;
}
@@ -395,12 +423,12 @@
} else {
//TODO: look for reversable widening conversions
- report.handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0007", viewSymbols.get(i), symbol)); //$NON-NLS-1$
+ report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0007", viewSymbols.get(i), symbol)); //$NON-NLS-1$
}
}
if (query.getFrom().getClauses().size() > 1 || (!(query.getFrom().getClauses().get(0) instanceof UnaryFromClause))) {
- report.handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0009", query.getFrom())); //$NON-NLS-1$
+ report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0009", query.getFrom())); //$NON-NLS-1$
updateInfo.isSimple = false;
}
List<GroupSymbol> allGroups = query.getFrom().getGroups();
@@ -423,7 +451,9 @@
if (info == null) {
continue; // not projected
}
- report.handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0004", groupSymbol)); //$NON-NLS-1$
+ String warning = QueryPlugin.Util.getString("ERR.015.012.0004"); //$NON-NLS-1$
+ updateReport.handleValidationWarning(warning);
+ deleteReport.handleValidationWarning(warning);
}
}
@@ -464,7 +494,7 @@
}
if (!metadata.groupSupports(groupSymbol.getMetadataID(), SupportConstants.Group.UPDATE)) {
- report.handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0003", groupSymbol)); //$NON-NLS-1$
+ report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0003", groupSymbol)); //$NON-NLS-1$
return;
}
@@ -492,7 +522,7 @@
return true;
}
if (this.updateInfo.insertType == UpdateType.INHERENT) {
- report.handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0010", element, element.getGroupSymbol())); //$NON-NLS-1$
+ insertReport.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0010", element, element.getGroupSymbol())); //$NON-NLS-1$
}
return false;
}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -102,10 +102,8 @@
import org.teiid.query.sql.proc.CriteriaSelector;
import org.teiid.query.sql.proc.DeclareStatement;
import org.teiid.query.sql.proc.HasCriteria;
-import org.teiid.query.sql.proc.IfStatement;
import org.teiid.query.sql.proc.LoopStatement;
import org.teiid.query.sql.proc.TranslateCriteria;
-import org.teiid.query.sql.proc.WhileStatement;
import org.teiid.query.sql.symbol.AggregateSymbol;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.DerivedColumn;
@@ -134,7 +132,6 @@
import org.teiid.query.sql.visitor.FunctionCollectorVisitor;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
-import org.teiid.query.sql.visitor.PredicateCollectorVisitor;
import org.teiid.query.sql.visitor.SQLStringVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import org.teiid.query.validator.UpdateValidator.UpdateInfo;
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidatorFailure.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidatorFailure.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidatorFailure.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -28,11 +28,17 @@
import org.teiid.query.sql.LanguageObject;
public class ValidatorFailure extends ReportItem {
+
+ public enum Status {
+ ERROR,
+ WARNING
+ }
public static final String VALIDATOR_FAILURE = "ValidatorFailure"; //$NON-NLS-1$
// Don't want to pass this around, so make it transient
- private transient Collection invalidObjects;
+ private transient Collection<LanguageObject> invalidObjects;
+ private Status status = Status.ERROR;
public ValidatorFailure(String description) {
super(VALIDATOR_FAILURE);
@@ -42,16 +48,24 @@
public ValidatorFailure(String description, LanguageObject object) {
super(VALIDATOR_FAILURE);
setMessage(description);
- this.invalidObjects = new ArrayList(1);
+ this.invalidObjects = new ArrayList<LanguageObject>(1);
this.invalidObjects.add(object);
}
- public ValidatorFailure(String description, Collection objects) {
+ public ValidatorFailure(String description, Collection<? extends LanguageObject> objects) {
super(VALIDATOR_FAILURE);
setMessage(description);
- this.invalidObjects = new ArrayList(objects);
+ this.invalidObjects = new ArrayList<LanguageObject>(objects);
}
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
/**
* Get count of invalid objects.
* @return Count of invalid objects
@@ -67,7 +81,7 @@
* Get the objects that failed validation. The collection may be null.
* @return Invalid objects, may be null
*/
- public Collection getInvalidObjects() {
+ public Collection<LanguageObject> getInvalidObjects() {
return this.invalidObjects;
}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -28,9 +28,10 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.report.ActivityReport;
import org.teiid.query.sql.LanguageObject;
+import org.teiid.query.validator.ValidatorFailure.Status;
-public class ValidatorReport extends ActivityReport {
+public class ValidatorReport extends ActivityReport<ValidatorFailure> {
public static final String VALIDATOR_REPORT = "Validator Report"; //$NON-NLS-1$
@@ -38,10 +39,8 @@
super(VALIDATOR_REPORT);
}
- public void collectInvalidObjects(Collection invalidObjects) {
- Iterator iter = getItemsByType(ValidatorFailure.VALIDATOR_FAILURE).iterator();
- while(iter.hasNext()) {
- ValidatorFailure failure = (ValidatorFailure) iter.next();
+ public void collectInvalidObjects(Collection<LanguageObject> invalidObjects) {
+ for (ValidatorFailure failure : getItems()) {
if(failure.getInvalidObjectCount() > 0) {
invalidObjects.addAll(failure.getInvalidObjects());
}
@@ -49,7 +48,7 @@
}
public String getFailureMessage() {
- Collection failures = getItemsByType(ValidatorFailure.VALIDATOR_FAILURE);
+ Collection<ValidatorFailure> failures = getItems();
if(failures.size() == 0) {
return QueryPlugin.Util.getString("ERR.015.012.0064"); //$NON-NLS-1$
} else if(failures.size() == 1) {
@@ -58,14 +57,12 @@
StringBuffer err = new StringBuffer();
err.append(QueryPlugin.Util.getString("ERR.015.012.0063")); //$NON-NLS-1$
- Iterator iter = failures.iterator();
- ValidatorFailure failure = (ValidatorFailure) iter.next();
- err.append(failure);
-
+ Iterator<ValidatorFailure> iter = failures.iterator();
while(iter.hasNext()) {
- failure = (ValidatorFailure) iter.next();
- err.append(", "); //$NON-NLS-1$
- err.append(failure);
+ err.append(iter.next());
+ if (iter.hasNext()) {
+ err.append(", "); //$NON-NLS-1$
+ }
}
return err.toString();
}
@@ -75,6 +72,12 @@
return this.getFailureMessage();
}
+ public void handleValidationWarning(String message) {
+ ValidatorFailure vf = new ValidatorFailure(message);
+ vf.setStatus(Status.WARNING);
+ this.addItem(vf);
+ }
+
public void handleValidationError(String message) {
this.addItem(new ValidatorFailure(message));
}
@@ -83,7 +86,7 @@
this.addItem(new ValidatorFailure(message, invalidObj));
}
- public void handleValidationError(String message, Collection invalidObjs) {
+ public void handleValidationError(String message, Collection<? extends LanguageObject> invalidObjs) {
this.addItem(new ValidatorFailure(message, invalidObjs));
}
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2011-01-19 01:57:17 UTC (rev 2851)
@@ -88,9 +88,6 @@
ERR.015.006.0057= Unknown subquery comparison predicate quantifier: {0}
ERR.015.006.0058= The command of this scalar subquery returned more than one value: {0}
-# report (007)
-ERR.015.007.0001= Item may not be null
-
# resolver (008)
ERR.015.008.0003= Only one XML document may be specified in the FROM clause of a query.
ERR.015.008.0007= Incorrect number of parameters specified on the stored procedure {2} - expected {0} but got {1}
Modified: trunk/engine/src/test/java/org/teiid/query/validator/TestUpdateValidator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/validator/TestUpdateValidator.java 2011-01-18 22:14:35 UTC (rev 2850)
+++ trunk/engine/src/test/java/org/teiid/query/validator/TestUpdateValidator.java 2011-01-19 01:57:17 UTC (rev 2851)
@@ -52,6 +52,7 @@
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.validator.UpdateValidator.UpdateInfo;
+import org.teiid.query.validator.UpdateValidator.UpdateType;
@SuppressWarnings("nls")
public class TestUpdateValidator {
@@ -65,7 +66,7 @@
String vGroup = "gx";
Command command = createView(sql, md, vGroup);
- UpdateValidator uv = new UpdateValidator(md, null, null, null);
+ UpdateValidator uv = new UpdateValidator(md, UpdateType.INHERENT, UpdateType.INHERENT, UpdateType.INHERENT);
GroupSymbol gs = new GroupSymbol(vGroup);
ResolverUtil.resolveGroup(gs, md);
uv.validate(command, ResolverUtil.resolveElementsInGroup(gs, md));
13 years, 3 months
teiid SVN: r2850 - branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-01-18 17:14:35 -0500 (Tue, 18 Jan 2011)
New Revision: 2850
Modified:
branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
Log:
TEIID-1442: JBC upon clear of cache still keeps the empty nodes with a dummy object around (may be for little while), during this time the size calculations can be wrong. So base the size calculations on the nodes with actual data.
Modified: branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
===================================================================
--- branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2011-01-18 18:54:42 UTC (rev 2849)
+++ branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2011-01-18 22:14:35 UTC (rev 2850)
@@ -78,9 +78,12 @@
@Override
public V remove(K key) {
Node<K, V> node = getRootNode();
- Node child = node.getChild(getFqn(key));
+ Fqn<String> fqn = getFqn(key);
+ Node child = node.getChild(fqn);
if (child != null) {
- return (V)child.remove(key);
+ V value = (V)child.remove(key);
+ node.removeChild(fqn);
+ return value;
}
return null;
}
@@ -88,7 +91,14 @@
@Override
public int size() {
Node<K, V> node = getRootNode();
- return node.getChildren().size();
+ int size = 0;
+ Set<Node<K,V>> nodes = new HashSet<Node<K, V>>(node.getChildren());
+ for (Node<K, V> child : nodes) {
+ if (!child.getData().isEmpty()) {
+ size++;
+ }
+ }
+ return size;
}
@Override
13 years, 3 months
teiid SVN: r2849 - in branches/7.1.x/engine/src: test/java/org/teiid/dqp/internal/process and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-18 13:54:42 -0500 (Tue, 18 Jan 2011)
New Revision: 2849
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java
Log:
TEIID-1441 properly configuring the distributed cache for use with mattables and ensuring that -1 means "unlimited" for the sessionawarecache.
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-01-18 18:47:06 UTC (rev 2848)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-01-18 18:54:42 UTC (rev 2849)
@@ -96,7 +96,7 @@
this.lobChunkSizeInKB = lobChunkSizeInKB;
}
- @ManagementProperty(description="The maximum number of query plans that are cached. Note: this is a memory based cache. (default 250)")
+ @ManagementProperty(description="The maximum number of query plans that are cached. Note: this is a memory based cache. (default 512)")
public int getPreparedPlanCacheMaxCount() {
return this.preparedPlanCacheMaxCount;
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-01-18 18:47:06 UTC (rev 2848)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-01-18 18:54:42 UTC (rev 2849)
@@ -706,7 +706,8 @@
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
if (cacheFactory.isReplicated()) {
- matTables = new SessionAwareCache<CachedResults>();
+ matTables = new SessionAwareCache<CachedResults>(this.cacheFactory, Cache.Type.RESULTSET, new CacheConfiguration(Policy.LRU, -1, -1));
+ matTables.setBufferManager(this.bufferManager);
}
dataTierMgr = new TempTableDataManager(new DataTierManagerImpl(this,
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-01-18 18:47:06 UTC (rev 2848)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-01-18 18:54:42 UTC (rev 2849)
@@ -74,7 +74,7 @@
SessionAwareCache (final CacheFactory cacheFactory, final Cache.Type type, final CacheConfiguration config){
this.maxSize = config.getMaxEntries();
if(this.maxSize < 0){
- this.maxSize = DEFAULT_MAX_SIZE_TOTAL;
+ this.maxSize = Integer.MAX_VALUE;
}
this.localCache = new DefaultCache<CacheID, T>("local", maxSize, config.getMaxAgeInSeconds()*1000); //$NON-NLS-1$
Modified: branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java 2011-01-18 18:47:06 UTC (rev 2848)
+++ branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java 2011-01-18 18:54:42 UTC (rev 2849)
@@ -128,13 +128,11 @@
assertEquals(0, cache.getTotalCacheEntries());
}
- // set init size to negative number, which should default to 100 (default)
+ // set init size to negative number, which should default to max
@Test public void testNegativeSizeCacheUsesDefault() {
- SessionAwareCache<PreparedPlan> negativeSizedCache = new SessionAwareCache<PreparedPlan>(-1000);
- SessionAwareCache<PreparedPlan> defaultSizedCache = new SessionAwareCache<PreparedPlan>();
+ SessionAwareCache<PreparedPlan> negativeSizedCache = new SessionAwareCache<PreparedPlan>(-1);
- assertEquals(defaultSizedCache.getSpaceAllowed(), negativeSizedCache.getSpaceAllowed());
- assertEquals(SessionAwareCache.DEFAULT_MAX_SIZE_TOTAL, negativeSizedCache.getSpaceAllowed());
+ assertEquals(Integer.MAX_VALUE, negativeSizedCache.getSpaceAllowed());
}
//====Help methods====//
13 years, 3 months
teiid SVN: r2848 - branches/7.1.x/engine/src/test/java/org/teiid/query/processor/proc.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-18 13:47:06 -0500 (Tue, 18 Jan 2011)
New Revision: 2848
Modified:
branches/7.1.x/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
Log:
TEIID-1438 correcting the validation that is performed on non-query commands to detect pushdown errors.
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2011-01-18 18:12:05 UTC (rev 2847)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2011-01-18 18:47:06 UTC (rev 2848)
@@ -57,6 +57,7 @@
import org.teiid.query.resolver.QueryResolver;
import org.teiid.query.rewriter.QueryRewriter;
import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.lang.SPParameter;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.unittest.FakeMetadataFacade;
import org.teiid.query.unittest.FakeMetadataFactory;
@@ -2648,5 +2649,40 @@
helpTestProcess(plan, expected, new HardcodedDataManager(), metadata);
}
+ @Test public void testNonQueryPushdownValidation() throws Exception {
+
+ FakeMetadataFacade metadata = FakeMetadataFactory.example1();
+
+ FakeMetadataObject pm1 = metadata.getStore().findObject("pm1",FakeMetadataObject.MODEL); //$NON-NLS-1$
+
+ FakeMetadataObject rs2 = FakeMetadataFactory.createResultSet("pm1.rs1", pm1, new String[] { "e1" }, new String[] { DataTypeManager.DefaultDataTypes.STRING }); //$NON-NLS-1$ //$NON-NLS-2$
+ FakeMetadataObject rs2p1 = FakeMetadataFactory.createParameter("ret", 1, ParameterInfo.RESULT_SET, DataTypeManager.DefaultDataTypes.OBJECT, rs2); //$NON-NLS-1$
+ FakeMetadataObject in = FakeMetadataFactory.createParameter("pm1.sq1.in1", 2, SPParameter.IN, DataTypeManager.DefaultDataTypes.INTEGER, null); //$NON-NLS-1$
+
+ StringBuffer procedure = new StringBuffer("CREATE VIRTUAL PROCEDURE \n"); //$NON-NLS-1$
+ procedure.append("BEGIN\n"); //$NON-NLS-1$
+ procedure.append("create local temporary table x (y string);\n"); //$NON-NLS-1$
+ procedure.append("update x set y = in1 || 'foo';\n"); //$NON-NLS-1$
+ procedure.append("update pm1.g1 set e1 = lookup('pm1.g1', 'e1', 'e2', in1);\n"); //$NON-NLS-1$
+ procedure.append("exec pm1.sq2(in1 || 'foo');\n"); //$NON-NLS-1$
+ procedure.append("END"); //$NON-NLS-1$
+
+ QueryNode sq2n1 = new QueryNode("pm1.sq1", procedure.toString()); //$NON-NLS-1$
+ FakeMetadataObject sq1 = FakeMetadataFactory.createVirtualProcedure("pm1.sq1", pm1, Arrays.asList(new FakeMetadataObject[] { in, rs2p1 }), sq2n1); //$NON-NLS-1$
+
+ metadata.getStore().addObject(rs2);
+ metadata.getStore().addObject(sq1);
+
+ String userUpdateStr = "EXEC pm1.sq1(1)"; //$NON-NLS-1$
+
+ FakeDataManager dataMgr = exampleDataManager(metadata);
+
+ ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
+
+ //Create expected results
+ List[] expected = new List[0];
+ helpTestProcess(plan, expected, dataMgr, metadata);
+ }
+
private static final boolean DEBUG = false;
}
13 years, 3 months
teiid SVN: r2847 - in branches/7.1.x/client/src: test/java/org/teiid/adminapi/impl and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-18 13:12:05 -0500 (Tue, 18 Jan 2011)
New Revision: 2847
Added:
branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java
Log:
TEIID-1420 fixing the next issue with transaction metadata
Modified: branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java 2011-01-17 21:54:13 UTC (rev 2846)
+++ branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/TransactionMetadataMapper.java 2011-01-18 18:12:05 UTC (rev 2847)
@@ -36,7 +36,7 @@
import org.jboss.metatype.spi.values.MetaMapper;
public class TransactionMetadataMapper extends MetaMapper<TransactionMetadata> {
- private static final String XID = "xid"; //$NON-NLS-1$
+ private static final String ID = "id"; //$NON-NLS-1$
private static final String SCOPE = "scope"; //$NON-NLS-1$
private static final String CREATED_TIME = "createdTime"; //$NON-NLS-1$
private static final String ASSOCIATED_SESSION = "associatedSession"; //$NON-NLS-1$
@@ -48,7 +48,7 @@
metaType.addItem(ASSOCIATED_SESSION, ASSOCIATED_SESSION, SimpleMetaType.STRING);
metaType.addItem(CREATED_TIME, CREATED_TIME, SimpleMetaType.LONG_PRIMITIVE);
metaType.addItem(SCOPE, SCOPE, SimpleMetaType.STRING);
- metaType.addItem(XID, XID, SimpleMetaType.STRING);
+ metaType.addItem(ID, ID, SimpleMetaType.STRING);
metaType.freeze();
}
@@ -73,7 +73,7 @@
transaction.set(ASSOCIATED_SESSION, SimpleValueSupport.wrap(object.getAssociatedSession()));
transaction.set(CREATED_TIME, SimpleValueSupport.wrap(object.getCreatedTime()));
transaction.set(SCOPE, SimpleValueSupport.wrap(object.getScope()));
- transaction.set("id", SimpleValueSupport.wrap(object.getId())); //$NON-NLS-1$
+ transaction.set(ID, SimpleValueSupport.wrap(object.getId()));
return transaction;
}
@@ -92,7 +92,7 @@
transaction.setAssociatedSession((String) metaValueFactory.unwrap(compositeValue.get(ASSOCIATED_SESSION)));
transaction.setCreatedTime((Long) metaValueFactory.unwrap(compositeValue.get(CREATED_TIME)));
transaction.setScope((String) metaValueFactory.unwrap(compositeValue.get(SCOPE)));
- transaction.setId((String) metaValueFactory.unwrap(compositeValue.get("id"))); //$NON-NLS-1$
+ transaction.setId((String) metaValueFactory.unwrap(compositeValue.get(ID)));
return transaction;
}
throw new IllegalStateException("Unable to unwrap TransactionMetadata " + metaValue); //$NON-NLS-1$
Added: branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
===================================================================
--- branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java (rev 0)
+++ branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java 2011-01-18 18:12:05 UTC (rev 2847)
@@ -0,0 +1,45 @@
+/*
+ * 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.adminapi.impl;
+
+import static org.junit.Assert.*;
+
+import org.jboss.metatype.api.values.MetaValue;
+import org.junit.Test;
+
+@SuppressWarnings("nls")
+public class TestTransactionMetadata {
+
+ @Test public void testMapping() {
+ TransactionMetadata tm = new TransactionMetadata();
+ tm.setAssociatedSession("x");
+
+ TransactionMetadataMapper tmm = new TransactionMetadataMapper();
+ MetaValue mv = tmm.createMetaValue(tmm.getMetaType(), tm);
+
+ TransactionMetadata tm1 = tmm.unwrapMetaValue(mv);
+
+ assertEquals(tm.getAssociatedSession(), tm1.getAssociatedSession());
+ }
+
+}
Property changes on: branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 3 months
teiid SVN: r2846 - trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-01-17 16:54:13 -0500 (Mon, 17 Jan 2011)
New Revision: 2846
Modified:
trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/customer-schema.sql
Log:
TEIID-1434 removing bad holdings entries
Modified: trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/customer-schema.sql
===================================================================
--- trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/customer-schema.sql 2011-01-17 20:08:09 UTC (rev 2845)
+++ trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/customer-schema.sql 2011-01-17 21:54:13 UTC (rev 2846)
@@ -125,7 +125,6 @@
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990007,1008,{ts '1999-05-11 00:00:00.000'},85);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1005,{ts '1999-05-21 00:00:00.000'},105);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990009,1004,{ts '1999-06-25 00:00:00.000'},120);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1020,{ts '1999-07-22 00:00:00.000'},150);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000015,1018,{ts '2000-04-20 00:00:00.000'},135);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980006,1030,{ts '2000-06-12 00:00:00.000'},91);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1029,{ts '2000-10-08 00:00:00.000'},351);
@@ -140,7 +139,6 @@
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1006,{ts '2001-11-14 00:00:00.000'},125);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1029,{ts '2001-11-15 00:00:00.000'},100);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1011,{ts '2001-12-18 00:00:00.000'},44);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1022,{ts '2001-12-19 00:00:00.000'},115);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020034,1024,{ts '2002-01-22 00:00:00.000'},189);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990009,1022,{ts '2002-01-24 00:00:00.000'},30);
INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020035,1013,{ts '2002-02-12 00:00:00.000'},110);
13 years, 3 months