teiid SVN: r4097 - branches/7.7.x/connectors/connector-infinispan.
by teiid-commits@lists.jboss.org
Author: van.halbert
Date: 2012-05-10 15:03:30 -0400 (Thu, 10 May 2012)
New Revision: 4097
Modified:
branches/7.7.x/connectors/connector-infinispan/pom.xml
Log:
TEIID-1992 the version for logging needs to be adjusted
Modified: branches/7.7.x/connectors/connector-infinispan/pom.xml
===================================================================
--- branches/7.7.x/connectors/connector-infinispan/pom.xml 2012-05-10 18:20:25 UTC (rev 4096)
+++ branches/7.7.x/connectors/connector-infinispan/pom.xml 2012-05-10 19:03:30 UTC (rev 4097)
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
- <version>3.1.1.GA</version>
+ <version>3.1.0.GA</version>
</dependency>
<dependency>
12 years, 8 months
teiid SVN: r4096 - in trunk: build/kits/jboss-as7/modules/org/jboss/teiid/admin/main and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-05-10 14:20:25 -0400 (Thu, 10 May 2012)
New Revision: 4096
Modified:
trunk/admin/pom.xml
trunk/build/kits/jboss-as7/modules/org/jboss/teiid/admin/main/module.xml
Log:
TEIID-2038: adding missing dependency
Modified: trunk/admin/pom.xml
===================================================================
--- trunk/admin/pom.xml 2012-05-10 17:12:24 UTC (rev 4095)
+++ trunk/admin/pom.xml 2012-05-10 18:20:25 UTC (rev 4096)
@@ -32,6 +32,10 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-cli</artifactId>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-controller-client</artifactId>
+ </dependency>
</dependencies>
</project>
Modified: trunk/build/kits/jboss-as7/modules/org/jboss/teiid/admin/main/module.xml
===================================================================
--- trunk/build/kits/jboss-as7/modules/org/jboss/teiid/admin/main/module.xml 2012-05-10 17:12:24 UTC (rev 4095)
+++ trunk/build/kits/jboss-as7/modules/org/jboss/teiid/admin/main/module.xml 2012-05-10 18:20:25 UTC (rev 4096)
@@ -10,6 +10,7 @@
<module name="org.jboss.dmr" />
<module name="javax.api" />
<module name="org.jboss.as.cli"/>
+ <module name="org.jboss.as.controller-client"/>
</dependencies>
</module>
\ No newline at end of file
12 years, 8 months
teiid SVN: r4095 - trunk/jboss-integration/src/main/java/org/teiid/jboss.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-05-10 13:12:24 -0400 (Thu, 10 May 2012)
New Revision: 4095
Modified:
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
Log:
TEIID-2026: Made all the attributes writable. However since most of them or independent services with dependecies with each other, they require restart to take effect.
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2012-05-10 16:53:47 UTC (rev 4094)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2012-05-10 17:12:24 UTC (rev 4095)
@@ -44,6 +44,8 @@
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.controller.registry.AttributeAccess.Storage;
+import org.jboss.as.controller.registry.ManagementResourceRegistration;
import org.jboss.as.controller.services.path.RelativePathService;
import org.jboss.as.naming.ManagedReferenceFactory;
import org.jboss.as.naming.ServiceBasedNamingStore;
@@ -570,4 +572,10 @@
return this.vdbRepoInjector.getValue();
}
}
+
+ public static void registerReadWriteAttributes(ManagementResourceRegistration subsystem) {
+ for (int i = 0; i < attributes.length; i++) {
+ subsystem.registerReadWriteAttribute(attributes[i].getModelName(), null, AttributeWrite.INSTANCE, Storage.CONFIGURATION);
+ }
+ }
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2012-05-10 16:53:47 UTC (rev 4094)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2012-05-10 17:12:24 UTC (rev 4095)
@@ -33,8 +33,8 @@
import org.jboss.as.controller.descriptions.DescriptionProvider;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.as.controller.parsing.ExtensionParsingContext;
+import org.jboss.as.controller.registry.AttributeAccess.Storage;
import org.jboss.as.controller.registry.ManagementResourceRegistration;
-import org.jboss.as.controller.registry.AttributeAccess.Storage;
import org.jboss.dmr.ModelNode;
import org.teiid.logging.LogManager;
@@ -114,7 +114,10 @@
teiidSubsystem.registerReadOnlyAttribute(RUNTIME_VERSION, new GetRuntimeVersion(RUNTIME_VERSION), Storage.RUNTIME);
- teiidSubsystem.registerReadOnlyAttribute(ACTIVE_SESSION_COUNT, new GetActiveSessionsCount(ACTIVE_SESSION_COUNT), Storage.RUNTIME);
+ teiidSubsystem.registerReadOnlyAttribute(ACTIVE_SESSION_COUNT, new GetActiveSessionsCount(ACTIVE_SESSION_COUNT), Storage.RUNTIME);
+
+ TeiidAdd.registerReadWriteAttributes(teiidSubsystem);
+ TransportAdd.registerReadWriteAttributes(transportModel);
// teiid level admin api operation handlers
new GetTranslator().register(teiidSubsystem);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-05-10 16:53:47 UTC (rev 4094)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-05-10 17:12:24 UTC (rev 4095)
@@ -42,6 +42,7 @@
import javax.xml.stream.XMLStreamException;
import org.jboss.as.connector.metadata.xmldescriptors.ConnectorXmlDescriptor;
+import org.jboss.as.controller.AbstractWriteAttributeHandler;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.PathAddress;
@@ -141,6 +142,27 @@
}
}
+/**
+ * Since all the properties in the DQP/Buffer Manager etc needs restart, just save it to the configuration
+ * then restart will apply correctly to the buffer manager.
+ */
+class AttributeWrite extends AbstractWriteAttributeHandler<Void> {
+ static AttributeWrite INSTANCE = new AttributeWrite();
+
+ @Override
+ protected boolean applyUpdateToRuntime(OperationContext context,ModelNode operation,String attributeName,ModelNode resolvedValue,
+ ModelNode currentValue, org.jboss.as.controller.AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder)
+ throws OperationFailedException {
+ return true;
+ }
+
+ @Override
+ protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName,
+ ModelNode valueToRestore, ModelNode valueToRevert, Void handback)
+ throws OperationFailedException {
+ }
+}
+
class GetActiveSessionsCount extends TeiidOperationHandler{
protected GetActiveSessionsCount(String operationName) {
super(operationName);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2012-05-10 16:53:47 UTC (rev 4094)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2012-05-10 17:12:24 UTC (rev 4095)
@@ -42,6 +42,8 @@
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.controller.registry.ManagementResourceRegistration;
+import org.jboss.as.controller.registry.AttributeAccess.Storage;
import org.jboss.as.naming.ManagedReferenceFactory;
import org.jboss.as.naming.ServiceBasedNamingStore;
import org.jboss.as.naming.deployment.ContextNames;
@@ -297,4 +299,10 @@
return socket;
}
+
+ public static void registerReadWriteAttributes(ManagementResourceRegistration subsystem) {
+ for (int i = 0; i < attributes.length; i++) {
+ subsystem.registerReadWriteAttribute(attributes[i].getModelName(), null, AttributeWrite.INSTANCE, Storage.CONFIGURATION);
+ }
+ }
}
12 years, 8 months
teiid SVN: r4094 - branches/7.7.x/connectors/connector-infinispan.
by teiid-commits@lists.jboss.org
Author: van.halbert
Date: 2012-05-10 12:53:47 -0400 (Thu, 10 May 2012)
New Revision: 4094
Modified:
branches/7.7.x/connectors/connector-infinispan/pom.xml
Log:
TEIID-1992 this reference to hibernate search needed to also be changed
Modified: branches/7.7.x/connectors/connector-infinispan/pom.xml
===================================================================
--- branches/7.7.x/connectors/connector-infinispan/pom.xml 2012-05-10 14:41:05 UTC (rev 4093)
+++ branches/7.7.x/connectors/connector-infinispan/pom.xml 2012-05-10 16:53:47 UTC (rev 4094)
@@ -12,7 +12,7 @@
<description>This connector reads data from a Infinispan cache</description>
<properties>
<version.infinispan>5.1.2.FINAL</version.infinispan>
- <version.hibernate.search>4.1.0.CR1</version.hibernate.search>
+ <version.hibernate.search>3.1.0.GA</version.hibernate.search>
</properties>
<dependencies>
12 years, 8 months
teiid SVN: r4093 - in branches/7.7.x: client/src/test/java/org/teiid/client/util and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-05-10 10:41:05 -0400 (Thu, 10 May 2012)
New Revision: 4093
Modified:
branches/7.7.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java
branches/7.7.x/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java
branches/7.7.x/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml
Log:
TEIID-2007 adding conditional warning fix
Modified: branches/7.7.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java
===================================================================
--- branches/7.7.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java 2012-05-10 13:23:52 UTC (rev 4092)
+++ branches/7.7.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java 2012-05-10 14:41:05 UTC (rev 4093)
@@ -22,14 +22,8 @@
package org.teiid.client.util;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
+import java.io.*;
+import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -72,23 +66,27 @@
if (this.exception == null) {
Throwable t = buildException(classNames, message, stackTrace, code);
- if (t == null) {
- if (causeHolder != null) {
- this.exception = causeHolder.exception;
- }
+ if (causeHolder != null) {
+ t.initCause(causeHolder.exception);
}
- else {
- if (causeHolder != null) {
- t.initCause(causeHolder.exception);
+ this.exception = t;
+
+ if (this.exception instanceof SQLException) {
+ try {
+ int count = in.readInt();
+ for (int i = 0; i < count; i++) {
+ ExceptionHolder next = (ExceptionHolder)in.readObject();
+ if (next.exception instanceof SQLException) {
+ ((SQLException)this.exception).setNextException((SQLException) next.exception);
+ }
+ }
+ } catch (EOFException e) {
+
+ } catch (OptionalDataException e) {
+
}
- this.exception = t;
}
}
-
- if (this.exception == null) {
- this.exception = new TeiidRuntimeException(message);
- this.exception.setStackTrace(stackTrace);
- }
}
@Override
@@ -126,6 +124,22 @@
else {
out.writeObject(null);
}
+ // handle SQLException chains
+ if (exception instanceof SQLException) {
+ SQLException se = (SQLException)exception;
+ SQLException next = se.getNextException();
+ int count = 0;
+ while (next != null) {
+ count++;
+ next = next.getNextException();
+ }
+ out.writeInt(count);
+ next = se.getNextException();
+ while (next != null) {
+ out.writeObject(new ExceptionHolder(next, true));
+ next = next.getNextException();
+ }
+ }
}
public Throwable getException() {
@@ -133,30 +147,32 @@
}
private Throwable buildException(List<String> classNames, String message, StackTraceElement[] stackTrace, String code) {
- if (classNames.isEmpty()) {
- return null;
+ String originalClass = Exception.class.getName();
+
+ if (!classNames.isEmpty()) {
+ originalClass = classNames.get(0);
}
- String originalClass = classNames.get(0);
-
List<String> args = Arrays.asList(CorePlugin.Util.getString("ExceptionHolder.converted_exception", message, originalClass)); //$NON-NLS-1$
Throwable result = null;
for (String className : classNames) {
try {
result = (Throwable)ReflectionHelper.create(className, args, ExceptionHolder.class.getClassLoader());
- result.setStackTrace(stackTrace);
break;
} catch (TeiidException e1) {
//
}
}
- if (result instanceof TeiidException) {
+ if (result == null) {
+ result = new TeiidRuntimeException(args.get(0));
+ } else if (result instanceof TeiidException) {
((TeiidException)result).setCode(code);
((TeiidException)result).setOriginalType(classNames.get(0));
}
+ result.setStackTrace(stackTrace);
return result;
}
Modified: branches/7.7.x/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java
===================================================================
--- branches/7.7.x/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java 2012-05-10 13:23:52 UTC (rev 4092)
+++ branches/7.7.x/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java 2012-05-10 14:41:05 UTC (rev 4093)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
package org.teiid.client.util;
import static org.junit.Assert.*;
@@ -18,7 +40,7 @@
import org.teiid.core.util.ReflectionHelper;
import org.teiid.core.util.UnitTestUtil;
-
+@SuppressWarnings("nls")
public class TestExceptionHolder {
@SuppressWarnings("all")
@@ -72,12 +94,43 @@
assertTrue(e instanceof BadException2);
assertEquals("Remote org.teiid.client.util.TestExceptionHolder$BadException2: I have foreign exception embedded in me", e.getMessage()); //$NON-NLS-1$
- // now unknown exception is not found, so promote known SQL exception up
e = e.getCause();
+ assertTrue(e instanceof TeiidRuntimeException);
+
+ e = e.getCause();
assertTrue(e instanceof SQLException);
+
assertEquals("Remote java.sql.SQLException: something bad happended", e.getMessage()); //$NON-NLS-1$
- }
+ }
+ @Test public void testSQLExceptionChain() throws Exception {
+ ClassLoader cl = new URLClassLoader(new URL[] {UnitTestUtil.getTestDataFile("test.jar").toURI().toURL()}); //$NON-NLS-1$
+ Exception obj = (Exception)ReflectionHelper.create("test.UnknownException", null, cl); //$NON-NLS-1$
+ SQLException se = new SQLException("something bad happended");
+ se.initCause(obj); //$NON-NLS-1$
+ SQLException se1 = new SQLException("something else bad happended");
+ se1.initCause(obj); //$NON-NLS-1$
+ se.setNextException(se1);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(new ExceptionHolder(se, false)); //$NON-NLS-1$
+ oos.flush();
+
+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
+ ExceptionHolder holder = (ExceptionHolder)ois.readObject();
+ Throwable e = holder.getException();
+ assertTrue(e instanceof SQLException);
+ assertEquals("Remote java.sql.SQLException: something bad happended", e.getMessage()); //$NON-NLS-1$
+
+ assertTrue(e.getCause() instanceof TeiidRuntimeException);
+
+ e = ((SQLException)e).getNextException();
+ assertTrue(e instanceof SQLException);
+
+ assertEquals("Remote java.sql.SQLException: something else bad happended", e.getMessage()); //$NON-NLS-1$
+ }
+
@Test public void testDeserializationUnknownChildException2() throws Exception {
ClassLoader cl = new URLClassLoader(new URL[] {UnitTestUtil.getTestDataFile("test.jar").toURI().toURL()}); //$NON-NLS-1$
ArrayList<String> args = new ArrayList<String>();
@@ -93,7 +146,7 @@
ExceptionHolder holder = (ExceptionHolder)ois.readObject();
Throwable e = holder.getException();
assertTrue(e instanceof TeiidRuntimeException);
- assertEquals("Unknown Exception", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Remote test.UnknownException: Unknown Exception", e.getMessage()); //$NON-NLS-1$
}
private static class NotSerializable {
Modified: branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java
===================================================================
--- branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java 2012-05-10 13:23:52 UTC (rev 4092)
+++ branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java 2012-05-10 14:41:05 UTC (rev 4093)
@@ -30,6 +30,7 @@
import java.sql.Statement;
import java.util.List;
+import org.teiid.core.util.PropertiesUtils;
import org.teiid.language.Command;
import org.teiid.language.Literal;
import org.teiid.logging.LogConstants;
@@ -49,7 +50,8 @@
// Fields
// ===========================================================================================================================
- // Passed to constructor
+ private static final boolean ADD_EACH_WARNING = PropertiesUtils.getBooleanProperty(System.getProperties(), "org.teiid.addEachJDBCWarning", true); //$NON-NLS-1$
+ // Passed to constructor
protected Connection connection;
protected ExecutionContext context;
protected JDBCExecutionFactory executionFactory;
@@ -190,15 +192,23 @@
public void addStatementWarnings() throws SQLException {
SQLWarning warning = this.statement.getWarnings();
- while (warning != null) {
- SQLWarning toAdd = warning;
- warning = toAdd.getNextWarning();
- toAdd.setNextException(null);
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestIdentifier() + " Warning: ", warning); //$NON-NLS-1$
- }
- context.addWarning(toAdd);
- }
+ if (ADD_EACH_WARNING) {
+ while (warning != null) {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestIdentifier() + " Warning: ", warning); //$NON-NLS-1$
+ }
+ context.addWarning(warning);
+ warning = warning.getNextWarning();
+ }
+ } else if (warning != null) {
+ context.addWarning(warning);
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) {
+ while (warning != null) {
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestIdentifier() + " Warning: ", warning); //$NON-NLS-1$
+ warning = warning.getNextWarning();
+ }
+ }
+ }
this.statement.clearWarnings();
}
}
Modified: branches/7.7.x/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml
===================================================================
--- branches/7.7.x/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml 2012-05-10 13:23:52 UTC (rev 4092)
+++ branches/7.7.x/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml 2012-05-10 14:41:05 UTC (rev 4093)
@@ -45,5 +45,11 @@
Set to true to compare strings as if PAD SPACE collation is being used, that is strings are effectively right padded to the same length for comparison. If this property is set, it is not necessary to use the trimStrings translator option.
</para>
</listitem>
+ <listitem>
+ <para><emphasis>org.teiid.addEachJDBCWarning</emphasis> - defaults to true.
+ Set to false to add only the Warning root. This should be used if you are using a socket connection and your JDBC sources produce numerous warnings. See also issue <ulink url="https://issues.jboss.org/browse/TEIID-2007">TEIID-2007</ulink>.
+ </para>
+ <note><para>For Teiid 8.x this property no longer exists and the default behavior is to add only the Warning root.</para></note>
+ </listitem>
</itemizedlist>
</appendix>
\ No newline at end of file
12 years, 8 months
teiid SVN: r4092 - branches/7.7.x/connectors/translator-object.
by teiid-commits@lists.jboss.org
Author: van.halbert
Date: 2012-05-10 09:23:52 -0400 (Thu, 10 May 2012)
New Revision: 4092
Modified:
branches/7.7.x/connectors/translator-object/pom.xml
Log:
TEIID-1992 needed to change the hibernate search version for product dependency
Modified: branches/7.7.x/connectors/translator-object/pom.xml
===================================================================
--- branches/7.7.x/connectors/translator-object/pom.xml 2012-05-10 12:34:17 UTC (rev 4091)
+++ branches/7.7.x/connectors/translator-object/pom.xml 2012-05-10 13:23:52 UTC (rev 4092)
@@ -12,7 +12,7 @@
<description>This is the translator for Object(s)</description>
<properties>
<version.infinispan>5.1.2.FINAL</version.infinispan>
- <version.hibernate.search>4.1.0.CR1</version.hibernate.search>
+ <version.hibernate.search>3.1.1.GA</version.hibernate.search>
</properties>
<dependencies>
12 years, 8 months
teiid SVN: r4091 - branches/7.7.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-05-10 08:34:17 -0400 (Thu, 10 May 2012)
New Revision: 4091
Modified:
branches/7.7.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
Log:
TEIID-2028 fix for npe
Modified: branches/7.7.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- branches/7.7.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2012-05-10 12:31:45 UTC (rev 4090)
+++ branches/7.7.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2012-05-10 12:34:17 UTC (rev 4091)
@@ -298,7 +298,7 @@
}
public void stop(Object object) {
- if (!Proxy.isProxyClass(object.getClass())) {
+ if (object == null || !Proxy.isProxyClass(object.getClass())) {
return;
}
ReplicatedInvocationHandler<?> handler = (ReplicatedInvocationHandler<?>) Proxy.getInvocationHandler(object);
12 years, 8 months
teiid SVN: r4090 - in branches/7.7.x/engine/src: main/java/org/teiid/query/optimizer/relational and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-05-10 08:31:45 -0400 (Thu, 10 May 2012)
New Revision: 4090
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java
branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java
Log:
TEIID-1960 fix for multi-source project literals
Modified: branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java 2012-05-10 12:31:04 UTC (rev 4089)
+++ branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java 2012-05-10 12:31:45 UTC (rev 4090)
@@ -126,6 +126,9 @@
String modelName = accessNode.getModelName();
if(!this.multiSourceModels.contains(modelName)) {
+ if (!accessNode.isShouldEvaluate()) {
+ accessNode.minimizeProject(accessNode.getCommand());
+ }
return accessNode;
}
@@ -283,5 +286,11 @@
return command;
}
+
+ @Override
+ protected boolean minimizeProject() {
+ //running minimize twice is not allowed as the original command is modified
+ return false;
+ }
}
Modified: branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2012-05-10 12:31:04 UTC (rev 4089)
+++ branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2012-05-10 12:31:45 UTC (rev 4090)
@@ -328,7 +328,7 @@
}
}
aNode.setCommand(command);
- if (!aNode.isShouldEvaluate()) {
+ if (minimizeProject() && !aNode.isShouldEvaluate()) {
aNode.minimizeProject(command);
}
setRoutingName(aNode, node);
@@ -578,5 +578,9 @@
throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0009")); //$NON-NLS-1$
}
}
+
+ protected boolean minimizeProject() {
+ return true;
+ }
}
Modified: branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java
===================================================================
--- branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java 2012-05-10 12:31:04 UTC (rev 4089)
+++ branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java 2012-05-10 12:31:45 UTC (rev 4090)
@@ -234,6 +234,23 @@
helpTestMultiSourcePlan(metadata, userSql, multiModel, sources, dataMgr, expected, RealMetadataFactory.exampleMultiBindingVDB());
}
+ @Test public void testMultiReplacementWithProjectConstantLimit() throws Exception {
+ final QueryMetadataInterface metadata = RealMetadataFactory.exampleMultiBinding();
+ final String userSql = "SELECT a, b, source_name || a, '1' FROM MultiModel.Phys"; //$NON-NLS-1$
+ final String multiModel = "MultiModel"; //$NON-NLS-1$
+ final int sources = 2;
+ final List<?>[] expected = new List<?>[] {
+ Arrays.asList("x", "z", "ax", "1"),
+ };
+ final HardcodedDataManager dataMgr = new HardcodedDataManager();
+ dataMgr.addData("SELECT g_0.a, g_0.b, concat('a', g_0.a) FROM MultiModel.Phys AS g_0", //$NON-NLS-1$
+ new List<?>[] {
+ Arrays.asList("x", "z", "ax")}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ dataMgr.addData("SELECT g_0.a, g_0.b, concat('b', g_0.a) FROM MultiModel.Phys AS g_0", //$NON-NLS-1$
+ new List<?>[] {});
+ helpTestMultiSourcePlan(metadata, userSql, multiModel, sources, dataMgr, expected, RealMetadataFactory.exampleMultiBindingVDB());
+ }
+
@Test public void testMultiDependentJoin() throws Exception {
QueryMetadataInterface metadata = RealMetadataFactory.exampleMultiBinding();
12 years, 8 months
teiid SVN: r4089 - trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-05-10 08:31:04 -0400 (Thu, 10 May 2012)
New Revision: 4089
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java
Log:
TEIID-1960 ensuring that minimize is run against non-multisource model access nodes
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java 2012-05-10 12:12:51 UTC (rev 4088)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java 2012-05-10 12:31:04 UTC (rev 4089)
@@ -125,6 +125,9 @@
String modelName = accessNode.getModelName();
if(!this.multiSourceModels.contains(modelName)) {
+ if (!accessNode.isShouldEvaluate()) {
+ accessNode.minimizeProject(accessNode.getCommand());
+ }
return accessNode;
}
12 years, 8 months
teiid SVN: r4088 - trunk/engine/src/main/java/org/teiid/dqp/internal/process.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-05-10 08:12:51 -0400 (Thu, 10 May 2012)
New Revision: 4088
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java
Log:
TEIID-2037 ensuring a clean security context for teiid threads
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java 2012-05-10 03:02:40 UTC (rev 4087)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java 2012-05-10 12:12:51 UTC (rev 4088)
@@ -115,6 +115,10 @@
@Override
public void run() {
+ if (workContext.getSecurityHelper() != null) {
+ //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated
+ workContext.getSecurityHelper().clearSecurityContext();
+ }
workContext.runInContext(r);
}
12 years, 8 months