Author: rareddy
Date: 2009-07-16 15:19:54 -0400 (Thu, 16 Jul 2009)
New Revision: 1140
Removed:
trunk/embedded/src/main/resources/deploy.properties
trunk/embedded/src/main/resources/jboss-cache-configuration.xml
Modified:
trunk/build/kit-embedded/deploy.properties
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/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/SocketProfile.java
trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidDriver.java
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPLogListener.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPMonitoringAdminImpl.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/CacheProvider.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/LogListernerProvider.java
trunk/embedded/src/main/java/org/teiid/Server.java
trunk/embedded/src/main/java/org/teiid/ServerMBean.java
trunk/embedded/src/main/java/org/teiid/Shutdown.java
trunk/embedded/src/main/java/org/teiid/transport/LocalServerConnection.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/EmbeddedTestUtil.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedDataService.java
trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java
trunk/embedded/src/test/resources/admin/buffertest1.properties
trunk/embedded/src/test/resources/admin/buffertest2.properties
trunk/embedded/src/test/resources/admin/buffertest3.properties
trunk/embedded/src/test/resources/bqt/fakebqt.properties
trunk/embedded/src/test/resources/dqp/dqp.properties
trunk/engine/src/main/java/com/metamatrix/common/application/Application.java
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java
trunk/pom.xml
trunk/test-integration/pom.xml
trunk/test-integration/src/test/resources/3473/3473.properties
trunk/test-integration/src/test/resources/authcheck/bqt.properties
trunk/test-integration/src/test/resources/bqt/bqt.properties
trunk/test-integration/src/test/resources/dqp/dqp.properties
trunk/test-integration/src/test/resources/metadata/dqp.properties
trunk/test-integration/src/test/resources/partssupplier/dqp.properties
trunk/test-integration/src/test/resources/vdbless/dqp.properties
trunk/test-integration/src/test/resources/xml-vp/xmlvp.properties
trunk/test-integration/src/test/resources/xquery/xquery.properties
Log:
TEIID-679: adding "teiid.home" property to the configuration to help with work
and deploy directories.
Modified: trunk/build/kit-embedded/deploy.properties
===================================================================
--- trunk/build/kit-embedded/deploy.properties 2009-07-16 18:36:12 UTC (rev 1139)
+++ trunk/build/kit-embedded/deploy.properties 2009-07-16 19:19:54 UTC (rev 1140)
@@ -9,7 +9,7 @@
dqp.configFile=./deploy/configuration.xml
# Path to the directory where the VDBs are located, or list of VDBS separated by
";"
-vdb.definition=./deploy/
+dqp.deploydir=./deploy/
#Log file (optional) - will be modified to include the instance name, i.e. teiid_1.log
dqp.logFile=./log/teiid.log
Modified: trunk/build/kit-embedded/examples/portfolio/run.bat
===================================================================
--- trunk/build/kit-embedded/examples/portfolio/run.bat 2009-07-16 18:36:12 UTC (rev
1139)
+++ trunk/build/kit-embedded/examples/portfolio/run.bat 2009-07-16 19:19:54 UTC (rev
1140)
@@ -2,7 +2,7 @@
set CLIENT_PATH=java/*;PortfolioModel/
rem Second one for the JARs in Teiid embedded
-set
TEIID_PATH=../../client/teiid-${pom.version}-client.jar;../../deploy;../../lib/patches/*;../../lib/*;../../extensions/*
+set
TEIID_PATH=../../client/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-07-16 18:36:12 UTC (rev 1139)
+++ trunk/build/kit-embedded/examples/portfolio/run.sh 2009-07-16 19:19:54 UTC (rev 1140)
@@ -4,6 +4,6 @@
CLIENT_PATH=java/*:PortfolioModel/
#Second one for the JARs in Teiid embedded
-TEIID_PATH=../../client/teiid-${pom.version}-client.jar:../../deploy:../../lib/patches/*:../../lib/*:../../extensions/*
+TEIID_PATH=../../client/teiid-${pom.version}-client.jar:../..:../../deploy:../../lib/patches/*:../../lib/*:../../extensions/*
java -cp ${CLIENT_PATH}:${TEIID_PATH} JDBCClient "select * from
CustomerAccount"
Modified:
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
===================================================================
---
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -25,8 +25,7 @@
/**
*/
public interface DQPEmbeddedProperties {
-
- public static final String DQP_LOGFILE = "dqp.logFile"; //$NON-NLS-1$
+ public static final String DQP_LOGDIR = "dqp.logdir"; //$NON-NLS-1$
public static final String DQP_EXTENSIONS = "dqp.extensions";
//$NON-NLS-1$
public static final String DQP_CONFIGFILE = "dqp.configFile";
//$NON-NLS-1$
public static final String DQP_METADATA_SYSTEMURL =
"dqp.metadata.systemURL"; //$NON-NLS-1$
@@ -35,6 +34,7 @@
public static final String COMMON_EXTENSION_CLASPATH =
"dqp.extension.CommonClasspath"; //$NON-NLS-1$
public static final String DQP_KEYSTORE = "dqp.keystore"; //$NON-NLS-1$
public static final String DQP_WORKDIR = "dqp.workdir"; //$NON-NLS-1$
+ public static final String DQP_DEPLOYDIR = "dqp.deploydir"; //$NON-NLS-1$
public static final String DQP_LIBDIR = "dqp.lib"; //$NON-NLS-1$
public static final String PROCESSNAME = "processName"; //$NON-NLS-1$
public static final String CLUSTERNAME = "clusterName"; //$NON-NLS-1$
@@ -49,11 +49,11 @@
//derived properties
public static final String DQP_IDENTITY = "dqp.identity"; //$NON-NLS-1$
public static final String DQP_TMPDIR = "mm.io.tmpdir"; //$NON-NLS-1$
- public static final String DQP_WORKSPACE = "dqp.workspacedir";
//$NON-NLS-1$
public static final String BOOTURL = "bootURL"; //$NON-NLS-1$
public static final String ENABLE_SOCKETS = "sockets.enabled";
//$NON-NLS-1$
public static final String HOST_ADDRESS = "hostAddress"; //$NON-NLS-1$
public static final String DQP_BOOTSTRAP_FILE = "bootstrapFile";
//$NON-NLS-1$
+ public static final String TEIID_HOME = "teiid.home"; //$NON-NLS-1$
public interface BufferService {
/**
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -22,6 +22,7 @@
package com.metamatrix.jdbc;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
@@ -42,6 +43,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import com.metamatrix.common.classloader.PostDelegatingClassLoader;
import com.metamatrix.common.comm.api.ServerConnection;
import com.metamatrix.common.comm.api.ServerConnectionFactory;
@@ -330,13 +332,14 @@
private ServerConnectionFactory connectionFactory;
private ClassLoader classLoader;
private URL url;
+ Properties props;
public EmbeddedTransport(URL dqpURL, Properties info) throws SQLException {
this.url = dqpURL;
//Load the properties from dqp.properties file
- Properties props = loadDQPProperties(dqpURL);
+ props = loadDQPProperties(dqpURL);
props.putAll(info);
props = PropertiesUtils.resolveNestedProperties(props);
@@ -354,7 +357,7 @@
runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation,
MMURLConnection.DATE));
try {
- String configLocation =
props.getProperty(DQPEmbeddedProperties.VDB_DEFINITION, "./deploy/");
//$NON-NLS-1$
+ String configLocation =
props.getProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR, "./deploy/");
//$NON-NLS-1$
if (!configLocation.endsWith("/")) { //$NON-NLS-1$
configLocation = configLocation + "/"; //$NON-NLS-1$
}
@@ -462,6 +465,7 @@
Thread.currentThread().setContextClassLoader(classLoader);
try {
info.setProperty(DQPEmbeddedProperties.BOOTURL, url.toExternalForm());
+ info.setProperty(DQPEmbeddedProperties.TEIID_HOME,
getHomeDirectory(url));
ServerConnection conn = connectionFactory.createConnection(info);
return new MMConnection(conn, info, url.toExternalForm());
} catch (CommunicationException e) {
@@ -474,6 +478,32 @@
}
}
+ String getHomeDirectory(URL url) throws SQLException {
+ try {
+ // check the system wide
+ String teiidHome = System.getProperty(DQPEmbeddedProperties.TEIID_HOME);
+
+ // then check the deploy.properties
+ if (teiidHome == null) {
+ teiidHome = this.props.getProperty(DQPEmbeddedProperties.TEIID_HOME);
+ }
+
+ if (teiidHome == null) {
+ if (getDefaultConnectionURL().equals(url.toString())) {
+ teiidHome = System.getProperty("user.dir")+"/teiid";
//$NON-NLS-1$ //$NON-NLS-2$
+ }
+ else {
+ URL installDirectory = URLHelper.buildURL(url, ".");
//$NON-NLS-1$
+ teiidHome = installDirectory.getPath();
+ }
+ }
+ File f = new File(teiidHome);
+ return f.getCanonicalPath();
+ } catch(IOException e) {
+ throw MMSQLException.create(e);
+ }
+ }
+
}
}
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMConnection.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -58,12 +58,9 @@
import javax.transaction.xa.Xid;
import org.teiid.adminapi.Admin;
-import org.teiid.adminapi.AdminException;
-import org.teiid.jdbc.TeiidDriver;
import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.comm.api.ServerConnection;
-import com.metamatrix.common.comm.api.ServerConnectionFactory;
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.comm.platform.socket.client.SocketServerConnection;
import com.metamatrix.common.util.SqlUtil;
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/EmbeddedProfile.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/EmbeddedProfile.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -22,6 +22,7 @@
package org.teiid.jdbc;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
@@ -272,20 +273,21 @@
private ServerConnectionFactory connectionFactory;
private ClassLoader classLoader;
private URL url;
+ Properties props;
public EmbeddedTransport(URL dqpURL, Properties info) throws SQLException {
this.url = dqpURL;
//Load the properties from dqp.properties file
- Properties props = loadDQPProperties(dqpURL);
- props.putAll(info);
+ this.props = loadDQPProperties(dqpURL);
+ this.props.putAll(info);
- props = PropertiesUtils.resolveNestedProperties(props);
+ this.props = PropertiesUtils.resolveNestedProperties(this.props);
// a non-delegating class loader will be created from where all third party
dependent jars can be loaded
ArrayList<URL> runtimeClasspathList = new ArrayList<URL>();
- String libLocation = props.getProperty(DQPEmbeddedProperties.DQP_LIBDIR,
"./lib/"); //$NON-NLS-1$
+ String libLocation = this.props.getProperty(DQPEmbeddedProperties.DQP_LIBDIR,
"./lib/"); //$NON-NLS-1$
if (!libLocation.endsWith("/")) { //$NON-NLS-1$
libLocation = libLocation + "/"; //$NON-NLS-1$
}
@@ -296,7 +298,7 @@
runtimeClasspathList.addAll(libClassPath(dqpURL, libLocation,
MMURLConnection.DATE));
try {
- String configLocation =
props.getProperty(DQPEmbeddedProperties.VDB_DEFINITION, "./deploy/");
//$NON-NLS-1$
+ String configLocation =
this.props.getProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR, "./deploy/");
//$NON-NLS-1$
if (!configLocation.endsWith("/")) { //$NON-NLS-1$
configLocation = configLocation + "/"; //$NON-NLS-1$
}
@@ -404,6 +406,7 @@
Thread.currentThread().setContextClassLoader(classLoader);
try {
info.setProperty(DQPEmbeddedProperties.BOOTURL, url.toExternalForm());
+ info.setProperty(DQPEmbeddedProperties.TEIID_HOME,
getHomeDirectory(url));
ServerConnection conn = connectionFactory.createConnection(info);
return new MMConnection(conn, info, url.toExternalForm());
} catch (CommunicationException e) {
@@ -416,6 +419,32 @@
}
}
+ String getHomeDirectory(URL url) throws SQLException {
+ try {
+ // check the system wide
+ String teiidHome = System.getProperty(DQPEmbeddedProperties.TEIID_HOME);
+
+ // then check the deploy.properties
+ if (teiidHome == null) {
+ teiidHome = this.props.getProperty(DQPEmbeddedProperties.TEIID_HOME);
+ }
+
+ if (teiidHome == null) {
+ if (EmbeddedProfile.getDefaultConnectionURL().equals(url.toString())) {
+ teiidHome = System.getProperty("user.dir")+"/teiid";
//$NON-NLS-1$ //$NON-NLS-2$
+ }
+ else {
+ URL installDirectory = URLHelper.buildURL(url, ".");
//$NON-NLS-1$
+ teiidHome = installDirectory.getPath();
+ }
+ }
+ File f = new File(teiidHome);
+ return f.getCanonicalPath();
+ } catch(IOException e) {
+ throw MMSQLException.create(e);
+ }
+ }
+
}
private static final String BUNDLE_NAME = "com.metamatrix.jdbc.basic_i18n";
//$NON-NLS-1$
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/SocketProfile.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/SocketProfile.java 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/SocketProfile.java 2009-07-16 19:19:54
UTC (rev 1140)
@@ -23,12 +23,8 @@
package org.teiid.jdbc;
import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.DriverPropertyInfo;
import java.sql.SQLException;
import java.util.Enumeration;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -40,15 +36,12 @@
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.comm.exception.ConnectionException;
import com.metamatrix.common.comm.platform.socket.client.SocketServerConnectionFactory;
-import com.metamatrix.common.util.ApplicationInfo;
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.core.MetaMatrixCoreException;
import com.metamatrix.jdbc.BaseDataSource;
-import com.metamatrix.jdbc.BaseDriver;
import com.metamatrix.jdbc.JDBCPlugin;
import com.metamatrix.jdbc.MMConnection;
import com.metamatrix.jdbc.MMSQLException;
-import com.metamatrix.jdbc.api.ConnectionProperties;
import com.metamatrix.jdbc.util.MMJDBCURL;
/**
Modified: trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidDriver.java 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/client-jdbc/src/main/java/org/teiid/jdbc/TeiidDriver.java 2009-07-16 19:19:54
UTC (rev 1140)
@@ -27,18 +27,14 @@
import java.sql.DriverManager;
import java.sql.DriverPropertyInfo;
import java.sql.SQLException;
-import java.util.Enumeration;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
-import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.util.ApplicationInfo;
-import com.metamatrix.jdbc.BaseDataSource;
import com.metamatrix.jdbc.JDBCPlugin;
-import com.metamatrix.jdbc.MMSQLException;
import com.metamatrix.jdbc.util.MMJDBCURL;
/**
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPLogListener.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPLogListener.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPLogListener.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -25,7 +25,6 @@
import org.teiid.adminapi.EmbeddedLogger;
import com.metamatrix.core.log.LogListener;
-import com.metamatrix.core.log.LogMessage;
import com.metamatrix.core.log.MessageLevel;
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPMonitoringAdminImpl.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPMonitoringAdminImpl.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/DQPMonitoringAdminImpl.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -30,7 +30,6 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.Set;
import org.teiid.adminapi.AdminComponentException;
import org.teiid.adminapi.AdminException;
@@ -41,7 +40,6 @@
import org.teiid.adminapi.ProcessObject;
import org.teiid.adminapi.SystemObject;
import org.teiid.adminapi.Transaction;
-import org.teiid.dqp.internal.process.DQPWorkContext;
import com.metamatrix.admin.objects.MMAdminObject;
import com.metamatrix.api.exception.MetaMatrixComponentException;
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-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -1002,14 +1002,19 @@
}
/**
- * Get path(s) for VDB(s) that are availble from the configuration to the DQP
+ * Get path(s) for VDB(s) that are available from the configuration to the DQP
* engine.
* @return URLs to the resources.
*/
public URL[] getVDBLocations() {
ArrayList vdbs = new ArrayList();
- String vdbProperty =
getUserPreferences().getProperty(DQPEmbeddedProperties.VDB_DEFINITION);
- if (vdbProperty != null && vdbProperty.length() != 0) {
+ addVDBs(vdbs,
getUserPreferences().getProperty(DQPEmbeddedProperties.VDB_DEFINITION));
+ addVDBs(vdbs,
getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR));
+ return (URL[])vdbs.toArray(new URL[vdbs.size()]);
+ }
+
+ private void addVDBs(ArrayList vdbs, String vdbProperty) {
+ if (vdbProperty != null && vdbProperty.length() != 0) {
StringTokenizer st = new StringTokenizer(vdbProperty, VDB_LIST_SEPARATOR);
while( st.hasMoreTokens() ) {
String token = st.nextToken();
@@ -1022,8 +1027,7 @@
vdbs.add(vdbURL);
}
}
- return (URL[])vdbs.toArray(new URL[vdbs.size()]);
- }
+ }
/**
* Load the Connector Bindings from the VDBS and ServerConfig.xml
@@ -1140,11 +1144,9 @@
}
protected File getDeployDir() {
- File f = new File(getFullyQualifiedPath("deploy").getPath()); //$NON-NLS-1$
- if (f.exists()) {
- return f;
- }
- return new File(getWorkDir(), "deploy"); //$NON-NLS-1$
+ String deployDirectory =
getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR);
+ File deployDir = new File(deployDirectory);
+ return deployDir;
}
/**
@@ -1384,8 +1386,8 @@
return
Boolean.valueOf(getUserPreferences().getProperty(DQPEmbeddedProperties.BufferService.DQP_BUFFER_USEDISK,
"true")).booleanValue(); //$NON-NLS-1$
}
- public File getWorkDir() {
- String workDirectory =
getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_WORKSPACE,
System.getProperty("java.io.tmpdir") + "/teiid"); //$NON-NLS-1$
//$NON-NLS-2$
+ private File getWorkDir() {
+ String workDirectory =
getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_WORKDIR);
File workDir = new File(workDirectory);
workDir.mkdirs();
return workDir;
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -48,7 +48,7 @@
props = new Properties(props);
props.setProperty(TransactionService.HOSTNAME, "dqp");
//$NON-NLS-1$
props.setProperty(TransactionService.VMNAME,
props.getProperty(DQPEmbeddedProperties.DQP_IDENTITY));
- props.setProperty(TransactionService.TXN_STORE_DIR,
props.getProperty(DQPEmbeddedProperties.DQP_WORKSPACE));
+ props.setProperty(TransactionService.TXN_STORE_DIR,
props.getProperty(DQPEmbeddedProperties.DQP_WORKDIR));
this.setTransactionProvider(ArjunaTransactionProvider.getInstance(props));
} catch (XATransactionException e) {
throw new ApplicationInitializationException(e);
Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/CacheProvider.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/CacheProvider.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/CacheProvider.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -33,16 +33,18 @@
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
+import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
@Singleton
class CacheProvider implements Provider<org.jboss.cache.Cache> {
- @Inject @Named("WorkspaceDir") String workspaceDir;
+ @Inject @Named("DQPProperties") Properties props;
public Cache get() {
Cache cache = new
DefaultCacheFactory().createCache("jboss-cache-configuration.xml", false);
//$NON-NLS-1$
List<IndividualCacheLoaderConfig> configs =
cache.getConfiguration().getCacheLoaderConfig().getIndividualCacheLoaderConfigs();
Properties p = configs.get(0).getProperties();
+ String workspaceDir = this.props.getProperty(DQPEmbeddedProperties.DQP_WORKDIR);
p.setProperty("location", workspaceDir + "/cache"); //$NON-NLS-1$
//$NON-NLS-2$
configs.get(0).setProperties(p);
return cache;
Modified:
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -30,7 +30,6 @@
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.InetAddress;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
import java.util.Properties;
@@ -126,19 +125,32 @@
URL bootstrapURL = null;
Properties props = info;
- try {
+
+ try {
bootstrapURL = URLHelper.buildURL(info.getProperty(DQPEmbeddedProperties.BOOTURL));
props = PropertiesUtils.loadFromURL(bootstrapURL);
props.putAll(info);
props = PropertiesUtils.resolveNestedProperties(props);
+
+ // Create a temporary workspace directory
+ String teiidHome = info.getProperty(DQPEmbeddedProperties.TEIID_HOME);
+ this.workspaceDirectory = createWorkspace(teiidHome,
props.getProperty(DQPEmbeddedProperties.DQP_WORKDIR, "work"), dqpId);
//$NON-NLS-1$
+ props.setProperty(DQPEmbeddedProperties.DQP_WORKDIR, this.workspaceDirectory);
+
+ // create the deploy directories
+ File deployDirectory = new File(teiidHome,
props.getProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR, "deploy"));
//$NON-NLS-1$
+ props.setProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR,
deployDirectory.getCanonicalPath());
+ deployDirectory.mkdirs();
+
+ // create log directory
+ File logDirectory = new File(teiidHome,
props.getProperty(DQPEmbeddedProperties.DQP_LOGDIR, "log")); //$NON-NLS-1$
+ props.setProperty(DQPEmbeddedProperties.DQP_LOGDIR,
logDirectory.getCanonicalPath());
+ deployDirectory.mkdirs();
+
} catch (IOException e) {
throw new ApplicationInitializationException(e);
}
- // Create a temporary workspace directory
- this.workspaceDirectory = createWorkspace(bootstrapURL,
props.getProperty(DQPEmbeddedProperties.DQP_WORKDIR), dqpId);
- props.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE, this.workspaceDirectory);
-
this.jmxServer = new JMXUtil(dqpId);
EmbeddedGuiceModule config = new EmbeddedGuiceModule(bootstrapURL, props);
@@ -175,7 +187,7 @@
DQPEmbeddedPlugin.logInfo("DQPEmbeddedManager.start_dqp", new Object[]
{new Date(System.currentTimeMillis()).toString()}); //$NON-NLS-1$
}
- private ClientServiceRegistry createClientServices(ConfigurationService
configService) {
+ private ClientServiceRegistry createClientServices(ConfigurationService configService)
{
ClientServiceRegistry services = new ClientServiceRegistry();
SessionServiceInterface sessionService =
(SessionServiceInterface)this.dqp.getEnvironment().findService(DQPServiceNames.SESSION_SERVICE);
@@ -214,20 +226,13 @@
* @param identity - identity of the dqp
* @throws MMSQLException
*/
- private String createWorkspace(URL bootstrapURL, String baseDir, String identity)
throws ApplicationInitializationException {
- if (baseDir == null) {
- baseDir = System.getProperty("java.io.tmpdir")+"/teiid/";
//$NON-NLS-1$ //$NON-NLS-2$
- } else {
- try {
- baseDir = URLHelper.buildURL(bootstrapURL, baseDir).getPath();
- } catch (MalformedURLException e) {
- throw new ApplicationInitializationException(e);
- }
- }
- System.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, baseDir +
"/temp"); //$NON-NLS-1$S
+ private String createWorkspace(String teiidHome, String baseDir, String identity)
throws IOException {
+ File baseFile = new File(teiidHome, baseDir);
- File f = new File(baseDir, identity);
+ System.setProperty(DQPEmbeddedProperties.DQP_TMPDIR, baseFile.getCanonicalPath() +
"/temp"); //$NON-NLS-1$S
+ File f = new File(baseFile, identity);
+
// If directory already exists then try to delete it; because we may have
// failed to delete at end of last run (JVM holds lock on jar files)
if (f.exists()) {
@@ -238,7 +243,7 @@
if (!f.exists()) {
f.mkdirs();
}
- return f.getAbsolutePath();
+ return f.getCanonicalPath();
}
/**
Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -82,8 +82,6 @@
bind(URL.class).annotatedWith(Names.named("BootstrapURL")).toInstance(bootstrapURL);
//$NON-NLS-1$
bindConstant().annotatedWith(Names.named("HostName")).to("embedded");
//$NON-NLS-1$ //$NON-NLS-2$
bindConstant().annotatedWith(Names.named("ProcessName")).to(props.getProperty(DQPEmbeddedProperties.DQP_IDENTITY,
"test")); //$NON-NLS-1$ //$NON-NLS-2$
- String workspaceDir = props.getProperty(DQPEmbeddedProperties.DQP_WORKSPACE,
System.getProperty("user.dir")); //$NON-NLS-1$
- bindConstant().annotatedWith(Names.named("WorkspaceDir")).to(workspaceDir);
//$NON-NLS-1$
bind(Properties.class).annotatedWith(Names.named("DQPProperties")).toInstance(this.props);
//$NON-NLS-1$
InetAddress address =
resolveHostAddress(props.getProperty(DQPEmbeddedProperties.BIND_ADDRESS));
Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/LogListernerProvider.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/LogListernerProvider.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/LogListernerProvider.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -22,8 +22,7 @@
package com.metamatrix.jdbc;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.io.File;
import java.util.Properties;
import org.apache.log4j.Logger;
@@ -32,50 +31,23 @@
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
-import com.metamatrix.common.protocol.URLHelper;
-import com.metamatrix.core.MetaMatrixRuntimeException;
-import com.metamatrix.core.log.JavaLogWriter;
import com.metamatrix.core.log.LogListener;
import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
@Singleton
class LogListernerProvider implements Provider<LogListener> {
+
@Inject @Named("DQPProperties")
Properties props;
- @Inject @Named("BootstrapURL")
- URL dqpURL;
-
@Override
public LogListener get() {
- String logFile = this.props.getProperty(DQPEmbeddedProperties.DQP_LOGFILE);
+ String logDirectory = this.props.getProperty(DQPEmbeddedProperties.DQP_LOGDIR);
String instanceId = this.props.getProperty(DQPEmbeddedProperties.DQP_IDENTITY,
"0"); //$NON-NLS-1$
-
- // Configure Logging
- try {
- String dqpURLString = dqpURL.toString();
- dqpURL = URLHelper.buildURL(dqpURLString);
- if (logFile != null) {
- String modifiedLogFileName = logFile;
- int dotIndex = logFile.lastIndexOf('.');
- if (dotIndex != -1) {
- modifiedLogFileName =
logFile.substring(0,dotIndex)+"_"+instanceId+"."+logFile.substring(dotIndex+1);
//$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- modifiedLogFileName = logFile+"_"+instanceId;
//$NON-NLS-1$
- }
- URL logURL = URLHelper.buildURL(dqpURL, modifiedLogFileName);
-
- // TODO: The Log4j File appender needs to be created with the above name
- // since we do not have handle on the Log4J configuration we come back to
this issue.
- // until then just manage on the properties file.
- System.setProperty("dqp.log4jFile", logURL.getPath());
//$NON-NLS-1$ // hack
- return new Log4jListener();
- }
- return new JavaLogWriter();
- } catch (MalformedURLException e) {
- throw new MetaMatrixRuntimeException(e);
- }
+
+ File logFile = new File(logDirectory,
"teiid_"+instanceId+".log"); //$NON-NLS-1$ //$NON-NLS-2$
+ System.setProperty("dqp.log4jFile", logFile.getAbsolutePath());
//$NON-NLS-1$ // hack
+ return new Log4jListener();
}
/**
Modified: trunk/embedded/src/main/java/org/teiid/Server.java
===================================================================
--- trunk/embedded/src/main/java/org/teiid/Server.java 2009-07-16 18:36:12 UTC (rev 1139)
+++ trunk/embedded/src/main/java/org/teiid/Server.java 2009-07-16 19:19:54 UTC (rev 1140)
@@ -98,7 +98,7 @@
// enable socket communication by default.
props.setProperty(DQPEmbeddedProperties.ENABLE_SOCKETS, Boolean.TRUE.toString());
props.setProperty(DQPEmbeddedProperties.BOOTURL, f.getCanonicalPath());
-
+ props.setProperty(DQPEmbeddedProperties.TEIID_HOME,f.getParentFile().getCanonicalPath());
} catch (IOException e) {
System.out.println("Failed to load bootstrap properties file.");
//$NON-NLS-1$
e.printStackTrace();
Modified: trunk/embedded/src/main/java/org/teiid/ServerMBean.java
===================================================================
--- trunk/embedded/src/main/java/org/teiid/ServerMBean.java 2009-07-16 18:36:12 UTC (rev
1139)
+++ trunk/embedded/src/main/java/org/teiid/ServerMBean.java 2009-07-16 19:19:54 UTC (rev
1140)
@@ -21,8 +21,6 @@
*/
package org.teiid;
-import javax.management.ObjectName;
-
import com.metamatrix.common.util.JMXUtil;
public interface ServerMBean {
Modified: trunk/embedded/src/main/java/org/teiid/Shutdown.java
===================================================================
--- trunk/embedded/src/main/java/org/teiid/Shutdown.java 2009-07-16 18:36:12 UTC (rev
1139)
+++ trunk/embedded/src/main/java/org/teiid/Shutdown.java 2009-07-16 19:19:54 UTC (rev
1140)
@@ -58,7 +58,7 @@
// enable socket communication by default.
props.setProperty(DQPEmbeddedProperties.ENABLE_SOCKETS, Boolean.TRUE.toString());
props.setProperty(DQPEmbeddedProperties.BOOTURL, f.getCanonicalPath());
-
+ props.setProperty(DQPEmbeddedProperties.TEIID_HOME,f.getParentFile().getCanonicalPath());
} catch (IOException e) {
System.out.println("Failed to load bootstrap properties file.");
//$NON-NLS-1$
e.printStackTrace();
Modified: trunk/embedded/src/main/java/org/teiid/transport/LocalServerConnection.java
===================================================================
--- trunk/embedded/src/main/java/org/teiid/transport/LocalServerConnection.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/embedded/src/main/java/org/teiid/transport/LocalServerConnection.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -33,17 +33,14 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.security.LogonException;
import com.metamatrix.client.ExceptionUtil;
-import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.comm.api.ServerConnection;
import com.metamatrix.common.comm.exception.CommunicationException;
import com.metamatrix.common.comm.exception.ConnectionException;
import com.metamatrix.common.comm.platform.CommPlatformPlugin;
-import com.metamatrix.dqp.client.ClientSideDQP;
import com.metamatrix.jdbc.JDBCPlugin;
import com.metamatrix.platform.security.api.ILogon;
import com.metamatrix.platform.security.api.LogonResult;
-import com.metamatrix.platform.security.api.SessionToken;
public class LocalServerConnection implements ServerConnection {
Deleted: trunk/embedded/src/main/resources/deploy.properties
===================================================================
--- trunk/embedded/src/main/resources/deploy.properties 2009-07-16 18:36:12 UTC (rev
1139)
+++ trunk/embedded/src/main/resources/deploy.properties 2009-07-16 19:19:54 UTC (rev
1140)
@@ -1,2 +0,0 @@
-dqp.workdir=${user.dir}/teiid-work
-dqp.logFile=${user.dir}/teiid.log
\ No newline at end of file
Deleted: trunk/embedded/src/main/resources/jboss-cache-configuration.xml
===================================================================
--- trunk/embedded/src/main/resources/jboss-cache-configuration.xml 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/embedded/src/main/resources/jboss-cache-configuration.xml 2009-07-16 19:19:54
UTC (rev 1140)
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
- <mbean code="org.jboss.cache.pojo.jmx.CacheJmxWrapper"
name="jboss.cache:service=TeiidCache">
- <attribute
name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
- <attribute name="IsolationLevel">READ_COMMITTED</attribute>
- <attribute
name="LockParentForChildInsertRemove">true</attribute>
-
- <attribute name="CacheMode">LOCAL</attribute>
- <!-- <attribute
name="UseLazyDeserialization">true</attribute> -->
-
- <!--
- The max amount of time (in milliseconds) we wait until the
- initial state (ie. the contents of the cache) are retrieved from
- existing members in a clustered environment
- -->
- <attribute name="StateRetrievalTimeout">20000</attribute>
-
- <!--
- Number of milliseconds to wait until all responses for a
- synchronous call have been received.
- -->
- <attribute name="SyncReplTimeout">20000</attribute>
-
- <!-- Max number of milliseconds to wait for a lock acquisition -->
- <attribute name="LockAcquisitionTimeout">15000</attribute>
-
- <!-- Shutdown hook behavior. Valid choices are: DEFAULT, REGISTER and
DONT_REGISTER. this element is omitted, DEFAULT is used. -->
- <attribute name="ShutdownHookBehavior">DEFAULT</attribute>
-
- <attribute name="FetchInMemoryState">true</attribute>
-
- <attribute name="CacheLoaderConfig" replace="false">
- <config>
-
- <!-- are the cache loaders shared in a cluster? -->
- <shared>false</shared>
- <!-- if passivation is true, only the first cache loader is used; the rest
are ignored -->
- <passivation>true</passivation>
-
- <cacheloader>
- <class>org.jboss.cache.loader.FileCacheLoader</class>
- <properties>location=./teiid/cache</properties>
-
- <!--fetch the persistent state of a cache when joining a
cluster-->
- <fetchPersistentState>true</fetchPersistentState>
-
- <!-- empties the specified cache loader when cache loader starts up
-->
- <purgeOnStartup>true</purgeOnStartup>
-
- <!-- cache loader is shared among different cache instances -->
- <shared>false</shared>
- </cacheloader>
- </config>
- </attribute>
-
- <attribute name="EvictionPolicyConfig">
- <config>
- <attribute name="wakeUpIntervalSeconds">3</attribute>
- <!-- This defaults to 200000 if not specified -->
- <attribute name="eventQueueSize">100000</attribute>
- <!-- Name of the DEFAULT eviction policy class. -->
- <attribute
name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
- <!-- Cache wide default -->
- <region name="/_default_">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLiveSeconds">0</attribute>
- </region>
- </config>
- </attribute>
-
- </mbean>
-</server>
\ No newline at end of file
Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/EmbeddedTestUtil.java
===================================================================
---
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/EmbeddedTestUtil.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/EmbeddedTestUtil.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -35,7 +35,10 @@
public class EmbeddedTestUtil {
public static Properties getProperties() throws IOException {
- return
getProperties(UnitTestUtil.getTestScratchPath()+"/dqp/dqp.properties");
//$NON-NLS-1$
+ Properties p =
getProperties(UnitTestUtil.getTestScratchPath()+"/dqp/dqp.properties");
//$NON-NLS-1$
+ p.setProperty(DQPEmbeddedProperties.DQP_WORKDIR,
System.getProperty("java.io.tmpdir")+"/teiid/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR,
System.getProperty("java.io.tmpdir")+"/teiid/deploy");
//$NON-NLS-1$ //$NON-NLS-2$
+ return p;
}
public static Properties getProperties(String file) throws IOException {
Modified:
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedDataService.java
===================================================================
---
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedDataService.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedDataService.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -28,6 +28,7 @@
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
import com.metamatrix.dqp.embedded.EmbeddedTestUtil;
import com.metamatrix.dqp.service.DQPServiceNames;
@@ -53,7 +54,9 @@
}
public void testSelectConnector() throws Exception {
- Properties p =
EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath()+"/dqp/dqp.properties");
//$NON-NLS-1$
+ Properties p =
EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath()+"/dqp/dqp.properties");
//$NON-NLS-1$
+ p.setProperty(DQPEmbeddedProperties.DQP_WORKDIR,
System.getProperty("java.io.tmpdir")+"/teiid/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR,
System.getProperty("java.io.tmpdir")+"/teiid/deploy");
//$NON-NLS-1$ //$NON-NLS-2$
configService.setUserPreferences(p);
configService.initializeService(p);
Modified:
trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java
===================================================================
---
trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/embedded/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -49,7 +49,8 @@
Application r = new Application();
ConfigurationService cs = new EmbeddedConfigurationService();
Properties p = EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath()
+ "/admin/buffertest1.properties"); //$NON-NLS-1$
- p.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE,
System.getProperty("java.io.tmpdir")+"/metamatrix/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_WORKDIR,
System.getProperty("java.io.tmpdir")+"/teiid/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR,
System.getProperty("java.io.tmpdir")+"/teiid/deploy");
//$NON-NLS-1$ //$NON-NLS-2$
cs.initialize(p);
r.installService(DQPServiceNames.CONFIGURATION_SERVICE, cs);
EmbeddedBufferService svc = new EmbeddedBufferService();
@@ -72,7 +73,8 @@
Application r = new Application();
cs = new EmbeddedConfigurationService();
Properties p = EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath() +
"/admin/buffertest2.properties"); //$NON-NLS-1$
- p.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE,
System.getProperty("java.io.tmpdir")+"/metamatrix/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_WORKDIR,
System.getProperty("java.io.tmpdir")+"/teiid/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR,
System.getProperty("java.io.tmpdir")+"/teiid/deploy");
//$NON-NLS-1$ //$NON-NLS-2$
cs.initialize(p);
r.installService(DQPServiceNames.CONFIGURATION_SERVICE, cs);
svc = new EmbeddedBufferService();
@@ -98,7 +100,8 @@
Application r = new Application();
ConfigurationService cs = new EmbeddedConfigurationService();
Properties p = EmbeddedTestUtil.getProperties(UnitTestUtil.getTestDataPath() +
"/admin/buffertest3.properties"); //$NON-NLS-1$
- p.setProperty(DQPEmbeddedProperties.DQP_WORKSPACE,
System.getProperty("java.io.tmpdir")+"/metamatrix/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_WORKDIR,
System.getProperty("java.io.tmpdir")+"/teiid/1");
//$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(DQPEmbeddedProperties.DQP_DEPLOYDIR,
System.getProperty("java.io.tmpdir")+"/teiid/deploy");
//$NON-NLS-1$ //$NON-NLS-2$
cs.initialize(p);
r.installService(DQPServiceNames.CONFIGURATION_SERVICE, cs);
svc = new EmbeddedBufferService();
Modified: trunk/embedded/src/test/resources/admin/buffertest1.properties
===================================================================
--- trunk/embedded/src/test/resources/admin/buffertest1.properties 2009-07-16 18:36:12 UTC
(rev 1139)
+++ trunk/embedded/src/test/resources/admin/buffertest1.properties 2009-07-16 19:19:54 UTC
(rev 1140)
@@ -30,5 +30,5 @@
metamatrix.xatxnmgr.enable_recovery=false
+teiid.home=target/scratch
-
Modified: trunk/embedded/src/test/resources/admin/buffertest2.properties
===================================================================
--- trunk/embedded/src/test/resources/admin/buffertest2.properties 2009-07-16 18:36:12 UTC
(rev 1139)
+++ trunk/embedded/src/test/resources/admin/buffertest2.properties 2009-07-16 19:19:54 UTC
(rev 1140)
@@ -33,4 +33,4 @@
metamatrix.xatxnmgr.enable_recovery=false
-
+teiid.home=target/scratch
Modified: trunk/embedded/src/test/resources/admin/buffertest3.properties
===================================================================
--- trunk/embedded/src/test/resources/admin/buffertest3.properties 2009-07-16 18:36:12 UTC
(rev 1139)
+++ trunk/embedded/src/test/resources/admin/buffertest3.properties 2009-07-16 19:19:54 UTC
(rev 1140)
@@ -32,3 +32,4 @@
+teiid.home=target/scratch
\ No newline at end of file
Modified: trunk/embedded/src/test/resources/bqt/fakebqt.properties
===================================================================
--- trunk/embedded/src/test/resources/bqt/fakebqt.properties 2009-07-16 18:36:12 UTC (rev
1139)
+++ trunk/embedded/src/test/resources/bqt/fakebqt.properties 2009-07-16 19:19:54 UTC (rev
1140)
@@ -15,3 +15,4 @@
metamatrix.xatxnmgr.txnstore_dir=../../../../target/scratch
+teiid.home=target/scratch
\ No newline at end of file
Modified: trunk/embedded/src/test/resources/dqp/dqp.properties
===================================================================
--- trunk/embedded/src/test/resources/dqp/dqp.properties 2009-07-16 18:36:12 UTC (rev
1139)
+++ trunk/embedded/src/test/resources/dqp/dqp.properties 2009-07-16 19:19:54 UTC (rev
1140)
@@ -34,4 +34,4 @@
metamatrix.xatxnmgr.enable_recovery=false
-
+teiid.home=target/scratch
Modified: trunk/engine/src/main/java/com/metamatrix/common/application/Application.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/application/Application.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/engine/src/main/java/com/metamatrix/common/application/Application.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -25,18 +25,9 @@
import java.util.ArrayList;
import java.util.Iterator;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.Key;
import com.metamatrix.common.CommonPlugin;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.core.log.MessageLevel;
-import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.ResourceFinder;
-import com.metamatrix.dqp.service.DQPServiceNames;
-import com.metamatrix.dqp.util.LogConstants;
/**
*/
Modified:
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java 2009-07-16
18:36:12 UTC (rev 1139)
+++
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -22,11 +22,8 @@
package com.metamatrix.common.application;
-import java.util.Map;
import java.util.Properties;
-import com.google.inject.Binder;
-
/**
* This interface represents a source of DQP configuration information.
*/
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java 2009-07-16
19:19:54 UTC (rev 1140)
@@ -22,14 +22,10 @@
package com.metamatrix.dqp.service;
-import org.teiid.connector.api.CacheScope;
import org.teiid.dqp.internal.cache.DQPContextCache;
-import org.teiid.dqp.internal.process.DQPWorkContext;
-import com.metamatrix.cache.Cache;
import com.metamatrix.common.application.ApplicationService;
import com.metamatrix.common.buffer.BufferManager;
-import com.metamatrix.dqp.message.RequestID;
/**
*/
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-07-16 18:36:12 UTC (rev 1139)
+++ trunk/pom.xml 2009-07-16 19:19:54 UTC (rev 1140)
@@ -149,6 +149,10 @@
<name>java.io.tmpdir</name>
<value>${basedir}/target</value>
</property>
+ <property>
+ <name>teiid.home</name>
+ <value>${basedir}/target</value>
+ </property>
</systemProperties>
</configuration>
</plugin>
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2009-07-16 18:36:12 UTC (rev 1139)
+++ trunk/test-integration/pom.xml 2009-07-16 19:19:54 UTC (rev 1140)
@@ -67,6 +67,12 @@
<artifactId>teiid-embedded</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-embedded</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>connector-loopback</artifactId>
Modified: trunk/test-integration/src/test/resources/3473/3473.properties
===================================================================
--- trunk/test-integration/src/test/resources/3473/3473.properties 2009-07-16 18:36:12 UTC
(rev 1139)
+++ trunk/test-integration/src/test/resources/3473/3473.properties 2009-07-16 19:19:54 UTC
(rev 1140)
@@ -32,3 +32,4 @@
+teiid.home=target/scratch
\ No newline at end of file
Modified: trunk/test-integration/src/test/resources/authcheck/bqt.properties
===================================================================
--- trunk/test-integration/src/test/resources/authcheck/bqt.properties 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/test-integration/src/test/resources/authcheck/bqt.properties 2009-07-16 19:19:54
UTC (rev 1140)
@@ -38,4 +38,4 @@
entitlements.enabled=true
-
+teiid.home=target/scratch
Modified: trunk/test-integration/src/test/resources/bqt/bqt.properties
===================================================================
--- trunk/test-integration/src/test/resources/bqt/bqt.properties 2009-07-16 18:36:12 UTC
(rev 1139)
+++ trunk/test-integration/src/test/resources/bqt/bqt.properties 2009-07-16 19:19:54 UTC
(rev 1140)
@@ -28,3 +28,4 @@
+teiid.home=target/scratch
\ No newline at end of file
Modified: trunk/test-integration/src/test/resources/dqp/dqp.properties
===================================================================
--- trunk/test-integration/src/test/resources/dqp/dqp.properties 2009-07-16 18:36:12 UTC
(rev 1139)
+++ trunk/test-integration/src/test/resources/dqp/dqp.properties 2009-07-16 19:19:54 UTC
(rev 1140)
@@ -33,3 +33,4 @@
+teiid.home=target/scratch
\ No newline at end of file
Modified: trunk/test-integration/src/test/resources/metadata/dqp.properties
===================================================================
--- trunk/test-integration/src/test/resources/metadata/dqp.properties 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/test-integration/src/test/resources/metadata/dqp.properties 2009-07-16 19:19:54
UTC (rev 1140)
@@ -29,4 +29,4 @@
metamatrix.xatxnmgr.enable_recovery=false
-
+teiid.home=target/scratch
Modified: trunk/test-integration/src/test/resources/partssupplier/dqp.properties
===================================================================
--- trunk/test-integration/src/test/resources/partssupplier/dqp.properties 2009-07-16
18:36:12 UTC (rev 1139)
+++ trunk/test-integration/src/test/resources/partssupplier/dqp.properties 2009-07-16
19:19:54 UTC (rev 1140)
@@ -33,4 +33,4 @@
metamatrix.xatxnmgr.enable_recovery=false
-
+teiid.home=target/scratch
Modified: trunk/test-integration/src/test/resources/vdbless/dqp.properties
===================================================================
--- trunk/test-integration/src/test/resources/vdbless/dqp.properties 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/test-integration/src/test/resources/vdbless/dqp.properties 2009-07-16 19:19:54
UTC (rev 1140)
@@ -27,5 +27,5 @@
#only for testing, as this takes more time to start and shutdown
metamatrix.xatxnmgr.enable_recovery=false
+teiid.home=target/scratch
-
Modified: trunk/test-integration/src/test/resources/xml-vp/xmlvp.properties
===================================================================
--- trunk/test-integration/src/test/resources/xml-vp/xmlvp.properties 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/test-integration/src/test/resources/xml-vp/xmlvp.properties 2009-07-16 19:19:54
UTC (rev 1140)
@@ -32,5 +32,5 @@
#only for testing, as this takes more time to start and shutdown
metamatrix.xatxnmgr.enable_recovery=false
+teiid.home=target/scratch
-
Modified: trunk/test-integration/src/test/resources/xquery/xquery.properties
===================================================================
--- trunk/test-integration/src/test/resources/xquery/xquery.properties 2009-07-16 18:36:12
UTC (rev 1139)
+++ trunk/test-integration/src/test/resources/xquery/xquery.properties 2009-07-16 19:19:54
UTC (rev 1140)
@@ -7,4 +7,4 @@
metamatrix.xatxnmgr.enable_recovery=false
-
+teiid.home=target/scratch