teiid SVN: r922 - trunk/engine/src/test/java/com/metamatrix/query/optimizer.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-12 21:01:53 -0400 (Tue, 12 May 2009)
New Revision: 922
Modified:
trunk/engine/src/test/java/com/metamatrix/query/optimizer/InlineViewCase.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestInlineView.java
Log:
adding mysql and postgres as test targets
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/InlineViewCase.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/InlineViewCase.java 2009-05-13 01:01:18 UTC (rev 921)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/InlineViewCase.java 2009-05-13 01:01:53 UTC (rev 922)
@@ -25,11 +25,6 @@
import java.util.List;
import java.util.Set;
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.QueryParserException;
-import com.metamatrix.api.exception.query.QueryResolverException;
-import com.metamatrix.api.exception.query.QueryValidatorException;
-
public class InlineViewCase {
public String name;
public String userQuery;
@@ -37,7 +32,7 @@
public Set<String> sourceQueries;
public List<List<Object>> expectedResults;
- public String getFullyQualifiedQuery() throws QueryParserException, QueryResolverException, QueryValidatorException, MetaMatrixComponentException {
+ public String getFullyQualifiedQuery() {
return optimizedQuery;
}
public InlineViewCase(String name, String userQuery, String optimizedQuery, Set<String> sourceQueries, List expectedResults) {
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestInlineView.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestInlineView.java 2009-05-13 01:01:18 UTC (rev 921)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestInlineView.java 2009-05-13 01:01:53 UTC (rev 922)
@@ -77,7 +77,8 @@
sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testANSIJoinInlineView", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
@@ -100,7 +101,8 @@
sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testInlineView", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
}
@@ -121,7 +123,8 @@
sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testInlineViewWithDistinctAndOrderBy", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
@@ -139,7 +142,8 @@
sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testInlineViewOfVirtual", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
}
@@ -160,7 +164,8 @@
sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testInlineViewWithOuterOrderAndGroup", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
}
@@ -184,7 +189,8 @@
sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testInlineViewsInUnions", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
@@ -213,12 +219,12 @@
//sourceQueries.add("db2"); //$NON-NLS-1$
sourceQueries.add("sybase"); //$NON-NLS-1$
sourceQueries.add("sqlserver"); //$NON-NLS-1$
-
+ sourceQueries.add("mysql"); //$NON-NLS-1$
+ sourceQueries.add("postgres"); //$NON-NLS-1$
return new InlineViewCase("testUnionInInlineView", userQuery, optimizedQuery, //$NON-NLS-1$
sourceQueries, expectedResults);
}
-
protected void runTest(InlineViewCase testCase) throws Exception {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
15 years, 7 months
teiid SVN: r921 - in trunk: connector-api/src/main/resources and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-12 21:01:18 -0400 (Tue, 12 May 2009)
New Revision: 921
Modified:
trunk/connector-api/src/main/java/org/teiid/connector/internal/ConnectorPropertyNames.java
trunk/connector-api/src/main/resources/connector-base.xml
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java
trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/pooling/connector/ConnectionPool.java
Log:
TEIID-578 TEIID-203 removing connector max threads and updating capabilities overrides
Modified: trunk/connector-api/src/main/java/org/teiid/connector/internal/ConnectorPropertyNames.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/internal/ConnectorPropertyNames.java 2009-05-13 00:57:35 UTC (rev 920)
+++ trunk/connector-api/src/main/java/org/teiid/connector/internal/ConnectorPropertyNames.java 2009-05-13 01:01:18 UTC (rev 921)
@@ -34,7 +34,7 @@
* The environment property name whose value defines the maximum number
* of processor threads. This property is required.
*/
- public static final String MAX_THREADS = "ConnectorMaxThreads"; //$NON-NLS-1$
+ public static final String MAX_CONNECTIONS = "ConnectorMaxConnections"; //$NON-NLS-1$
/**
* This property can be used to specify the maximum number of rows to be returned
Modified: trunk/connector-api/src/main/resources/connector-base.xml
===================================================================
--- trunk/connector-api/src/main/resources/connector-base.xml 2009-05-13 00:57:35 UTC (rev 920)
+++ trunk/connector-api/src/main/resources/connector-base.xml 2009-05-13 01:01:18 UTC (rev 921)
@@ -6,11 +6,11 @@
<PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
<PropertyDefinition Name="ServiceMonitoringEnabled" DisplayName="Data Source Monitoring Enabled" ShortDescription="Whether to monitor the underlying data source to see if it is available." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" ISExpert="true" />
<PropertyDefinition Name="Immutable" DisplayName="Is Immutable" ShortDescription="True if the source never changes." DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="ConnectorMaxThreads" DisplayName="Connector Maximum Thread Count" ShortDescription="" DefaultValue="20" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorMaxConnections" DisplayName="Maximum Concurrent Connections" ShortDescription="" DefaultValue="20" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" Multiplicity="1" IsExpert="true" IsHidden="true" />
<PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.server.connector.service.ConnectorService" Multiplicity="1" IsHidden="true" />
<PropertyDefinition Name="MaxResultRows" DisplayName="Maximum Result Rows" ShortDescription="" DefaultValue="10000" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
- <PropertyDefinition Name="ConnectorThreadTTL" DisplayName="Thread Time to live (milliseconds)" ShortDescription="" DefaultValue="120000" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="SynchWorkers" DisplayName="Synchronous Workers" ShortDescription="Whether worker threads will be bound to connections. Asynch connectors should set this value to false." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="ResultSetCacheEnabled" DisplayName="ResultSet Cache Enabled" ShortDescription="" DefaultValue="false" Multiplicity="0..1" PropertyType="Boolean" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ResultSetCacheMaxSize" DisplayName="ResultSet Cache Maximum Size (megabytes)" ShortDescription="" DefaultValue="20" PropertyType="Integer" />
<PropertyDefinition Name="ResultSetCacheMaxAge" DisplayName="ResultSet Cache Maximum Age (milliseconds)" ShortDescription="" DefaultValue="3600000" PropertyType="Long" IsExpert="true" />
@@ -18,42 +18,43 @@
<AllowedValue>vdb</AllowedValue>
<AllowedValue>session</AllowedValue>
</PropertyDefinition>
- <PropertyDefinition Name="com.metamatrix.data.pool.max_connections" DisplayName="Pool Maximum Connections" ShortDescription="Set the maximum number of connections for the connection pool" DefaultValue="20" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Set to true if this is an XA Connector" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
+ <PropertyDefinition Name="ConnectionPoolEnabled" DisplayName="Connection Pool Enabled" ShortDescription="Enable the use of connection pooling with this connector." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
+ <PropertyDefinition Name="UseCredentialMap" DisplayName="Requires Credential Map" ShortDescription="Set to true if this connector requires credentials to be passed via a credential map." DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
+ <PropertyDefinition Name="AdminConnectionsAllowed" DisplayName="Admin Connections Allowed" ShortDescription="Whether admin connections without an execution context are allowed." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
<PropertyDefinition Name="com.metamatrix.data.pool.max_connections_for_each_id" DisplayName="Pool Maximum Connections for Each ID" ShortDescription="Set the maximum number of connections for each connector ID for the connection pool" DefaultValue="20" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
<PropertyDefinition Name="com.metamatrix.data.pool.live_and_unused_time" DisplayName="Pool Connection Idle Time (seconds)" ShortDescription="Set the idle time of the connection before it should be closed if pool shrinking is enabled" DefaultValue="60" Multiplicity="0..1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
<PropertyDefinition Name="com.metamatrix.data.pool.wait_for_source_time" DisplayName="Pool Connection Waiting Time (milliseconds)" ShortDescription="Set the time to wait if the connection is not available" DefaultValue="120000" Multiplicity="0..1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
<PropertyDefinition Name="com.metamatrix.data.pool.cleaning_interval" DisplayName="Pool cleaning Interval (seconds)" ShortDescription="Set the interval to cleaning the pool" DefaultValue="60" Multiplicity="0..1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
<PropertyDefinition Name="com.metamatrix.data.pool.enable_shrinking" DisplayName="Enable Pool Shrinking" ShortDescription="Set whether to enable the pool shrinking" DefaultValue="false" Multiplicity="0..1" PropertyType="Boolean" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
- <PropertyDefinition Name="supportsAndCriteria" DisplayName="supportsAndCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCompareCriteria" DisplayName="supportsCompareCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsCompareCriteriaEquals" DisplayName="supportsCompareCriteriaEquals" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCompareCriteriaGreaterThan" DisplayName="supportsCompareCriteriaGreaterThan" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCompareCriteriaGreaterThanOrEqual" DisplayName="supportsCompareCriteriaGreaterThanOrEqual" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCompareCriteriaLessThan" DisplayName="supportsCompareCriteriaLessThan" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCompareCriteriaLessThanOrEqual" DisplayName="supportsCompareCriteriaLessThanOrEqual" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCompareCriteriaNotEquals" DisplayName="supportsCompareCriteriaNotEquals" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsCriteria" DisplayName="supportsCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaOrdered" DisplayName="supportsCompareCriteriaOrdered" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsInCriteria" DisplayName="supportsInCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="getMaxInCriteriaSize" DisplayName="getMaxInCriteriaSize" ShortDescription="" Multiplicity="0..1" PropertyType="Integer" IsExpert="true" />
<PropertyDefinition Name="supportsIsNullCriteria" DisplayName="supportsIsNullCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsJoins" DisplayName="supportsJoins" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsLikeCriteria" DisplayName="supportsLikeCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsLikeCriteriaEscapeCharacter" DisplayName="supportsLikeCriteriaEscapeCharacter" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsNotCriteria" DisplayName="supportsNotCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsOrCriteria" DisplayName="supportsOrCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsBetweenCriteria" DisplayName="supportsBetweenCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsSelectDistinct" DisplayName="supportsSelectDistinct" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsSelectLiterals" DisplayName="supportsSelectLiterals" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsSelectExpression" DisplayName="supportsSelectExpression" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsInnerJoins" DisplayName="supportsInnerJoins" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsAliasedGroup" DisplayName="supportsAliasedGroup" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsSelfJoins" DisplayName="supportsSelfJoins" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsOuterJoins" DisplayName="supportsOuterJoins" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsFullOuterJoins" DisplayName="supportsFullOuterJoins" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsBetweenCriteria" DisplayName="supportsBetweenCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsLikeCriteriaEscapeCharacter" DisplayName="supportsLikeCriteriaEscapeCharacter" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsInCriteriaSubquery" DisplayName="supportsInCriteriaSubquery" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsExistsCriteria" DisplayName="supportsExistsCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsQuantifiedCompareCriteria" DisplayName="supportsQuantifiedCompareCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsQuantifiedCompareCriteriaSome" DisplayName="supportsQuantifiedCompareCriteriaSome" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsQuantifiedCompareCriteriaAll" DisplayName="supportsQuantifiedCompareCriteriaAll" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="getMaxFromGroups" DisplayName="getMaxFromGroups" ShortDescription="" Multiplicity="0..1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="getSupportedJoinCriteria" DisplayName="getSupportedJoinCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="String" IsExpert="true" >
+ <AllowedValue>ANY</AllowedValue>
+ <AllowedValue>THETA</AllowedValue>
+ <AllowedValue>EQUI</AllowedValue>
+ <AllowedValue>KEY</AllowedValue>
+ </PropertyDefinition>
<PropertyDefinition Name="supportsOrderBy" DisplayName="supportsOrderBy" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsAggregates" DisplayName="supportsAggregates" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsGroupBy" DisplayName="supportsGroupBy" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsFunctionsInGroupBy" DisplayName="supportsFunctionsInGroupBy" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsHaving" DisplayName="supportsHaving" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsAggregatesSum" DisplayName="supportsAggregatesSum" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsAggregatesAvg" DisplayName="supportsAggregatesAvg" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsAggregatesMin" DisplayName="supportsAggregatesMin" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
@@ -61,15 +62,26 @@
<PropertyDefinition Name="supportsAggregatesCount" DisplayName="supportsAggregatesCount" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsAggregatesCountStar" DisplayName="supportsAggregatesCountStar" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsAggregatesDistinct" DisplayName="supportsAggregatesDistinct" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsInCriteriaSubquery" DisplayName="supportsInCriteriaSubquery" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsExistsCriteria" DisplayName="supportsExistsCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsQuantifiedCompareCriteriaSome" DisplayName="supportsQuantifiedCompareCriteriaSome" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsQuantifiedCompareCriteriaAll" DisplayName="supportsQuantifiedCompareCriteriaAll" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsScalarSubqueries" DisplayName="supportsScalarSubqueries" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsCorrelatedSubqueries" DisplayName="supportsCorrelatedSubqueries" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsCaseExpressions" DisplayName="supportsCaseExpressions" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsSearchedCaseExpressions" DisplayName="supportsSearchedCaseExpressions" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsScalarFunctions" DisplayName="supportsScalarFunctions" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="getSupportedFunctions" DisplayName="getSupportedFunctions" ShortDescription="" Multiplicity="0..1" PropertyType="string" IsExpert="true" />
<PropertyDefinition Name="supportsInlineViews" DisplayName="supportsInlineViews" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsOrderByInInlineViews" DisplayName="supportsOrderByInInlineViews" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="supportsUnionOrderBy" DisplayName="supportsUnionOrderBy" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsSetQueryOrderBy" DisplayName="supportsSetQueryOrderBy" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="supportsUnions" DisplayName="supportsUnions" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsIntersect" DisplayName="supportsIntersect" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsExcept" DisplayName="supportsExcept" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="requiresCriteria" DisplayName="requiresCriteria" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="useAnsiJoin" DisplayName="useAnsiJoin" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsBatchedUpdates" DisplayName="supportsBatchedUpdates" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsBulkUpdate" DisplayName="supportsBulkUpdate" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsInsertWithQueryExpression" DisplayName="supportsInsertWithQueryExpression" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsRowLimit" DisplayName="supportsRowLimit" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsRowOffset" DisplayName="supportsRowOffset" ShortDescription="" Multiplicity="0..1" PropertyType="Boolean" IsExpert="true" />
</ComponentType>
\ No newline at end of file
Modified: trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java
===================================================================
--- trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java 2009-05-13 00:57:35 UTC (rev 920)
+++ trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java 2009-05-13 01:01:18 UTC (rev 921)
@@ -221,14 +221,13 @@
results.add(result);
}
break;
- } else {
- UpdateExecution rs = (UpdateExecution)execution;
- int[] result = rs.getUpdateCounts();
- for (int i = 0; i < result.length; i++) {
- results.add(Arrays.asList(result[i]));
- }
- break;
- }
+ }
+ UpdateExecution rs = (UpdateExecution)execution;
+ int[] result = rs.getUpdateCounts();
+ for (int i = 0; i < result.length; i++) {
+ results.add(Arrays.asList(result[i]));
+ }
+ break;
} catch (DataNotAvailableException e) {
try {
Thread.sleep(e.getRetryDelay());
Modified: trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
===================================================================
--- trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-13 00:57:35 UTC (rev 920)
+++ trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-13 01:01:18 UTC (rev 921)
@@ -1,28 +1,21 @@
<ComponentType Name="JDBC Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.952-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.952-06:00">
- <PropertyDefinition Name="MaxSQLLength" DisplayName="Max SQL String Length" ShortDescription="" DefaultValue="16384" Multiplicity="0..1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
<PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
<PropertyDefinition Name="UseBindVariables" DisplayName="Use prepared statements and bind variables" ShortDescription="" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="ExtensionCapabilityClass" DisplayName="Extension Capability Class" ShortDescription="" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.JDBCConnector" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="DatabaseTimeZone" DisplayName="Database time zone" ShortDescription="Time zone of the database, if different than Integration Server" IsExpert="true" />
- <PropertyDefinition Name="TransactionIsolationLevel" DisplayName="Transaction Isolation Level" ShortDescription="Set the data source transaction isolation level" DefaultValue="" IsExpert="true" IsConstrainedToAllowedValues="true">
+ <PropertyDefinition Name="TransactionIsolationLevel" DisplayName="Transaction Isolation Level" ShortDescription="Set the data source transaction isolation level" Multiplicity="0..1" IsExpert="true" IsConstrainedToAllowedValues="true">
<AllowedValue>TRANSACTION_READ_UNCOMMITTED</AllowedValue>
<AllowedValue>TRANSACTION_READ_COMMITTED</AllowedValue>
<AllowedValue>TRANSACTION_SERIALIZABLE</AllowedValue>
<AllowedValue>TRANSACTION_NONE</AllowedValue>
- <AllowedValue></AllowedValue>
</PropertyDefinition>
<PropertyDefinition Name="Password" DisplayName="Password" ShortDescription="" Multiplicity="0..1" IsConstrainedToAllowedValues="false" IsMasked="true" IsPreferred="true" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.translator.Translator" IsExpert="true" />
- <PropertyDefinition Name="SetCriteriaBatchSize" DisplayName="Max Values in IN Predicate" ShortDescription="Max number of values in an IN Predicate. Must be >= 0." DefaultValue="1000" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="User" DisplayName="User Name" ShortDescription="" Multiplicity="0..1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="TrimStrings" DisplayName="Trim string flag" ShortDescription="Right Trim fixed character types returned as Strings" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
- <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
<PropertyDefinition Name="UseCommentsInSourceQuery" DisplayName="Use informational comments in Source Queries" ShortDescription="This will embed /*comment*/ style comment with session/request id in source SQL query for informational purposes" DefaultValue="false" PropertyType="Boolean" IsPreferred="true" IsExpert="true"/>
- <PropertyDefinition Name="ResultSetCacheEnabled" DisplayName="ResultSet Cache Enabled" ShortDescription="" DefaultValue="false" Multiplicity="0..1" PropertyType="Boolean" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false"/>
- <PropertyDefinition Name="ResultSetCacheMaxSize" DisplayName="ResultSet Cache Maximum Size (megabytes)" ShortDescription="" DefaultValue="0" Multiplicity="0..1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="Oracle Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="oracle.jdbc.driver.OracleDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-05-13 00:57:35 UTC (rev 920)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-05-13 01:01:18 UTC (rev 921)
@@ -96,7 +96,7 @@
*/
public class ConnectorManager implements ApplicationService {
- public static final int DEFAULT_MAX_PROCESSOR_THREADS = 15;
+ public static final int DEFAULT_MAX_THREADS = 20;
private static final String DEFAULT_MAX_RESULTSET_CACHE_SIZE = "20"; //$NON-NLS-1$
private static final String DEFAULT_MAX_RESULTSET_CACHE_AGE = "3600000"; //$NON-NLS-1$
@@ -308,7 +308,7 @@
throw new ApplicationLifecycleException(DQPPlugin.Util.getString("Missing_required_property", new Object[]{ConnectorPropertyNames.CONNECTOR_CLASS, connectorName})); //$NON-NLS-1$
}
- int maxThreads = PropertiesUtils.getIntProperty(props, ConnectorPropertyNames.MAX_THREADS, DEFAULT_MAX_PROCESSOR_THREADS);
+ int maxThreads = PropertiesUtils.getIntProperty(props, ConnectorPropertyNames.MAX_CONNECTIONS, DEFAULT_MAX_THREADS);
connectorWorkerPool = WorkerPoolFactory.newWorkerPool(connectorName, maxThreads);
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/pooling/connector/ConnectionPool.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/pooling/connector/ConnectionPool.java 2009-05-13 00:57:35 UTC (rev 920)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/pooling/connector/ConnectionPool.java 2009-05-13 01:01:18 UTC (rev 921)
@@ -42,6 +42,7 @@
import org.teiid.connector.api.ConnectorIdentity;
import org.teiid.connector.api.ExecutionContext;
import org.teiid.connector.api.SingleIdentity;
+import org.teiid.connector.internal.ConnectorPropertyNames;
import org.teiid.connector.xa.api.TransactionContext;
import org.teiid.connector.xa.api.XAConnector;
import org.teiid.dqp.internal.datamgr.impl.ConnectorWrapper;
@@ -60,10 +61,7 @@
*/
public static final String SOURCE_CONNECTION_TEST_INTERVAL = "SourceConnectionTestInterval"; //$NON-NLS-1$
- /**
- * Maximum connections for this pool. Default to 0, which means there is no limit.
- */
- public static final String MAX_CONNECTIONS = "com.metamatrix.data.pool.max_connections"; //$NON-NLS-1$
+ public static final String MAX_CONNECTIONS = ConnectorPropertyNames.MAX_CONNECTIONS;
/**
* Maximum connection for each ConnectorIdentity. Default to 0, which means there is no limit.
15 years, 7 months
teiid SVN: r920 - in trunk: connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-12 20:57:35 -0400 (Tue, 12 May 2009)
New Revision: 920
Added:
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/BitFunctionModifier.java
Modified:
trunk/connector-api/src/main/java/org/teiid/connector/visitor/util/SQLStringVisitor.java
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLConvertModifier.java
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLTranslator.java
Log:
TEIID-105 adding mysql support for bit operations and creating a mysql 5 specific translator/capabilities.
Modified: trunk/connector-api/src/main/java/org/teiid/connector/visitor/util/SQLStringVisitor.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/visitor/util/SQLStringVisitor.java 2009-05-12 22:13:24 UTC (rev 919)
+++ trunk/connector-api/src/main/java/org/teiid/connector/visitor/util/SQLStringVisitor.java 2009-05-13 00:57:35 UTC (rev 920)
@@ -85,7 +85,7 @@
public class SQLStringVisitor extends AbstractLanguageVisitor implements SQLReservedWords {
private Set<String> infixFunctions = new HashSet<String>(Arrays.asList("%", "+", "-", "*", "+", "/", "||", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- "&", "~", "|", "^")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "&", "|", "^")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
private static final String ESCAPED_QUOTE = "''"; //$NON-NLS-1$
Added: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/BitFunctionModifier.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/BitFunctionModifier.java (rev 0)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/BitFunctionModifier.java 2009-05-13 00:57:35 UTC (rev 920)
@@ -0,0 +1,49 @@
+/*
+ * 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.connector.jdbc.mysql;
+
+import org.teiid.connector.api.SourceSystemFunctions;
+import org.teiid.connector.api.TypeFacility;
+import org.teiid.connector.jdbc.translator.AliasModifier;
+import org.teiid.connector.language.IExpression;
+import org.teiid.connector.language.IFunction;
+import org.teiid.connector.language.ILanguageFactory;
+
+public class BitFunctionModifier extends AliasModifier {
+ private ILanguageFactory langFactory;
+
+ public BitFunctionModifier(String alias, ILanguageFactory langFactory) {
+ super(alias);
+ this.langFactory = langFactory;
+ }
+
+ /**
+ * Wrap the renamed function in a convert back to integer
+ */
+ @Override
+ public IExpression modify(IFunction function) {
+ return langFactory.createFunction(SourceSystemFunctions.CONVERT,
+ new IExpression[] {super.modify(function), langFactory.createLiteral(MySQLConvertModifier.SIGNED_INTEGER, TypeFacility.RUNTIME_TYPES.STRING)}, TypeFacility.RUNTIME_TYPES.INTEGER);
+ }
+
+}
Property changes on: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/BitFunctionModifier.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLConvertModifier.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLConvertModifier.java 2009-05-12 22:13:24 UTC (rev 919)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLConvertModifier.java 2009-05-13 00:57:35 UTC (rev 920)
@@ -41,7 +41,9 @@
*/
class MySQLConvertModifier extends BasicFunctionModifier {
- private static DropFunctionModifier DROP_MODIFIER = new DropFunctionModifier();
+ public static final String SIGNED_INTEGER = "SIGNED INTEGER"; //$NON-NLS-1$
+
+ private static DropFunctionModifier DROP_MODIFIER = new DropFunctionModifier();
private ILanguageFactory langFactory;
@@ -66,7 +68,7 @@
} else if (target.equals("byte") || //$NON-NLS-1$
target.equals("short") || //$NON-NLS-1$
target.equals("integer")) { //$NON-NLS-1$
- return convertToNativeType(function, "SIGNED INTEGER"); //$NON-NLS-1$
+ return convertToNativeType(function, SIGNED_INTEGER);
} else if (target.equals("long") || //$NON-NLS-1$
target.equals("biginteger")) { //$NON-NLS-1$
return convertToNativeType(function, "SIGNED"); //$NON-NLS-1$
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLTranslator.java 2009-05-12 22:13:24 UTC (rev 919)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/mysql/MySQLTranslator.java 2009-05-13 00:57:35 UTC (rev 920)
@@ -33,7 +33,6 @@
import org.teiid.connector.api.ConnectorEnvironment;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.api.SourceSystemFunctions;
-import org.teiid.connector.jdbc.translator.AliasModifier;
import org.teiid.connector.jdbc.translator.Translator;
@@ -47,10 +46,10 @@
public void initialize(ConnectorEnvironment env) throws ConnectorException {
super.initialize(env);
registerFunctionModifier(SourceSystemFunctions.CONVERT, new MySQLConvertModifier(getLanguageFactory()));
- registerFunctionModifier(SourceSystemFunctions.BITAND, new AliasModifier("&")); //$NON-NLS-1$
- registerFunctionModifier(SourceSystemFunctions.BITNOT, new AliasModifier("~")); //$NON-NLS-1$
- registerFunctionModifier(SourceSystemFunctions.BITOR, new AliasModifier("|")); //$NON-NLS-1$
- registerFunctionModifier(SourceSystemFunctions.BITXOR, new AliasModifier("^")); //$NON-NLS-1$
+ registerFunctionModifier(SourceSystemFunctions.BITAND, new BitFunctionModifier("&", getLanguageFactory())); //$NON-NLS-1$
+ registerFunctionModifier(SourceSystemFunctions.BITNOT, new BitFunctionModifier("~", getLanguageFactory())); //$NON-NLS-1$
+ registerFunctionModifier(SourceSystemFunctions.BITOR, new BitFunctionModifier("|", getLanguageFactory())); //$NON-NLS-1$
+ registerFunctionModifier(SourceSystemFunctions.BITXOR, new BitFunctionModifier("^", getLanguageFactory())); //$NON-NLS-1$
}
@Override
15 years, 7 months
teiid SVN: r919 - in trunk: build/assembly/embedded and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-05-12 18:13:24 -0400 (Tue, 12 May 2009)
New Revision: 919
Removed:
trunk/build/assembly/embedded/embedded-connector-dependencies.xml
trunk/build/assembly/embedded/embedded-jar.xml
Modified:
trunk/build/assembly/embedded/embedded-dependencies.xml
trunk/pom.xml
Log:
TEIID-581
Deleted: trunk/build/assembly/embedded/embedded-connector-dependencies.xml
===================================================================
--- trunk/build/assembly/embedded/embedded-connector-dependencies.xml 2009-05-12 19:48:13 UTC (rev 918)
+++ trunk/build/assembly/embedded/embedded-connector-dependencies.xml 2009-05-12 22:13:24 UTC (rev 919)
@@ -1,33 +0,0 @@
-<!--This script builds a JAR for the Embedded Server Installation -->
-<assembly>
-
- <id>connector-dependencies</id>
-
- <formats>
- <format>dir</format>
- </formats>
-
- <includeBaseDirectory>false</includeBaseDirectory>
- <baseDirectory>teiid-embedded</baseDirectory>
-
- <moduleSets>
- <moduleSet>
- <includes>
- <include>org.jboss.teiid.connectors:connector-jdbc</include>
- <include>org.jboss.teiid.connectors:connector-xml</include>
- <include>org.jboss.teiid.connectors:connector-xml-common</include>
- <include>org.jboss.teiid.connectors:connector-loopback</include>
- <include>org.jboss.teiid.connectors:connector-text</include>
- <include>org.jboss.teiid.connectors:connector-ldap</include>
- <include>org.jboss.teiid.connectors:connector-salesforce</include>
- </includes>
-
- <binaries>
- <includeDependencies>false</includeDependencies>
- <attachmentClassifier>bundle</attachmentClassifier>
- <unpack>true</unpack>
- </binaries>
- </moduleSet>
- </moduleSets>
-
-</assembly>
\ No newline at end of file
Modified: trunk/build/assembly/embedded/embedded-dependencies.xml
===================================================================
--- trunk/build/assembly/embedded/embedded-dependencies.xml 2009-05-12 19:48:13 UTC (rev 918)
+++ trunk/build/assembly/embedded/embedded-dependencies.xml 2009-05-12 22:13:24 UTC (rev 919)
@@ -16,9 +16,6 @@
<includes>
<include>org.jboss.teiid:teiid-cache-jbosscache</include>
- <include>org.jboss.teiid:teiid-client</include>
- <include>org.jboss.teiid:teiid-client-jdbc</include>
- <include>org.jboss.teiid:teiid-common-core</include>
<include>org.jboss.teiid:teiid-common-internal</include>
<include>org.jboss.teiid:teiid-connector-api</include>
@@ -31,11 +28,11 @@
<binaries>
<includeDependencies>true</includeDependencies>
- <unpack>true</unpack>
+ <unpack>false</unpack>
<dependencySets>
<dependencySet>
- <useProjectArtifact>false</useProjectArtifact>
+ <useProjectArtifact>true</useProjectArtifact>
<unpack>false</unpack>
<useTransitiveDependencies>true</useTransitiveDependencies>
<useDefaultExcludes>true</useDefaultExcludes>
Deleted: trunk/build/assembly/embedded/embedded-jar.xml
===================================================================
--- trunk/build/assembly/embedded/embedded-jar.xml 2009-05-12 19:48:13 UTC (rev 918)
+++ trunk/build/assembly/embedded/embedded-jar.xml 2009-05-12 22:13:24 UTC (rev 919)
@@ -1,41 +0,0 @@
-<!--This script builds a JAR for the Embedded Server Installation -->
-<assembly>
-
- <id>embedded</id>
-
- <formats>
- <format>jar</format>
- </formats>
-
- <includeBaseDirectory>false</includeBaseDirectory>
- <baseDirectory>teiid-embedded</baseDirectory>
-
- <moduleSets>
- <moduleSet>
- <includeSubModules>true</includeSubModules>
-
- <includes>
- <include>org.jboss.teiid:teiid-cache-jbosscache</include>
- <include>org.jboss.teiid:teiid-common-internal</include>
-
- <include>org.jboss.teiid:teiid-connector-api</include>
- <include>org.jboss.teiid:teiid-connector-metadata</include>
- <include>org.jboss.teiid:teiid-embedded</include>
- <include>org.jboss.teiid:teiid-engine</include>
- <include>org.jboss.teiid:teiid-metadata</include>
- <include>org.jboss.teiid:teiid-txn-jbossts</include>
- </includes>
-
- <binaries>
- <includeDependencies>false</includeDependencies>
- <unpack>true</unpack>
- <outputDirectory></outputDirectory>
- <includes>
- <include>:jar:*</include>
- </includes>
- </binaries>
-
- </moduleSet>
- </moduleSets>
-
-</assembly>
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-05-12 19:48:13 UTC (rev 918)
+++ trunk/pom.xml 2009-05-12 22:13:24 UTC (rev 919)
@@ -83,7 +83,6 @@
<!-- <descriptor>build/assembly/bin.xml</descriptor>-->
<descriptor>build/assembly/embedded/embedded-client-jar.xml</descriptor>
<descriptor>build/assembly/embedded/embedded-dependencies.xml</descriptor>
- <descriptor>build/assembly/embedded/embedded-jar.xml</descriptor>
<descriptor>build/assembly/embedded/embedded-dist.xml</descriptor>
<descriptor>build/assembly/cdk/cdk-dependencies.xml</descriptor>
<descriptor>build/assembly/cdk/cdk-dist.xml</descriptor>
15 years, 7 months
teiid SVN: r918 - branches/6.0.x/build/kit-embedded/deploy.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-05-12 15:48:13 -0400 (Tue, 12 May 2009)
New Revision: 918
Modified:
branches/6.0.x/build/kit-embedded/deploy/configuration.xml
Log:
TEIID-576
Modified: branches/6.0.x/build/kit-embedded/deploy/configuration.xml
===================================================================
--- branches/6.0.x/build/kit-embedded/deploy/configuration.xml 2009-05-12 19:44:34 UTC (rev 917)
+++ branches/6.0.x/build/kit-embedded/deploy/configuration.xml 2009-05-12 19:48:13 UTC (rev 918)
@@ -300,11 +300,11 @@
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.JDBCConnector" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="DatabaseTimeZone" DisplayName="Database time zone" ShortDescription="Time zone of the database, if different than Integration Server" IsExpert="true" />
<PropertyDefinition Name="TransactionIsolationLevel" DisplayName="Transaction Isolation Level" ShortDescription="Set the data source transaction isolation level" DefaultValue="" IsExpert="true" />
- <PropertyDefinition Name="Password" DisplayName="Password" ShortDescription="" Multiplicity="0" IsConstrainedToAllowedValues="false" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="Password" DisplayName="Password" ShortDescription="" Multiplicity="0..1" IsConstrainedToAllowedValues="false" IsMasked="true" IsPreferred="true" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.translator.Translator" IsExpert="true" />
<PropertyDefinition Name="SetCriteriaBatchSize" DisplayName="Max Values in IN Predicate" ShortDescription="Max number of values in an IN Predicate. Must be >= 0." DefaultValue="1000" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="User" DisplayName="User Name" ShortDescription="" Multiplicity="0" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="User" DisplayName="User Name" ShortDescription="" Multiplicity="0..1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="TrimStrings" DisplayName="Trim string flag" ShortDescription="Right Trim fixed character types returned as Strings" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
<PropertyDefinition Name="UseCommentsInSourceQuery" DisplayName="Use informational comments in Source Queries" ShortDescription="This will embed /*comment*/ style comment with session/request id in source SQL query for informational purposes" DefaultValue="false" PropertyType="Boolean" IsPreferred="true" IsExpert="true" />
15 years, 7 months
teiid SVN: r917 - trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-05-12 15:44:34 -0400 (Tue, 12 May 2009)
New Revision: 917
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
Log:
Teiid-579 - NPE being caused by checking status on a connector that couldn't started
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-05-12 19:44:31 UTC (rev 916)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-05-12 19:44:34 UTC (rev 917)
@@ -273,6 +273,8 @@
* @see com.metamatrix.dqp.internal.datamgr.ConnectorManager#isAlive()
*/
public Boolean getStatus() {
+ if (this.connector == null) return false;
+
ClassLoader contextloader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(classloader);
15 years, 7 months
teiid SVN: r916 - trunk/client-jdbc/src/main/java/com/metamatrix/jdbc.
by teiid-commits@lists.jboss.org
Author: li.liang
Date: 2009-05-12 15:44:31 -0400 (Tue, 12 May 2009)
New Revision: 916
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
Log:
TEIID-522 Return values when catalog is an empty string.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-05-12 19:36:13 UTC (rev 915)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-05-12 19:44:31 UTC (rev 916)
@@ -602,7 +602,7 @@
// Since catelog is allways null with MM, if nay supplied send empty
//result set
- if (catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyColumnsResultSet();
}
@@ -934,7 +934,7 @@
* @throws SQLException if there is an error obtaining server results
*/
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
- if (catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyExportedKeys();
}
@@ -1008,7 +1008,7 @@
* @throws SQLException if there is an error obtaining server results
*/
public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {
- if (catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyImportedKeys();
}
@@ -1061,7 +1061,7 @@
* @throws SQLException if catalog/schema info does not match for this connection.
*/
public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {
- if(catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyIndexInfo();
}
@@ -1356,8 +1356,7 @@
* @throws SQLException if there is an error obtaining metamatrix results.
*/
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
-
- if (catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyPrimaryKeys();
}
@@ -1448,7 +1447,7 @@
* @throws SQLException if there is an error obtaining metamatrix results.
*/
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException {
- if(catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyProcedureColumns();
}
if (schemaPattern == null) {
@@ -1556,7 +1555,7 @@
* @throws SQLException if there is an error obtaining metamatrix results.
*/
public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {
- if (catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyProcedures();
}
if (schemaPattern == null) {
@@ -1885,8 +1884,7 @@
* @throws SQLException if there is an error obtaining metamatrix results.
*/
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException {
-
- if (catalog != null) {
+ if ((catalog != null) && (catalog.trim().length() > 0)) {
return emptyTablesResultSet();
}
15 years, 7 months
teiid SVN: r915 - in branches/6.0.x: client-jdbc/src/main/java/com/metamatrix/jdbc and 4 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-05-12 15:36:13 -0400 (Tue, 12 May 2009)
New Revision: 915
Modified:
branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java
branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMServerConnection.java
branches/6.0.x/client/src/main/java/com/metamatrix/admin/api/embedded/EmbeddedConfigAdmin.java
branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java
branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
branches/6.0.x/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnection.java
Log:
TEIID-558, TEIID-557, TEIID-564
Modified: branches/6.0.x/client/src/main/java/com/metamatrix/admin/api/embedded/EmbeddedConfigAdmin.java
===================================================================
--- branches/6.0.x/client/src/main/java/com/metamatrix/admin/api/embedded/EmbeddedConfigAdmin.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/client/src/main/java/com/metamatrix/admin/api/embedded/EmbeddedConfigAdmin.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -23,12 +23,17 @@
package com.metamatrix.admin.api.embedded;
import com.metamatrix.admin.api.core.CoreConfigAdmin;
+import com.metamatrix.admin.api.exception.AdminException;
/**
* @since 4.3
*/
-public interface EmbeddedConfigAdmin extends
- CoreConfigAdmin {
-
+public interface EmbeddedConfigAdmin extends CoreConfigAdmin {
+ /**
+ * Reload the User Defined function.
+ * @throws AdminException
+ * @since 6.1.0
+ */
+ void reloadUDF() throws AdminException;
}
Modified: branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -372,7 +372,13 @@
}
URL[] dqpClassPath = runtimeClasspath.toArray(new URL[runtimeClasspath.size()]);
- this.classLoader = new URLClassLoader(dqpClassPath, Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ boolean useNondelegation = Boolean.parseBoolean(info.getProperty("dqp.useNonDelegateClassloader", "false")); //$NON-NLS-1$ //$NON-NLS-2$
+ if (useNondelegation) {
+ this.classLoader = new NonDelegatingClassLoader(dqpClassPath, Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ }
+ else {
+ this.classLoader = new URLClassLoader(dqpClassPath, Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ }
String logMsg = BaseDataSource.getResourceMessage("EmbeddedDriver.use_classpath"); //$NON-NLS-1$
DriverManager.println(logMsg);
for (int i = 0; i < dqpClassPath.length; i++) {
Modified: branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java
===================================================================
--- branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -501,7 +501,7 @@
* Get the database name that this connection is representing
* @return String name of the database
*/
- abstract String getDatabaseName();
+ public abstract String getDatabaseName();
/**
* Retrieves the current holdability of ResultSet objects created using this Connection object.
@@ -904,9 +904,9 @@
}
}
- abstract BaseDriver getBaseDriver();
+ public abstract BaseDriver getBaseDriver();
- abstract boolean isSameProcess(MMConnection conn) throws CommunicationException;
+ public abstract boolean isSameProcess(MMConnection conn) throws CommunicationException;
public void setClientInfo(Properties properties)
throws SQLClientInfoException {
Modified: branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMServerConnection.java
===================================================================
--- branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMServerConnection.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/client-jdbc/src/main/java/com/metamatrix/jdbc/MMServerConnection.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -94,7 +94,7 @@
/**
* @see com.metamatrix.jdbc.MMConnection#getDatabaseName()
*/
- String getDatabaseName() {
+ public String getDatabaseName() {
return SERVER_NAME;
}
@@ -113,7 +113,7 @@
}
@Override
- boolean isSameProcess(MMConnection conn) throws CommunicationException {
+ public boolean isSameProcess(MMConnection conn) throws CommunicationException {
if (conn instanceof MMServerConnection
&& this.serverConn instanceof SocketServerConnection
&& conn.serverConn instanceof SocketServerConnection) {
Modified: branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
===================================================================
--- branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -213,8 +213,6 @@
}
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
- } catch (MetaMatrixProcessingException e) {
- throw new AdminProcessingException(e);
}
}
@@ -287,20 +285,18 @@
// now that all of the input parameters validated, add the connector binding
binding = addConnectorBinding(deployName, binding, ctype, true);
- } catch (MetaMatrixProcessingException e) {
- throw new AdminProcessingException(e);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
}
return (com.metamatrix.admin.api.objects.ConnectorBinding) convertToAdminObjects(binding);
}
- boolean bindingExists(String name) throws MetaMatrixComponentException, MetaMatrixProcessingException {
+ boolean bindingExists(String name) throws MetaMatrixComponentException {
ConnectorBinding binding = getDataService().getConnectorBinding(name);
return (binding != null);
}
- boolean bindingTypeExists(String name) throws MetaMatrixComponentException, MetaMatrixProcessingException {
+ boolean bindingTypeExists(String name) throws MetaMatrixComponentException {
ConnectorBindingType type = getConfigurationService().getConnectorType(name);
return (type != null);
}
@@ -366,8 +362,6 @@
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
- } catch (MetaMatrixProcessingException e) {
- throw new AdminProcessingException(e);
}
return (com.metamatrix.admin.api.objects.ConnectorBinding) convertToAdminObjects(binding);
@@ -397,9 +391,7 @@
return binding;
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
- } catch (MetaMatrixProcessingException e) {
- throw new AdminProcessingException(e);
- }
+ }
}
throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.connector_load_failed_wrong_type", deployName)); //$NON-NLS-1$
}
@@ -468,7 +460,6 @@
try {
startVDBConnectorBindings(deployedVDB);
} catch (MetaMatrixComponentException e) {
- } catch (MetaMatrixProcessingException e) {
} catch (ApplicationLifecycleException e) {
// we can safely ignore these because the cause of the not starting is already recorded
// and more likely VDB deployment succeeded.
@@ -478,8 +469,6 @@
return (VDB) convertToAdminObjects(deployedVDB);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
- } catch (MetaMatrixProcessingException e) {
- throw new AdminProcessingException(e);
}
}
@@ -488,7 +477,7 @@
* @param vdb
*/
private void startVDBConnectorBindings(VDBArchive vdb) throws MetaMatrixComponentException,
- MetaMatrixProcessingException, ApplicationLifecycleException {
+ ApplicationLifecycleException {
VDBDefn def = vdb.getConfigurationDef();
Collection<ConnectorBinding> bindings = def.getConnectorBindings().values();
@@ -503,8 +492,7 @@
* the decrypt properties.
*/
void validateConnectorBindingsInVdb(VDBArchive vdb, AdminOptions options)
- throws MetaMatrixComponentException, MetaMatrixProcessingException,
- AdminProcessingException, AdminException {
+ throws MetaMatrixComponentException, AdminProcessingException, AdminException {
VDBDefn def = vdb.getConfigurationDef();
@@ -861,7 +849,7 @@
if (type == null) {
type = connectorTypes[typeIndex];
ExtensionModule[] extModules = archive.getExtensionModules(type);
- checkAddingConnectorType(type, extModules, options, previouslyAddedModules);
+ checkDuplicateExtensionModules(extModules, options, previouslyAddedModules);
saveConnectorType(type);
} else {
@@ -876,14 +864,14 @@
// Now that we know we need to add this to configuration; let's get on with it
type = connectorTypes[typeIndex];
ExtensionModule[] extModules = archive.getExtensionModules(type);
- checkAddingConnectorType(type, extModules, options, previouslyAddedModules);
+ checkDuplicateExtensionModules(extModules, options, previouslyAddedModules);
saveConnectorType(type);
}
}
// Now that we know we need to add this to configuration; let's get on with it
type = connectorTypes[typeIndex];
ExtensionModule[] extModules = archive.getExtensionModules(type);
- checkAddingConnectorType(type, extModules, options, previouslyAddedModules);
+ checkDuplicateExtensionModules(extModules, options, previouslyAddedModules);
}
// Now add the extension modules
@@ -894,8 +882,6 @@
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
- } catch(MetaMatrixProcessingException e) {
- throw new AdminProcessingException(e);
}
}
@@ -904,12 +890,12 @@
* system, if it there takes the appropriate action. Otherwise keeps tracks of all modules
* to add.
* @param type - connector type
- * @param extModules - Extension modules for the Coneector Type
+ * @param extModules - Extension modules for the Connector Type
* @param options - Admin Options
* @param ignorableModules - Modules which are already added, can be ignored for adding
*/
- void checkAddingConnectorType(ConnectorBindingType type, ExtensionModule[] extModules, AdminOptions options, HashSet ignorableModules)
- throws MetaMatrixComponentException, MetaMatrixProcessingException, AdminException {
+ void checkDuplicateExtensionModules(ExtensionModule[] extModules, AdminOptions options, HashSet ignorableModules)
+ throws AdminException {
// Now check if the the extension modules are already there
for (int i = 0; i < extModules.length; i++) {
@@ -932,7 +918,7 @@
// this is OK, we did not find any thing
}
- // if we found it take approprite action.
+ // if we found it take appropriate action.
if(previousModule != null && options.containsOption(AdminOptions.OnConflict.EXCEPTION)) {
throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.extension_module_exists", previousModule.getFullName())); //$NON-NLS-1$
}
@@ -1003,14 +989,12 @@
}
}
- private void saveConnectorType(ConnectorBindingType type) throws MetaMatrixProcessingException, MetaMatrixComponentException {
+ private void saveConnectorType(ConnectorBindingType type) throws MetaMatrixComponentException {
getConfigurationService().saveConnectorType(type);
}
- /**
- * @see com.metamatrix.admin.api.core.CoreConfigAdmin#addUDF(byte[], java.lang.String)
- */
+ @Override
public void addUDF(byte[] modelFileContents, String classpath)
throws AdminException {
if (modelFileContents == null || modelFileContents.length == 0) {
@@ -1057,9 +1041,7 @@
}
}
- /**
- * @see com.metamatrix.admin.api.core.CoreConfigAdmin#deleteUDF()
- */
+ @Override
public void deleteUDF() throws AdminException {
try {
getConfigurationService().unloadUDF();
@@ -1067,5 +1049,14 @@
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
}
+ }
+
+ @Override
+ public void reloadUDF() throws AdminException {
+ try {
+ getConfigurationService().loadUDF();
+ } catch (MetaMatrixComponentException e) {
+ throw new AdminComponentException(e);
+ }
}
}
Modified: branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java
===================================================================
--- branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -27,16 +27,22 @@
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import com.metamatrix.common.config.api.ComponentType;
+import com.metamatrix.common.config.api.ComponentTypeID;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationModelContainer;
import com.metamatrix.common.config.api.ConnectorBinding;
+import com.metamatrix.common.config.api.ConnectorBindingType;
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
+import com.metamatrix.common.config.model.BasicComponentType;
import com.metamatrix.common.config.model.ConfigurationModelContainerAdapter;
+import com.metamatrix.common.object.PropertyDefinition;
/**
* This class loades the server configuration file <code>ServerConfig.xml</code>
@@ -78,7 +84,7 @@
for (Iterator i = componentTypes.iterator(); i.hasNext();) {
ComponentType type = (ComponentType)i.next();
if (type.getComponentTypeCode() == ComponentType.CONNECTOR_COMPONENT_TYPE_CODE) {
- connectorTypes.put(type.getName(), type);
+ connectorTypes.put(type.getName(), resolvePropertyDefns(type, this.configuration));
}
}
@@ -134,4 +140,23 @@
public Map getConnectorTypes() {
return connectorTypes;
}
+
+ public static ComponentType resolvePropertyDefns(ComponentType type, ConfigurationModelContainer configuration) {
+ BasicComponentType baseType = (BasicComponentType)type;
+ Collection c = configuration.getAllComponentTypeDefinitions((ComponentTypeID)baseType.getID());
+
+ // if the type is found in the configuration.xml, then add its prop-definitions; else look for parent
+ if (c == null || c.isEmpty()) {
+ // this means user has added a new connector type
+ c = configuration.getAllComponentTypeDefinitions(type.getSuperComponentTypeID());
+ }
+
+ if (c != null && !c.isEmpty()) {
+ Set<PropertyDefinition> defns = new HashSet<PropertyDefinition>();
+ defns.addAll(c);
+ defns.addAll(type.getComponentTypeDefinitions());
+ baseType.setComponentTypeDefinitions(defns);
+ }
+ return baseType;
+ }
}
Modified: branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -231,32 +231,6 @@
DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.udf_classspath_failure", new Object[] {}); //$NON-NLS-1$
}
}
- /*
- else {
- try {
- StringBuffer sb = new StringBuffer();
- List<ExtensionModule> extModules = getExtensionModules();
- boolean valid = false;
- for (ExtensionModule module:extModules) {
- sb.append("extensionjar:").append(module.getFullName()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
- valid = true;
- }
- if (valid) {
- classpath = sb.toString();
- ArrayList<URL> allExtensionModules = new ArrayList<URL>();
- URL[] contexts = getExtensionPath();
- for (URL context:contexts) {
- allExtensionModules.addAll(ExtensionModuleReader.resolveExtensionClasspath(classpath, context));
- }
- return allExtensionModules;
- }
- } catch (MetaMatrixComponentException e) {
- // ok to return null
- } catch (IOException e) {
- DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.udf_classspath_failure", new Object[] {}); //$NON-NLS-1$
- }
- }
- */
return null;
}
@@ -875,7 +849,7 @@
* @since 4.3
*/
public void saveConnectorType(ConnectorBindingType type) throws MetaMatrixComponentException {
- loadedConnectorTypes.put(type.getName(), addFullPropertyDefns(type));
+ loadedConnectorTypes.put(type.getName(), ServerConfigFileReader.resolvePropertyDefns(type, this.configurationModel));
// Also add binding type to the configuration and save.
DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.connector_type_save", new Object[] {type.getName()}); //$NON-NLS-1$
@@ -928,7 +902,16 @@
if(udfFile != null && exists(udfFile)) {
List<URL> urls = getCommonExtensionClasspath();
try {
- this.udfSource = new UDFSource(udfFile, urls.toArray(new URL[urls.size()]));
+
+ // un-register the old UDF model, if there is one.
+ unloadUDF();
+
+ if (urls == null || urls.isEmpty()) {
+ this.udfSource = new UDFSource(udfFile);
+ }
+ else {
+ this.udfSource = new UDFSource(udfFile, urls.toArray(new URL[urls.size()]));
+ }
FunctionLibraryManager.registerSource(this.udfSource);
DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.udf_load", new Object[] {udfFile, urls}); //$NON-NLS-1$
} catch (IOException e) {
@@ -1089,7 +1072,7 @@
for (Iterator it = def.getConnectorTypes().values().iterator(); it.hasNext();) {
ConnectorBindingType type= (ConnectorBindingType)it.next();
if (!loadedConnectorTypes.containsKey(type.getName())) {
- loadedConnectorTypes.put(type.getName(), addFullPropertyDefns(type));
+ loadedConnectorTypes.put(type.getName(), ServerConfigFileReader.resolvePropertyDefns(type, this.configurationModel));
}
}
@@ -1107,24 +1090,7 @@
}
}
- private ComponentType addFullPropertyDefns(ConnectorBindingType type) {
- BasicComponentType baseType = (BasicComponentType)type;
- Collection c = this.configurationModel.getAllComponentTypeDefinitions((ComponentTypeID)baseType.getID());
- // if the type is found in the configuration.xml, then add its prop-definitions; else look for parent
- if (c == null || c.isEmpty()) {
- // this means user has added a new connector type
- c = this.configurationModel.getAllComponentTypeDefinitions(type.getSuperComponentTypeID());
- }
-
- if (c != null && !c.isEmpty()) {
- Set<PropertyDefinition> defns = new HashSet<PropertyDefinition>();
- defns.addAll(c);
- defns.addAll(type.getComponentTypeDefinitions());
- baseType.setComponentTypeDefinitions(defns);
- }
- return baseType;
- }
/**
* Add the connnector binding with new deployment name
Modified: branches/6.0.x/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnection.java
===================================================================
--- branches/6.0.x/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnection.java 2009-05-12 15:49:00 UTC (rev 914)
+++ branches/6.0.x/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnection.java 2009-05-12 19:36:13 UTC (rev 915)
@@ -140,7 +140,7 @@
* @see com.metamatrix.jdbc.MMConnection#getDatabaseName()
*/
@Override
- String getDatabaseName() {
+ public String getDatabaseName() {
return SERVER_NAME;
}
@@ -150,7 +150,7 @@
}
@Override
- boolean isSameProcess(MMConnection conn) {
+ public boolean isSameProcess(MMConnection conn) {
return (conn instanceof EmbeddedConnection);
}
15 years, 7 months
teiid SVN: r914 - trunk/connectors/connector-jdbc/src/main/resources.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-12 11:49:00 -0400 (Tue, 12 May 2009)
New Revision: 914
Modified:
trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
Log:
TEIID-576 updating username and password multiplicity.
Modified: trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
===================================================================
--- trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-12 13:02:33 UTC (rev 913)
+++ trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-12 15:49:00 UTC (rev 914)
@@ -13,11 +13,11 @@
<AllowedValue>TRANSACTION_NONE</AllowedValue>
<AllowedValue></AllowedValue>
</PropertyDefinition>
- <PropertyDefinition Name="Password" DisplayName="Password" ShortDescription="" Multiplicity="0" IsConstrainedToAllowedValues="false" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="Password" DisplayName="Password" ShortDescription="" Multiplicity="0..1" IsConstrainedToAllowedValues="false" IsMasked="true" IsPreferred="true" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.translator.Translator" IsExpert="true" />
<PropertyDefinition Name="SetCriteriaBatchSize" DisplayName="Max Values in IN Predicate" ShortDescription="Max number of values in an IN Predicate. Must be >= 0." DefaultValue="1000" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="User" DisplayName="User Name" ShortDescription="" Multiplicity="0" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="User" DisplayName="User Name" ShortDescription="" Multiplicity="0..1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="TrimStrings" DisplayName="Trim string flag" ShortDescription="Right Trim fixed character types returned as Strings" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
<PropertyDefinition Name="UseCommentsInSourceQuery" DisplayName="Use informational comments in Source Queries" ShortDescription="This will embed /*comment*/ style comment with session/request id in source SQL query for informational purposes" DefaultValue="false" PropertyType="Boolean" IsPreferred="true" IsExpert="true"/>
15 years, 7 months
teiid SVN: r913 - trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce.
by teiid-commits@lists.jboss.org
Author: jdoyle
Date: 2009-05-12 09:02:33 -0400 (Tue, 12 May 2009)
New Revision: 913
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/SalesforceCapabilities.java
Log:
Bumping up IN criteria size.
Modified: trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/SalesforceCapabilities.java
===================================================================
--- trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/SalesforceCapabilities.java 2009-05-12 03:17:43 UTC (rev 912)
+++ trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/SalesforceCapabilities.java 2009-05-12 13:02:33 UTC (rev 913)
@@ -23,66 +23,61 @@
import java.util.ArrayList;
import java.util.List;
-
import org.teiid.connector.basic.BasicConnectorCapabilities;
-
public class SalesforceCapabilities extends BasicConnectorCapabilities {
-
+
public int getMaxInCriteriaSize() {
- return 100;
+ return 700;
}
-
+
public List getSupportedFunctions() {
List<String> supportedFunctions = new ArrayList<String>();
supportedFunctions.add("includes");
supportedFunctions.add("excludes");
- return supportedFunctions;
+ return supportedFunctions;
}
-
- public boolean supportsCompareCriteriaEquals() {
+ public boolean supportsCompareCriteriaEquals() {
return true;
}
-
public boolean supportsInCriteria() {
return true;
}
+ public boolean supportsLikeCriteria() {
+ return true;
+ }
- public boolean supportsLikeCriteria() {
- return true;
- }
+ public boolean supportsRowLimit() {
+ return true;
+ }
- public boolean supportsRowLimit() {
- return true;
- }
+ // http://jira.jboss.org/jira/browse/JBEDSP-306
+ // Salesforce supports ORDER BY, but not on all column types
+ public boolean supportsOrderBy() {
+ return false;
+ }
- // http://jira.jboss.org/jira/browse/JBEDSP-306
- // Salesforce supports ORDER BY, but not on all column types
- public boolean supportsOrderBy() {
- return false;
- }
+ @Override
+ public boolean supportsAggregatesCountStar() {
+ return true;
+ }
- @Override
- public boolean supportsAggregatesCountStar() {
- return true;
- }
+ @Override
+ public boolean supportsNotCriteria() {
+ return true;
+ }
- @Override
- public boolean supportsNotCriteria() {
- return true;
- }
-
- @Override
- public boolean supportsOrCriteria() {
- return true;
- }
-
- @Override
- public boolean supportsCompareCriteriaOrdered() {
- return true;
- }
+ @Override
+ public boolean supportsOrCriteria() {
+ return true;
+ }
+ @Override
+ public boolean supportsCompareCriteriaOrdered() {
+ return true;
+ }
+
}
15 years, 7 months