teiid SVN: r1314 - in trunk/runtime/src/main: resources/com/metamatrix/dqp/embedded and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-10 10:03:21 -0400 (Thu, 10 Sep 2009)
New Revision: 1314
Modified:
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
trunk/runtime/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties
Log:
TEIID-824
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-10 13:50:56 UTC (rev 1313)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-10 14:03:21 UTC (rev 1314)
@@ -203,7 +203,7 @@
checkDecryption(binding, ctype);
} catch(CryptoException e) {
if (!options.containsOption(AdminOptions.BINDINGS_IGNORE_DECRYPT_ERROR)) {
- throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("AdminStatus.CODE_DECRYPTION_FAILED", binding.getFullName())); //$NON-NLS-1$
+ throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.CODE_DECRYPTION_FAILED", binding.getFullName())); //$NON-NLS-1$
}
}
@@ -280,7 +280,7 @@
checkDecryption(binding, type);
} catch(CryptoException e) {
if (!options.containsOption(AdminOptions.BINDINGS_IGNORE_DECRYPT_ERROR)) {
- throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("AdminStatus.CODE_DECRYPTION_FAILED", binding.getFullName())); //$NON-NLS-1$
+ throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.CODE_DECRYPTION_FAILED", binding.getFullName())); //$NON-NLS-1$
}
}
@@ -457,7 +457,7 @@
checkDecryption(binding, type);
} catch(CryptoException e) {
if (!options.containsOption(AdminOptions.BINDINGS_IGNORE_DECRYPT_ERROR)) {
- throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("AdminStatus.CODE_DECRYPTION_FAILED", binding.getFullName())); //$NON-NLS-1$
+ throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.CODE_DECRYPTION_FAILED", binding.getFullName())); //$NON-NLS-1$
}
}
}
@@ -502,7 +502,7 @@
* @return decrypted property.
*/
String decryptProperty(String value) throws CryptoException{
- if (value != null && value.length() > 0) {
+ if (value != null && value.length() > 0 && CryptoUtil.isValueEncrypted(value)) {
return CryptoUtil.stringDecrypt(value);
}
return value;
Modified: trunk/runtime/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties 2009-09-10 13:50:56 UTC (rev 1313)
+++ trunk/runtime/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties 2009-09-10 14:03:21 UTC (rev 1314)
@@ -195,6 +195,7 @@
Admin.bindings_exceeded_limit=You have reached the MetaMatrix license limit of connector bindings, Failed to add connector bindings.
Admin.cb_doesnot_exist=The connector binding does not exist:{0}
Admin.ct_doesnot_exist=The connector type does not exist:{0}
+Admin.CODE_DECRYPTION_FAILED=Decryption of the password property failed; Check to make sure encryption libraries are correctly installed or provide a plain text password.
DQPEmbeddedManager.start_dqp=Teiid is started at time = {0}
DQPEmbeddedManager.shutdown_dqp=Teiid is shutdown at time = {0}
15 years, 4 months
teiid SVN: r1313 - trunk/build/kit-runtime/deploy.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-10 09:50:56 -0400 (Thu, 10 Sep 2009)
New Revision: 1313
Modified:
trunk/build/kit-runtime/deploy/log4j.xml
Log:
TEIID-769: Adding the supporting logging levels as comment.
Modified: trunk/build/kit-runtime/deploy/log4j.xml
===================================================================
--- trunk/build/kit-runtime/deploy/log4j.xml 2009-09-08 22:04:04 UTC (rev 1312)
+++ trunk/build/kit-runtime/deploy/log4j.xml 2009-09-10 13:50:56 UTC (rev 1313)
@@ -59,9 +59,10 @@
</appender>
-->
- <!-- ================ -->
- <!-- categories -->
- <!-- ================ -->
+ <!-- ======================================================== -->
+ <!-- Loggers -->
+ <!-- Supported logging levels DEBUG, INFO, WARN, ERROR, FATAL -->
+ <!-- ======================================================== -->
<logger name="org.jgroups">
<level value="WARN"/>
15 years, 4 months
teiid SVN: r1312 - in trunk: engine/src/main/java/org/teiid/dqp/internal/cache and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-08 18:04:04 -0400 (Tue, 08 Sep 2009)
New Revision: 1312
Modified:
trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java
trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
Log:
TEIID-763: Node not valid exception is happening because of the setTimeLimit is set to zero (0), which should be unlimited. NPE, from the JBoss cache code there is no way to avoid it, as t happens during the thread interruptions or when a node is deleted. So if this is occurring in the "remove" situations handle them appropriately, otherwise it will still fail with a meaningful message.
Modified: trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java 2009-09-08 19:58:25 UTC (rev 1311)
+++ trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java 2009-09-08 22:04:04 UTC (rev 1312)
@@ -131,7 +131,7 @@
*/
@Override
public Cache<K, V> addChild(String name) {
- Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
+ Node<K, V> node = getRootNode();
Node<K, V> childNode = node.addChild(Fqn.fromString(name));
return new JBossCache<K, V>(this.cacheStore, childNode.getFqn());
}
@@ -141,20 +141,28 @@
*/
@Override
public Cache<K, V> getChild(String name) {
- Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
+ Node<K, V> node = getRootNode();
Node<K, V> child = node.getChild(Fqn.fromString(name));
if (child != null) {
return new JBossCache<K, V>(this.cacheStore, child.getFqn());
}
return null;
}
+
+ private Node<K, V> getRootNode() {
+ Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
+ if (node == null) {
+ throw new IllegalStateException("Cache Node "+ this.rootFqn +" not found."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return node;
+ }
/**
* {@inheritDoc}
*/
@Override
public List<Cache> getChildren() {
- Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
+ Node<K, V> node = getRootNode();
Set<Node<K,V>> nodes = node.getChildren();
if (nodes.isEmpty()) {
return Collections.emptyList();
@@ -171,7 +179,7 @@
*/
@Override
public boolean removeChild(String name) {
- Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
+ Node<K, V> node = getRootNode();
return node.removeChild(Fqn.fromString(name));
}
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-09-08 19:58:25 UTC (rev 1311)
+++ trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCacheFactory.java 2009-09-08 22:04:04 UTC (rev 1312)
@@ -88,7 +88,7 @@
LRUAlgorithmConfig lru = new LRUAlgorithmConfig();
lru.setMaxNodes(config.getMaxNodes());
lru.setMaxAge(config.getMaxAgeInSeconds()*1000);
- lru.setTimeToLive(0);
+ lru.setTimeToLive(-1); // -1 no limit
evictionConfig = lru;
}
else if (config.getPolicy() == Policy.MRU) {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2009-09-08 19:58:25 UTC (rev 1311)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2009-09-08 22:04:04 UTC (rev 1312)
@@ -30,7 +30,9 @@
import com.metamatrix.cache.CacheConfiguration;
import com.metamatrix.cache.CacheFactory;
import com.metamatrix.cache.CacheConfiguration.Policy;
+import com.metamatrix.common.log.LogManager;
import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
+import com.metamatrix.dqp.util.LogConstants;
@Singleton
public class DQPContextCache {
@@ -50,7 +52,11 @@
}
public void shutdown() {
- this.cache.removeChild(this.processIdentifier);
+ try {
+ this.cache.removeChild(this.processIdentifier);
+ } catch(IllegalStateException e) {
+ LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
+ }
}
public Cache getRequestScopedCache(String request) {
@@ -60,12 +66,16 @@
}
public void removeRequestScopedCache(String request) {
- Cache processCache = this.cache.getChild(this.processIdentifier);
- if (processCache != null) {
- Cache scopeNode = processCache.getChild(Scope.REQUEST.name());
- if (scopeNode != null) {
- scopeNode.removeChild(request.toString());
+ try {
+ Cache processCache = this.cache.getChild(this.processIdentifier);
+ if (processCache != null) {
+ Cache scopeNode = processCache.getChild(Scope.REQUEST.name());
+ if (scopeNode != null) {
+ scopeNode.removeChild(request.toString());
+ }
}
+ } catch(IllegalStateException e) {
+ LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -76,12 +86,16 @@
}
public void removeServiceScopedCache(String serviceId) {
- Cache processCache = this.cache.getChild(this.processIdentifier);
- if (processCache != null) {
- Cache scopeNode = processCache.addChild(Scope.SERVICE.name());
- if (scopeNode != null) {
- scopeNode.removeChild(serviceId);
+ try {
+ Cache processCache = this.cache.getChild(this.processIdentifier);
+ if (processCache != null) {
+ Cache scopeNode = processCache.addChild(Scope.SERVICE.name());
+ if (scopeNode != null) {
+ scopeNode.removeChild(serviceId);
+ }
}
+ } catch(IllegalStateException e) {
+ LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -91,9 +105,13 @@
}
public void removeSessionScopedCache(String session) {
- Cache scopeNode = this.cache.addChild(Scope.SESSION.name());
- if (scopeNode != null) {
- scopeNode.removeChild(session);
+ try {
+ Cache scopeNode = this.cache.addChild(Scope.SESSION.name());
+ if (scopeNode != null) {
+ scopeNode.removeChild(session);
+ }
+ } catch(IllegalStateException e) {
+ LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
}
}
@@ -104,10 +122,14 @@
}
public void removeVDBScopedCache(String vdbName, String vdbVersion) {
- Cache scopeNode = this.cache.addChild(Scope.VDB.name());
- if (scopeNode != null) {
- String id = vdbName+"-"+vdbVersion; //$NON-NLS-1$
- scopeNode.removeChild(id.toUpperCase());
+ try {
+ Cache scopeNode = this.cache.addChild(Scope.VDB.name());
+ if (scopeNode != null) {
+ String id = vdbName+"-"+vdbVersion; //$NON-NLS-1$
+ scopeNode.removeChild(id.toUpperCase());
+ }
+ } catch(IllegalStateException e) {
+ LogManager.logWarning(LogConstants.CTX_DQP, e, e.getMessage());
}
}
}
15 years, 4 months
teiid SVN: r1311 - trunk/runtime/src/main/java/org/teiid/transport.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-09-08 15:58:25 -0400 (Tue, 08 Sep 2009)
New Revision: 1311
Modified:
trunk/runtime/src/main/java/org/teiid/transport/SocketListener.java
Log:
TEIID-821 marking netty socket threads as daemon
Modified: trunk/runtime/src/main/java/org/teiid/transport/SocketListener.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SocketListener.java 2009-09-08 19:08:14 UTC (rev 1310)
+++ trunk/runtime/src/main/java/org/teiid/transport/SocketListener.java 2009-09-08 19:58:25 UTC (rev 1311)
@@ -43,6 +43,7 @@
import com.metamatrix.common.util.ApplicationInfo;
import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.log.MessageLevel;
+import com.metamatrix.core.util.NamedThreadFactory;
import com.metamatrix.platform.security.api.service.SessionServiceInterface;
import com.metamatrix.platform.vm.controller.SocketListenerStats;
@@ -78,7 +79,7 @@
this.server = server;
this.workerPool = WorkerPoolFactory.newWorkerPool("SocketWorker", maxWorkers); //$NON-NLS-1$
- this.nettyPool = Executors.newCachedThreadPool();
+ this.nettyPool = Executors.newCachedThreadPool(new NamedThreadFactory("NIO")); //$NON-NLS-1$
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_SERVER, MessageLevel.DETAIL)) {
LogManager.logDetail(LogConstants.CTX_SERVER, "server = " + bindAddress + "binding to port:" + port); //$NON-NLS-1$ //$NON-NLS-2$
}
15 years, 4 months
teiid SVN: r1310 - in trunk: server/src/main/java/com/metamatrix/common/log/reader and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-09-08 15:08:14 -0400 (Tue, 08 Sep 2009)
New Revision: 1310
Added:
trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntry.java
trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntryPropertyNames.java
trunk/server/src/main/java/com/metamatrix/common/log/reader/LogReader.java
Removed:
trunk/common-internal/src/main/java/com/metamatrix/common/log/reader/
Log:
moving the log reader code to server
Copied: trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntry.java (from rev 1303, trunk/common-internal/src/main/java/com/metamatrix/common/log/reader/LogEntry.java)
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntry.java (rev 0)
+++ trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntry.java 2009-09-08 19:08:14 UTC (rev 1310)
@@ -0,0 +1,179 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.common.log.reader;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * @since 4.3
+ */
+public class LogEntry implements Serializable {
+
+
+
+ private String exception;
+ private Date date;
+ private String message;
+ private String context;
+ private int level;
+ private String hostName;
+ private String processName;
+ private String threadName;
+
+
+
+ /**
+ * The name of the System property that contains the maximum number of rows
+ * that will be returned for viewing.. This is an optional property that defaults to '2500'.
+ */
+ public static final String MAX_LOG_ROWS_RETURNED = "metamatrix.log.maxRows"; //$NON-NLS-1$
+
+
+ /**
+ * @return Returns the context.
+ * @since 4.3
+ */
+ public String getContext() {
+ return this.context;
+ }
+
+ /**
+ * @param context The context to set.
+ * @since 4.3
+ */
+ public void setContext(String context) {
+ this.context = context;
+ }
+
+ /**
+ * @return Returns the date.
+ * @since 4.3
+ */
+ public Date getDate() {
+ return this.date;
+ }
+ /**
+ * @param date The date to set.
+ * @since 4.3
+ */
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ /**
+ * @return Returns the exception.
+ * @since 4.3
+ */
+ public String getException() {
+ return this.exception;
+ }
+
+ /**
+ * @param exception The exception to set.
+ * @since 4.3
+ */
+ public void setException(String exception) {
+ this.exception = exception;
+ }
+ /**
+ * @return Returns the hostName.
+ * @since 4.3
+ */
+ public String getHostName() {
+ return this.hostName;
+ }
+ /**
+ * @param hostName The hostName to set.
+ * @since 4.3
+ */
+ public void setHostName(String hostName) {
+ this.hostName = hostName;
+ }
+
+ /**
+ * @return Returns the level.
+ * @since 4.3
+ */
+ public int getLevel() {
+ return this.level;
+ }
+
+ /**
+ * @param level The level to set.
+ * @since 4.3
+ */
+ public void setLevel(int level) {
+ this.level = level;
+ }
+
+ /**
+ * @return Returns the message.
+ * @since 4.3
+ */
+ public String getMessage() {
+ return this.message;
+ }
+ /**
+ * @param message The message to set.
+ * @since 4.3
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ /**
+ * @return Returns the processName.
+ * @since 4.3
+ */
+ public String getProcessName() {
+ return this.processName;
+ }
+
+ /**
+ * @param processName The processName to set.
+ * @since 4.3
+ */
+ public void setProcessName(String processName) {
+ this.processName = processName;
+ }
+
+ /**
+ * @return Returns the threadName.
+ * @since 4.3
+ */
+ public String getThreadName() {
+ return this.threadName;
+ }
+
+ /**
+ * @param threadName The threadName to set.
+ * @since 4.3
+ */
+ public void setThreadName(String threadName) {
+ this.threadName = threadName;
+ }
+
+
+}
Copied: trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntryPropertyNames.java (from rev 1303, trunk/common-internal/src/main/java/com/metamatrix/common/log/reader/LogEntryPropertyNames.java)
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntryPropertyNames.java (rev 0)
+++ trunk/server/src/main/java/com/metamatrix/common/log/reader/LogEntryPropertyNames.java 2009-09-08 19:08:14 UTC (rev 1310)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.common.log.reader;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+
+
+/**
+ * @since 4.3
+ */
+public class LogEntryPropertyNames implements Serializable {
+
+
+ /**
+ * The name of the System property that contains the maximum number of rows
+ * that will be returned for viewing.. This is an optional property that defaults to '2500'.
+ */
+ public static final String MAX_LOG_ROWS_RETURNED = "metamatrix.log.maxRows"; //$NON-NLS-1$
+
+ /**
+ * List of String database column names which store the
+ * log message attributes
+ */
+ public static List COLUMN_NAMES;
+
+
+ static {
+ COLUMN_NAMES = new ArrayList();
+ COLUMN_NAMES.add(ColumnName.CONTEXT);
+ COLUMN_NAMES.add(ColumnName.LEVEL);
+ COLUMN_NAMES.add(ColumnName.MESSAGE);
+ COLUMN_NAMES.add(ColumnName.EXCEPTION);
+ COLUMN_NAMES.add(ColumnName.TIMESTAMP);
+ COLUMN_NAMES.add(ColumnName.HOST);
+ COLUMN_NAMES.add(ColumnName.VM);
+ COLUMN_NAMES.add(ColumnName.THREAD);
+ COLUMN_NAMES = Collections.unmodifiableList(COLUMN_NAMES);
+
+ }
+
+
+ public static final class ColumnName {
+ public static final String TIMESTAMP = "TIMESTAMP"; //$NON-NLS-1$
+ public static final String SEQUENCE_NUMBER = "VMSEQNUM"; //$NON-NLS-1$
+ public static final String CONTEXT = "CONTEXT"; //$NON-NLS-1$
+ public static final String LEVEL = "MSGLEVEL"; //$NON-NLS-1$
+ public static final String EXCEPTION = "EXCEPTION"; //$NON-NLS-1$
+ public static final String MESSAGE = "MESSAGE"; //$NON-NLS-1$
+ public static final String HOST = "HOSTNAME"; //$NON-NLS-1$
+ public static final String VM = "VMID"; //$NON-NLS-1$
+ public static final String THREAD = "THREADNAME"; //$NON-NLS-1$
+ }
+
+
+
+}
Copied: trunk/server/src/main/java/com/metamatrix/common/log/reader/LogReader.java (from rev 1303, trunk/common-internal/src/main/java/com/metamatrix/common/log/reader/LogReader.java)
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/log/reader/LogReader.java (rev 0)
+++ trunk/server/src/main/java/com/metamatrix/common/log/reader/LogReader.java 2009-09-08 19:08:14 UTC (rev 1310)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.common.log.reader;
+
+import java.util.Date;
+import java.util.List;
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+
+/**
+ * Class that reads MetaMatrix log entries.
+ */
+public interface LogReader {
+
+
+
+ /**
+ * @see com.metamatrix.platform.admin.api.RuntimeStateAdminAPI#getLogEntries(java.util.Date, java.util.Date, java.util.List, java.util.List, int)
+ * @since 4.3
+ */
+ List getLogEntries(Date startTime,
+ Date endTime,
+ List levels,
+ List contexts,
+ int maxRows) throws MetaMatrixComponentException;
+
+
+}
+
15 years, 4 months
teiid SVN: r1309 - in trunk: runtime/src/main/java/com/metamatrix/dqp/embedded/admin and 1 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-08 12:24:15 -0400 (Tue, 08 Sep 2009)
New Revision: 1309
Modified:
trunk/client/src/main/java/org/teiid/adminapi/ConfigurationAdmin.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
trunk/server/src/main/java/com/metamatrix/admin/server/ServerAdminImpl.java
trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java
Log:
Modified: trunk/client/src/main/java/org/teiid/adminapi/ConfigurationAdmin.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/ConfigurationAdmin.java 2009-09-05 16:28:23 UTC (rev 1308)
+++ trunk/client/src/main/java/org/teiid/adminapi/ConfigurationAdmin.java 2009-09-08 16:24:15 UTC (rev 1309)
@@ -347,5 +347,14 @@
* @throws AdminException
* @since 6.1.0
*/
- void extensionModuleModified(String name) throws AdminException;
+ void extensionModuleModified(String name) throws AdminException;
+
+
+ /**
+ * Set a process level property.
+ * @param processIdentifier - identifier for the process where the property needs to be set
+ * @param propertyName - name of the property
+ * @param propertyValue - value of the property
+ */
+ void setProcessProperty(String processIdentifier, String propertyName, String propertyValue) throws AdminException;
}
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-05 16:28:23 UTC (rev 1308)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-08 16:24:15 UTC (rev 1309)
@@ -1038,5 +1038,14 @@
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
}
- }
+ }
+
+ @Override
+ public void setProcessProperty(String processIdentifier, String propertyName, String propertyValue) throws AdminException{
+ try {
+ getConfigurationService().setSystemProperty(propertyName, propertyValue);
+ } catch (MetaMatrixComponentException e) {
+ throw new AdminComponentException(e);
+ }
+ }
}
Modified: trunk/server/src/main/java/com/metamatrix/admin/server/ServerAdminImpl.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/admin/server/ServerAdminImpl.java 2009-09-05 16:28:23 UTC (rev 1308)
+++ trunk/server/src/main/java/com/metamatrix/admin/server/ServerAdminImpl.java 2009-09-08 16:24:15 UTC (rev 1309)
@@ -1036,4 +1036,9 @@
return null;
}
+ @Override
+ public void setProcessProperty(String processIdentifier,
+ String propertyName, String propertyValue) throws AdminException {
+ }
+
}
\ No newline at end of file
Modified: trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java 2009-09-05 16:28:23 UTC (rev 1308)
+++ trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java 2009-09-08 16:24:15 UTC (rev 1309)
@@ -2397,5 +2397,10 @@
public void setLogListener(EmbeddedLogger listener) throws AdminException {
}
+
+ @Override
+ public void setProcessProperty(String processIdentifier,
+ String propertyName, String propertyValue) throws AdminException {
+ }
}
\ No newline at end of file
15 years, 4 months
teiid SVN: r1308 - in trunk/connectors/connector-jdbc/src: test/java/org/teiid/connector/jdbc/sybase and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-09-05 12:28:23 -0400 (Sat, 05 Sep 2009)
New Revision: 1308
Modified:
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/SQLConversionVisitor.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java
Log:
TEIID-818 fixing the handling of null ordering in the sql conversion visitor
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/SQLConversionVisitor.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/SQLConversionVisitor.java 2009-09-04 14:36:59 UTC (rev 1307)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/SQLConversionVisitor.java 2009-09-05 16:28:23 UTC (rev 1308)
@@ -118,15 +118,15 @@
@Override
public void visit(IOrderByItem obj) {
super.visit(obj);
- if (!this.translator.supportsExplicitNullOrdering()) {
+ NullOrder nullOrder = this.translator.getDefaultNullOrder();
+ if (!this.translator.supportsExplicitNullOrdering() || nullOrder == NullOrder.LOW) {
return;
}
- NullOrder nullOrder = this.translator.getDefaultNullOrder();
if (obj.getDirection() == IOrderByItem.ASC) {
- if (nullOrder != NullOrder.LOW && nullOrder != NullOrder.FIRST) {
+ if (nullOrder != NullOrder.FIRST) {
buffer.append(" NULLS FIRST"); //$NON-NLS-1$
}
- } else if (nullOrder != NullOrder.HIGH && nullOrder != NullOrder.LAST) {
+ } else if (nullOrder == NullOrder.FIRST) {
buffer.append(" NULLS LAST"); //$NON-NLS-1$
}
}
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java 2009-09-04 14:36:59 UTC (rev 1307)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java 2009-09-05 16:28:23 UTC (rev 1308)
@@ -225,5 +225,15 @@
input,
output);
}
+
+ @Test public void testOrderByDesc() throws Exception {
+ String input = "select intnum + 1 x from bqt1.smalla order by x desc"; //$NON-NLS-1$
+ String output = "SELECT (SmallA.IntNum + 1) AS x FROM SmallA ORDER BY x DESC"; //$NON-NLS-1$
+
+ helpTestVisitor(getBQTVDB(),
+ input,
+ output);
+ }
+
}
15 years, 4 months
teiid SVN: r1307 - trunk/connectors/connector-jdbc/src/main/resources.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-04 10:36:59 -0400 (Fri, 04 Sep 2009)
New Revision: 1307
Modified:
trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
Log:
TEIID-820: adding Derby XA Connector type
Modified: trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
===================================================================
--- trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-09-02 20:30:46 UTC (rev 1306)
+++ trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-09-04 14:36:59 UTC (rev 1307)
@@ -109,6 +109,14 @@
<PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.derby.DerbySQLTranslator" PropertyType="String" IsExpert="true" IsMasked="false" />
<PropertyDefinition Name="DatabaseVersion" DisplayName="Database Version" ShortDescription="Derby Version i.e. 10.3" DefaultValue="10.1" PropertyType="String" />
</ComponentType>
+ <ComponentType Name="Apache Derby XA Network Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="org.apache.derby.jdbc.ClientXADataSource" IsRequired="true" />
+ <PropertyDefinition Name="PortNumber" DisplayName="Port Number" DefaultValue="1527" ShortDescription="" IsRequired="true" PropertyType="Integer" IsMasked="false" />
+ <PropertyDefinition Name="ServerName" DisplayName="Server Name" ShortDescription="" IsRequired="true" PropertyType="String" IsMasked="false" />
+ <PropertyDefinition Name="DatabaseName" DisplayName="Database Name" ShortDescription="" IsRequired="true" PropertyType="String" IsMasked="false" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.derby.DerbySQLTranslator" PropertyType="String" IsExpert="true" IsMasked="false" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" IsRequired="true" PropertyType="Boolean" />
+ </ComponentType>
<ComponentType Name="Teiid 6 JDBC Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbc.MMDriver" IsRequired="true" />
<PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:metamatrix:<vdbName>@mm://<host>:<port>" IsRequired="true" />
15 years, 4 months
teiid SVN: r1306 - in trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc: translator and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-02 16:30:46 -0400 (Wed, 02 Sep 2009)
New Revision: 1306
Modified:
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/oracle/OracleSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java
Log:
TEIID-818
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/oracle/OracleSQLTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/oracle/OracleSQLTranslator.java 2009-09-02 18:20:57 UTC (rev 1305)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/oracle/OracleSQLTranslator.java 2009-09-02 20:30:46 UTC (rev 1306)
@@ -407,4 +407,8 @@
public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
return OracleCapabilities.class;
}
+
+ public boolean supportsExplicitNullOrdering() {
+ return true;
+ }
}
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java 2009-09-02 18:20:57 UTC (rev 1305)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java 2009-09-02 20:30:46 UTC (rev 1306)
@@ -815,6 +815,6 @@
}
public boolean supportsExplicitNullOrdering() {
- return true;
+ return false;
}
}
15 years, 4 months