Warning: could not send message for past 4 hours
by Mail Delivery Subsystem
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************
The original message was received at Thu, 16 Jul 2009 15:28:55 -0400
from svn01.web.mwc.hst.phx2.redhat.com [10.5.105.7]
----- Transcript of session follows -----
<teiid-commits(a)lists.jboss.org>... Deferred: Connection refused by mx1.lists.jboss.org.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old
16 years, 9 months
Warning: could not send message for past 4 hours
by Mail Delivery Subsystem
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************
The original message was received at Thu, 16 Jul 2009 15:19:55 -0400
from svn01.web.mwc.hst.phx2.redhat.com [10.5.105.7]
----- Transcript of session follows -----
<teiid-commits(a)lists.jboss.org>... Deferred: Connection refused by mx1.lists.jboss.org.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old
16 years, 9 months
Warning: could not send message for past 4 hours
by Mail Delivery Subsystem
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************
The original message was received at Thu, 16 Jul 2009 15:40:25 -0400
from svn01.web.mwc.hst.phx2.redhat.com [10.5.105.7]
----- Transcript of session follows -----
<teiid-commits(a)lists.jboss.org>... Deferred: Connection refused by mx1.lists.jboss.org.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old
16 years, 9 months
Warning: could not send message for past 4 hours
by Mail Delivery Subsystem
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************
The original message was received at Thu, 16 Jul 2009 13:06:58 -0400
from svn01.web.mwc.hst.phx2.redhat.com [10.5.105.7]
----- Transcript of session follows -----
<teiid-commits(a)lists.jboss.org>... Deferred: Connection refused by mx1.lists.jboss.org.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old
16 years, 9 months
teiid SVN: r1143 - in trunk: embedded/src/main/java/com/metamatrix/dqp/embedded/services and 2 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-07-16 16:56:43 -0400 (Thu, 16 Jul 2009)
New Revision: 1143
Modified:
trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/TestEmbeddedConfigSource.java
Log:
TEIID-485: removing the all the deprecated classes from Jboss cache.
Modified: trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java 2009-07-16 19:40:24 UTC (rev 1142)
+++ trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java 2009-07-16 20:56:43 UTC (rev 1143)
@@ -22,55 +22,45 @@
package com.metamatrix.cache.jboss;
-import java.lang.management.ManagementFactory;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.OperationsException;
-
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.Region;
-import org.jboss.cache.config.EvictionPolicyConfig;
-import org.jboss.cache.eviction.FIFOConfiguration;
-import org.jboss.cache.eviction.LFUConfiguration;
-import org.jboss.cache.eviction.LRUConfiguration;
-import org.jboss.cache.eviction.MRUConfiguration;
-import org.jboss.cache.jmx.CacheJmxWrapper;
-import org.jboss.cache.jmx.CacheJmxWrapperMBean;
+import org.jboss.cache.config.EvictionAlgorithmConfig;
+import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.eviction.FIFOAlgorithmConfig;
+import org.jboss.cache.eviction.LFUAlgorithmConfig;
+import org.jboss.cache.eviction.LRUAlgorithmConfig;
+import org.jboss.cache.eviction.MRUAlgorithmConfig;
import com.google.inject.Inject;
import com.google.inject.Singleton;
-import com.google.inject.name.Named;
import com.metamatrix.cache.Cache;
import com.metamatrix.cache.CacheConfiguration;
import com.metamatrix.cache.CacheFactory;
import com.metamatrix.cache.Cache.Type;
import com.metamatrix.cache.CacheConfiguration.Policy;
+import com.metamatrix.common.util.JMXUtil;
+import com.metamatrix.common.util.JMXUtil.FailedToRegisterException;
import com.metamatrix.core.MetaMatrixRuntimeException;
@Singleton
public class JBossCacheFactory implements CacheFactory {
+ private static final String NAME = "Cache"; //$NON-NLS-1$
private org.jboss.cache.Cache cacheStore;
private volatile boolean destroyed = false;
- private ObjectName jmxName;
@Inject
- public JBossCacheFactory(org.jboss.cache.Cache cacheStore, @Named("ProcessName") String processName) {
+ JMXUtil jmx;
+
+ @Inject
+ public JBossCacheFactory(org.jboss.cache.Cache cacheStore) {
try {
- CacheJmxWrapperMBean wrapper = new CacheJmxWrapper(cacheStore);
- MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- this.jmxName = new ObjectName("Teiid["+processName+"]:service=JBossCache,name=cache"); //$NON-NLS-1$ //$NON-NLS-2$
- mbs.registerMBean(wrapper, this.jmxName);
- wrapper.create();
- wrapper.start();
- this.cacheStore = wrapper.getCache();
- } catch (OperationsException e) {
- throw new MetaMatrixRuntimeException(e);
- } catch (MBeanRegistrationException e) {
- throw new MetaMatrixRuntimeException(e);
+ jmx.register(JMXUtil.MBeanType.SERVICE, NAME, cacheStore);
+ cacheStore.create();
+ cacheStore.start();
+ this.cacheStore = cacheStore;
+ } catch (FailedToRegisterException e) {
+ throw new MetaMatrixRuntimeException(e.getCause());
}
}
@@ -82,37 +72,37 @@
Node cacheRoot = this.cacheStore.getRoot().addChild(Fqn.fromString("Teiid")); //$NON-NLS-1$
Node node = cacheRoot.addChild(Fqn.fromString(type.location()));
-
Region cacheRegion = this.cacheStore.getRegion(node.getFqn(), true);
- cacheRegion.setEvictionPolicy(buildEvictionPolicy(config));
+ EvictionRegionConfig erc = new EvictionRegionConfig(node.getFqn(), buildEvictionAlgorithmConfig(config));
+ cacheRegion.setEvictionRegionConfig(erc);
return new JBossCache(this.cacheStore, node.getFqn());
}
throw new MetaMatrixRuntimeException("Cache system has been shutdown"); //$NON-NLS-1$
}
- private EvictionPolicyConfig buildEvictionPolicy(CacheConfiguration config) {
- EvictionPolicyConfig evictionConfig = null;
+ private EvictionAlgorithmConfig buildEvictionAlgorithmConfig(CacheConfiguration config) {
+ EvictionAlgorithmConfig evictionConfig = null;
if (config.getPolicy() == Policy.LRU) {
- LRUConfiguration lru = new LRUConfiguration();
+ LRUAlgorithmConfig lru = new LRUAlgorithmConfig();
lru.setMaxNodes(config.getMaxNodes());
- lru.setMaxAgeSeconds(config.getMaxAgeInSeconds());
- lru.setTimeToLiveSeconds(0);
+ lru.setMaxAge(config.getMaxAgeInSeconds()*1000);
+ lru.setTimeToLive(0);
evictionConfig = lru;
}
else if (config.getPolicy() == Policy.MRU) {
- MRUConfiguration mru = new MRUConfiguration();
+ MRUAlgorithmConfig mru = new MRUAlgorithmConfig();
mru.setMaxNodes(config.getMaxNodes());
evictionConfig = mru;
}
else if (config.getPolicy() == Policy.FIFO) {
- FIFOConfiguration fifo = new FIFOConfiguration();
+ FIFOAlgorithmConfig fifo = new FIFOAlgorithmConfig();
fifo.setMaxNodes(config.getMaxNodes());
evictionConfig = fifo;
}
else if (config.getPolicy() == Policy.LFU) {
- LFUConfiguration lfu = new LFUConfiguration();
+ LFUAlgorithmConfig lfu = new LFUAlgorithmConfig();
lfu.setMaxNodes(config.getMaxNodes());
evictionConfig = lfu;
}
@@ -121,10 +111,8 @@
public void destroy() {
try {
- MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- mbs.unregisterMBean(this.jmxName);
- } catch (InstanceNotFoundException e) {
- } catch (MBeanRegistrationException e) {
+ jmx.unregister(JMXUtil.MBeanType.SERVICE, NAME);
+ } catch (FailedToRegisterException e) {
} finally {
this.cacheStore.destroy();
this.destroyed = true;
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 19:40:24 UTC (rev 1142)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedTransactionService.java 2009-07-16 20:56:43 UTC (rev 1143)
@@ -22,13 +22,10 @@
package com.metamatrix.dqp.embedded.services;
-import java.net.URL;
import java.util.Properties;
import org.teiid.dqp.internal.transaction.TransactionServerImpl;
-import com.google.inject.Inject;
-import com.google.inject.name.Named;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.xa.XATransactionException;
import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
@@ -39,8 +36,6 @@
public static final String TRANSACTIONS_ENABLED = "metamatrix.xatxnmgr.enabled"; //$NON-NLS-1$
- @Inject @Named("BootstrapURL") URL bootstrapURL;
-
@Override
public void initialize(Properties props)
throws ApplicationInitializationException {
Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java 2009-07-16 19:40:24 UTC (rev 1142)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedConnectionFactoryImpl.java 2009-07-16 20:56:43 UTC (rev 1143)
@@ -153,7 +153,7 @@
this.jmxServer = new JMXUtil(dqpId);
- EmbeddedGuiceModule config = new EmbeddedGuiceModule(bootstrapURL, props);
+ EmbeddedGuiceModule config = new EmbeddedGuiceModule(bootstrapURL, props, this.jmxServer);
Injector injector = Guice.createInjector(config);
ResourceFinder.setInjector(injector);
config.setInjector(injector);
Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java 2009-07-16 19:40:24 UTC (rev 1142)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java 2009-07-16 20:56:43 UTC (rev 1143)
@@ -45,6 +45,7 @@
import com.metamatrix.common.application.DQPConfigSource;
import com.metamatrix.common.log.LogConfiguration;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.util.JMXUtil;
import com.metamatrix.common.util.NetUtils;
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.core.MetaMatrixRuntimeException;
@@ -67,11 +68,13 @@
private Properties props;
private URL bootstrapURL;
+ private JMXUtil jmx;
Injector injector;
- public EmbeddedGuiceModule(URL bootstrapURL, Properties props) {
+ public EmbeddedGuiceModule(URL bootstrapURL, Properties props, JMXUtil jmxUtil) {
this.bootstrapURL = bootstrapURL;
this.props = props;
+ this.jmx = jmxUtil;
}
@Override
@@ -83,6 +86,7 @@
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$
bind(Properties.class).annotatedWith(Names.named("DQPProperties")).toInstance(this.props); //$NON-NLS-1$
+ bind(JMXUtil.class).toInstance(this.jmx);
InetAddress address = resolveHostAddress(props.getProperty(DQPEmbeddedProperties.BIND_ADDRESS));
bind(InetAddress.class).annotatedWith(Names.named(DQPEmbeddedProperties.HOST_ADDRESS)).toInstance(address);
Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/TestEmbeddedConfigSource.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/TestEmbeddedConfigSource.java 2009-07-16 19:40:24 UTC (rev 1142)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/TestEmbeddedConfigSource.java 2009-07-16 20:56:43 UTC (rev 1143)
@@ -31,6 +31,7 @@
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.metamatrix.common.protocol.URLHelper;
+import com.metamatrix.common.util.JMXUtil;
import com.metamatrix.core.util.UnitTestUtil;
import com.metamatrix.dqp.service.ConfigurationService;
import com.metamatrix.dqp.service.FakeAbstractService;
@@ -53,7 +54,7 @@
URL url = buildDQPUrl(UnitTestUtil.getTestDataPath() + "/bqt/fakebqt.properties"); //$NON-NLS-1$
p.load(url.openStream());
- EmbeddedGuiceModule source = new EmbeddedGuiceModule(url, p);
+ EmbeddedGuiceModule source = new EmbeddedGuiceModule(url, p, new JMXUtil("test")); //$NON-NLS-1$
Injector injector = Guice.createInjector(source);
source.setInjector(injector);
16 years, 9 months
teiid SVN: r1142 - in trunk/client/src/main/java/com/metamatrix/common/comm/platform: socket/client and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-07-16 15:40:24 -0400 (Thu, 16 Jul 2009)
New Revision: 1142
Modified:
trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/OioOjbectChannelFactory.java
trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java
trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnectionFactory.java
trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerInstanceImpl.java
Log:
TEIID-721: all the classes in question where proxy was using thread context class loader should be using the current class loader as they will be available in the same class loader for sure.
Modified: trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-07-16 19:28:55 UTC (rev 1141)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-07-16 19:40:24 UTC (rev 1142)
@@ -219,7 +219,7 @@
p.remove(MMURL.JDBC.VDB_NAME);
p.remove(MMURL.JDBC.VDB_VERSION);
p.setProperty(MMURL.CONNECTION.AUTO_FAILOVER, Boolean.TRUE.toString());
- Admin serverAdmin = (Admin)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] { Admin.class }, new ReconnectingProxy(p));
+ Admin serverAdmin = (Admin)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] { Admin.class }, new ReconnectingProxy(p));
return serverAdmin;
}
Modified: trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/OioOjbectChannelFactory.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/OioOjbectChannelFactory.java 2009-07-16 19:28:55 UTC (rev 1141)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/OioOjbectChannelFactory.java 2009-07-16 19:40:24 UTC (rev 1142)
@@ -68,7 +68,7 @@
//The output stream must be flushed on creation in order to write some initialization data
//through the buffered stream to the input stream on the other side
outputStream.flush();
- final ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ final ClassLoader cl = this.getClass().getClassLoader();
BufferedInputStream bis = new BufferedInputStream(socket.getInputStream(), STREAM_BUFFER_SIZE);
inputStream = new ObjectDecoderInputStream(new DataInputStream(bis), cl, MAX_OBJECT_SIZE);
}
Modified: trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java 2009-07-16 19:28:55 UTC (rev 1141)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java 2009-07-16 19:40:24 UTC (rev 1142)
@@ -242,7 +242,7 @@
}
public <T> T getService(Class<T> iface) {
- return (T)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {iface}, new ServerConnectionInvocationHandler(iface));
+ return (T)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {iface}, new ServerConnectionInvocationHandler(iface));
}
public synchronized void shutdown() {
Modified: trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnectionFactory.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnectionFactory.java 2009-07-16 19:28:55 UTC (rev 1141)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnectionFactory.java 2009-07-16 19:40:24 UTC (rev 1142)
@@ -233,7 +233,7 @@
key.actual = ssii;
key.instance = instanceCount.getAndIncrement();
//create a proxied socketserverinstance that will pool itself on shutdown
- key.proxy = (SocketServerInstance)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {SocketServerInstance.class}, new ShutdownHandler(key));
+ key.proxy = (SocketServerInstance)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {SocketServerInstance.class}, new ShutdownHandler(key));
return key.proxy;
}
return ssii;
@@ -256,7 +256,7 @@
discovery = new UrlServerDiscovery();
} else {
try {
- discovery = (ServerDiscovery)ReflectionHelper.create(discoveryStrategyName, null, Thread.currentThread().getContextClassLoader());
+ discovery = (ServerDiscovery)ReflectionHelper.create(discoveryStrategyName, null, this.getClass().getClassLoader());
} catch (MetaMatrixCoreException e) {
throw new ConnectionException(e);
}
Modified: trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerInstanceImpl.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerInstanceImpl.java 2009-07-16 19:28:55 UTC (rev 1141)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerInstanceImpl.java 2009-07-16 19:40:24 UTC (rev 1142)
@@ -244,7 +244,7 @@
@Override
//## JDBC4.0-end ##
public <T> T getService(Class<T> iface) {
- return (T)Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {iface}, new RemoteInvocationHandler(iface));
+ return (T)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {iface}, new RemoteInvocationHandler(iface));
}
public class RemoteInvocationHandler implements InvocationHandler {
16 years, 9 months
teiid SVN: r1141 - trunk/build/kit-embedded/bin.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-07-16 15:28:55 -0400 (Thu, 16 Jul 2009)
New Revision: 1141
Modified:
trunk/build/kit-embedded/bin/run.bat
trunk/build/kit-embedded/bin/run.sh
trunk/build/kit-embedded/bin/shutdown.bat
trunk/build/kit-embedded/bin/shutdown.sh
Log:
TEIID-679: adding "teiid.home" property to the configuration to help with work and deploy directories.
Modified: trunk/build/kit-embedded/bin/run.bat
===================================================================
--- trunk/build/kit-embedded/bin/run.bat 2009-07-16 19:19:54 UTC (rev 1140)
+++ trunk/build/kit-embedded/bin/run.bat 2009-07-16 19:28:55 UTC (rev 1141)
@@ -55,6 +55,7 @@
)
cd %TEIID_HOME%
+set JAVA_OPTS=%JAVA_OPTS% -Dteiid.home=%TEIID_HOME%
echo ===============================================================================
echo.
Modified: trunk/build/kit-embedded/bin/run.sh
===================================================================
--- trunk/build/kit-embedded/bin/run.sh 2009-07-16 19:19:54 UTC (rev 1140)
+++ trunk/build/kit-embedded/bin/run.sh 2009-07-16 19:28:55 UTC (rev 1141)
@@ -74,6 +74,8 @@
echo "A new key with keystore generated at $KEYSTORE_FILE"
fi
+JAVA_OPTS="$JAVA_OPTS -Dteiid.home=$TEIID_HOME"
+
# Display our environment
echo "========================================================================="
echo ""
Modified: trunk/build/kit-embedded/bin/shutdown.bat
===================================================================
--- trunk/build/kit-embedded/bin/shutdown.bat 2009-07-16 19:19:54 UTC (rev 1140)
+++ trunk/build/kit-embedded/bin/shutdown.bat 2009-07-16 19:28:55 UTC (rev 1141)
@@ -47,6 +47,7 @@
rem set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
cd %TEIID_HOME%
+set JAVA_OPTS=%JAVA_OPTS% -Dteiid.home=%TEIID_HOME%
echo ===============================================================================
echo.
Modified: trunk/build/kit-embedded/bin/shutdown.sh
===================================================================
--- trunk/build/kit-embedded/bin/shutdown.sh 2009-07-16 19:19:54 UTC (rev 1140)
+++ trunk/build/kit-embedded/bin/shutdown.sh 2009-07-16 19:28:55 UTC (rev 1141)
@@ -67,6 +67,8 @@
TEIID_CLASSPATH=`cygpath --path --windows "$TEIID_CLASSPATH"`
fi
+JAVA_OPTS="$JAVA_OPTS -Dteiid.home=$TEIID_HOME"
+
# Display our environment
echo "========================================================================="
echo ""
16 years, 9 months
teiid SVN: r1140 - in trunk: build/kit-embedded and 28 other directories.
by teiid-commits@lists.jboss.org
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
16 years, 9 months