teiid SVN: r992 - trunk/common-internal/src/main/java/com/metamatrix/common/util/crypto/keymanage.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-05-21 16:54:34 -0400 (Thu, 21 May 2009)
New Revision: 992
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/util/crypto/keymanage/FilePasswordConverter.java
Log:
Teiid-624 : changed the ConvertPassword utility to expect the default keystore file to be located in the config directory
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/util/crypto/keymanage/FilePasswordConverter.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/util/crypto/keymanage/FilePasswordConverter.java 2009-05-21 17:30:07 UTC (rev 991)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/util/crypto/keymanage/FilePasswordConverter.java 2009-05-21 20:54:34 UTC (rev 992)
@@ -59,7 +59,7 @@
public static final int FILE_TYPE_VDB = 3;
private static String DEFAULT_KEY_FILE = System.getProperty(CommonPropertyNames.INSTALLATION_DIRECTORY) + File.separator
- + "lib" + File.separator + CryptoUtil.KEY_NAME; //$NON-NLS-1$
+ + "config" + File.separator + CryptoUtil.KEY_NAME; //$NON-NLS-1$
private static final String PASSWORD = "PASSWORD"; //$NON-NLS-1$
15 years, 7 months
teiid SVN: r991 - in trunk: connector-sdk and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-21 13:30:07 -0400 (Thu, 21 May 2009)
New Revision: 991
Modified:
trunk/common-internal/pom.xml
trunk/connector-sdk/pom.xml
trunk/console/pom.xml
Log:
TEIID-621 removing bsh from common-internal dependencies.
Modified: trunk/common-internal/pom.xml
===================================================================
--- trunk/common-internal/pom.xml 2009-05-21 02:51:37 UTC (rev 990)
+++ trunk/common-internal/pom.xml 2009-05-21 17:30:07 UTC (rev 991)
@@ -33,13 +33,8 @@
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
</dependency>
-
+
<dependency>
- <groupId>beanshell</groupId>
- <artifactId>bsh</artifactId>
- </dependency>
-
- <dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
</dependency>
Modified: trunk/connector-sdk/pom.xml
===================================================================
--- trunk/connector-sdk/pom.xml 2009-05-21 02:51:37 UTC (rev 990)
+++ trunk/connector-sdk/pom.xml 2009-05-21 17:30:07 UTC (rev 991)
@@ -1,82 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>teiid</artifactId>
- <groupId>org.jboss.teiid</groupId>
- <version>6.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>teiid-connector-sdk</artifactId>
- <name>Connector SDK</name>
- <description>Connector Development Tools</description>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <configuration>
- <tasks>
- <tstamp>
- <format property="TSTAMP" pattern="yyyy-MM-dd'T'HH:mm:ss.SSS"/>
- </tstamp>
- <replace dir="${project.build.outputDirectory}" token="@build-date@" value="${TSTAMP}">
- <include name="**/*.cdk" />
- </replace>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*.cdk</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <excludes>
- <exclude>**/*.cdk</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-common-core</artifactId>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-engine</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-engine</artifactId>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-metadata</artifactId>
- </dependency>
- </dependencies>
-
+ <parent>
+ <artifactId>teiid</artifactId>
+ <groupId>org.jboss.teiid</groupId>
+ <version>6.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>teiid-connector-sdk</artifactId>
+ <name>Connector SDK</name>
+ <description>Connector Development Tools</description>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <configuration>
+ <tasks>
+ <tstamp>
+ <format property="TSTAMP" pattern="yyyy-MM-dd'T'HH:mm:ss.SSS" />
+ </tstamp>
+ <replace dir="${project.build.outputDirectory}" token="@build-date@"
+ value="${TSTAMP}">
+ <include name="**/*.cdk" />
+ </replace>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*.cdk</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <excludes>
+ <exclude>**/*.cdk</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-connector-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-common-core</artifactId>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-engine</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-engine</artifactId>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-metadata</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>beanshell</groupId>
+ <artifactId>bsh</artifactId>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2009-05-21 02:51:37 UTC (rev 990)
+++ trunk/console/pom.xml 2009-05-21 17:30:07 UTC (rev 991)
@@ -47,5 +47,9 @@
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
+ <dependency>
+ <groupId>beanshell</groupId>
+ <artifactId>bsh</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
15 years, 7 months
teiid SVN: r990 - in trunk: engine/src/main/java/com/metamatrix/common/application and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-20 22:51:37 -0400 (Wed, 20 May 2009)
New Revision: 990
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java
trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java
trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java
trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
Log:
TEIID-600 servicetype for registry bindings is actually the routing id, also the server doesn't need to use the url stream handler factory.
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-21 01:07:58 UTC (rev 989)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-21 02:51:37 UTC (rev 990)
@@ -110,7 +110,7 @@
private UDFSource udfSource;
private HashSet<ServerConnection> clientConnections = new HashSet<ServerConnection>();
- private AbstractClassLoaderManager classLoaderManager = new AbstractClassLoaderManager(Thread.currentThread().getContextClassLoader(), true) {
+ private AbstractClassLoaderManager classLoaderManager = new AbstractClassLoaderManager(Thread.currentThread().getContextClassLoader(), true, true) {
@Override
public String getCommonExtensionClassPath() {
Modified: trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java 2009-05-21 01:07:58 UTC (rev 989)
+++ trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java 2009-05-21 02:51:37 UTC (rev 990)
@@ -42,18 +42,22 @@
private URLFilteringClassLoader commonExtensionClassloader;
private Map<String, PostDelegatingClassLoader> postdelegationClassLoaderCache = new HashMap<String, PostDelegatingClassLoader>();
private boolean usePostDelegationCache;
+ private MetaMatrixURLStreamHandlerFactory factory;
private Object lock = new Object();
- public AbstractClassLoaderManager(ClassLoader parentClassLoader, boolean usePostDelegationCache) {
+ public AbstractClassLoaderManager(ClassLoader parentClassLoader, boolean usePostDelegationCache, boolean useStreamHandler) {
this.usePostDelegationCache = usePostDelegationCache;
this.parentClassLoader = parentClassLoader;
+ if (useStreamHandler) {
+ factory = new MetaMatrixURLStreamHandlerFactory();
+ }
}
public ClassLoader getCommonClassLoader(String urls) {
synchronized (lock) {
if (this.commonExtensionClassloader == null) {
// since we are using the extensions, get the common extension path
- this.commonExtensionClassloader = new URLFilteringClassLoader(parseURLs(getCommonExtensionClassPath()), parentClassLoader, new MetaMatrixURLStreamHandlerFactory());
+ this.commonExtensionClassloader = new URLFilteringClassLoader(parseURLs(getCommonExtensionClassPath()), parentClassLoader, factory);
}
if (urls != null && urls.trim().length() > 0) {
for (URL url : parseURLs(urls)) {
@@ -69,7 +73,7 @@
PostDelegatingClassLoader cl = this.postdelegationClassLoaderCache.get(urls);
if (cl == null) {
if (urls != null && urls.trim().length() > 0) {
- cl = new PostDelegatingClassLoader(parseURLs(urls), getCommonClassLoader(null), new MetaMatrixURLStreamHandlerFactory());
+ cl = new PostDelegatingClassLoader(parseURLs(urls), getCommonClassLoader(null), factory);
if (usePostDelegationCache) {
this.postdelegationClassLoaderCache.put(urls, cl);
}
Modified: trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java 2009-05-21 01:07:58 UTC (rev 989)
+++ trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java 2009-05-21 02:51:37 UTC (rev 990)
@@ -24,13 +24,8 @@
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
import com.metamatrix.common.extensionmodule.protocol.extensionjar.Handler;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.util.LogCommonConstants;
/**
* Factory to convert String urls into URL objects. This factory
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java 2009-05-21 01:07:58 UTC (rev 989)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java 2009-05-21 02:51:37 UTC (rev 990)
@@ -86,7 +86,8 @@
super(si, hostName, bus);
this.serviceData = new ServiceData(ServiceState.STATE_NOT_INITIALIZED);
this.serviceData.setId(serviceID);
- this.serviceData.setServiceType(serviceType);
+ this.serviceData.setRoutingId(serviceType);
+ this.serviceData.setServiceType(componentType);
this.serviceData.setInstanceName(instanceName);
this.deployedComponent = deployedComponent;
this.essential = essential;
@@ -115,7 +116,7 @@
}
public String getServiceType() {
- return this.serviceData.getServiceType();
+ return this.serviceData.getRoutingId();
}
public String getInstanceName() {
Modified: trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java 2009-05-21 01:07:58 UTC (rev 989)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java 2009-05-21 02:51:37 UTC (rev 990)
@@ -30,6 +30,7 @@
public class ServiceData implements Serializable {
private int state;
private String serviceType;
+ private String routingId;
private String instanceName;
private ServiceID id;
private Date startTime;
@@ -114,5 +115,13 @@
setStateChangeTime(new Date());
}
}
+
+ public String getRoutingId() {
+ return routingId;
+ }
+
+ public void setRoutingId(String routingId) {
+ this.routingId = routingId;
+ }
}
\ No newline at end of file
Modified: trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-05-21 01:07:58 UTC (rev 989)
+++ trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-05-21 02:51:37 UTC (rev 990)
@@ -168,7 +168,7 @@
* @throws Exception if an error occurs initializing vmController
*/
public ProcessController(Host host, String processname, ClusteredRegistryState registry, ServerEvents serverEvents, MessageBus bus, HostManagement hostManagement) throws Exception {
- super(Thread.currentThread().getContextClassLoader(), PropertiesUtils.getBooleanProperty(CurrentConfiguration.getInstance().getProperties(), ServerPropertyNames.CACHE_CLASS_LOADERS, true));
+ super(Thread.currentThread().getContextClassLoader(), PropertiesUtils.getBooleanProperty(CurrentConfiguration.getInstance().getProperties(), ServerPropertyNames.CACHE_CLASS_LOADERS, true), false);
this.host = host;
this.processName = processname;
@@ -726,7 +726,8 @@
ServiceData serviceData = service.getServiceData();
serviceData.setId(serviceID);
- serviceData.setServiceType(serviceProps.getProperty(ServicePropertyNames.COMPONENT_TYPE_NAME));
+ serviceData.setServiceType(serviceProps.getProperty(ServicePropertyNames.COMPONENT_TYPE_NAME));
+ serviceData.setRoutingId(serviceProps.getProperty(ServicePropertyNames.SERVICE_ROUTING_ID));
serviceData.setInstanceName(serviceProps.getProperty(ServicePropertyNames.INSTANCE_NAME));
// Create ServiceRegistryBinding and register
15 years, 7 months
teiid SVN: r989 - in trunk: connectors/connector-jdbc/src/main/resources and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-20 21:07:58 -0400 (Wed, 20 May 2009)
New Revision: 989
Modified:
trunk/connector-api/src/main/resources/connector-base.xml
trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml
trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml
trunk/connectors/connector-text/src/main/resources/connector-text.xml
trunk/connectors/connector-xml/src/main/resources/connector-xml.xml
Log:
TEIID-618 removing redundant classpath entry and changing cache size to expert
Modified: trunk/connector-api/src/main/resources/connector-base.xml
===================================================================
--- trunk/connector-api/src/main/resources/connector-base.xml 2009-05-20 23:07:35 UTC (rev 988)
+++ trunk/connector-api/src/main/resources/connector-base.xml 2009-05-21 01:07:58 UTC (rev 989)
@@ -13,7 +13,7 @@
<PropertyDefinition Name="MaxResultRows" DisplayName="Maximum Result Rows" ShortDescription="" DefaultValue="10000" 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="ResultSetCacheMaxSize" DisplayName="ResultSet Cache Maximum Size (megabytes)" ShortDescription="" DefaultValue="20" PropertyType="Integer" IsExpert="true" />
<PropertyDefinition Name="ResultSetCacheMaxAge" DisplayName="ResultSet Cache Maximum Age (milliseconds)" ShortDescription="" DefaultValue="3600000" PropertyType="Long" IsExpert="true" />
<PropertyDefinition Name="ResultSetCacheScope" DisplayName="ResultSet Cache Scope" ShortDescription="" DefaultValue="vdb" IsExpert="true">
<AllowedValue>vdb</AllowedValue>
Modified: trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
===================================================================
--- trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-20 23:07:35 UTC (rev 988)
+++ trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-21 01:07:58 UTC (rev 989)
@@ -20,20 +20,17 @@
<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" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:oracle:thin:@<host>:1521:<sid>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.oracle.OracleSQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="Oracle XA 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.xa.client.OracleXADataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:oracle:thin:@<host>:1521:<sid>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.oracle.OracleSQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="DB2 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="com.ibm.db2.jcc.DB2Driver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:db2://<server>:50000/<db-name>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.db2.DB2SQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="DB2 XA Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
@@ -42,14 +39,12 @@
<PropertyDefinition Name="ServerName" DisplayName="Server Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="DatabaseName" DisplayName="Database Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="DriverType" DisplayName="Driver Type" ShortDescription="" DefaultValue="4" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.db2.DB2SQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="SQL Server 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="com.microsoft.sqlserver.jdbc.SQLServerDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:sqlserver://<host>:1433;databaseName=<db-name>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.sqlserver.SqlServerSQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="SQL Server XA Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
@@ -57,20 +52,17 @@
<PropertyDefinition Name="PortNumber" DisplayName="Port Number" DefaultValue="1433" ShortDescription="" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="ServerName" DisplayName="Server Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="DatabaseName" DisplayName="Database Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.sqlserver.SqlServerSQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="MySQL JDBC 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="com.mysql.jdbc.Driver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mysql://<host>:3306/<databaseName>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.mysql.MySQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="MySQL 5 JDBC 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="com.mysql.jdbc.Driver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mysql://<host>:3306/<databaseName>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.mysql.MySQL5Translator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="MySQL JDBC XA Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
@@ -78,7 +70,6 @@
<PropertyDefinition Name="PortNumber" DisplayName="Port Number" DefaultValue="3306" ShortDescription="" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="ServerName" DisplayName="Server Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="DatabaseName" DisplayName="Database Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.mysql.MySQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
@@ -87,14 +78,12 @@
<PropertyDefinition Name="PortNumber" DisplayName="Port Number" DefaultValue="3306" ShortDescription="" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="ServerName" DisplayName="Server Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="DatabaseName" DisplayName="Database Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.mysql.MySQL5Translator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="PostgreSQL JDBC 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="org.postgresql.Driver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:postgresql://<host>:5432/<databaseName>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.postgresql.PostgreSQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="PostgreSQL XA JDBC Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
@@ -102,26 +91,22 @@
<PropertyDefinition Name="PortNumber" DisplayName="Port Number" DefaultValue="5432" ShortDescription="" Multiplicity="1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="ServerName" DisplayName="Server Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
<PropertyDefinition Name="DatabaseName" DisplayName="Database Name" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.postgresql.PostgreSQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="Apache Derby Embedded 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="org.apache.derby.jdbc.EmbeddedDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:derby:<databaseName>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.derby.DerbySQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="Apache Derby Network 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="org.apache.derby.jdbc.ClientDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:derby://localhost:1527/<path/to/db>" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.derby.DerbySQLTranslator" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="Teiid 6 JDBC 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="com.metamatrix.jdbc.MMDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:metamatrix:<vdbName>@mm://<host>:<port>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
</ComponentType>
<ComponentType Name="JDBC ODBC 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="sun.jdbc.odbc.JdbcOdbcDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
@@ -140,28 +125,24 @@
<ComponentType Name="Datadirect DB2 8 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.928-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.928-06:00">
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.db2.DB2DataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:db2://<host>:50000;DatabaseName=<databasename>;CollectionID=<collectionid>;PackageName=<packagename>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.db2.DB2SQLTranslator" IsExpert="true" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="Datadirect Oracle 9 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.923-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.923-06:00">
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.oracle.OracleDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:oracle://<host>:1521;SID=<sid>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.oracle.OracleSQLTranslator" IsExpert="true" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="Datadirect SQL Server 2003 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.935-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.935-06:00">
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.sqlserver.SQLServerDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:sqlserver://<host>:1433;DatabaseName=<databasename>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.sqlserver.SqlServerSQLTranslator" IsExpert="true" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
</ComponentType>
<ComponentType Name="Datadirect Sybase 12 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.930-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.930-06:00">
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.sybase.SybaseDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:sybase://<host>:5000;DatabaseName=<databasename>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.sybase.SybaseSQLTranslator" IsExpert="true" />
<PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
<PropertyDefinition Name="SetCriteriaBatchSize" DisplayName="Max Values in IN Predicate" ShortDescription="Max number of values in an IN Predicate. Must be >= 0." DefaultValue="250" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
Modified: trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml
===================================================================
--- trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml 2009-05-20 23:07:35 UTC (rev 988)
+++ trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml 2009-05-21 01:07:58 UTC (rev 989)
@@ -1,5 +1,4 @@
<ComponentType Name="LDAP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.946-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.946-06:00">
- <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="SearchDefaultBaseDN" DisplayName="Default Search Base DN" ShortDescription="Default Base DN for LDAP Searches" IsExpert="true" />
<PropertyDefinition Name="LdapAdminUserDN" DisplayName="Ldap Admin User DN" ShortDescription="User DN for the LDAP admin account." DefaultValue="cn=<>,ou=<>,dc=<>" Multiplicity="1" IsPreferred="true" />
Modified: trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml
===================================================================
--- trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml 2009-05-20 23:07:35 UTC (rev 988)
+++ trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml 2009-05-21 01:07:58 UTC (rev 989)
@@ -1,5 +1,4 @@
<ComponentType Name="Salesforce Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.916-06:00" CreationDate="2008-10-31T10:26:19.916-06:00">
- <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="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
<PropertyDefinition Name="UsePostDelegation" DisplayName="Use Separate Classloader" ShortDescription="Set to true to indicate that the connector classpath and connector type classpath entries should be loaded by a connector specific post-delegation class loader." PropertyType="Boolean" Multiplicity="1" IsExpert="true" DefaultValue="true"/>
<PropertyDefinition Name="username" DisplayName="User Name" ShortDescription="Name value for Salesforce authentication" DefaultValue="" Multiplicity="1" IsPreferred="true" />
Modified: trunk/connectors/connector-text/src/main/resources/connector-text.xml
===================================================================
--- trunk/connectors/connector-text/src/main/resources/connector-text.xml 2009-05-20 23:07:35 UTC (rev 988)
+++ trunk/connectors/connector-text/src/main/resources/connector-text.xml 2009-05-21 01:07:58 UTC (rev 989)
@@ -1,5 +1,4 @@
<ComponentType Name="Text File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
- <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="PartialStartupAllowed" DisplayName="Partial Startup Allowed" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsPreferred="true" />
<PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
Modified: trunk/connectors/connector-xml/src/main/resources/connector-xml.xml
===================================================================
--- trunk/connectors/connector-xml/src/main/resources/connector-xml.xml 2009-05-20 23:07:35 UTC (rev 988)
+++ trunk/connectors/connector-xml/src/main/resources/connector-xml.xml 2009-05-21 01:07:58 UTC (rev 989)
@@ -1,5 +1,4 @@
<ComponentType Name="XML Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
- <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="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true"/>
<PropertyDefinition Name="UsePostDelegation" DisplayName="Use Separate Classloader" ShortDescription="Set to true to indicate that the connector classpath and connector type classpath entries should be loaded by a connector specific post-delegation class loader." PropertyType="Boolean" Multiplicity="1" IsExpert="true" DefaultValue="true"/>
</ComponentType>
15 years, 7 months
teiid SVN: r988 - in trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc: mysql and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-20 19:07:35 -0400 (Wed, 20 May 2009)
New Revision: 988
Removed:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java
Modified:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/MetadataFactory.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java
Log:
TEIID-473 moving util directly onto metadata factory
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/MetadataFactory.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/MetadataFactory.java 2009-05-20 21:28:07 UTC (rev 987)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/MetadataFactory.java 2009-05-20 23:07:35 UTC (rev 988)
@@ -22,10 +22,16 @@
package org.teiid.connector.jdbc;
+import static org.junit.Assert.*;
+
+import org.teiid.connector.api.ConnectorException;
+import org.teiid.connector.jdbc.translator.TranslatedCommand;
+import org.teiid.connector.jdbc.translator.Translator;
import org.teiid.connector.language.ICommand;
import junit.framework.Assert;
+import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.cdk.unittest.FakeTranslationFactory;
@@ -46,4 +52,15 @@
return util.parseCommand(sql);
}
+ public static void helpTestVisitor(String vdb, String input, String expectedOutput, Translator translator) throws ConnectorException {
+ // Convert from sql to objects
+ ICommand obj = helpTranslate(vdb, input);
+
+ TranslatedCommand tc = new TranslatedCommand(EnvironmentUtility.createSecurityContext("user"), translator); //$NON-NLS-1$
+ tc.translateCommand(obj);
+
+ // Check stuff
+ assertEquals("Did not get correct sql", expectedOutput, tc.getSql()); //$NON-NLS-1$
+ }
+
}
Deleted: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java 2009-05-20 21:28:07 UTC (rev 987)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java 2009-05-20 23:07:35 UTC (rev 988)
@@ -1,47 +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.connector.jdbc;
-
-import static org.junit.Assert.*;
-
-import org.teiid.connector.api.ConnectorException;
-import org.teiid.connector.jdbc.translator.TranslatedCommand;
-import org.teiid.connector.jdbc.translator.Translator;
-import org.teiid.connector.language.ICommand;
-
-import com.metamatrix.cdk.api.EnvironmentUtility;
-
-public class Util {
-
- public static void helpTestVisitor(String vdb, String input, String expectedOutput, Translator translator) throws ConnectorException {
- // Convert from sql to objects
- ICommand obj = MetadataFactory.helpTranslate(vdb, input);
-
- TranslatedCommand tc = new TranslatedCommand(EnvironmentUtility.createSecurityContext("user"), translator); //$NON-NLS-1$
- tc.translateCommand(obj);
-
- // Check stuff
- assertEquals("Did not get correct sql", expectedOutput, tc.getSql()); //$NON-NLS-1$
- }
-
-}
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java 2009-05-20 21:28:07 UTC (rev 987)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java 2009-05-20 23:07:35 UTC (rev 988)
@@ -28,7 +28,6 @@
import org.junit.Test;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.jdbc.MetadataFactory;
-import org.teiid.connector.jdbc.Util;
import com.metamatrix.cdk.api.EnvironmentUtility;
@@ -55,7 +54,7 @@
String input = "SELECT char(convert(PART_WEIGHT, integer) + 100) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT char((convert(PARTS.PART_WEIGHT, SIGNED INTEGER) + 100)) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -64,7 +63,7 @@
String input = "SELECT convert(PART_WEIGHT, long) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT convert(PARTS.PART_WEIGHT, SIGNED) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -73,7 +72,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, long), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT convert(convert(PARTS.PART_WEIGHT, SIGNED), CHAR) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -82,7 +81,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, date), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT date_format(DATE(PARTS.PART_WEIGHT), '%Y-%m-%d') FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -90,7 +89,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, time), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT date_format(TIME(PARTS.PART_WEIGHT), '%H:%i:%S') FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -98,7 +97,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, timestamp), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT date_format(TIMESTAMP(PARTS.PART_WEIGHT), '%Y-%m-%d %H:%i:%S.%f') FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -106,7 +105,7 @@
String input = "SELECT ifnull(PART_WEIGHT, 'otherString') FROM PARTS"; //$NON-NLS-1$
String output = "SELECT ifnull(PARTS.PART_WEIGHT, 'otherString') FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -114,7 +113,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, integer), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT convert(convert(PARTS.PART_WEIGHT, SIGNED INTEGER), CHAR) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -122,7 +121,7 @@
String input = "SELECT insert(PART_WEIGHT, 1, 5, 'chimp') FROM PARTS"; //$NON-NLS-1$
String output = "SELECT insert(PARTS.PART_WEIGHT, 1, 5, 'chimp') FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -130,7 +129,7 @@
String input = "SELECT locate(PART_WEIGHT, 'chimp', 1) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT locate(PARTS.PART_WEIGHT, 'chimp', 1) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -138,7 +137,7 @@
String input = "SELECT substring(PART_WEIGHT, 1) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT substring(PARTS.PART_WEIGHT, 1) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -146,7 +145,7 @@
String input = "SELECT substring(PART_WEIGHT, 1, 5) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT substring(PARTS.PART_WEIGHT, 1, 5) FROM PARTS"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -154,7 +153,7 @@
String input = "SELECT PART_ID FROM PARTS UNION SELECT PART_ID FROM PARTS ORDER BY PART_ID"; //$NON-NLS-1$
String output = "(SELECT PARTS.PART_ID FROM PARTS) UNION (SELECT PARTS.PART_ID FROM PARTS) ORDER BY PART_ID"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestVDB(),
+ MetadataFactory.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -163,7 +162,7 @@
String input = "select intkey from bqt1.smalla limit 100"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA LIMIT 100"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestBQTVDB(),
+ MetadataFactory.helpTestVisitor(getTestBQTVDB(),
input,
output, TRANSLATOR);
}
@@ -172,7 +171,7 @@
String input = "select intkey from bqt1.smalla limit 50, 100"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA LIMIT 50, 100"; //$NON-NLS-1$
- Util.helpTestVisitor(getTestBQTVDB(),
+ MetadataFactory.helpTestVisitor(getTestBQTVDB(),
input,
output, TRANSLATOR);
}
@@ -181,7 +180,7 @@
String input = "select bitand(intkey, intnum) from bqt1.smalla"; //$NON-NLS-1$
String output = "SELECT convert((SmallA.IntKey & SmallA.IntNum), SIGNED INTEGER) FROM SmallA"; //$NON-NLS-1$
- Util.helpTestVisitor(MetadataFactory.BQT_VDB,
+ MetadataFactory.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
@@ -190,7 +189,7 @@
String input = "select smalla.intkey from bqt1.smalla inner join bqt1.smallb on smalla.stringkey=smallb.stringkey cross join bqt1.mediuma"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM (SmallA INNER JOIN SmallB ON SmallA.StringKey = SmallB.StringKey) CROSS JOIN MediumA"; //$NON-NLS-1$
- Util.helpTestVisitor(MetadataFactory.BQT_VDB,
+ MetadataFactory.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java 2009-05-20 21:28:07 UTC (rev 987)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java 2009-05-20 23:07:35 UTC (rev 988)
@@ -28,7 +28,6 @@
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.jdbc.MetadataFactory;
-import org.teiid.connector.jdbc.Util;
import org.teiid.connector.jdbc.translator.TranslatedCommand;
import org.teiid.connector.jdbc.translator.Translator;
import org.teiid.connector.language.ICommand;
@@ -72,7 +71,7 @@
String input = "select smalla.intkey from bqt1.smalla inner join bqt1.smallb on smalla.stringkey=smallb.stringkey cross join bqt1.mediuma"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA INNER JOIN SmallB ON SmallA.StringKey = SmallB.StringKey CROSS JOIN MediumA"; //$NON-NLS-1$
- Util.helpTestVisitor(MetadataFactory.BQT_VDB,
+ MetadataFactory.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
@@ -81,7 +80,7 @@
String input = "select smalla.intkey from bqt1.smalla cross join (bqt1.smallb cross join bqt1.mediuma)"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA CROSS JOIN (SmallB CROSS JOIN MediumA)"; //$NON-NLS-1$
- Util.helpTestVisitor(MetadataFactory.BQT_VDB,
+ MetadataFactory.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
15 years, 7 months
teiid SVN: r987 - trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-20 17:28:07 -0400 (Wed, 20 May 2009)
New Revision: 987
Modified:
trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java
Log:
removing unused import/system.out
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java 2009-05-20 14:33:32 UTC (rev 986)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java 2009-05-20 21:28:07 UTC (rev 987)
@@ -31,7 +31,6 @@
import javax.swing.SwingUtilities;
-import com.metamatrix.common.config.api.ComponentDefn;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
@@ -47,7 +46,6 @@
import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
import com.metamatrix.console.util.ExternalException;
import com.metamatrix.console.util.LogContexts;
-
import com.metamatrix.toolbox.ui.widget.tree.DefaultTreeModel;
import com.metamatrix.toolbox.ui.widget.tree.DefaultTreeNode;
@@ -101,7 +99,6 @@
super(new DefaultTreeNode());
root = (DefaultTreeNode)getRoot();
- System.out.println("root");
}
public void init(Configuration theConfig) {
15 years, 7 months
teiid SVN: r986 - in trunk: build/kit-embedded/examples/portfolio and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-20 10:33:32 -0400 (Wed, 20 May 2009)
New Revision: 986
Added:
trunk/build/kit-embedded/examples/portfolio/README.txt
Modified:
trunk/build/assembly/embedded/embedded-dist.xml
trunk/build/kit-embedded/examples/portfolio/run.bat
trunk/build/kit-embedded/examples/portfolio/run.sh
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
Log:
TEIID-50 updates to ensure that the arjuna patches are picked up ahead of the arjuna jar. also added a readme file to the example
Modified: trunk/build/assembly/embedded/embedded-dist.xml
===================================================================
--- trunk/build/assembly/embedded/embedded-dist.xml 2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/build/assembly/embedded/embedded-dist.xml 2009-05-20 14:33:32 UTC (rev 986)
@@ -25,10 +25,21 @@
<includes>
<include>*.jar</include>
</includes>
+ <excludes>
+ <exclude>teiid-txn-jbossts-${version}.jar</exclude>
+ </excludes>
<outputDirectory>lib</outputDirectory>
- </fileSet>
+ </fileSet>
<fileSet>
+ <directory>target/distribution/teiid-${version}-embedded-dependencies.dir</directory>
+ <includes>
+ <include>teiid-txn-jbossts-${version}.jar</include>
+ </includes>
+ <outputDirectory>lib/patches</outputDirectory>
+ </fileSet>
+
+ <fileSet>
<directory>target/distribution/teiid-${version}-connector-dependencies.dir</directory>
<includes>
<include>*.jar</include>
Added: trunk/build/kit-embedded/examples/portfolio/README.txt
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/README.txt (rev 0)
+++ trunk/build/kit-embedded/examples/portfolio/README.txt 2009-05-20 14:33:32 UTC (rev 986)
@@ -0,0 +1,11 @@
+Install a recent version of Derby - see http://db.apache.org/derby/derby_downloads.html
+
+Create the example dataset in Derby by running <derby home>/bin/ij customer-schema.sql
+
+Put the <derby home>/lib/derbyclient.jar to the <teiid embedded home>/extensions directory.
+
+Run the demo with run.bat or run.sh.
+
+This will execute the query contained in the run script against a vdb that integrates the
+Derby datasource with file based data contained in the marketdata-price.txt file.
+
Property changes on: trunk/build/kit-embedded/examples/portfolio/README.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/build/kit-embedded/examples/portfolio/run.bat
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.bat 2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/build/kit-embedded/examples/portfolio/run.bat 2009-05-20 14:33:32 UTC (rev 986)
@@ -2,7 +2,7 @@
set CLIENT_PATH=java/*;PortfolioModel/
rem Second one for the JARs in Teiid embedded
-set TEIID_PATH=../../teiid-${pom.version}-client.jar;../../deploy;../../lib/*;../../extensions/*
+set TEIID_PATH=../../teiid-${pom.version}-client.jar;../../deploy;../../lib/patches/*;../../lib/*;../../extensions/*
java -cp %CLIENT_PATH%;%TEIID_PATH% JDBCClient "select * from CustomerAccount"
Modified: trunk/build/kit-embedded/examples/portfolio/run.sh
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.sh 2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/build/kit-embedded/examples/portfolio/run.sh 2009-05-20 14:33:32 UTC (rev 986)
@@ -4,6 +4,6 @@
CLIENT_PATH=java/*:PortfolioModel/
#Second one for the JARs in Teiid embedded
-TEIID_PATH=../../teiid-${pom.version}-client.jar:../../deploy:../../lib/*:../../extensions/*
+TEIID_PATH=../../teiid-${pom.version}-client.jar:../../deploy:../../lib/patches/*:../../lib/*:../../extensions/*
java -cp ${CLIENT_PATH}:${TEIID_PATH} JDBCClient "select * from CustomerAccount"
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-05-20 14:33:32 UTC (rev 986)
@@ -375,14 +375,22 @@
// find jars in the "lib" directory; patches is reverse alpaha and not case sensitive so small letters then capitals
if (!EmbeddedDriver.getDefaultConnectionURL().equals(dqpURL.toString())) {
runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation+"patches/", MMURLConnection.REVERSEALPHA)); //$NON-NLS-1$
- runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation, MMURLConnection.DATE));
-
+
// check if a specific post delegation rules specified for loading
String postDelgationLibraries = info.getProperty(POST_DELEGATION_LIBRARIES);
if (postDelgationLibraries != null) {
postDelegationClasspathList = resolvePath(dqpURL, libLocation, postDelgationLibraries);
+ List<URL> postDelegationPatches = new ArrayList<URL>(runtimeClasspathList);
+ postDelegationPatches.retainAll(postDelegationClasspathList);
+ postDelegationClasspathList.removeAll(postDelegationPatches);
+ postDelegationClasspathList.addAll(0, postDelegationPatches);
+ }
+
+ runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation, MMURLConnection.DATE));
+
+ if (postDelegationClasspathList != null) {
runtimeClasspathList.removeAll(postDelegationClasspathList);
- }
+ }
}
URL[] dqpClassPath = runtimeClasspathList.toArray(new URL[runtimeClasspathList.size()]);
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-20 02:53:44 UTC (rev 985)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-05-20 14:33:32 UTC (rev 986)
@@ -381,10 +381,11 @@
classloader = threadContextLoader;
} else {
env.getProperties().setProperty(ConnectorPropertyNames.USING_CUSTOM_CLASSLOADER, Boolean.TRUE.toString());
- LogManager.logInfo(DQPPlugin.Util.getString("DataService.useClassloader"), classPath); //$NON-NLS-1$
-
+
boolean postDelegation = PropertiesUtils.getBooleanProperty(env.getProperties(), ConnectorPropertyNames.USE_POST_DELEGATION, false);
+ LogManager.logInfo(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("ConnectorManager.useClassloader", connectorName, postDelegation, classPath)); //$NON-NLS-1$
+
if (postDelegation) {
this.classloader = this.clManager.getPostDelegationClassLoader(classPath);
} else {
Modified: trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-05-20 02:53:44 UTC (rev 985)
+++ trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-05-20 14:33:32 UTC (rev 986)
@@ -56,7 +56,8 @@
ConnectorManagerImpl.Err_get_conn=Error getting connection for cancellation: {0}
ConnectorManager.cannot_restart=Cannot restart ConnectorManager
ConnectorManager.cannot_add_to_recovery=Connector ''{0}'' does not support single identity connections, it cannot participate in recovery
-ConnectorManager.asynch_worker_warning=Setting ''{0}'' to false with pooling enabled is not recommended. If connector threads become exhausted normal execution closure will not be possible.
+ConnectorManager.asynch_worker_warning=Setting ''{0}'' to false with pooling enabled is not recommended. If connector threads become exhausted normal execution closure will not be possible.
+ConnectorManager.useClassloader=Connector ''{0}'' using post delegation = {1} and classpath {2}
non_xa_connector=Connector \"{0}\" was configured to support XA transactions, but the connector is not an XAConnector
no_txn_manager=No Transaction Manger found in the configuration, Failed to start connector \"{0}\"
Connector_State_not_active=Connector request state is not active for request {0} in Connector {1}
15 years, 7 months
teiid SVN: r985 - in trunk: build/assembly/embedded and 24 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-19 22:53:44 -0400 (Tue, 19 May 2009)
New Revision: 985
Added:
trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java
trunk/engine/src/main/java/com/metamatrix/common/application/ClassLoaderManager.java
Modified:
trunk/build/assembly/embedded/build-configuration.xml
trunk/build/assembly/embedded/embedded-dist.xml
trunk/build/kit-embedded/examples/portfolio/run.bat
trunk/build/kit-embedded/examples/portfolio/run.sh
trunk/build/pom.xml
trunk/common-core/src/main/java/com/metamatrix/common/classloader/URLFilteringClassLoader.java
trunk/connector-api/src/main/java/org/teiid/connector/internal/ConnectorPropertyNames.java
trunk/connector-api/src/main/resources/connector-base.xml
trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml
trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml
trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml
trunk/connectors/connector-text/src/main/resources/connector-text.xml
trunk/connectors/connector-xml/src/main/resources/connector-xml.xml
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java
trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java
trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java
trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java
trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java
Log:
TEIID-600 TEIID-615 further refining connector dependency handling, also adding filtering to add version info to the example scripts
Modified: trunk/build/assembly/embedded/build-configuration.xml
===================================================================
--- trunk/build/assembly/embedded/build-configuration.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/build/assembly/embedded/build-configuration.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -18,17 +18,10 @@
</unzip>
<move todir="${kit.dir}/extensions">
<fileset dir="${extensions.dir}/unzipped">
- <exclude name="**/connector-*.jar"/>
- <exclude name="**/*.xml"/>
+ <include name="**/*.jar"/>
</fileset>
</move>
-
- <move todir="${kit.dir}/lib">
- <fileset dir="${extensions.dir}/unzipped">
- <include name="**/connector-*.jar"/>
- </fileset>
- </move>
-
+
<!-- add all the cdk files, and then add the combined fragment to the config.xml -->
<concat destfile="${extensions.dir}/unzipped/all-cdks.xml">
<fileset dir="${extensions.dir}/unzipped" includes="connector-*.xml"/>
Modified: trunk/build/assembly/embedded/embedded-dist.xml
===================================================================
--- trunk/build/assembly/embedded/embedded-dist.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/build/assembly/embedded/embedded-dist.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -11,18 +11,10 @@
<baseDirectory>teiid-embedded-${version}</baseDirectory>
<fileSets>
-
+
<fileSet>
<directory>target/distribution</directory>
<includes>
- <include>teiid-${version}-embedded.jar</include>
- </includes>
- <outputDirectory>lib</outputDirectory>
- </fileSet>
-
- <fileSet>
- <directory>target/distribution</directory>
- <includes>
<include>teiid-${version}-client.jar</include>
</includes>
<outputDirectory>/</outputDirectory>
@@ -48,10 +40,19 @@
<directory>build/target/kit-embedded</directory>
<outputDirectory>/</outputDirectory>
<excludes>
- <exclude>**/*.foo</exclude>
+ <exclude>**/run.*</exclude>
</excludes>
- </fileSet>
+ </fileSet>
+
+ <fileSet>
+ <directory>build/target/kit-embedded</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>**/run.*</include>
+ </includes>
+ <filtered>true</filtered>
+ </fileSet>
+
</fileSets>
-
</assembly>
\ No newline at end of file
Modified: trunk/build/kit-embedded/examples/portfolio/run.bat
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.bat 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/build/kit-embedded/examples/portfolio/run.bat 2009-05-20 02:53:44 UTC (rev 985)
@@ -2,7 +2,7 @@
set CLIENT_PATH=java/*;PortfolioModel/
rem Second one for the JARs in Teiid embedded
-set TEIID_PATH=../../teiid-6.0.0-client.jar;../../deploy;../../lib/*;../../extensions/*
+set TEIID_PATH=../../teiid-${pom.version}-client.jar;../../deploy;../../lib/*;../../extensions/*
java -cp %CLIENT_PATH%;%TEIID_PATH% JDBCClient "select * from CustomerAccount"
Modified: trunk/build/kit-embedded/examples/portfolio/run.sh
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.sh 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/build/kit-embedded/examples/portfolio/run.sh 2009-05-20 02:53:44 UTC (rev 985)
@@ -4,6 +4,6 @@
CLIENT_PATH=java/*:PortfolioModel/
#Second one for the JARs in Teiid embedded
-TEIID_PATH=../../teiid-6.0.0-client.jar:../../deploy:../../lib/*:../../extensions/*
+TEIID_PATH=../../teiid-${pom.version}-client.jar:../../deploy:../../lib/*:../../extensions/*
java -cp ${CLIENT_PATH}:${TEIID_PATH} JDBCClient "select * from CustomerAccount"
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/build/pom.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -10,10 +10,6 @@
<packaging>pom</packaging>
<name>Build</name>
<description>Teiid Build</description>
- <properties>
- <org.jboss.teiid.version>6.1.0-SNAPSHOT</org.jboss.teiid.version>
- </properties>
-
<build>
<plugins>
<plugin>
@@ -32,7 +28,7 @@
<artifactItem>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-connector-api</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -40,7 +36,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-xml</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -48,7 +44,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-xml-common</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -56,7 +52,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-jdbc</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -64,7 +60,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-text</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -72,7 +68,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-ldap</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -80,7 +76,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-loopback</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
@@ -88,7 +84,7 @@
<artifactItem>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-salesforce</artifactId>
- <version>${org.jboss.teiid.version}</version>
+ <version>${pom.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<overWrite>true</overWrite>
Modified: trunk/common-core/src/main/java/com/metamatrix/common/classloader/URLFilteringClassLoader.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/classloader/URLFilteringClassLoader.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/common-core/src/main/java/com/metamatrix/common/classloader/URLFilteringClassLoader.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -91,5 +91,10 @@
}
return temp.toArray(new URL[temp.size()]);
}
+
+ @Override
+ public void addURL(URL url) {
+ super.addURL(url);
+ }
}
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-20 02:07:14 UTC (rev 984)
+++ trunk/connector-api/src/main/java/org/teiid/connector/internal/ConnectorPropertyNames.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -108,5 +108,7 @@
* is about to be executed by a non-XA compatible connector, but there is a global transaction.
*/
public static final String IS_IMMUTABLE = "Immutable"; //$NON-NLS-1$
+
+ public static final String USE_POST_DELEGATION = "UsePostDelegation"; //$NON-NLS-1$
}
Modified: trunk/connector-api/src/main/resources/connector-base.xml
===================================================================
--- trunk/connector-api/src/main/resources/connector-base.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connector-api/src/main/resources/connector-base.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -2,6 +2,7 @@
<PropertyDefinition Name="SourceConnectionTestInterval" DisplayName="Data Source Test Connect Interval (seconds)" ShortDescription="How often (in seconds) to create test connections to the underlying datasource to see if it is available." DefaultValue="600" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
<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)" Multiplicity="0..1" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="UsePostDelegation" DisplayName="Use Separate Classloader" ShortDescription="Set to true to indicate that the connector classpath and connector type classpath entries should be loaded by a connector specific post-delegation class loader." PropertyType="Boolean" Multiplicity="1" IsExpert="true" DefaultValue="false"/>
<PropertyDefinition Name="ExceptionOnMaxRows" DisplayName="Exception on Exceeding Max Rows" ShortDescription="Indicates if an Exception should be thrown if the specified value for Maximum Result Rows is exceeded; else no exception and no more than the maximum will be returned" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
<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" />
Modified: trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
===================================================================
--- trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -1,6 +1,6 @@
<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="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${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="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" />
Modified: trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml
===================================================================
--- trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -1,7 +1,7 @@
<ComponentType Name="LDAP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.946-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.946-06:00">
<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="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
- <PropertyDefinition Name="SearchDefaultBaseDN" DisplayName="Default Search Base DN" ShortDescription="Default Base DN for LDAP Searches" IsExpert="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="SearchDefaultBaseDN" DisplayName="Default Search Base DN" ShortDescription="Default Base DN for LDAP Searches" IsExpert="true" />
<PropertyDefinition Name="LdapAdminUserDN" DisplayName="Ldap Admin User DN" ShortDescription="User DN for the LDAP admin account." DefaultValue="cn=<>,ou=<>,dc=<>" Multiplicity="1" IsPreferred="true" />
<PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.ldap.LDAPConnector" Multiplicity="1" IsExpert="true" />
Modified: trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml
===================================================================
--- trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -1,5 +1,5 @@
<ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="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="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackCapabilities" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" IsExpert="true" />
Modified: trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml
===================================================================
--- trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -1,6 +1,7 @@
<ComponentType Name="Salesforce Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.916-06:00" CreationDate="2008-10-31T10:26:19.916-06:00">
<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="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
+ <PropertyDefinition Name="UsePostDelegation" DisplayName="Use Separate Classloader" ShortDescription="Set to true to indicate that the connector classpath and connector type classpath entries should be loaded by a connector specific post-delegation class loader." PropertyType="Boolean" Multiplicity="1" IsExpert="true" DefaultValue="true"/>
<PropertyDefinition Name="username" DisplayName="User Name" ShortDescription="Name value for Salesforce authentication" DefaultValue="" Multiplicity="1" IsPreferred="true" />
<PropertyDefinition Name="ConnectorStateClass" DisplayName="Connector State Class" ShortDescription="" DefaultValue="com.metamatrix.connector.salesforce.ConnectorState" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.salesforce.Connector" Multiplicity="1" IsExpert="true" />
Modified: trunk/connectors/connector-text/src/main/resources/connector-text.xml
===================================================================
--- trunk/connectors/connector-text/src/main/resources/connector-text.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connectors/connector-text/src/main/resources/connector-text.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -1,6 +1,6 @@
<ComponentType Name="Text File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
<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="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="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="PartialStartupAllowed" DisplayName="Partial Startup Allowed" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsPreferred="true" />
<PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
<PropertyDefinition Name="DescriptorFile" DisplayName="Text File Descriptor" ShortDescription="" Multiplicity="1" IsPreferred="true" />
Modified: trunk/connectors/connector-xml/src/main/resources/connector-xml.xml
===================================================================
--- trunk/connectors/connector-xml/src/main/resources/connector-xml.xml 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/connectors/connector-xml/src/main/resources/connector-xml.xml 2009-05-20 02:53:44 UTC (rev 985)
@@ -1,6 +1,7 @@
<ComponentType Name="XML Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
<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="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true"/>
+ <PropertyDefinition Name="UsePostDelegation" DisplayName="Use Separate Classloader" ShortDescription="Set to true to indicate that the connector classpath and connector type classpath entries should be loaded by a connector specific post-delegation class loader." PropertyType="Boolean" Multiplicity="1" IsExpert="true" DefaultValue="true"/>
</ComponentType>
<ComponentType Name="XML File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -29,11 +29,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.config.api.ExtensionModule;
@@ -126,32 +122,7 @@
return extModuleList;
}
- /**
- * Convert the extension path into URLS
- * @param extClassPath -
- * ClassPath String for the extension
- * classpath Example:extensionjar:jdbcconn.jar;extensionjar:MJjdbc.jar;file://E/mydir/my.jar
- * @param context - dqp.extensions directory path used for finding the context URL
- * @return URL[] array of URLs
- * @throws MalformedURLException
- * @since 4.3
- */
- public static Set<URL> resolveExtensionClasspath(String extClassPath, URL[] contexts)
- throws IOException {
-
- Set<URL> urls = new LinkedHashSet<URL>();
- StringTokenizer st = new StringTokenizer(extClassPath, ";"); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- String extModule = st.nextToken();
- URL entry = resolveExtensionModule(extModule, contexts);
- if (entry != null) {
- urls.add(entry);
- }
- }
- return urls;
- }
-
- public static URL resolveExtensionModule(String extModule, URL[] contexts) throws IOException {
+ public static URL resolveExtensionModule(String extModule, URL[] contexts) throws MalformedURLException {
int idx = extModule.indexOf(MM_JAR_PROTOCOL);
if (idx != -1) {
for (URL context : contexts) {
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -38,9 +38,8 @@
import java.util.Set;
import java.util.StringTokenizer;
-import org.teiid.connector.internal.ConnectorPropertyNames;
-
import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.common.application.AbstractClassLoaderManager;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
@@ -91,7 +90,7 @@
* - Onlu used get, save, delete of any configuration on public api
* @since 4.3
*/
-public class EmbeddedConfigurationService extends EmbeddedBaseDQPService implements ConfigurationService{
+public class EmbeddedConfigurationService extends EmbeddedBaseDQPService implements ConfigurationService {
private static final String VDB_LIST_SEPARATOR = ";"; //$NON-NLS-1$
private static final String VDB = ".vdb"; //$NON-NLS-1$
@@ -111,6 +110,19 @@
private UDFSource udfSource;
private HashSet<ServerConnection> clientConnections = new HashSet<ServerConnection>();
+ private AbstractClassLoaderManager classLoaderManager = new AbstractClassLoaderManager(Thread.currentThread().getContextClassLoader(), true) {
+
+ @Override
+ public String getCommonExtensionClassPath() {
+ return userPreferences.getProperty(DQPEmbeddedProperties.COMMON_EXTENSION_CLASPATH, ""); //$NON-NLS-1$
+ }
+
+ @Override
+ public URL parseURL(String url) throws MalformedURLException {
+ return ExtensionModuleReader.resolveExtensionModule(url, getExtensionPath());
+ }
+ };
+
boolean valid(String str) {
if (str != null) {
str = str.trim();
@@ -218,35 +230,21 @@
return null;
}
}
-
- /**
- * @see com.metamatrix.dqp.service.ConfigurationService#getCommonExtensionClasspath()
- */
- public Set<URL> getCommonExtensionClasspath() {
- String classpath= userPreferences.getProperty(DQPEmbeddedProperties.COMMON_EXTENSION_CLASPATH);
-
- // add the "ConnectorClasspath" to the common extension path
- Collection<ConnectorBinding> bindings = this.loadedConnectorBindings.values();
- for (ConnectorBinding b:bindings) {
- if (classpath == null) {
- classpath = b.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH);
- }
- else {
- classpath += ";"; //$NON-NLS-1$
- classpath += b.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH);
- }
- }
-
- if (valid(classpath)) {
- try {
- return ExtensionModuleReader.resolveExtensionClasspath(classpath, getExtensionPath());
- } catch (IOException e) {
- DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.udf_classspath_failure", new Object[] {}); //$NON-NLS-1$
- }
- }
- return null;
+
+ @Override
+ public ClassLoader getCommonClassLoader(String urls) {
+ return this.classLoaderManager.getCommonClassLoader(urls);
}
+ @Override
+ public ClassLoader getPostDelegationClassLoader(String urls) {
+ return this.classLoaderManager.getPostDelegationClassLoader(urls);
+ }
+
+ public AbstractClassLoaderManager getClassLoaderManager() {
+ return classLoaderManager;
+ }
+
/**
* @see com.metamatrix.dqp.service.ConfigurationService#getLogFile()
* @since 4.3
@@ -838,6 +836,7 @@
* @since 4.3
*/
public void saveExtensionModule(ExtensionModule extModule) throws MetaMatrixComponentException {
+ this.classLoaderManager.clearCache();
ExtensionModuleWriter.write(extModule, getExtensionPath());
}
@@ -846,6 +845,7 @@
* @since 4.3
*/
public void deleteExtensionModule(String extModuleName) throws MetaMatrixComponentException {
+ this.classLoaderManager.clearCache();
ExtensionModuleWriter.deleteModule(extModuleName, getExtensionPath());
}
@@ -913,20 +913,14 @@
public void loadUDF() throws MetaMatrixComponentException {
URL udfFile = getUDFFile();
if(udfFile != null && exists(udfFile)) {
- Set<URL> urls = getCommonExtensionClasspath();
try {
// 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()]));
- }
+ this.udfSource = new UDFSource(udfFile.openStream(), getCommonClassLoader(null));
FunctionLibraryManager.registerSource(this.udfSource);
- DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.udf_load", new Object[] {udfFile, urls}); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_DQP, DQPEmbeddedPlugin.Util.getString("EmbeddedConfigurationService.udf_load", udfFile)); //$NON-NLS-1$
} catch (IOException e) {
LogManager.logError(LogConstants.CTX_DQP, e, e.getMessage());
}
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -22,7 +22,6 @@
package com.metamatrix.dqp.embedded.services;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -30,7 +29,6 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import org.teiid.connector.api.ConnectorException;
@@ -43,20 +41,17 @@
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
-import com.metamatrix.common.classloader.URLFilteringClassLoader;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.config.api.ComponentType;
import com.metamatrix.common.config.api.ComponentTypeDefn;
import com.metamatrix.common.config.api.ComponentTypeID;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.protocol.MetaMatrixURLStreamHandlerFactory;
import com.metamatrix.common.util.crypto.CryptoException;
import com.metamatrix.common.util.crypto.CryptoUtil;
import com.metamatrix.common.vdb.api.VDBArchive;
import com.metamatrix.common.vdb.api.VDBDefn;
import com.metamatrix.core.vdb.VDBStatus;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
-import com.metamatrix.dqp.embedded.configuration.ExtensionModuleReader;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
@@ -457,7 +452,8 @@
connectorProperties.setProperty(ConnectorPropertyNames.CONNECTOR_BINDING_NAME, binding.getFullName());
try {
- ConnectorManager mgr = initConnectorManager(connectorProperties);
+ ConnectorManager mgr = new ConnectorManager();
+ mgr.setClassLoaderManager(this.getConfigurationService());
mgr.initialize(connectorProperties);
return mgr;
} catch(Exception e) {
@@ -558,65 +554,4 @@
return new DefaultIndexConnectorBinding();
}
- /**
- * Depending upon the setting for the connector manager either load the class in
- * same class loader or different class loader. Connector Bindings has property
- * called ConnectorClassPath which defines the class path.
- */
- ConnectorManager initConnectorManager(Properties connectorProperties)
- throws ApplicationLifecycleException{
-
- try {
- // Ask the configuration if we can use the extension class loader.
- boolean useExtensionClassPath = (getConfigurationService().useExtensionClasspath());
- String classPath = buildClasspath(connectorProperties);
-
- if (classPath == null || classPath.length() == 0) {
- useExtensionClassPath = false;
- }
-
- if (!useExtensionClassPath) {
- return new ConnectorManager();
- }
-
- DQPEmbeddedPlugin.logInfo("DataService.useClassloader", new Object[] {classPath}); //$NON-NLS-1$
-
- Set<URL> userPath = ExtensionModuleReader.resolveExtensionClasspath(classPath, getConfigurationService().getExtensionPath());
-
- // since we are using the extensions, get the common extension path
- Set<URL> commonExtensionPath = getConfigurationService().getCommonExtensionClasspath();
-
- ArrayList<URL> urlPath = new ArrayList<URL>();
- urlPath.addAll(userPath);
-
- if (commonExtensionPath != null) {
- urlPath.addAll(commonExtensionPath);
- }
-
- ClassLoader classLoader = new URLFilteringClassLoader(urlPath.toArray(new URL[urlPath.size()]), Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
-
- ConnectorManager cm = new ConnectorManager();
- cm.setClassloader(classLoader);
- return cm;
- } catch (Exception e) {
- throw new ApplicationLifecycleException(e);
- }
- }
-
- private String buildClasspath(Properties connectorProperties) {
- StringBuilder sb = new StringBuilder();
- appendlasspath(connectorProperties.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH), sb); // this is user defined, could be very specific to the binding
- appendlasspath(connectorProperties.getProperty(ConnectorPropertyNames.CONNECTOR_TYPE_CLASSPATH), sb); // this is system defined; type classpath
- return sb.toString();
- }
-
- private void appendlasspath(String path, StringBuilder builder) {
- if (path != null && path.length() > 0) {
- builder.append(path);
- if (!path.endsWith(";")) { //$NON-NLS-1$
- builder.append(";"); //$NON-NLS-1$
- }
- }
- }
-
}
Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -31,7 +31,6 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.Set;
import junit.framework.TestCase;
@@ -539,9 +538,9 @@
// test common class path; also makes sure that the connect in position (1) has the newly added module
service.userPreferences.setProperty("dqp.extension.CommonClasspath", "extensionjar:added-ext.jar;extensionjar:extfile.jar"); //$NON-NLS-1$ //$NON-NLS-2$
- Iterator<URL> i = service.getCommonExtensionClasspath().iterator();
- assertEquals("mmfile:target/scratch/dqp/foo/added-ext.jar", i.next().toString()); //$NON-NLS-1$
- assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", i.next().toString()); //$NON-NLS-1$
+ URL[] urls = service.getClassLoaderManager().parseURLs(service.getClassLoaderManager().getCommonExtensionClassPath());
+ assertEquals("mmfile:target/scratch/dqp/foo/added-ext.jar", urls[0].toString()); //$NON-NLS-1$
+ assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", urls[1].toString()); //$NON-NLS-1$
// test delete
service.deleteExtensionModule("added-ext.jar"); //$NON-NLS-1$
@@ -575,22 +574,11 @@
p.setProperty("dqp.extensions", "./foo/;./bar/"); //$NON-NLS-1$ //$NON-NLS-2$
service.userPreferences = p;
- assertNull(service.getCommonExtensionClasspath());
+ assertEquals("", service.getClassLoaderManager().getCommonExtensionClassPath()); //$NON-NLS-1$
p.setProperty(DQPEmbeddedProperties.COMMON_EXTENSION_CLASPATH, "extensionjar:extfile.jar"); //$NON-NLS-1$
- Set<URL> urls = service.getCommonExtensionClasspath();
- assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", urls.iterator().next().toString()); //$NON-NLS-1$
-
- BasicConnectorBinding binding = new BasicConnectorBinding(new ConfigurationID("foo"), new ConnectorBindingID(new ConfigurationID("foo"), "foo"), new ComponentTypeID("foo type")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Properties props = new Properties();
- props.setProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH, "extensionjar:driver.jar"); //$NON-NLS-1$
- binding.setProperties(props);
- service.loadedConnectorBindings.put("Foo", binding); //$NON-NLS-1$
-
- Iterator<URL> i = service.getCommonExtensionClasspath().iterator();
-
- assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", i.next().toString()); //$NON-NLS-1$
- assertEquals("mmfile:target/scratch/dqp/bar/driver.jar", i.next().toString()); //$NON-NLS-1$
+ URL[] urls = service.getClassLoaderManager().parseURLs(service.getClassLoaderManager().getCommonExtensionClassPath());
+ assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", urls[0].toString()); //$NON-NLS-1$
}
}
Added: trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java (rev 0)
+++ trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -0,0 +1,114 @@
+/*
+ * 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 com.metamatrix.common.application;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import com.metamatrix.common.classloader.PostDelegatingClassLoader;
+import com.metamatrix.common.classloader.URLFilteringClassLoader;
+import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.protocol.MetaMatrixURLStreamHandlerFactory;
+import com.metamatrix.common.util.LogCommonConstants;
+
+public abstract class AbstractClassLoaderManager implements ClassLoaderManager {
+
+ private ClassLoader parentClassLoader;
+ private URLFilteringClassLoader commonExtensionClassloader;
+ private Map<String, PostDelegatingClassLoader> postdelegationClassLoaderCache = new HashMap<String, PostDelegatingClassLoader>();
+ private boolean usePostDelegationCache;
+ private Object lock = new Object();
+
+ public AbstractClassLoaderManager(ClassLoader parentClassLoader, boolean usePostDelegationCache) {
+ this.usePostDelegationCache = usePostDelegationCache;
+ this.parentClassLoader = parentClassLoader;
+ }
+
+ public ClassLoader getCommonClassLoader(String urls) {
+ synchronized (lock) {
+ if (this.commonExtensionClassloader == null) {
+ // since we are using the extensions, get the common extension path
+ this.commonExtensionClassloader = new URLFilteringClassLoader(parseURLs(getCommonExtensionClassPath()), parentClassLoader, new MetaMatrixURLStreamHandlerFactory());
+ }
+ if (urls != null && urls.trim().length() > 0) {
+ for (URL url : parseURLs(urls)) {
+ this.commonExtensionClassloader.addURL(url);
+ }
+ }
+ return this.commonExtensionClassloader;
+ }
+ }
+
+ public ClassLoader getPostDelegationClassLoader(String urls) {
+ synchronized (lock) {
+ PostDelegatingClassLoader cl = this.postdelegationClassLoaderCache.get(urls);
+ if (cl == null) {
+ if (urls != null && urls.trim().length() > 0) {
+ cl = new PostDelegatingClassLoader(parseURLs(urls), getCommonClassLoader(null), new MetaMatrixURLStreamHandlerFactory());
+ if (usePostDelegationCache) {
+ this.postdelegationClassLoaderCache.put(urls, cl);
+ }
+ }
+ if (cl == null) {
+ return getCommonClassLoader(null);
+ }
+ }
+ return cl;
+ }
+ }
+
+ public void clearCache() {
+ synchronized (lock) {
+ this.commonExtensionClassloader = null;
+ this.postdelegationClassLoaderCache.clear();
+ }
+ }
+
+ public URL[] parseURLs(String delimitedUrls) {
+ StringTokenizer toke = new StringTokenizer(delimitedUrls, ";"); //$NON-NLS-1$
+ List<URL> urls = new ArrayList<URL>(toke.countTokens());
+ while (toke.hasMoreElements()) {
+ String urlString = toke.nextToken();
+ try {
+ URL url = parseURL(urlString);
+ if (url != null) {
+ urls.add(url);
+ }
+ } catch (MalformedURLException e) {
+ LogManager.logError(LogCommonConstants.CTX_EXTENSION_SOURCE, "Invalid extension classpath entry " + urlString); //$NON-NLS-1$
+ }
+ }
+
+ return urls.toArray(new URL[urls.size()]);
+ }
+
+ public abstract URL parseURL(String url) throws MalformedURLException;
+
+ public abstract String getCommonExtensionClassPath();
+
+}
Property changes on: trunk/engine/src/main/java/com/metamatrix/common/application/AbstractClassLoaderManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/engine/src/main/java/com/metamatrix/common/application/ClassLoaderManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/application/ClassLoaderManager.java (rev 0)
+++ trunk/engine/src/main/java/com/metamatrix/common/application/ClassLoaderManager.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -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 com.metamatrix.common.application;
+
+public interface ClassLoaderManager {
+
+ /**
+ * Return the common class loader with the given urls appended
+ * @param urls
+ * @return
+ */
+ ClassLoader getCommonClassLoader(String urls);
+
+ /**
+ * Return a distinct post delgation class loader - which may be cached.
+ * @param urls
+ * @return
+ */
+ ClassLoader getPostDelegationClassLoader(String urls);
+
+}
Property changes on: trunk/engine/src/main/java/com/metamatrix/common/application/ClassLoaderManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -30,6 +30,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationService;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.api.ServerConnection;
import com.metamatrix.common.comm.api.ServerConnectionListener;
import com.metamatrix.common.config.api.ComponentType;
@@ -46,7 +47,7 @@
* for other services and also DQP configuration.
* @since 4.3
*/
-public interface ConfigurationService extends ApplicationService {
+public interface ConfigurationService extends ApplicationService, ClassLoaderManager {
public static final String NEXT_VDB_VERSION = "NEXT_VDB_VERSION"; //$NON-NLS-1$
public static final String USER_DEFINED_FUNCTION_MODEL = "FunctionDefinitions.xmi"; //$NON-NLS-1$
/**
@@ -98,13 +99,6 @@
public URL getUDFFile();
/**
- * Get the user defined extension file classpath. The jar
- * files are loaded usually as the extension modules.
- * @return URL[] - Classpath for the UDF jar files
- */
- public Set<URL> getCommonExtensionClasspath();
-
- /**
* URL to Log file name
* @return URL or null if one not available
*/
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-20 02:07:14 UTC (rev 984)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -60,6 +60,7 @@
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.ApplicationService;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
@@ -121,6 +122,8 @@
private BufferService bufferService;
private volatile Boolean started;
+
+ private ClassLoaderManager clManager;
// known requests
private ConcurrentHashMap<AtomicRequestID, ConnectorWorkItem> requestStates = new ConcurrentHashMap<AtomicRequestID, ConnectorWorkItem>();
@@ -344,20 +347,51 @@
this.started = true;
}
+ private String buildClasspath(Properties connectorProperties) {
+ StringBuilder sb = new StringBuilder();
+ appendlasspath(connectorProperties.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH), sb); // this is user defined, could be very specific to the binding
+ appendlasspath(connectorProperties.getProperty(ConnectorPropertyNames.CONNECTOR_TYPE_CLASSPATH), sb); // this is system defined; type classpath
+ return sb.toString();
+ }
+
+ private void appendlasspath(String path, StringBuilder builder) {
+ if (path != null && path.length() > 0) {
+ builder.append(path);
+ if (!path.endsWith(";")) { //$NON-NLS-1$
+ builder.append(";"); //$NON-NLS-1$
+ }
+ }
+ }
+
/**
* Initialize and start the connector.
* @param env
* @throws ApplicationLifecycleException
*/
private void initStartConnector(ConnectorEnvironment env) throws ApplicationLifecycleException {
+
String connectorClassName = env.getProperties().getProperty(ConnectorPropertyNames.CONNECTOR_CLASS);
- if(classloader == null){
- classloader = getClass().getClassLoader();
+
+ String classPath = buildClasspath(env.getProperties());
+
+ Thread currentThread = Thread.currentThread();
+ ClassLoader threadContextLoader = currentThread.getContextClassLoader();
+
+ if (classPath == null || classPath.trim().length() == 0) {
+ classloader = threadContextLoader;
} else {
env.getProperties().setProperty(ConnectorPropertyNames.USING_CUSTOM_CLASSLOADER, Boolean.TRUE.toString());
+ LogManager.logInfo(DQPPlugin.Util.getString("DataService.useClassloader"), classPath); //$NON-NLS-1$
+
+ boolean postDelegation = PropertiesUtils.getBooleanProperty(env.getProperties(), ConnectorPropertyNames.USE_POST_DELEGATION, false);
+
+ if (postDelegation) {
+ this.classloader = this.clManager.getPostDelegationClassLoader(classPath);
+ } else {
+ this.classloader = this.clManager.getCommonClassLoader(classPath);
+ }
}
- Thread currentThread = Thread.currentThread();
- ClassLoader threadContextLoader = currentThread.getContextClassLoader();
+
try {
currentThread.setContextClassLoader(classloader);
Connector c;
@@ -650,8 +684,8 @@
return isXa;
}
- public void setClassloader(ClassLoader classloader) {
- this.classloader = classloader;
+ public void setClassLoaderManager(ClassLoaderManager clManager) {
+ this.clManager = clManager;
}
public void setWorkItemFactory(ConnectorWorkItemFactory workItemFactory) {
@@ -681,13 +715,11 @@
}
public Collection<ConnectionPoolStats> getConnectionPoolStats() {
- if (connector.getActualConnector() instanceof PooledConnector) {
- PooledConnector pc = (PooledConnector) connector;
-
- return pc.getConnectionPoolStats();
-
+ if (connector instanceof PooledConnector) {
+ PooledConnector pc = (PooledConnector) connector;
+
+ return pc.getConnectionPoolStats();
}
- return Collections.EMPTY_LIST;
-
+ return Collections.emptyList();
}
}
Modified: trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/main/java/com/metamatrix/common/extensionmodule/protocol/URLFactory.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -24,11 +24,13 @@
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.*;
-import java.util.Iterator;
+import java.util.ArrayList;
import java.util.List;
+import java.util.StringTokenizer;
import com.metamatrix.common.extensionmodule.protocol.extensionjar.Handler;
+import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.LogCommonConstants;
/**
* Factory to convert String urls into URL objects. This factory
@@ -109,55 +111,4 @@
return result;
}
- /**
- * Parse the url string into a URL object
- * @param url String url
- * @return URL object
- * @throws MalformedURLException if url String is invalid
- */
- public static URL parseURL(String url) throws MalformedURLException {
- return parseURL(null, url);
- }
-
- /**
- * Parse the List of string urls into an array of
- * URL objects
- * @param urls List of String urls
- * @return array of URL objects
- * @throws MalformedURLException if any of the url Strings
- * are invalid
- */
- public static URL[] parseURLs(List urls) throws MalformedURLException{
- URL[] result = new URL[urls.size()];
-
- Iterator urlIter = urls.iterator();
- for (int i=0; urlIter.hasNext(); i++){
- result[i] = parseURL((String)urlIter.next());
- }
-
- return result;
- }
-
- /**
- * Parse the single delimited String of URLs into an array of URL objects
- * @param delimitedURLs a single String of delimiter-separated URL strings
- * @param delimiter delimiter of tokens in delmitedURLs - if this is null, a single
- * whitespace will be assumed as the delimiter
- * @return URL[] array
- * @throws MalformedURLException if any of the url Strings are invalid
- */
- public static URL[] parseURLs(String delimitedURLs, String delimiter) throws MalformedURLException{
-
- if (delimiter == null){
- delimiter = " "; //$NON-NLS-1$
- }
- StringTokenizer toke = new StringTokenizer(delimitedURLs, delimiter);
- List urlStrings = new ArrayList(toke.countTokens());
- while (toke.hasMoreElements()) {
- String urlString = toke.nextToken();
- urlStrings.add(urlString);
- }
- return parseURLs(urlStrings);
- }
-
}
Modified: trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -26,6 +26,7 @@
import java.util.Date;
import java.util.Properties;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.queue.WorkerPoolStats;
@@ -42,9 +43,10 @@
* service must notify any lifecycle listeners of its initialization
* using the unique service instance name returned.
* @param deployedComponentID Unique identifier of this deployed component.
+ * @param clManager
* @return The unique name of this service instance.
*/
- void init(ServiceID id, DeployedComponentID deployedComponentID, Properties props, ClientServiceRegistry listenerRegistry);
+ void init(ServiceID id, DeployedComponentID deployedComponentID, Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager);
/*
Modified: trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -32,6 +32,7 @@
import java.util.List;
import java.util.Properties;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.CurrentConfiguration;
import com.metamatrix.common.config.api.DeployedComponentID;
@@ -85,7 +86,7 @@
* @param props the properties which define the service configuration
* @param controller ServiceBusInterface which supplies resources such as event processing
*/
- public void init(ServiceID id, DeployedComponentID deployedComponentID, Properties props, ClientServiceRegistry listenerRegistry) {
+ public void init(ServiceID id, DeployedComponentID deployedComponentID, Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager) {
if (props == null) {
throw new ServiceException(ServiceMessages.SERVICE_0001, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0001));
Modified: trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -26,6 +26,7 @@
import java.lang.reflect.Proxy;
import java.net.InetAddress;
import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EventObject;
@@ -41,7 +42,7 @@
import com.metamatrix.admin.server.ServerAdminImpl;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MultipleException;
-import com.metamatrix.common.classloader.URLFilteringClassLoader;
+import com.metamatrix.common.application.AbstractClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.comm.platform.socket.server.AdminAuthorizationInterceptor;
import com.metamatrix.common.comm.platform.socket.server.LogonImpl;
@@ -117,7 +118,7 @@
* This class is used to start up a server process and start all services that are
* configured under this server
*/
-public abstract class ProcessController implements ProcessManagement {
+public abstract class ProcessController extends AbstractClassLoaderManager implements ProcessManagement {
public final static String SERVICE_ID = "Service"; //$NON-NLS-1$
@@ -154,7 +155,6 @@
protected ClientServiceRegistry clientServices;
private Map<ComponentTypeID, Properties> defaultPropertiesCache = new HashMap<ComponentTypeID, Properties>();
- private ClassLoader commonExtensionClassLoader = null;
private String commonExtensionClasspath;
private int force_shutdown_time = DEFAULT_FORCE_SHUTDOWN_TIME;
@@ -168,6 +168,7 @@
* @throws Exception if an error occurs initializing vmController
*/
public ProcessController(Host host, String processname, ClusteredRegistryState registry, ServerEvents serverEvents, MessageBus bus, HostManagement hostManagement) throws Exception {
+ super(Thread.currentThread().getContextClassLoader(), PropertiesUtils.getBooleanProperty(CurrentConfiguration.getInstance().getProperties(), ServerPropertyNames.CACHE_CLASS_LOADERS, true));
this.host = host;
this.processName = processname;
@@ -191,10 +192,19 @@
this.registerSubSystemAdminAPIs(hostManagement);
- manageCommonExtensionClassloader();
+ manageClassloaders();
}
-
+ @Override
+ public URL parseURL(String url) throws MalformedURLException {
+ return URLFactory.parseURL(null, url);
+ }
+
+ @Override
+ public String getCommonExtensionClassPath() {
+ return CurrentConfiguration.getInstance().getProperties().getProperty(ServerPropertyNames.COMMON_EXTENSION_CLASPATH, ""); //$NON-NLS-1$
+ }
+
/**
* Register the ServiceInterceptors for the SubSystemAdminAPIs
* @throws MetaMatrixComponentException
@@ -343,7 +353,6 @@
}
}
-
public void startService(ServiceID serviceID) {
logMessage(PlatformPlugin.Util.getString(LogMessageKeys.VM_0018, serviceID));
@@ -669,12 +678,13 @@
* Throw away the common extension class loader when there is change in the Extension modules or has a changed extension
* classpath.
*/
- private void manageCommonExtensionClassloader() throws MessagingException {
+ private void manageClassloaders() throws MessagingException {
+ this.commonExtensionClasspath = getCommonExtensionClassPath();
this.messageBus.addListener(ExtensionModuleEvent.class, new EventObjectListener() {
@Override
public void processEvent(EventObject obj) {
if (obj instanceof ExtensionModuleEvent) {
- ProcessController.this.commonExtensionClassLoader = null;
+ clearCache();
}
}
});
@@ -683,42 +693,22 @@
@Override
public void processEvent(EventObject obj) {
if (obj instanceof ConfigurationChangeEvent) {
- String extensionClasspath = CurrentConfiguration.getInstance().getProperties().getProperty(ServerPropertyNames.COMMON_EXTENSION_CLASPATH);
- if (extensionClasspath != null) {
- if (!extensionClasspath.equals(ProcessController.this.commonExtensionClasspath)) {
- ProcessController.this.commonExtensionClassLoader = null;
- }
+ String extensionClasspath = getCommonExtensionClassPath();
+ if (!extensionClasspath.equals(ProcessController.this.commonExtensionClasspath)) {
+ commonExtensionClasspath = extensionClasspath;
+ clearCache();
}
- else {
- ProcessController.this.commonExtensionClassLoader = null;
- }
}
}
});
}
- private ClassLoader getCommonExtensionClassloader() {
- if (this.commonExtensionClassLoader == null) {
- String extensionClasspath = CurrentConfiguration.getInstance().getProperties().getProperty(ServerPropertyNames.COMMON_EXTENSION_CLASPATH);
- if (extensionClasspath != null && extensionClasspath.length() > 0) {
- try {
- this.commonExtensionClassLoader = new URLFilteringClassLoader(URLFactory.parseURLs(extensionClasspath, ";"), Thread.currentThread().getContextClassLoader()); //$NON-NLS-1$
- this.commonExtensionClasspath = extensionClasspath;
- logMessage(PlatformPlugin.Util.getString("commonextensionspath_in_use", extensionClasspath)); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- logMessage(PlatformPlugin.Util.getString("commonextensionspath_not_in_use",extensionClasspath)); //$NON-NLS-1$
- }
- }
- }
- return this.commonExtensionClassLoader;
- }
-
private void startService(ClientServiceRegistry serverListenerRegistry, ServiceID serviceID, DeployedComponent deployedComponent,final String serviceClass,Properties serviceProps) {
String serviceInstanceName = null;
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
try {
- ClassLoader commonExtensionClassLoader = getCommonExtensionClassloader();
+ ClassLoader commonExtensionClassLoader = getCommonClassLoader(null);
if (commonExtensionClassLoader != null) {
Thread.currentThread().setContextClassLoader(commonExtensionClassLoader);
}
@@ -751,7 +741,7 @@
DeployedComponentID deployedComponentID = (DeployedComponentID) deployedComponent.getID();
logMessage(PlatformPlugin.Util.getString("ServiceController.1",param1)); //$NON-NLS-1$
- service.init(serviceID, deployedComponentID, serviceProps, serverListenerRegistry);
+ service.init(serviceID, deployedComponentID, serviceProps, serverListenerRegistry, this);
logMessage(PlatformPlugin.Util.getString("ServiceController.2",param1)); //$NON-NLS-1$
logMessage(PlatformPlugin.Util.getString("ServiceController.3",param1)); //$NON-NLS-1$
Modified: trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -27,15 +27,12 @@
package com.metamatrix.server.connector.service;
import java.io.Serializable;
-import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
-import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.EventObject;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -50,9 +47,9 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.ApplicationService;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
-import com.metamatrix.common.classloader.PostDelegatingClassLoader;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.config.CurrentConfiguration;
@@ -64,11 +61,7 @@
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
-import com.metamatrix.common.extensionmodule.ExtensionModuleEvent;
-import com.metamatrix.common.extensionmodule.protocol.URLFactory;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.messaging.MessageBus;
-import com.metamatrix.common.messaging.MessagingException;
import com.metamatrix.common.object.PropertyDefinition;
import com.metamatrix.common.queue.WorkerPoolStats;
import com.metamatrix.common.stats.ConnectionPoolStats;
@@ -76,7 +69,6 @@
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.common.util.crypto.CryptoException;
import com.metamatrix.common.util.crypto.CryptoUtil;
-import com.metamatrix.core.event.EventObjectListener;
import com.metamatrix.dqp.client.ClientSideDQP;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.message.AtomicRequestID;
@@ -91,9 +83,7 @@
import com.metamatrix.platform.service.controller.AbstractService;
import com.metamatrix.platform.service.controller.ServicePropertyNames;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
-import com.metamatrix.server.ResourceFinder;
import com.metamatrix.server.ServerPlugin;
-import com.metamatrix.server.util.ServerPropertyNames;
/**
* ConnectorService.
@@ -106,53 +96,17 @@
private boolean monitoringEnabled = true;
private ClientServiceRegistry registry;
+ private ClassLoaderManager clManager;
- private static boolean cacheClassLoaders = true;
-
/**
- * Map of String (urls) to ClassLoader.
- * This is based on the assumption that two classloaders
- * with the same URLs should be identical.
- */
- private static Map<String, WeakReference<PostDelegatingClassLoader>> classLoaderCache = new HashMap<String, WeakReference<PostDelegatingClassLoader>> ();
-
- static {
- //read value of cacheClassLoaders
- cacheClassLoaders = PropertiesUtils.getBooleanProperty(CurrentConfiguration.getInstance().getProperties(), ServerPropertyNames.CACHE_CLASS_LOADERS, false);
- logOK("ConnectorService.Cache_class_loaders", new Boolean(cacheClassLoaders)); //$NON-NLS-1$
- initExtensionModuleListener();
- }
-
- private static void initExtensionModuleListener() {
- MessageBus vmb = ResourceFinder.getMessageBus();
- EventObjectListener listener = new EventObjectListener() {
- public void processEvent(EventObject obj) {
- if (obj instanceof ExtensionModuleEvent) {
- ExtensionModuleEvent event = (ExtensionModuleEvent) obj;
-
- switch (event.getType()) {
- case ExtensionModuleEvent.TYPE_FILE_CHANGED:
- clearClassLoaderCache();
- break;
- }
- }
- }
- };
- try {
- vmb.addListener(ExtensionModuleEvent.class, listener);
- } catch (MessagingException e) {
- LogManager.logError(LogCommonConstants.CTX_CONFIG, e, e.getMessage());
- }
- }
-
- /**
* Initialize ConnectorService
*/
- public void init(ServiceID id, DeployedComponentID deployedComponentID, Properties props, ClientServiceRegistry listenerRegistry) {
+ public void init(ServiceID id, DeployedComponentID deployedComponentID, Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager) {
//this assumes that the dqp has already been initialized and i
this.registry = listenerRegistry;
+ this.clManager = clManager;
- super.init(id, deployedComponentID, props, listenerRegistry);
+ super.init(id, deployedComponentID, props, listenerRegistry, clManager);
//read value of monitoringEnabled
String monitoringEnabledString = getProperties().getProperty(ServicePropertyNames.SERVICE_MONITORING_ENABLED);
if (monitoringEnabledString != null) {
@@ -190,44 +144,6 @@
this.connectorMgr.requstMore(request);
}
-
- //=========================================================================
- // Methods from AbstractService
- //=========================================================================
- /**
- * Build a custom class loader from a given set of urls.
- */
- private ClassLoader getCustomClassLoader(String urls) throws ApplicationInitializationException{
- if(urls == null || urls.trim().length() == 0){
- LogManager.logDetail(LogCommonConstants.CTX_CONFIG, ServerPlugin.Util.getString("ConnectorService.NoClassPath")); //$NON-NLS-1$
- return null;
- }
-
- synchronized (ConnectorService.class) {
- PostDelegatingClassLoader result = null;
- if (cacheClassLoaders) {
- WeakReference<PostDelegatingClassLoader> ref = classLoaderCache.get(urls);
- if (ref != null) {
- result = ref.get();
- if (result != null) {
- return result;
- }
- }
- }
-
- try {
- result = new PostDelegatingClassLoader(URLFactory.parseURLs(urls, ";"), Thread.currentThread().getContextClassLoader()); //$NON-NLS-1$
- if (cacheClassLoaders) {
- classLoaderCache.put(urls, new WeakReference<PostDelegatingClassLoader>(result));
- }
- return result;
- } catch (MalformedURLException e1) {
- String msg = ServerPlugin.Util.getString("ConnectorService.IllegalClassPath", urls); //$NON-NLS-1$
- throw new ApplicationInitializationException(msg);
- }
- }
- }
-
/**
* Build and intialize the Connector Manager class.
* @param deMaskedProps
@@ -235,16 +151,15 @@
* @throws ApplicationLifecycleException
* @throws ApplicationInitializationException
*/
- private ConnectorManager createConnectorManager(Properties deMaskedProps, ClassLoader loader) throws ApplicationLifecycleException {
+ private ConnectorManager createConnectorManager(Properties deMaskedProps) throws ApplicationLifecycleException {
ConnectorManager connectorManager = new ConnectorManager();
-
+ connectorManager.setClassLoaderManager(clManager);
// Create a stringified connector ID from the serviceID
ServiceID id = this.getID();
String connID = id.getHostName()+"|"+ id.getProcessName() + "|" + id.getID(); //$NON-NLS-1$ //$NON-NLS-2$
deMaskedProps.put(ConnectorPropertyNames.CONNECTOR_ID, connID);
deMaskedProps.put(ConnectorPropertyNames.CONNECTOR_BINDING_NAME, getInstanceName());
deMaskedProps.put(ConnectorPropertyNames.CONNECTOR_VM_NAME, CurrentConfiguration.getInstance().getProcessName());
- connectorManager.setClassloader(loader);
connectorManager.initialize(deMaskedProps);
return connectorManager;
}
@@ -256,12 +171,9 @@
// Decrypt masked properties
Properties deMaskedProps = decryptMaskedProperties(props);
- String urls = buildClasspath(deMaskedProps);
-
- ClassLoader loader = getCustomClassLoader(urls);
// Build a Connector manager using the custom class loader and initialize
// the service.
- this.connectorMgr = createConnectorManager(deMaskedProps, loader);
+ this.connectorMgr = createConnectorManager(deMaskedProps);
ApplicationEnvironment env = new ApplicationEnvironment();
env.bindService(DQPServiceNames.REGISTRY_SERVICE, new ClientServiceRegistryService(this.registry));
@@ -297,23 +209,7 @@
killService();
throw e;
}
- }
-
- private String buildClasspath(Properties connectorProperties) {
- StringBuilder sb = new StringBuilder();
- appendlasspath(connectorProperties.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH), sb); // this is user defined, could be very specific to the binding
- appendlasspath(connectorProperties.getProperty(ConnectorPropertyNames.CONNECTOR_TYPE_CLASSPATH), sb); // this is system defined; type classpath
- return sb.toString();
- }
-
- private void appendlasspath(String path, StringBuilder builder) {
- if (path != null && path.length() > 0) {
- builder.append(path);
- if (!path.endsWith(";")) { //$NON-NLS-1$
- builder.append(";"); //$NON-NLS-1$
- }
- }
- }
+ }
/**
* Close the service to new work if applicable. After this method is called
@@ -521,12 +417,6 @@
}
}
- private synchronized static void clearClassLoaderCache() {
- LogManager.logInfo(LogCommonConstants.CTX_CONFIG, "ConnectorService clearing ClassLoader cache"); //$NON-NLS-1$
-
- classLoaderCache.clear();
- }
-
private static void logOK(String messageProperty, Object value) {
LogManager.logInfo(LogCommonConstants.CTX_CONFIG, ServerPlugin.Util.getString(messageProperty, value));
}
Modified: trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/main/java/com/metamatrix/server/query/service/QueryService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -41,6 +41,7 @@
import com.metamatrix.api.exception.ComponentNotFoundException;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.server.InvalidRequestIDException;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.application.DQPConfigSource;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.CurrentConfiguration;
@@ -252,8 +253,8 @@
@Override
public void init(ServiceID id, DeployedComponentID deployedComponentID,
- Properties props, ClientServiceRegistry listenerRegistry) {
- super.init(id, deployedComponentID, props, listenerRegistry);
+ Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager) {
+ super.init(id, deployedComponentID, props, listenerRegistry, clManager);
listenerRegistry.registerClientService(ClientSideDQP.class, this.dqp, LogConstants.CTX_QUERY_SERVICE);
}
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -34,6 +34,7 @@
import com.metamatrix.admin.api.objects.Cache;
import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.queue.WorkerPoolStats;
@@ -134,7 +135,7 @@
public void init(ServiceID id,
DeployedComponentID deployedComponentID,
Properties props,
- ClientServiceRegistry listenerRegistry) {
+ ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager) {
}
public boolean isAlive() {
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -38,6 +38,7 @@
import com.metamatrix.common.actions.ActionDefinition;
import com.metamatrix.common.actions.CreateObject;
import com.metamatrix.common.actions.ModificationException;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.ComponentDefn;
import com.metamatrix.common.config.api.ComponentDefnID;
@@ -775,7 +776,7 @@
}
public void init(ServiceID id, DeployedComponentID deployedComponentID,
- Properties props, ClientServiceRegistry listenerRegistry) {
+ Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager) {
}
public void setInitException(Throwable t) {
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -41,6 +41,7 @@
import com.metamatrix.api.exception.ComponentNotFoundException;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.server.InvalidRequestIDException;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.queue.WorkerPoolStats;
@@ -262,7 +263,7 @@
}
public void init(ServiceID id, DeployedComponentID deployedComponentID,
- Properties props, ClientServiceRegistry listenerRegistry){
+ Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager){
}
public void setInitException(Throwable t) {
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -35,6 +35,7 @@
import com.metamatrix.api.exception.security.AuthorizationException;
import com.metamatrix.api.exception.security.MetaMatrixAuthenticationException;
import com.metamatrix.api.exception.security.SessionServiceException;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.queue.WorkerPoolStats;
@@ -253,7 +254,7 @@
}
public void init(ServiceID id, DeployedComponentID deployedComponentID,
- Properties props, ClientServiceRegistry listenerRegistry){
+ Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager){
}
public void setInitException(Throwable t) {
Modified: trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java 2009-05-20 02:07:14 UTC (rev 984)
+++ trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java 2009-05-20 02:53:44 UTC (rev 985)
@@ -28,6 +28,7 @@
import java.util.HashSet;
import java.util.Properties;
+import com.metamatrix.common.application.ClassLoaderManager;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.queue.WorkerPoolStats;
@@ -102,7 +103,7 @@
return this.test1Count;
}
public void init(ServiceID id, DeployedComponentID deployedComponentID,
- Properties props, ClientServiceRegistry listenerRegistry){
+ Properties props, ClientServiceRegistry listenerRegistry, ClassLoaderManager clManager){
}
public void setInitException(Throwable t) {
}
15 years, 7 months
teiid SVN: r984 - in trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc: oracle and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-19 22:07:14 -0400 (Tue, 19 May 2009)
New Revision: 984
Modified:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java
Log:
TEIID-473 fix for extract function modifier - changing name to util, rather than testutil
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java 2009-05-20 02:06:54 UTC (rev 983)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/mysql/TestMySQLTranslator.java 2009-05-20 02:07:14 UTC (rev 984)
@@ -28,7 +28,7 @@
import org.junit.Test;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.jdbc.MetadataFactory;
-import org.teiid.connector.jdbc.TestUtil;
+import org.teiid.connector.jdbc.Util;
import com.metamatrix.cdk.api.EnvironmentUtility;
@@ -55,7 +55,7 @@
String input = "SELECT char(convert(PART_WEIGHT, integer) + 100) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT char((convert(PARTS.PART_WEIGHT, SIGNED INTEGER) + 100)) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -64,7 +64,7 @@
String input = "SELECT convert(PART_WEIGHT, long) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT convert(PARTS.PART_WEIGHT, SIGNED) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -73,7 +73,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, long), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT convert(convert(PARTS.PART_WEIGHT, SIGNED), CHAR) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -82,7 +82,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, date), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT date_format(DATE(PARTS.PART_WEIGHT), '%Y-%m-%d') FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -90,7 +90,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, time), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT date_format(TIME(PARTS.PART_WEIGHT), '%H:%i:%S') FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -98,7 +98,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, timestamp), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT date_format(TIMESTAMP(PARTS.PART_WEIGHT), '%Y-%m-%d %H:%i:%S.%f') FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -106,7 +106,7 @@
String input = "SELECT ifnull(PART_WEIGHT, 'otherString') FROM PARTS"; //$NON-NLS-1$
String output = "SELECT ifnull(PARTS.PART_WEIGHT, 'otherString') FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -114,7 +114,7 @@
String input = "SELECT convert(convert(PART_WEIGHT, integer), string) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT convert(convert(PARTS.PART_WEIGHT, SIGNED INTEGER), CHAR) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -122,7 +122,7 @@
String input = "SELECT insert(PART_WEIGHT, 1, 5, 'chimp') FROM PARTS"; //$NON-NLS-1$
String output = "SELECT insert(PARTS.PART_WEIGHT, 1, 5, 'chimp') FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -130,7 +130,7 @@
String input = "SELECT locate(PART_WEIGHT, 'chimp', 1) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT locate(PARTS.PART_WEIGHT, 'chimp', 1) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -138,7 +138,7 @@
String input = "SELECT substring(PART_WEIGHT, 1) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT substring(PARTS.PART_WEIGHT, 1) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -146,7 +146,7 @@
String input = "SELECT substring(PART_WEIGHT, 1, 5) FROM PARTS"; //$NON-NLS-1$
String output = "SELECT substring(PARTS.PART_WEIGHT, 1, 5) FROM PARTS"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -154,7 +154,7 @@
String input = "SELECT PART_ID FROM PARTS UNION SELECT PART_ID FROM PARTS ORDER BY PART_ID"; //$NON-NLS-1$
String output = "(SELECT PARTS.PART_ID FROM PARTS) UNION (SELECT PARTS.PART_ID FROM PARTS) ORDER BY PART_ID"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestVDB(),
+ Util.helpTestVisitor(getTestVDB(),
input,
output, TRANSLATOR);
}
@@ -163,7 +163,7 @@
String input = "select intkey from bqt1.smalla limit 100"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA LIMIT 100"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestBQTVDB(),
+ Util.helpTestVisitor(getTestBQTVDB(),
input,
output, TRANSLATOR);
}
@@ -172,7 +172,7 @@
String input = "select intkey from bqt1.smalla limit 50, 100"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA LIMIT 50, 100"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(getTestBQTVDB(),
+ Util.helpTestVisitor(getTestBQTVDB(),
input,
output, TRANSLATOR);
}
@@ -181,7 +181,7 @@
String input = "select bitand(intkey, intnum) from bqt1.smalla"; //$NON-NLS-1$
String output = "SELECT convert((SmallA.IntKey & SmallA.IntNum), SIGNED INTEGER) FROM SmallA"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(MetadataFactory.BQT_VDB,
+ Util.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
@@ -190,7 +190,7 @@
String input = "select smalla.intkey from bqt1.smalla inner join bqt1.smallb on smalla.stringkey=smallb.stringkey cross join bqt1.mediuma"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM (SmallA INNER JOIN SmallB ON SmallA.StringKey = SmallB.StringKey) CROSS JOIN MediumA"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(MetadataFactory.BQT_VDB,
+ Util.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java 2009-05-20 02:06:54 UTC (rev 983)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java 2009-05-20 02:07:14 UTC (rev 984)
@@ -28,7 +28,7 @@
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.jdbc.MetadataFactory;
-import org.teiid.connector.jdbc.TestUtil;
+import org.teiid.connector.jdbc.Util;
import org.teiid.connector.jdbc.translator.TranslatedCommand;
import org.teiid.connector.jdbc.translator.Translator;
import org.teiid.connector.language.ICommand;
@@ -72,7 +72,7 @@
String input = "select smalla.intkey from bqt1.smalla inner join bqt1.smallb on smalla.stringkey=smallb.stringkey cross join bqt1.mediuma"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA INNER JOIN SmallB ON SmallA.StringKey = SmallB.StringKey CROSS JOIN MediumA"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(MetadataFactory.BQT_VDB,
+ Util.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
@@ -81,7 +81,7 @@
String input = "select smalla.intkey from bqt1.smalla cross join (bqt1.smallb cross join bqt1.mediuma)"; //$NON-NLS-1$
String output = "SELECT SmallA.IntKey FROM SmallA CROSS JOIN (SmallB CROSS JOIN MediumA)"; //$NON-NLS-1$
- TestUtil.helpTestVisitor(MetadataFactory.BQT_VDB,
+ Util.helpTestVisitor(MetadataFactory.BQT_VDB,
input,
output, TRANSLATOR);
}
15 years, 7 months
teiid SVN: r983 - trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-19 22:06:54 -0400 (Tue, 19 May 2009)
New Revision: 983
Removed:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/TestUtil.java
Log:
TEIID-473 fix for extract function modifier - changing name to util, rather than testutil
Deleted: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/TestUtil.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/TestUtil.java 2009-05-19 20:46:31 UTC (rev 982)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/TestUtil.java 2009-05-20 02:06:54 UTC (rev 983)
@@ -1,47 +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.connector.jdbc;
-
-import static org.junit.Assert.*;
-
-import org.teiid.connector.api.ConnectorException;
-import org.teiid.connector.jdbc.translator.TranslatedCommand;
-import org.teiid.connector.jdbc.translator.Translator;
-import org.teiid.connector.language.ICommand;
-
-import com.metamatrix.cdk.api.EnvironmentUtility;
-
-public class TestUtil {
-
- public static void helpTestVisitor(String vdb, String input, String expectedOutput, Translator translator) throws ConnectorException {
- // Convert from sql to objects
- ICommand obj = MetadataFactory.helpTranslate(vdb, input);
-
- TranslatedCommand tc = new TranslatedCommand(EnvironmentUtility.createSecurityContext("user"), translator); //$NON-NLS-1$
- tc.translateCommand(obj);
-
- // Check stuff
- assertEquals("Did not get correct sql", expectedOutput, tc.getSql()); //$NON-NLS-1$
- }
-
-}
15 years, 7 months