teiid SVN: r3693 - in branches/7.6.x/connectors/translator-jdbc/src: main/java/org/teiid/translator/jdbc/oracle and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 15:25:10 -0500 (Tue, 22 Nov 2011)
New Revision: 3693
Modified:
branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
branches/7.6.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
Log:
TEIID-669 correcting parameter logic and ensuring a better interaction with the oracle native logic
Modified: branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
===================================================================
--- branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2011-11-22 20:00:47 UTC (rev 3692)
+++ branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2011-11-22 20:25:10 UTC (rev 3693)
@@ -211,9 +211,9 @@
if (obj.getArguments().get(i).getDirection() != Direction.IN) {
throw new IllegalArgumentException(JDBCPlugin.Util.getString("SQLConversionVisitor.not_in_parameter", i+1)); //$NON-NLS-1$
}
- visit(obj.getArguments().get(i));
+ buffer.append('?');
if (this.prepared) {
- this.preparedValues.add(obj.getArguments());
+ this.preparedValues = obj.getArguments();
}
}
}
Modified: branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
--- branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2011-11-22 20:00:47 UTC (rev 3692)
+++ branches/7.6.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2011-11-22 20:25:10 UTC (rev 3693)
@@ -70,6 +70,7 @@
import org.teiid.translator.jdbc.JDBCExecutionFactory;
import org.teiid.translator.jdbc.JDBCPlugin;
import org.teiid.translator.jdbc.LocateFunctionModifier;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
import org.teiid.translator.jdbc.TranslatedCommand;
@@ -606,8 +607,8 @@
public List<?> translate(LanguageObject obj, ExecutionContext context) {
if (oracleSuppliedDriver && obj instanceof Call) {
Call call = (Call)obj;
- //oracle returns the resultset as a parameter
- if (call.getReturnType() == null) {
+ if (call.getReturnType() == null && call.getMetadataObject() != null && call.getMetadataObject().getProperties().get(SQLConversionVisitor.TEIID_NATIVE_QUERY) == null) {
+ //oracle returns the resultset as a parameter
call.setReturnType(RefCursorType.class);
}
}
Modified: branches/7.6.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- branches/7.6.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-11-22 20:00:47 UTC (rev 3692)
+++ branches/7.6.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-11-22 20:25:10 UTC (rev 3693)
@@ -27,6 +27,7 @@
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
+import java.sql.Types;
import java.util.Arrays;
import java.util.List;
@@ -875,11 +876,30 @@
@Test public void testNativeQueryProc() throws Exception {
String input = "call proc(2)"; //$NON-NLS-1$
- String output = "select x from y where z = 2"; //$NON-NLS-1$
+ String output = "select x from y where z = ?"; //$NON-NLS-1$
QueryMetadataInterface metadata = getOracleSpecificMetadata();
helpTestVisitor(metadata, input, EMPTY_CONTEXT, null, output);
}
+
+ @Test public void testNativeQueryProcPreparedExecution() throws Exception {
+ CommandBuilder commandBuilder = new CommandBuilder(getOracleSpecificMetadata());
+ Command command = commandBuilder.getCommand("call proc(2)");
+ Connection connection = Mockito.mock(Connection.class);
+ CallableStatement cs = Mockito.mock(CallableStatement.class);
+ Mockito.stub(cs.getUpdateCount()).toReturn(-1);
+ ResultSet rs = Mockito.mock(ResultSet.class);
+ Mockito.stub(cs.getObject(1)).toReturn(rs);
+ Mockito.stub(cs.getInt(3)).toReturn(4);
+ Mockito.stub(connection.prepareCall("select x from y where z = ?")).toReturn(cs); //$NON-NLS-1$
+ OracleExecutionFactory ef = new OracleExecutionFactory();
+
+ JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class), ef);
+ procedureExecution.execute();
+ Mockito.verify(cs, Mockito.never()).registerOutParameter(1, OracleExecutionFactory.CURSOR_TYPE);
+ Mockito.verify(cs, Mockito.never()).getObject(1);
+ Mockito.verify(cs, Mockito.times(1)).setObject(1, 2, Types.INTEGER);
+ }
}
13 years, 1 month
teiid SVN: r3692 - in branches/7.6.x/runtime/src: test/java/org/teiid/transport and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-11-22 15:00:47 -0500 (Tue, 22 Nov 2011)
New Revision: 3692
Modified:
branches/7.6.x/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
branches/7.6.x/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
Log:
TEIID-1849: Jboss beans framework in the presence of the "get" method it will look for same signature based "set" method. In the absence of "get" method, it will use the "set" method signature. Code had mixed set of in parameter in "set" and return on "get".
Modified: branches/7.6.x/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
===================================================================
--- branches/7.6.x/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java 2011-11-22 18:13:38 UTC (rev 3691)
+++ branches/7.6.x/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java 2011-11-22 20:00:47 UTC (rev 3692)
@@ -151,7 +151,7 @@
this.enabledCipherSuites = enabledCipherSuites.split(","); //$NON-NLS-1$
}
- public String[] getEnabledCipherSuites() {
+ public String[] getEnabledCipherSuitesAsArray() {
return enabledCipherSuites;
}
}
Modified: branches/7.6.x/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
===================================================================
--- branches/7.6.x/runtime/src/test/java/org/teiid/transport/TestCommSockets.java 2011-11-22 18:13:38 UTC (rev 3691)
+++ branches/7.6.x/runtime/src/test/java/org/teiid/transport/TestCommSockets.java 2011-11-22 20:00:47 UTC (rev 3692)
@@ -259,7 +259,7 @@
@Test public void testEnableCipherSuites() throws Exception {
SSLConfiguration config = new SSLConfiguration();
config.setEnabledCipherSuites("x,y,z");
- assertArrayEquals(new String[] {"x","y","z"}, config.getEnabledCipherSuites());
+ assertArrayEquals(new String[] {"x","y","z"}, config.getEnabledCipherSuitesAsArray());
}
}
13 years, 1 month
teiid SVN: r3691 - trunk/build/kits/jboss-container.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 13:13:38 -0500 (Tue, 22 Nov 2011)
New Revision: 3691
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
Log:
TEIID-1022 adding a release note
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-22 18:10:52 UTC (rev 3690)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-22 18:13:38 UTC (rev 3691)
@@ -38,6 +38,7 @@
<h4>from 7.6</h4>
<ul>
<li>TRANSLATE/HAS CRITERIA has been removed. INSTEAD OF trigger actions should be used instead. ROWS_UPDATED, INPUTS, and INPUT are no longer procedure reserved words.
+ <li>7.6 or earlier VDBs with table cardinalities set the old unknown value 0 will now report that value as -1 via the metadata API or SYS.TABLES.
</ul>
<h4>from 7.5</h4>
13 years, 1 month
teiid SVN: r3690 - in trunk: engine/src/main/java/org/teiid/query/metadata and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 13:10:52 -0500 (Tue, 22 Nov 2011)
New Revision: 3690
Modified:
trunk/api/src/main/java/org/teiid/metadata/Table.java
trunk/engine/src/main/java/org/teiid/query/metadata/QueryMetadataInterface.java
trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected
trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
Log:
TEIID-1022 updating indexing so that -1 can be used as a proper default cardinality
Modified: trunk/api/src/main/java/org/teiid/metadata/Table.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/Table.java 2011-11-22 18:01:23 UTC (rev 3689)
+++ trunk/api/src/main/java/org/teiid/metadata/Table.java 2011-11-22 18:10:52 UTC (rev 3690)
@@ -51,7 +51,7 @@
DELETE
}
- private int cardinality;
+ private int cardinality = -1;
private Type tableType;
private boolean isVirtual;
private boolean isSystem;
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/QueryMetadataInterface.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/QueryMetadataInterface.java 2011-11-22 18:01:23 UTC (rev 3689)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/QueryMetadataInterface.java 2011-11-22 18:10:52 UTC (rev 3690)
@@ -44,7 +44,7 @@
/**
* Unknown cardinality.
*/
- int UNKNOWN_CARDINALITY = 0;
+ int UNKNOWN_CARDINALITY = -1;
/**
* Get the metadata-implementation identifier object for the given element name.
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2011-11-22 18:01:23 UTC (rev 3689)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2011-11-22 18:10:52 UTC (rev 3690)
@@ -31,16 +31,7 @@
import org.teiid.core.util.Assertion;
import org.teiid.internal.core.index.EntryResult;
import org.teiid.internal.core.index.IIndexConstants;
-import org.teiid.metadata.AbstractMetadataRecord;
-import org.teiid.metadata.Column;
-import org.teiid.metadata.ColumnSet;
-import org.teiid.metadata.Datatype;
-import org.teiid.metadata.ForeignKey;
-import org.teiid.metadata.KeyRecord;
-import org.teiid.metadata.Procedure;
-import org.teiid.metadata.ProcedureParameter;
-import org.teiid.metadata.Schema;
-import org.teiid.metadata.Table;
+import org.teiid.metadata.*;
import org.teiid.metadata.BaseColumn.NullType;
import org.teiid.metadata.Column.SearchType;
import org.teiid.metadata.Datatype.Variety;
@@ -125,6 +116,8 @@
* @since 5.0
*/
public static final int PROCEDURE_UPDATE_COUNT_VERSION = 9;
+
+ public static final int NONZERO_UNKNOWN_CARDINALITY = 10;
/**
* The version number that is encoded with all newly created index records
@@ -397,7 +390,11 @@
tokens.get(tokenIndex++), tokens.get(tokenIndex++));
// The next token is the cardinality
- table.setCardinality( Integer.parseInt(tokens.get(tokenIndex++)) );
+ int cardinality = Integer.parseInt(tokens.get(tokenIndex++));
+ if (indexVersion < NONZERO_UNKNOWN_CARDINALITY && cardinality == 0) {
+ cardinality = -1;
+ }
+ table.setCardinality(cardinality);
// The next token is the tableType
table.setTableType(Table.Type.values()[Integer.parseInt(tokens.get(tokenIndex++))]);
Modified: trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected 2011-11-22 18:01:23 UTC (rev 3689)
+++ trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected 2011-11-22 18:10:52 UTC (rev 3690)
@@ -1,36 +1,36 @@
string string string string string boolean boolean string integer string boolean boolean integer
VDBName SchemaName Name Type NameInSource IsPhysical SupportsUpdates UID Cardinality Description IsSystem IsMaterialized OID
-parts SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 0 <null> true false 8
-parts SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 0 <null> true false 9
-parts SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 0 <null> true false 10
-parts SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 0 <null> true false 11
-parts SYSADMIN MatViews Table <null> true false mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 0 <null> true false 6
+parts SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 -1 <null> true false 8
+parts SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 -1 <null> true false 9
+parts SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 -1 <null> true false 10
+parts SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 -1 <null> true false 11
+parts SYSADMIN MatViews Table <null> true false mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 -1 <null> true false 6
parts PartsSupplier PARTSSUPPLIER.PARTS Table PARTS true true mmuuid:f6276601-73fe-1edc-a81c-ecf397b10590 16 <null> false false 1
parts PartsSupplier PARTSSUPPLIER.SHIP_VIA Table SHIP_VIA true true mmuuid:0f4e9b80-73ff-1edc-a81c-ecf397b10590 4 <null> false false 2
parts PartsSupplier PARTSSUPPLIER.STATUS Table STATUS true true mmuuid:1f297200-73ff-1edc-a81c-ecf397b10590 3 <null> false false 3
parts PartsSupplier PARTSSUPPLIER.SUPPLIER Table SUPPLIER true true mmuuid:2c371ec0-73ff-1edc-a81c-ecf397b10590 16 <null> false false 5
parts PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS Table SUPPLIER_PARTS true true mmuuid:3deafb00-73ff-1edc-a81c-ecf397b10590 227 <null> false false 4
-parts SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 0 <null> true false 12
-parts SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 0 <null> true false 13
-parts SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 0 <null> true false 14
-parts SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 0 <null> true false 15
-parts SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 0 <null> true false 16
-parts SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 0 <null> true false 17
-parts SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 0 <null> true false 7
-parts SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 0 <null> true false 18
-parts pg_catalog matpg_datatype Table <null> false false mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 0 <null> true true 31
-parts pg_catalog matpg_relatt Table <null> false false mmuid:8c0714d6-1c72-40b4-8528-3b2c63059107 0 <null> true true 30
-parts pg_catalog pg_am Table <null> false false mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 0 <null> true false 24
-parts pg_catalog pg_attrdef Table <null> false false mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf 0 <null> true false 27
-parts pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb 0 <null> true true 21
-parts pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 0 <null> true true 20
-parts pg_catalog pg_database Table <null> false false mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 0 <null> true false 28
-parts pg_catalog pg_index Table <null> false false mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 0 <null> true true 23
-parts pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 0 <null> true false 19
-parts pg_catalog pg_proc Table <null> false false mmuid:f20c9489-10ca-4596-8a37-24218b67f764 0 <null> true true 25
-parts pg_catalog pg_trigger Table <null> false false mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a 0 <null> true false 26
-parts pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a 0 <null> true false 22
-parts pg_catalog pg_user Table <null> false false mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb 0 <null> true false 29
+parts SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 -1 <null> true false 12
+parts SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 -1 <null> true false 13
+parts SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 -1 <null> true false 14
+parts SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 -1 <null> true false 15
+parts SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 -1 <null> true false 16
+parts SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 -1 <null> true false 17
+parts SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 -1 <null> true false 7
+parts SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 -1 <null> true false 18
+parts pg_catalog matpg_datatype Table <null> false false mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 -1 <null> true true 31
+parts pg_catalog matpg_relatt Table <null> false false mmuid:8c0714d6-1c72-40b4-8528-3b2c63059107 -1 <null> true true 30
+parts pg_catalog pg_am Table <null> false false mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 -1 <null> true false 24
+parts pg_catalog pg_attrdef Table <null> false false mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf -1 <null> true false 27
+parts pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb -1 <null> true true 21
+parts pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 -1 <null> true true 20
+parts pg_catalog pg_database Table <null> false false mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 -1 <null> true false 28
+parts pg_catalog pg_index Table <null> false false mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 -1 <null> true true 23
+parts pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 -1 <null> true false 19
+parts pg_catalog pg_proc Table <null> false false mmuid:f20c9489-10ca-4596-8a37-24218b67f764 -1 <null> true true 25
+parts pg_catalog pg_trigger Table <null> false false mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a -1 <null> true false 26
+parts pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a -1 <null> true false 22
+parts pg_catalog pg_user Table <null> false false mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb -1 <null> true false 29
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 parts java.lang.String VDBName string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected 2011-11-22 18:01:23 UTC (rev 3689)
+++ trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected 2011-11-22 18:10:52 UTC (rev 3690)
@@ -1,36 +1,36 @@
varchar varchar varchar varchar varchar bool bool varchar int4 varchar bool bool int4
vdbname schemaname name type nameinsource isphysical supportsupdates uid cardinality description issystem ismaterialized oid
-parts SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 0 <null> true false 8
-parts SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 0 <null> true false 9
-parts SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 0 <null> true false 10
-parts SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 0 <null> true false 11
-parts SYSADMIN MatViews Table <null> true false mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 0 <null> true false 6
+parts SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 -1 <null> true false 8
+parts SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 -1 <null> true false 9
+parts SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 -1 <null> true false 10
+parts SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 -1 <null> true false 11
+parts SYSADMIN MatViews Table <null> true false mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 -1 <null> true false 6
parts PartsSupplier PARTSSUPPLIER.PARTS Table PARTS true true mmuuid:f6276601-73fe-1edc-a81c-ecf397b10590 16 <null> false false 1
parts PartsSupplier PARTSSUPPLIER.SHIP_VIA Table SHIP_VIA true true mmuuid:0f4e9b80-73ff-1edc-a81c-ecf397b10590 4 <null> false false 2
parts PartsSupplier PARTSSUPPLIER.STATUS Table STATUS true true mmuuid:1f297200-73ff-1edc-a81c-ecf397b10590 3 <null> false false 3
parts PartsSupplier PARTSSUPPLIER.SUPPLIER Table SUPPLIER true true mmuuid:2c371ec0-73ff-1edc-a81c-ecf397b10590 16 <null> false false 5
parts PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS Table SUPPLIER_PARTS true true mmuuid:3deafb00-73ff-1edc-a81c-ecf397b10590 227 <null> false false 4
-parts SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 0 <null> true false 12
-parts SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 0 <null> true false 13
-parts SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 0 <null> true false 14
-parts SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 0 <null> true false 15
-parts SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 0 <null> true false 16
-parts SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 0 <null> true false 17
-parts SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 0 <null> true false 7
-parts SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 0 <null> true false 18
-parts pg_catalog matpg_datatype Table <null> false false mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 0 <null> true true 31
-parts pg_catalog matpg_relatt Table <null> false false mmuid:8c0714d6-1c72-40b4-8528-3b2c63059107 0 <null> true true 30
-parts pg_catalog pg_am Table <null> false false mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 0 <null> true false 24
-parts pg_catalog pg_attrdef Table <null> false false mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf 0 <null> true false 27
-parts pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb 0 <null> true true 21
-parts pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 0 <null> true true 20
-parts pg_catalog pg_database Table <null> false false mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 0 <null> true false 28
-parts pg_catalog pg_index Table <null> false false mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 0 <null> true true 23
-parts pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 0 <null> true false 19
-parts pg_catalog pg_proc Table <null> false false mmuid:f20c9489-10ca-4596-8a37-24218b67f764 0 <null> true true 25
-parts pg_catalog pg_trigger Table <null> false false mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a 0 <null> true false 26
-parts pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a 0 <null> true false 22
-parts pg_catalog pg_user Table <null> false false mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb 0 <null> true false 29
+parts SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 -1 <null> true false 12
+parts SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 -1 <null> true false 13
+parts SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 -1 <null> true false 14
+parts SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 -1 <null> true false 15
+parts SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 -1 <null> true false 16
+parts SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 -1 <null> true false 17
+parts SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 -1 <null> true false 7
+parts SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 -1 <null> true false 18
+parts pg_catalog matpg_datatype Table <null> false false mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 -1 <null> true true 31
+parts pg_catalog matpg_relatt Table <null> false false mmuid:8c0714d6-1c72-40b4-8528-3b2c63059107 -1 <null> true true 30
+parts pg_catalog pg_am Table <null> false false mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 -1 <null> true false 24
+parts pg_catalog pg_attrdef Table <null> false false mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf -1 <null> true false 27
+parts pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb -1 <null> true true 21
+parts pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 -1 <null> true true 20
+parts pg_catalog pg_database Table <null> false false mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 -1 <null> true false 28
+parts pg_catalog pg_index Table <null> false false mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 -1 <null> true true 23
+parts pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 -1 <null> true false 19
+parts pg_catalog pg_proc Table <null> false false mmuid:f20c9489-10ca-4596-8a37-24218b67f764 -1 <null> true true 25
+parts pg_catalog pg_trigger Table <null> false false mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a -1 <null> true false 26
+parts pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a -1 <null> true false 22
+parts pg_catalog pg_user Table <null> false false mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb -1 <null> true false 29
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
vdbname 12 java.lang.String vdbname varchar 2147483647 0 0 false true false false 1 false true false true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected 2011-11-22 18:01:23 UTC (rev 3689)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected 2011-11-22 18:10:52 UTC (rev 3690)
@@ -1,36 +1,36 @@
string string string string string boolean boolean string integer string boolean boolean integer
VDBName SchemaName Name Type NameInSource IsPhysical SupportsUpdates UID Cardinality Description IsSystem IsMaterialized OID
-PartsSupplier SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 0 <null> true false 8
-PartsSupplier SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 0 <null> true false 9
-PartsSupplier SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 0 <null> true false 10
-PartsSupplier SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 0 <null> true false 11
-PartsSupplier SYSADMIN MatViews Table <null> true false mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 0 <null> true false 6
+PartsSupplier SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 -1 <null> true false 8
+PartsSupplier SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 -1 <null> true false 9
+PartsSupplier SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 -1 <null> true false 10
+PartsSupplier SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 -1 <null> true false 11
+PartsSupplier SYSADMIN MatViews Table <null> true false mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 -1 <null> true false 6
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS Table PARTS true true mmuuid:f6276601-73fe-1edc-a81c-ecf397b10590 16 <null> false false 1
PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA Table SHIP_VIA true true mmuuid:0f4e9b80-73ff-1edc-a81c-ecf397b10590 4 <null> false false 2
PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS Table STATUS true true mmuuid:1f297200-73ff-1edc-a81c-ecf397b10590 3 <null> false false 3
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER Table SUPPLIER true true mmuuid:2c371ec0-73ff-1edc-a81c-ecf397b10590 16 <null> false false 5
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS Table SUPPLIER_PARTS true true mmuuid:3deafb00-73ff-1edc-a81c-ecf397b10590 227 <null> false false 4
-PartsSupplier SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 0 <null> true false 12
-PartsSupplier SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 0 <null> true false 13
-PartsSupplier SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 0 <null> true false 14
-PartsSupplier SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 0 <null> true false 15
-PartsSupplier SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 0 <null> true false 16
-PartsSupplier SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 0 <null> true false 17
-PartsSupplier SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 0 <null> true false 7
-PartsSupplier SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 0 <null> true false 18
-PartsSupplier pg_catalog matpg_datatype Table <null> false false mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 0 <null> true true 31
-PartsSupplier pg_catalog matpg_relatt Table <null> false false mmuid:8c0714d6-1c72-40b4-8528-3b2c63059107 0 <null> true true 30
-PartsSupplier pg_catalog pg_am Table <null> false false mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 0 <null> true false 24
-PartsSupplier pg_catalog pg_attrdef Table <null> false false mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf 0 <null> true false 27
-PartsSupplier pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb 0 <null> true true 21
-PartsSupplier pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 0 <null> true true 20
-PartsSupplier pg_catalog pg_database Table <null> false false mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 0 <null> true false 28
-PartsSupplier pg_catalog pg_index Table <null> false false mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 0 <null> true true 23
-PartsSupplier pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 0 <null> true false 19
-PartsSupplier pg_catalog pg_proc Table <null> false false mmuid:f20c9489-10ca-4596-8a37-24218b67f764 0 <null> true true 25
-PartsSupplier pg_catalog pg_trigger Table <null> false false mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a 0 <null> true false 26
-PartsSupplier pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a 0 <null> true false 22
-PartsSupplier pg_catalog pg_user Table <null> false false mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb 0 <null> true false 29
+PartsSupplier SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 -1 <null> true false 12
+PartsSupplier SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 -1 <null> true false 13
+PartsSupplier SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 -1 <null> true false 14
+PartsSupplier SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 -1 <null> true false 15
+PartsSupplier SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 -1 <null> true false 16
+PartsSupplier SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 -1 <null> true false 17
+PartsSupplier SYSADMIN VDBResources Table <null> true false mmuuid:1785804d-beaf-4831-9531-e59164fedd49 -1 <null> true false 7
+PartsSupplier SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 -1 <null> true false 18
+PartsSupplier pg_catalog matpg_datatype Table <null> false false mmuid:17448311-6679-4dfd-aeb6-4aabbd894729 -1 <null> true true 31
+PartsSupplier pg_catalog matpg_relatt Table <null> false false mmuid:8c0714d6-1c72-40b4-8528-3b2c63059107 -1 <null> true true 30
+PartsSupplier pg_catalog pg_am Table <null> false false mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 -1 <null> true false 24
+PartsSupplier pg_catalog pg_attrdef Table <null> false false mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf -1 <null> true false 27
+PartsSupplier pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb -1 <null> true true 21
+PartsSupplier pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 -1 <null> true true 20
+PartsSupplier pg_catalog pg_database Table <null> false false mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 -1 <null> true false 28
+PartsSupplier pg_catalog pg_index Table <null> false false mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 -1 <null> true true 23
+PartsSupplier pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 -1 <null> true false 19
+PartsSupplier pg_catalog pg_proc Table <null> false false mmuid:f20c9489-10ca-4596-8a37-24218b67f764 -1 <null> true true 25
+PartsSupplier pg_catalog pg_trigger Table <null> false false mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a -1 <null> true false 26
+PartsSupplier pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a -1 <null> true false 22
+PartsSupplier pg_catalog pg_user Table <null> false false mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb -1 <null> true false 29
Row Count : 31
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Tables 255 255 0 false true false true 1 false true true true
13 years, 1 month
teiid SVN: r3689 - in trunk/engine/src: main/java/org/teiid/query/sql/proc and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 13:01:23 -0500 (Tue, 22 Nov 2011)
New Revision: 3689
Modified:
trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
trunk/engine/src/main/java/org/teiid/query/sql/proc/CreateProcedureCommand.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java
trunk/engine/src/test/java/org/teiid/query/sql/proc/TestCreateUpdateProcedureCommand.java
Log:
TEIID-1842 completely removing the concept of an update procedure
Modified: trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2011-11-22 16:58:35 UTC (rev 3688)
+++ trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2011-11-22 18:01:23 UTC (rev 3689)
@@ -2652,7 +2652,6 @@
Block b = new Block();
b.addStatement(new CommandStatement(newUpdate));
CreateProcedureCommand cupc = new CreateProcedureCommand();
- cupc.setUpdateProcedure(false);
Block parent = new Block();
parent.setAtomic(true);
ElementSymbol rowsUpdated = new ElementSymbol(ProcedureReservedWords.VARIABLES+ElementSymbol.SEPARATOR+"ROWS_UPDATED"); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/query/sql/proc/CreateProcedureCommand.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/proc/CreateProcedureCommand.java 2011-11-22 16:58:35 UTC (rev 3688)
+++ trunk/engine/src/main/java/org/teiid/query/sql/proc/CreateProcedureCommand.java 2011-11-22 18:01:23 UTC (rev 3689)
@@ -50,9 +50,6 @@
// the command the user submitted against the virtual group being updated
private Command userCommand;
- //whether it is update procedure or virtual stored procedure, default to update procedure
- private boolean isUpdateProcedure = true;
-
private List projectedSymbols;
private GroupSymbol virtualGroup;
@@ -202,33 +199,22 @@
if(this.projectedSymbols != null){
return this.projectedSymbols;
}
- if(!isUpdateProcedure){
- if(this.resultsCommand == null){
- //user may have not entered any query yet
- return Collections.EMPTY_LIST;
- }
- List<? extends SingleElementSymbol> symbols = this.resultsCommand.getProjectedSymbols();
- if (this.resultsCommand instanceof StoredProcedure) {
- StoredProcedure sp = (StoredProcedure)this.resultsCommand;
- if (sp.isCallableStatement()) {
- symbols = sp.getResultSetColumns();
- }
- }
- setProjectedSymbols(symbols);
- return this.projectedSymbols;
+ if(this.resultsCommand == null){
+ //user may have not entered any query yet
+ return Collections.EMPTY_LIST;
}
- this.projectedSymbols = Command.getUpdateCommandSymbol();
- return this.projectedSymbols;
+ List<? extends SingleElementSymbol> symbols = this.resultsCommand.getProjectedSymbols();
+ if (this.resultsCommand instanceof StoredProcedure) {
+ StoredProcedure sp = (StoredProcedure)this.resultsCommand;
+ if (sp.isCallableStatement()) {
+ symbols = sp.getResultSetColumns();
+ }
+ }
+ setProjectedSymbols(symbols);
+ return this.projectedSymbols;
}
/**
- * @param isUpdateProcedure
- */
- public void setUpdateProcedure(boolean isUpdateProcedure) {
- this.isUpdateProcedure = isUpdateProcedure;
- }
-
- /**
* @param projSymbols
*/
public void setProjectedSymbols(List projSymbols) {
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-22 16:58:35 UTC (rev 3688)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-22 18:01:23 UTC (rev 3689)
@@ -551,7 +551,6 @@
| (<PROCEDURE> target = id() <AS> { comment = getToken(1).specialToken; } stmt = statement(info))
{
CreateProcedureCommand cup = new CreateProcedureCommand(asBlock(stmt));
- cup.setUpdateProcedure(false);
if (comment != null) {
cup.setCacheHint(getQueryCacheOption(comment.image));
}
@@ -1069,8 +1068,8 @@
<CREATE> [<VIRTUAL>] <PROCEDURE>
stmt = statement(info)
{
- updateProcCmd.setBlock(asBlock(stmt));
- return updateProcCmd;
+ procCmd.setBlock(asBlock(stmt));
+ return procCmd;
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java 2011-11-22 16:58:35 UTC (rev 3688)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java 2011-11-22 18:01:23 UTC (rev 3689)
@@ -3890,7 +3890,6 @@
CreateProcedureCommand virtualProcedureCommand = new CreateProcedureCommand();
virtualProcedureCommand.setBlock(block);
- virtualProcedureCommand.setUpdateProcedure(false);
helpTest("CREATE VIRTUAL PROCEDURE BEGIN DECLARE integer x; LOOP ON (SELECT c1, c2 FROM m.g) AS mycursor BEGIN x=mycursor.c1; IF(x > 5) BEGIN CONTINUE; END END SELECT c1, c2 FROM m.g; END", //$NON-NLS-1$
"CREATE VIRTUAL PROCEDURE\nBEGIN\nDECLARE integer x;\n" //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/sql/proc/TestCreateUpdateProcedureCommand.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/sql/proc/TestCreateUpdateProcedureCommand.java 2011-11-22 16:58:35 UTC (rev 3688)
+++ trunk/engine/src/test/java/org/teiid/query/sql/proc/TestCreateUpdateProcedureCommand.java 2011-11-22 18:01:23 UTC (rev 3689)
@@ -101,7 +101,6 @@
public void testProjectedSymbols() {
CreateProcedureCommand cupc = new CreateProcedureCommand();
- cupc.setUpdateProcedure(false);
StoredProcedure sp = (StoredProcedure)TestResolver.helpResolve("call TEIIDSP9(p1=>1, p2=>?)", RealMetadataFactory.exampleBQTCached());
sp.setCallableStatement(true);
cupc.setResultsCommand(sp);
13 years, 1 month
teiid SVN: r3688 - branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 11:58:35 -0500 (Tue, 22 Nov 2011)
New Revision: 3688
Modified:
branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt
branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml
branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-vdb.xml
Log:
TEIID-1839 updated the current example to use the new urls and message mode to avoid an error parsing the response
Modified: branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt
===================================================================
--- branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt 2011-11-22 16:25:33 UTC (rev 3687)
+++ branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt 2011-11-22 16:58:35 UTC (rev 3688)
@@ -38,18 +38,20 @@
2. SOAP11 RPC call providing all of the parameter values for the invoke procedure. With a SOAP
invocation, the action is used to convey the SOAPAction header value if needed. Also note
the use of the endpoint here with an absolute URL, which will be used instead of the default
-on the datasource.
+on the datasource. We are also using the DefaultServiceMode of MESSAGE (see the weather-vdb.xml file)
+to use the full SOAP message request and response.
select xmlserialize(document w.result as string) from
- (call weather.invoke(action=>'http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonList...',
- endpoint=>'http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php',
+ (call weather.invoke(action=>'http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php#LatLonList...',
+ endpoint=>'http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php',
binding=>'SOAP11',
request=>'
- <ns1:LatLonListZipCode xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:ns1="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">
- <zipCodeList xsi:type="ns2:zipCodeListType" xmlns:ns2="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd">63303</zipCodeList>
- </ns1:LatLonListZipCode>')) as w
+ <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
+ <SOAP-ENV:Body>
+ <ns8077:LatLonListZipCode xmlns:ns8077="uri:DWMLgen">
+ <listZipCodeList xsi:type="xsd:string">20910 25414</listZipCodeList>
+ </ns8077:LatLonListZipCode>
+ </SOAP-ENV:Body>
+ </SOAP-ENV:Envelope>')) as w
-See the DatabaseMetadata on the invoke procedure for a full description of the parameters.
-
+See the Reference or retrieve the JDBC DatabaseMetadata on the invoke procedure for a full description of the parameters.
Modified: branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml
===================================================================
--- branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml 2011-11-22 16:25:33 UTC (rev 3687)
+++ branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml 2011-11-22 16:58:35 UTC (rev 3688)
@@ -7,7 +7,7 @@
<rar-name>teiid-connector-ws.rar</rar-name>
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
- <config-property name="EndPoint">http://www.weather.gov/forecasts/xml/sample_products/browser_interface/nd...</config-property>
+ <config-property name="EndPoint">http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXM...</config-property>
<max-pool-size>20</max-pool-size>
Modified: branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-vdb.xml
===================================================================
--- branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-vdb.xml 2011-11-22 16:25:33 UTC (rev 3687)
+++ branches/7.6.x/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-vdb.xml 2011-11-22 16:58:35 UTC (rev 3688)
@@ -2,7 +2,7 @@
<vdb name="weather" version="1">
<!--
- See the dynamicvdb Portfolio example, or http://community.jboss.org/wiki/DynamicVDBinTeiid70
+ See the dynamicvdb Portfolio example, or the Reference
for more information on the format of a vdb.xml file.
-->
@@ -16,6 +16,7 @@
<translator name="MessageWeather" type="ws">
<property name="DefaultBinding" value="HTTP"/>
+ <property name="DefaultServiceMode" value="MESSAGE"/>
</translator>
</vdb>
\ No newline at end of file
13 years, 1 month
teiid SVN: r3687 - trunk/engine/src/main/javacc/org/teiid/query/parser.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 11:25:33 -0500 (Tue, 22 Nov 2011)
New Revision: 3687
Modified:
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
Log:
TEIID-1842 completely removing the concept of an update procedure
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-22 16:17:43 UTC (rev 3686)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-22 16:25:33 UTC (rev 3687)
@@ -465,7 +465,7 @@
Command command = null;
}
{
- (LOOKAHEAD(2) command = createUpdateProcedure(info) |
+ (LOOKAHEAD(2) command = createProcedure(info) |
command = userCommand(info) |
command = callableStatement(info)
)
@@ -496,7 +496,7 @@
Command command = null;
}
{
- (command = createUpdateProcedure(info) |
+ (command = createProcedure(info) |
command = forEachRowTriggerAction(info))
<EOF>
{
@@ -550,7 +550,7 @@
}
| (<PROCEDURE> target = id() <AS> { comment = getToken(1).specialToken; } stmt = statement(info))
{
- CreateUpdateProcedureCommand cup = new CreateUpdateProcedureCommand(asBlock(stmt));
+ CreateProcedureCommand cup = new CreateProcedureCommand(asBlock(stmt));
cup.setUpdateProcedure(false);
if (comment != null) {
cup.setCacheHint(getQueryCacheOption(comment.image));
@@ -1059,10 +1059,10 @@
* Parse create update procedure command
* @throws ParseException if parsing failed
*/
-CreateUpdateProcedureCommand createUpdateProcedure(ParseInfo info) :
+CreateProcedureCommand createProcedure(ParseInfo info) :
{
- CreateUpdateProcedureCommand updateProcCmd =
- new CreateUpdateProcedureCommand();
+ CreateProcedureCommand procCmd =
+ new CreateProcedureCommand();
Statement stmt = null;
}
{
13 years, 1 month
teiid SVN: r3686 - in trunk: admin and 9 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-11-22 11:17:43 -0500 (Tue, 22 Nov 2011)
New Revision: 3686
Added:
trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
Removed:
trunk/build/kits/jboss-as7/domain/configuration/host.xml
Modified:
trunk/admin/pom.xml
trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
trunk/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
trunk/cache-jbosscache/pom.xml
trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/pom.xml
trunk/test-integration/common/pom.xml
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
Log:
TEIID-1720: upgrading to latest AS nightly
Modified: trunk/admin/pom.xml
===================================================================
--- trunk/admin/pom.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/admin/pom.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -31,10 +31,6 @@
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
<artifactId>jboss-as-cli</artifactId>
</dependency>
</dependencies>
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-11-22 16:17:43 UTC (rev 3686)
@@ -30,7 +30,17 @@
import java.math.BigDecimal;
import java.math.BigInteger;
import java.net.UnknownHostException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
@@ -45,7 +55,6 @@
import org.jboss.as.cli.operation.impl.DefaultOperationRequestAddress;
import org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder;
import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.as.protocol.old.StreamUtils;
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
import org.teiid.adminapi.PropertyDefinition.RestartType;
@@ -192,8 +201,12 @@
@Override
public void close() {
if (this.connection != null) {
- StreamUtils.safeClose(this.connection);
- this.connection = null;
+ try {
+ connection.close();
+ } catch (Throwable t) {
+ //ignore
+ }
+ this.connection = null;
this.domainMode = false;
}
}
Modified: trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/build/kits/jboss-as7/domain/configuration/domain-teiid.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -20,7 +20,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<domain xmlns="urn:jboss:domain:1.0">
+<domain xmlns="urn:jboss:domain:1.1">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
@@ -28,10 +28,13 @@
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
+ <extension module="org.jboss.as.jacorb"/>
<extension module="org.jboss.as.jaxrs"/>
+ <extension module="org.jboss.as.jdr"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
+ <extension module="org.jboss.as.messaging"/>
<extension module="org.jboss.as.modcluster"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.osgi"/>
@@ -42,6 +45,7 @@
<extension module="org.jboss.as.threads"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.web"/>
+ <extension module="org.jboss.as.webservices" />
<extension module="org.jboss.as.weld"/>
</extensions>
@@ -61,7 +65,6 @@
</console-handler>
<periodic-rotating-file-handler name="FILE">
- <level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
@@ -78,6 +81,13 @@
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
+ <logger category="jacorb">
+ <level name="WARN"/>
+ </logger>
+ <!-- set jacorb.config to ERROR to avoid the "jacorb.properties not found" messages during startup -->
+ <logger category="jacorb.config">
+ <level name="ERROR"/>
+ </logger>
<root-logger>
<level name="INFO"/>
@@ -106,22 +116,44 @@
</datasources>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ee:1.0"/>
- <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.2" >
+
+ <remote connector-ref="remoting-connector" thread-pool-name="default" />
+ <async thread-pool-name="default" />
+
+ <timer-service thread-pool-name="default" >
+ <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
+ </timer-service>
+
<!-- EJB3 pools -->
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
instance-acquisition-timeout-unit="MINUTES"/>
+
+ <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
+ instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
+ <!-- Default MDB configurations -->
+ <mdb>
+ <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
+ <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+ </mdb>
+
<!-- Session bean configurations -->
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
+ <stateful default-access-timeout="5000"/>
+ <singleton default-access-timeout="5000"/>
</session-bean>
+ <thread-pools>
+ <thread-pool name="default" max-threads="10" keepalive-time="100" />
+ </thread-pools>
</subsystem>
<subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="cluster">
<cache-container name="cluster" default-cache="default">
@@ -133,11 +165,9 @@
<cache-container name="web" default-cache="repl">
<alias>standard-session-cache</alias>
<replicated-cache name="repl" mode="ASYNC" batching="true">
- <locking isolation="REPEATABLE_READ"/>
<file-store/>
</replicated-cache>
<distributed-cache name="dist" mode="ASYNC" batching="true">
- <locking isolation="REPEATABLE_READ"/>
<file-store/>
</distributed-cache>
</cache-container>
@@ -145,7 +175,6 @@
<alias>sfsb-cache</alias>
<alias>jboss.cache:service=EJB3SFSBClusteredCache</alias>
<replicated-cache name="repl" mode="ASYNC" batching="true">
- <locking isolation="REPEATABLE_READ"/>
<eviction strategy="LRU" max-entries="10000"/>
<file-store/>
</replicated-cache>
@@ -172,6 +201,7 @@
</replicated-cache>
</cache-container>
</subsystem>
+ <subsystem xmlns="urn:jboss:domain:jacorb:1.1"/>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
<subsystem xmlns="urn:jboss:domain:jca:1.0">
<archive-validation enabled="true"/>
@@ -191,6 +221,7 @@
</long-running-threads>
</default-workmanager>
</subsystem>
+ <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
<subsystem xmlns="urn:jboss:domain:jgroups:1.0" default-stack="udp">
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp" diagnostics-socket-binding="jgroups-diagnostics"/>
@@ -201,14 +232,13 @@
<protocol type="VERIFY_SUSPECT"/>
<protocol type="BARRIER"/>
<protocol type="pbcast.NAKACK"/>
- <protocol type="UNICAST"/>
+ <protocol type="UNICAST2"/>
<protocol type="pbcast.STABLE"/>
- <protocol type="VIEW_SYNC"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
- <protocol type="pbcast.STREAMING_STATE_TRANSFER"/>
+ <protocol type="pbcast.STATE_TRANSFER"/>
<protocol type="pbcast.FLUSH"/>
</stack>
<stack name="tcp">
@@ -220,89 +250,153 @@
<protocol type="VERIFY_SUSPECT"/>
<protocol type="BARRIER"/>
<protocol type="pbcast.NAKACK"/>
- <protocol type="UNICAST"/>
+ <protocol type="UNICAST2"/>
<protocol type="pbcast.STABLE"/>
- <protocol type="VIEW_SYNC"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
- <protocol type="pbcast.STREAMING_STATE_TRANSFER"/>
+ <protocol type="pbcast.STATE_TRANSFER"/>
<protocol type="pbcast.FLUSH"/>
</stack>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:jmx:1.0">
+ <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
<jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
</subsystem>
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
+ <subsystem xmlns="urn:jboss:domain:messaging:1.1">
+ <hornetq-server>
+ <!-- Default journal file size is 10Mb, reduced here to 100k for faster first boot -->
+ <journal-file-size>102400</journal-file-size>
+ <journal-min-files>2</journal-min-files>
+ <journal-type>NIO</journal-type>
+ <!-- disable messaging persistence -->
+ <persistence-enabled>false</persistence-enabled>
+
+ <connectors>
+ <netty-connector name="netty" socket-binding="messaging"/>
+ <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
+ <param key="batch-delay" value="50"/>
+ </netty-connector>
+ <in-vm-connector name="in-vm" server-id="0"/>
+ </connectors>
+
+ <acceptors>
+ <netty-acceptor name="netty" socket-binding="messaging"/>
+ <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
+ <param key="batch-delay" value="50"/>
+ <param key="direct-deliver" value="false"/>
+ </netty-acceptor>
+ <in-vm-acceptor name="in-vm" server-id="0"/>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+ <!--JMS Stuff-->
+ <jms-connection-factories>
+ <connection-factory name="InVmConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ </entries>
+ </connection-factory>
+ <connection-factory name="RemoteConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="RemoteConnectionFactory"/>
+ </entries>
+ </connection-factory>
+ <pooled-connection-factory name="hornetq-ra">
+ <transaction mode="xa"/>
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/JmsXA"/>
+ </entries>
+ </pooled-connection-factory>
+ </jms-connection-factories>
+
+ <jms-destinations>
+ <jms-queue name="testQueue">
+ <entry name="queue/test"/>
+ </jms-queue>
+ <jms-topic name="testTopic">
+ <entry name="topic/test"/>
+ </jms-topic>
+ </jms-destinations>
+ </hornetq-server>
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
<mod-cluster-config advertise-socket="modcluster"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
- <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
+ <subsystem xmlns="urn:jboss:domain:osgi:1.1" activation="lazy">
<configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
- <property name="manager.root">jboss-osgi</property>
+ <property name="manager.root" value="jboss-osgi"/>
</configuration>
<properties>
- <!--
- A comma seperated list of module identifiers. Each system module
- is added as a dependency to the OSGi framework module. The packages
- from these system modules can be made visible as framework system packages.
- http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAME...
- -->
- <property name="org.jboss.osgi.system.modules">
- org.apache.commons.logging,
- org.apache.log4j,
- org.jboss.as.osgi,
- org.slf4j,
- </property>
- <!--
- Framework environment property identifying extra packages which the system bundle
- must export from the current execution environment
- -->
- <property name="org.osgi.framework.system.packages.extra">
- org.apache.commons.logging;version=1.1.1,
- org.apache.log4j;version=1.2,
- org.jboss.as.osgi.service;version=7.0,
- org.jboss.osgi.deployment.interceptor;version=1.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.util;version=1.0,
- org.jboss.osgi.testing;version=1.0,
- org.jboss.osgi.vfs;version=1.0,
- org.slf4j;version=1.5.10,
- </property>
<!-- Specifies the beginning start level of the framework -->
<property name="org.osgi.framework.startlevel.beginning">1</property>
</properties>
- <modules>
+ <capabilities>
<!-- modules registered with the OSGi layer on startup -->
- <module identifier="javaee.api"/>
- <module identifier="org.jboss.logging"/>
+ <capability name="javax.api"/>
+ <capability name="javax.servlet.api"/>
+ <capability name="javax.transaction.api"/>
<!-- bundles installed on startup -->
- <module identifier="org.apache.aries.util"/>
- <module identifier="org.jboss.osgi.webconsole"/>
- <module identifier="org.osgi.compendium"/>
+ <capability name="org.apache.aries.util"/>
+ <capability name="org.jboss.osgi.webconsole"/>
+ <capability name="org.osgi.compendium"/>
<!-- bundles started in startlevel 1 -->
- <module identifier="org.apache.felix.log" startlevel="1"/>
- <module identifier="org.jboss.osgi.logging" startlevel="1"/>
- <module identifier="org.apache.felix.configadmin" startlevel="1"/>
- <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>
+ <capability name="org.apache.felix.log" startlevel="1"/>
+ <capability name="org.jboss.osgi.logging" startlevel="1"/>
+ <capability name="org.apache.felix.configadmin" startlevel="1"/>
+ <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
<!-- bundles started in startlevel 2 -->
- <module identifier="org.apache.aries.jmx" startlevel="2"/>
- <module identifier="org.apache.felix.eventadmin" startlevel="2"/>
- <module identifier="org.apache.felix.metatype" startlevel="2"/>
- <module identifier="org.apache.felix.webconsole" startlevel="2"/>
- <module identifier="org.jboss.osgi.jmx" startlevel="2"/>
- <module identifier="org.jboss.osgi.http" startlevel="2"/>
+ <capability name="org.apache.aries.jmx" startlevel="2"/>
+ <capability name="org.apache.felix.eventadmin" startlevel="2"/>
+ <capability name="org.apache.felix.metatype" startlevel="2"/>
+ <capability name="org.apache.felix.scr" startlevel="2"/>
+ <capability name="org.apache.felix.webconsole" startlevel="2"/>
+ <capability name="org.jboss.netty" startlevel="2"/>
+ <capability name="org.jboss.osgi.jmx" startlevel="2"/>
+ <capability name="org.jboss.osgi.http" startlevel="2"/>
+ <capability name="org.projectodd.stilts" startlevel="2"/>
<!-- bundles started in startlevel 3 -->
- <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>
- <module identifier="org.jboss.osgi.webapp" startlevel="3"/>
- <module identifier="org.jboss.osgi.xerces" startlevel="3"/>
- </modules>
+ <capability name="org.jboss.osgi.blueprint" startlevel="3"/>
+ <capability name="org.jboss.osgi.webapp" startlevel="3"/>
+ <capability name="org.jboss.osgi.xerces" startlevel="3"/>
+ </capabilities>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:remoting:1.0">
+ <connector name="remoting-connector" socket-binding="remoting"/>
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
<subsystem xmlns="urn:jboss:domain:security:1.0">
@@ -312,14 +406,6 @@
<login-module code="UsersRoles" flag="required"/>
</authentication>
</security-domain>
- <security-domain name="teiid-security" cache-type="default">
- <authentication>
- <login-module code="UsersRoles" flag="required">
- <module-option name="usersProperties" value="teiid-security-users.properties"/>
- <module-option name="rolesProperties" value="teiid-security-roles.properties"/>
- </login-module>
- </authentication>
- </security-domain>
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:teiid:1.0">
@@ -327,11 +413,13 @@
<object-replicator stack="udp" cluster-name="teiid-rep"/>
<resultset-cache container-name="teiid" name="resultset"/>
+ <transport name="embedded"/>
<transport name="jdbc" protocol="teiid" socket-binding="teiid-jdbc">
- <authentication security-domain="teiid-security" />
+ <ssl mode="login"/>
+ <authentication security-domain="teiid-security"/>
</transport>
<transport name="odbc" protocol="pg" socket-binding="teiid-odbc">
- <authentication security-domain="teiid-security" />
+ <authentication security-domain="teiid-security"/>
</transport>
<translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
@@ -361,6 +449,8 @@
<translator name="loopback" module="org.jboss.teiid.translator.loopback"/>
<translator name="olap" module="org.jboss.teiid.translator.olap"/>
<translator name="ws" module="org.jboss.teiid.translator.ws"/>
+ <translator name="salesforce" module="org.jboss.teiid.translator.salesforce"/>
+ <translator name="hive" module="org.jboss.teiid.translator.hive"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:threads:1.0">
<queueless-thread-pool name="teiid-async">
@@ -378,16 +468,24 @@
</subsystem>
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
<connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
- <virtual-server name="default-host">
+ <virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost" />
<alias name="example.com" />
</virtual-server>
</subsystem>
+ <subsystem xmlns="urn:jboss:domain:webservices:1.0">
+ <modify-wsdl-address>true</modify-wsdl-address>
+ <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
+ <!--
+ <wsdl-port>8080</wsdl-port>
+ <wsdl-secure-port>8443</wsdl-secure-port>
+ -->
+ </subsystem>
<subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
+
</profiles>
-
<!--
Named interfaces that can be referenced elsewhere in the configuration. The configuration
for how to associate these logical names with an actual network interface can either
@@ -401,20 +499,37 @@
</interfaces>
<socket-binding-groups>
+ <socket-binding-group name="standard-sockets" default-interface="public">
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <socket-binding name="jacorb" port="3528"/>
+ <socket-binding name="jacorb-ssl" port="3529"/>
+ <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
+ <socket-binding name="jmx-connector-server" interface="management" port="1091"/>
+ <socket-binding name="messaging" port="5445" />
+ <socket-binding name="messaging-throughput" port="5455"/>
+ <socket-binding name="osgi-http" interface="management" port="8090"/>
+ <socket-binding name="remoting" port="4447"/>
+ <socket-binding name="txn-recovery-environment" port="4712"/>
+ <socket-binding name="txn-status-manager" port="4713"/>
+ </socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
+ <socket-binding name="jacorb" port="3528"/>
+ <socket-binding name="jacorb-ssl" port="3529"/>
<socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>
- <socket-binding name="jgroups-mping" port="0" multicast-address="230.0.0.4" multicast-port="45700"/>
+ <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" port="7600"/>
<socket-binding name="jgroups-tcp-fd" port="57600"/>
- <socket-binding name="jgroups-udp" port="55200" multicast-address="230.0.0.4" multicast-port="45688"/>
+ <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" port="54200"/>
- <socket-binding name="jmx-connector-registry" port="1090"/>
- <socket-binding name="jmx-connector-server" port="1091"/>
- <socket-binding name="jndi" port="1099"/>
+ <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>
+ <socket-binding name="jmx-connector-server" interface="management" port="1091"/>
+ <socket-binding name="messaging" port="5445" />
+ <socket-binding name="messaging-throughput" port="5455"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
- <socket-binding name="osgi-http" port="8090"/>
+ <socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
@@ -426,7 +541,7 @@
<server-groups>
<server-group name="main-server-group" profile="ha">
<jvm name="default">
- <heap size="64m" max-size="512m"/>
+ <heap size="512m" max-size="1024m"/>
</jvm>
<socket-binding-group ref="ha-sockets"/>
</server-group>
Copied: trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml (from rev 3677, trunk/build/kits/jboss-as7/domain/configuration/host.xml)
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml (rev 0)
+++ trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -0,0 +1,92 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This 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 software 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 software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<host xmlns="urn:jboss:domain:1.1"
+ name="master">
+
+ <management>
+ <security-realms>
+ <security-realm name="ManagementRealm">
+ <authentication>
+ <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
+ </authentication>
+ </security-realm>
+ </security-realms>
+ <management-interfaces>
+ <native-interface security-realm="ManagementRealm">
+ <socket interface="management" port="9999"/>
+ </native-interface>
+ <http-interface security-realm="ManagementRealm">
+ <socket interface="management" port="9990"/>
+ </http-interface>
+ </management-interfaces>
+ </management>
+
+ <domain-controller>
+ <local/>
+ <!-- Alternative remote domain controller configuration with a host and port -->
+ <!-- <remote host="192.168.100.1" port="9999"/> -->
+ </domain-controller>
+
+ <interfaces>
+ <interface name="management">
+ <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
+ </interface>
+ <interface name="public">
+ <inet-address value="${jboss.bind.address:127.0.0.1}"/>
+ </interface>
+ </interfaces>
+
+ <jvms>
+ <jvm name="default">
+ <heap size="64m" max-size="128m"/>
+ </jvm>
+ </jvms>
+
+ <servers>
+ <server name="server-one" group="main-server-group">
+ <!-- server-one inherits the default socket-group declared in the server-group -->
+ <jvm name="default">
+ <!-- Remote JPDA debugging for a specific server
+ <jvm-options>
+ <option value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"/>
+ </jvm-options>
+ -->
+ </jvm>
+ </server>
+
+ <server name="server-two" group="main-server-group" auto-start="true">
+ <!-- server-two avoids port conflicts by incrementing the ports in
+ the default socket-group declared in the server-group -->
+ <socket-binding-group ref="ha-sockets" port-offset="150"/>
+ <jvm name="default">
+ <heap size="512m" max-size="1024m"/>
+ </jvm>
+ </server>
+
+ <server name="server-three" group="main-server-group" auto-start="false">
+ <!-- server-three avoids port conflicts by incrementing the ports in
+ the default socket-group declared in the server-group -->
+ <socket-binding-group ref="ha-sockets" port-offset="250"/>
+ </server>
+ </servers>
+</host>
Property changes on: trunk/build/kits/jboss-as7/domain/configuration/host-teiid.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/build/kits/jboss-as7/domain/configuration/host.xml
===================================================================
--- trunk/build/kits/jboss-as7/domain/configuration/host.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/build/kits/jboss-as7/domain/configuration/host.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -1,82 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2010, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This 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 software 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 software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
-
-<host xmlns="urn:jboss:domain:1.0"
- name="master">
-
- <management>
- <security-realms>
- <security-realm name="PropertiesMgmtSecurityRealm">
- <authentication>
- <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir" />
- </authentication>
- </security-realm>
- </security-realms>
- <management-interfaces>
- <native-interface interface="management" port="9999" />
- <http-interface interface="management" port="9990"/>
- </management-interfaces>
- </management>
-
- <domain-controller>
- <local/>
- <!-- Alternative remote domain controller configuration with a host and port -->
- <!-- <remote host="192.168.100.1" port="9999"/> -->
- </domain-controller>
-
- <interfaces>
- <interface name="management">
- <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
- </interface>
- <interface name="public">
- <inet-address value="${jboss.bind.address.public:127.0.0.1}"/>
- </interface>
- </interfaces>
-
- <jvms>
- <jvm name="default">
- <heap size="64m" max-size="128m"/>
- </jvm>
- </jvms>
-
- <servers>
- <server name="server-one" group="main-server-group">
- <!-- server-one inherits the default socket-group declared in the server-group -->
- <jvm name="default"/>
- </server>
-
- <server name="server-two" group="main-server-group" auto-start="true">
- <!-- server-two avoids port conflicts by incrementing the ports in
- the default socket-group declared in the server-group -->
- <socket-binding-group ref="ha-sockets" port-offset="150"/>
- <jvm name="default">
- <heap size="64m" max-size="256m"/>
- </jvm>
- </server>
-
- <server name="server-three" group="main-server-group" auto-start="false">
- <!-- server-three avoids port conflicts by incrementing the ports in
- the default socket-group declared in the server-group -->
- <socket-binding-group ref="ha-sockets" port-offset="250"/>
- </server>
- </servers>
-</host>
Modified: trunk/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
===================================================================
--- trunk/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -45,6 +45,7 @@
<module name="org.jboss.as.connector"/>
<module name="org.jboss.ironjacamar.api"/>
<module name="org.jboss.ironjacamar.impl"/>
+ <module name="org.jgroups"/>
</dependencies>
</module>
\ No newline at end of file
Modified: trunk/cache-jbosscache/pom.xml
===================================================================
--- trunk/cache-jbosscache/pom.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/cache-jbosscache/pom.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -26,8 +26,8 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-core</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-clustering-infinispan</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-11-22 16:17:43 UTC (rev 3686)
@@ -44,13 +44,17 @@
import org.jboss.as.clustering.jgroups.ChannelFactory;
import org.jgroups.Address;
import org.jgroups.Channel;
-import org.jgroups.ExtendedReceiverAdapter;
+import org.jgroups.MembershipListener;
import org.jgroups.Message;
+import org.jgroups.MessageListener;
+import org.jgroups.Receiver;
+import org.jgroups.ReceiverAdapter;
import org.jgroups.View;
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.MethodCall;
import org.jgroups.blocks.MethodLookup;
import org.jgroups.blocks.RequestOptions;
+import org.jgroups.blocks.ResponseMode;
import org.jgroups.blocks.RpcDispatcher;
import org.jgroups.util.Promise;
import org.jgroups.util.RspList;
@@ -93,23 +97,24 @@
}
}
- private final static class ReplicatedInvocationHandler<S> extends ExtendedReceiverAdapter implements
- InvocationHandler, Serializable {
+ private final static class ReplicatedInvocationHandler<S> implements
+ InvocationHandler, Serializable, MessageListener, Receiver,
+ MembershipListener {
private static final long serialVersionUID = -2943462899945966103L;
private final S object;
private RpcDispatcher disp;
private final HashMap<Method, Short> methodMap;
- protected Vector<Address> remoteMembers = new Vector<Address>();
+ protected List<Address> remoteMembers = new ArrayList<Address>();
protected final transient Promise<Boolean> state_promise=new Promise<Boolean>();
+
protected transient ThreadLocal<Promise<Boolean>> threadLocalPromise = new ThreadLocal<Promise<Boolean>>() {
protected org.jgroups.util.Promise<Boolean> initialValue() {
return new Promise<Boolean>();
}
};
- private ReplicatedInvocationHandler(S object,
- HashMap<Method, Short> methodMap) {
+ private ReplicatedInvocationHandler(S object,HashMap<Method, Short> methodMap) {
this.object = object;
this.methodMap = methodMap;
}
@@ -144,9 +149,9 @@
} catch (InvocationTargetException e) {
throw e.getCause();
}
- Vector<Address> dests = null;
+ List<Address> dests = null;
synchronized (remoteMembers) {
- dests = new Vector<Address>(remoteMembers);
+ dests = new ArrayList<Address>(remoteMembers);
}
ReplicatedObject ro = (ReplicatedObject)object;
String stateId = (String)args[0];
@@ -188,11 +193,11 @@
dests = new Vector<Address>(remoteMembers);
}
}
- RspList responses = disp.callRemoteMethods(dests, call, new RequestOptions().setMode(annotation.asynch()?GroupRequest.GET_NONE:GroupRequest.GET_ALL).setTimeout(annotation.timeout()));
+ RspList responses = disp.callRemoteMethods(dests, call, new RequestOptions().setMode(annotation.asynch()?ResponseMode.GET_NONE:ResponseMode.GET_ALL).setTimeout(annotation.timeout()));
if (annotation.asynch()) {
return null;
}
- Vector<Object> results = responses.getResults();
+ List<Object> results = responses.getResults();
if (method.getReturnType() == boolean.class) {
for (Object o : results) {
if (!Boolean.TRUE.equals(o)) {
@@ -212,7 +217,7 @@
throw new RuntimeException(method + " " + args + " failed"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
-
+
@Override
public void viewAccepted(View newView) {
if (newView.getMembers() != null) {
@@ -254,7 +259,6 @@
}
}
- @Override
public void setState(String stateId, InputStream istream) {
LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "loading state"); //$NON-NLS-1$
try {
@@ -268,7 +272,6 @@
}
}
- @Override
public void getState(String stateId, OutputStream ostream) {
LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "getting state"); //$NON-NLS-1$
try {
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java 2011-11-22 16:17:43 UTC (rev 3686)
@@ -25,11 +25,12 @@
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;
-import java.util.Vector;
+import java.util.List;
import org.jgroups.Address;
-import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.MethodCall;
+import org.jgroups.blocks.RequestOptions;
+import org.jgroups.blocks.ResponseMode;
import org.jgroups.blocks.RpcDispatcher;
import org.teiid.core.types.Streamable;
@@ -38,7 +39,7 @@
static final int CHUNK_SIZE=Streamable.STREAMING_BATCH_SIZE_IN_BYTES;
protected final RpcDispatcher disp;
- protected final Vector<Address> dests;
+ protected final List<Address> dests;
protected final String stateId;
protected final short methodOffset;
@@ -46,12 +47,16 @@
private final byte[] buffer=new byte[CHUNK_SIZE];
private int index=0;
- public JGroupsOutputStream(RpcDispatcher disp, Vector<Address> dests, String stateId, short methodOffset) {
+ public JGroupsOutputStream(RpcDispatcher disp, List<Address> dests, String stateId, short methodOffset) throws IOException {
this.disp=disp;
this.dests=dests;
this.stateId=stateId;
this.methodOffset = methodOffset;
- disp.callRemoteMethods(this.dests, new MethodCall(methodOffset, new Object[] {stateId}), GroupRequest.GET_NONE, 0);
+ try {
+ disp.callRemoteMethods(this.dests, new MethodCall(methodOffset, new Object[] {stateId}), new RequestOptions(ResponseMode.GET_NONE, 0));
+ } catch(Exception e) {
+ throw new IOException(e);
+ }
}
public void close() throws IOException {
@@ -60,7 +65,7 @@
}
flush();
try {
- disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 2), new Object[] {stateId}), GroupRequest.GET_NONE, 0);
+ disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 2), new Object[] {stateId}), new RequestOptions(ResponseMode.GET_NONE, 0));
} catch(Exception e) {
}
closed=true;
@@ -72,7 +77,7 @@
if(index == 0) {
return;
}
- disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 1), new Object[] {stateId, Arrays.copyOf(buffer, index)}), GroupRequest.GET_NONE, 0);
+ disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 1), new Object[] {stateId, Arrays.copyOf(buffer, index)}), new RequestOptions(ResponseMode.GET_NONE, 0));
index=0;
} catch(Exception e) {
throw new IOException(e);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-11-22 16:17:43 UTC (rev 3686)
@@ -303,7 +303,7 @@
JGroupsObjectReplicatorService replicatorService = new JGroupsObjectReplicatorService(clusterName);
replicatorService.setBufferManager(bufferManager.getBufferManager());
ServiceBuilder<JGroupsObjectReplicator> serviceBuilder = target.addService(TeiidServiceNames.OBJECT_REPLICATOR, replicatorService);
- serviceBuilder.addDependency(ServiceName.JBOSS.append("jgroups", stack), ChannelFactory.class, replicatorService.channelFactoryInjector); //$NON-NLS-1$
+ serviceBuilder.addDependency(ServiceName.JBOSS.append("jgroups", "stack", stack), ChannelFactory.class, replicatorService.channelFactoryInjector); //$NON-NLS-1$ //$NON-NLS-2$
newControllers.add(serviceBuilder.install());
}
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-11-22 16:17:43 UTC (rev 3686)
@@ -244,7 +244,7 @@
clear-cache.describe=Clear the caches in the system of the given type
clear-cache.cache-type.describe=cache type to be cleared. (PREPARED_PLAN_CACHE, QUERY_SERVICE_RESULT_SET_CACHE)
clear-cache.vdb-name.describe=VDB name
-clear-cache.vdb_version.describe=VDB version
+clear-cache.vdb-version.describe=VDB version
execute-query.describe=Execute a sql query
execute-query.vdb-name.describe=vdb name
@@ -300,8 +300,8 @@
requests-per-session.session.describe=The session Identifier
requests-per-vdb.describe=Current active requests in progress in the query engine for a given VDB name and its version.
-requests-per-vdb.vdb_name.describe=VDB Name
-requests-per-vdb.vdb_version.describe=VDB Version
+requests-per-vdb.vdb-name.describe=VDB Name
+requests-per-vdb.vdb-version.describe=VDB Version
terminate-session.describe=Terminate the session
terminate-session.session.describe=The session Identifier of session to be terminated
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/pom.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -10,7 +10,7 @@
<properties>
<ant.version>1.7.0</ant.version>
<site.url>http://www.jboss.org/teiid</site.url>
- <jbossas-version>7.1.0.Alpha1-SNAPSHOT</jbossas-version>
+ <jbossas-version>7.1.0.Alpha2-SNAPSHOT</jbossas-version>
</properties>
<scm>
<connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
@@ -389,6 +389,11 @@
<version>${jbossas-version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-clustering</artifactId>
+ <version>${jbossas-version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss</groupId>
<artifactId>staxmapper</artifactId>
<version>1.0.0.Final</version>
@@ -466,6 +471,11 @@
<version>1.0.0.CR1</version>
</dependency>
<dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-clustering-infinispan</artifactId>
+ <version>${jbossas-version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-spi</artifactId>
<version>2.2.0.CR1</version>
@@ -480,11 +490,6 @@
<artifactId>jboss-as-subsystem-test</artifactId>
<version>${jbossas-version}</version>
</dependency>
- <dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-core</artifactId>
- <version>5.0.0.FINAL</version>
- </dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxonhe</artifactId>
Modified: trunk/test-integration/common/pom.xml
===================================================================
--- trunk/test-integration/common/pom.xml 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/test-integration/common/pom.xml 2011-11-22 16:17:43 UTC (rev 3686)
@@ -45,7 +45,13 @@
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.0</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ <version>3.0.0.CR5</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<profiles>
<profile>
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java 2011-11-22 16:05:22 UTC (rev 3685)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java 2011-11-22 16:17:43 UTC (rev 3686)
@@ -22,7 +22,8 @@
package org.teiid.systemmodel;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -32,8 +33,8 @@
import java.util.HashMap;
import org.jboss.as.clustering.jgroups.ChannelFactory;
+import org.jboss.as.clustering.jgroups.JChannelFactory;
import org.jgroups.Channel;
-import org.jgroups.JChannelFactory;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -41,9 +42,9 @@
import org.teiid.core.util.UnitTestUtil;
import org.teiid.jdbc.FakeServer;
import org.teiid.metadata.FunctionMethod;
-import org.teiid.metadata.FunctionParameter;
import org.teiid.metadata.FunctionMethod.Determinism;
import org.teiid.metadata.FunctionMethod.PushDown;
+import org.teiid.metadata.FunctionParameter;
import org.teiid.replication.jboss.JGroupsObjectReplicator;
@SuppressWarnings("nls")
13 years, 1 month
teiid SVN: r3685 - branches/7.6.x/engine/src/main/java/org/teiid/common/buffer/impl.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 11:05:22 -0500 (Tue, 22 Nov 2011)
New Revision: 3685
Modified:
branches/7.6.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
Log:
TEIID-1750 fix for processing thread repositioning its working buffer when performing a free to allocate next
Modified: branches/7.6.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
===================================================================
--- branches/7.6.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2011-11-22 15:12:09 UTC (rev 3684)
+++ branches/7.6.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2011-11-22 16:05:22 UTC (rev 3685)
@@ -193,7 +193,7 @@
position = BYTES_PER_BLOCK_ADDRESS*index;
}
if (mode == Mode.ALLOCATE) {
- dataBlock = nextBlock(true);
+ dataBlock = nextBlock(info, true);
info.putInt(position, dataBlock);
if (mode == Mode.ALLOCATE && position + BYTES_PER_BLOCK_ADDRESS < info.limit()) {
//maintain the invariant that the next pointer is empty
@@ -212,7 +212,7 @@
int sib_index = buf.getInt(position);
if (index == cutOff) {
if (mode == Mode.ALLOCATE) {
- sib_index = nextBlock(false);
+ sib_index = nextBlock(buf, false);
buf.putInt(position, sib_index);
} else if (mode == Mode.UPDATE && value == EMPTY_ADDRESS) {
freeDataBlock(sib_index);
@@ -225,9 +225,12 @@
/**
* Get the next dataBlock. When the memory buffer is full we have some
* book keeping to do.
+ * @param reading
* @return
*/
- private int nextBlock(boolean data) {
+ private int nextBlock(ByteBuffer reading, boolean data) {
+ int limit = reading.limit();
+ int position = reading.position();
int next = EMPTY_ADDRESS;
memoryEvictionLock.readLock().lock();
boolean readLocked = true;
@@ -245,6 +248,12 @@
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Allocating", data?"data":"index", "block", next, "to", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
+ //restore the reading buffer
+ if (reading.limit() != limit) {
+ reading.rewind();
+ reading.limit(limit);
+ reading.position(position);
+ }
return next;
}
13 years, 1 month
teiid SVN: r3684 - branches/7.6.x/documentation/caching-guide/src/main/docbook/en-US/content.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-22 10:12:09 -0500 (Tue, 22 Nov 2011)
New Revision: 3684
Modified:
branches/7.6.x/documentation/caching-guide/src/main/docbook/en-US/content/results.xml
Log:
TEIID-1844 fixing cache hint example
Modified: branches/7.6.x/documentation/caching-guide/src/main/docbook/en-US/content/results.xml
===================================================================
--- branches/7.6.x/documentation/caching-guide/src/main/docbook/en-US/content/results.xml 2011-11-22 12:55:13 UTC (rev 3683)
+++ branches/7.6.x/documentation/caching-guide/src/main/docbook/en-US/content/results.xml 2011-11-22 15:12:09 UTC (rev 3684)
@@ -55,7 +55,7 @@
</para>
<example>
<title>Advanced ResultSet Caching</title>
- <programlisting>/*+ cache(pref_mem ttl:60000 */ select col from t</programlisting>
+ <programlisting>/*+ cache(pref_mem ttl:60000) */ select col from t</programlisting>
<para>In this example the memory preference has been enabled and the time to live is set to 60000 milliseconds or 1 minute.
The ttl for an entry is actually treated as it's maximum age and the entry may be purged sooner if the maximum number of cache entries has been reached.</para>
</example>
13 years, 1 month