teiid SVN: r3603 - in trunk: documentation/reference/src/main/docbook/en-US/content and 10 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-02 15:48:52 -0400 (Wed, 02 Nov 2011)
New Revision: 3603
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/Limit.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java
trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java
Log:
TEIID-1806 ensuring consistent handling of unordered limits
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-02 19:48:52 UTC (rev 3603)
@@ -37,6 +37,7 @@
<LI><B>Native Queries</B> - added the ability to specify native query SQL for JDBC physical tables and stored procedures via extension metadata.
<LI><B>View removal hint</B> - the NO_UNNEST hint now also applies to from clause views and subqueries. It will instruct the planner to not perform view flattening.
<LI><B>Non-blocking statement execution</B> - Teiid JDBC extensions TeiidStatement and TeiidPreparedStatement can be used to submit queries against embedded connections with a callback to process results in a non-blocking manner.
+ <LI><B>NON_STRICT limit hint</B> - the NON_STRICT hint can be used with unordered limits to tell the optimizer to not inhibit push operations even if the results will not be consistent with the logical application of the limit.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
@@ -51,6 +52,7 @@
<li>Leave was added as a reserved word.
<li>Lob inlining is incompatible with clients older than 7.6. If a 7.6 server will have older clients that use lobs connect to it, then the BufferService property inlineLobs should be set to false in the teiid-jboss-beans.xml file.
<li>Oracle translators assume they are using Oracle supplied drivers. If that is not the case, set the Oracle translator execution property oracleSuppliedDriver to false.
+ <li>Unordered limits are handled strictly by default. They are longer pushed through conditions, dup removal, or UNION not all - and cannot have conditions pushed through them. Use the NON_STRICT hint to change the behavior to Teiid 7.1 handling.
</ul>
<h4>from 7.4</h4>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml 2011-11-02 19:48:52 UTC (rev 3603)
@@ -438,6 +438,11 @@
<para>The terms FIRST/NEXT are interchangable as well as ROW/ROWS.
</para>
</listitem>
+ <listitem>
+ <para>The limit clause may take an optional preceeding NON_STRICT hint to indicate that push operations should not be inhibited even if the results will not be consistent with the logical application of the limit.
+ The hint is only needed on unordered limits, e.g. "SELECT * FROM VW /*+ NON_STRICT */ LIMIT 2".
+ </para>
+ </listitem>
</itemizedlist>
<itemizedlist>
<para>Examples:
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -1151,6 +1151,9 @@
if (limit.isImplicit()) {
limitNode.setProperty(Info.IS_IMPLICIT_LIMIT, true);
}
+ if (limit.isStrict()) {
+ limitNode.setProperty(Info.IS_STRICT, true);
+ }
attachLast(limitNode, plan);
plan = limitNode;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -148,6 +148,7 @@
MAX_TUPLE_LIMIT, // Expression that evaluates to the max number of tuples generated
OFFSET_TUPLE_COUNT, // Expression that evaluates to the tuple offset of the starting tuple
IS_IMPLICIT_LIMIT, // Boolean if the limit is created by the rewriter as part of a subquery optimization
+ IS_STRICT, // Boolean if the unordered limit should be enforced strictly
// Common AP Information
ACCESS_PATTERNS, // Collection <List <Object element ID> >
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -547,8 +547,8 @@
return null;
}
- public static boolean isOrderedLimit(PlanNode node) {
- return node.getType() == NodeConstants.Types.TUPLE_LIMIT && NodeEditor.findNodePreOrder(node, NodeConstants.Types.SORT, NodeConstants.Types.PROJECT | NodeConstants.Types.SET_OP) != null;
+ public static boolean isOrderedOrStrictLimit(PlanNode node) {
+ return node.getType() == NodeConstants.Types.TUPLE_LIMIT && (NodeEditor.findNodePreOrder(node, NodeConstants.Types.SORT, NodeConstants.Types.PROJECT | NodeConstants.Types.SET_OP) != null || node.hasProperty(Info.IS_STRICT));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -45,6 +45,7 @@
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
+import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.sql.lang.CompareCriteria;
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.lang.SetQuery;
@@ -135,7 +136,9 @@
Expression childOffset = (Expression)child.getProperty(NodeConstants.Info.OFFSET_TUPLE_COUNT);
combineLimits(limitNode, metadata, parentLimit, parentOffset, childLimit, childOffset);
-
+ if (child.hasBooleanProperty(Info.IS_STRICT)) {
+ limitNode.setProperty(Info.IS_STRICT, true);
+ }
NodeEditor.removeChildNode(limitNode, child);
limitNodes.remove(child);
@@ -143,10 +146,12 @@
}
case NodeConstants.Types.SET_OP:
{
- if (!SetQuery.Operation.UNION.equals(child.getProperty(NodeConstants.Info.SET_OPERATION))
- || !child.hasBooleanProperty(NodeConstants.Info.USE_ALL)) {
- return false;
- }
+ if (!SetQuery.Operation.UNION.equals(child.getProperty(NodeConstants.Info.SET_OPERATION))) {
+ return false;
+ }
+ if (!child.hasBooleanProperty(NodeConstants.Info.USE_ALL) && limitNode.hasBooleanProperty(Info.IS_STRICT)) {
+ return false;
+ }
//distribute the limit
List<PlanNode> grandChildren = new LinkedList<PlanNode>(child.getChildren());
for (PlanNode grandChild : grandChildren) {
@@ -171,13 +176,16 @@
{
GroupSymbol virtualGroup = child.getGroups().iterator().next();
if (virtualGroup.isProcedure()) {
- return false;
+ return false;
}
if (FrameUtil.isProcedure(child.getFirstChild())) {
return false;
}
return true;
}
+ case NodeConstants.Types.SELECT:
+ case NodeConstants.Types.DUP_REMOVE:
+ return !limitNode.hasBooleanProperty(Info.IS_STRICT);
default:
{
return false;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -343,7 +343,7 @@
}
satisfyAccessPatterns(critNode, currentNode);
- } else if (FrameUtil.isOrderedLimit(currentNode)) {
+ } else if (FrameUtil.isOrderedOrStrictLimit(currentNode)) {
return currentNode;
}
}
@@ -355,7 +355,7 @@
throws QueryPlannerException {
//ensure that the criteria can be pushed further
- if (sourceNode.getChildCount() == 1 && FrameUtil.isOrderedLimit(sourceNode.getFirstChild())) {
+ if (sourceNode.getChildCount() == 1 && FrameUtil.isOrderedOrStrictLimit(sourceNode.getFirstChild())) {
return false;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -423,7 +423,7 @@
//don't push criteria into an invalid location above an ordered limit - shouldn't happen
PlanNode limitNode = NodeEditor.findNodePreOrder(accessNode, NodeConstants.Types.TUPLE_LIMIT, NodeConstants.Types.SOURCE);
- if (limitNode != null && FrameUtil.isOrderedLimit(limitNode)) {
+ if (limitNode != null && FrameUtil.isOrderedOrStrictLimit(limitNode)) {
return false;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -44,7 +44,6 @@
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.lang.JoinType;
import org.teiid.query.sql.symbol.AggregateSymbol;
-import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
import org.teiid.query.util.CommandContext;
@@ -205,10 +204,6 @@
return NodeEditor.findAllNodes(optionalNode, NodeConstants.Types.JOIN);
}
- /**
- * Ensure that the needed elements come only from the left hand side and
- * that cardinality won't matter
- */
static boolean useNonDistinctRows(PlanNode parent) {
while (parent != null) {
if (parent.hasBooleanProperty(NodeConstants.Info.IS_DUP_REMOVAL)) {
@@ -229,16 +224,11 @@
return AggregateSymbol.areAggregatesCardinalityDependent(aggs);
}
case NodeConstants.Types.TUPLE_LIMIT: {
- if (!(parent.getProperty(NodeConstants.Info.MAX_TUPLE_LIMIT) instanceof Constant)
- || parent.getProperty(NodeConstants.Info.OFFSET_TUPLE_COUNT) != null) {
+ if (FrameUtil.isOrderedOrStrictLimit(parent)) {
return true;
}
- Constant constant = (Constant)parent.getProperty(NodeConstants.Info.MAX_TUPLE_LIMIT);
- if (!Integer.valueOf(1).equals(constant.getValue())) {
- return true;
- }
}
- //we assmue that projects of non-deterministic expressions do not matter
+ //we assume that projects of non-deterministic expressions do not matter
}
parent = parent.getParent();
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -200,7 +200,7 @@
if (rsInfo.exceptionOnRowlimit()) {
limit++;
}
- rsQuery.setLimit(new Limit(null, new Constant(new Integer(limit))));
+ rsQuery.setLimit(new Limit(null, new Constant(limit)));
}
// this query is not eligible for staging; proceed normally.
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -36,6 +36,7 @@
import org.teiid.query.sql.lang.CacheHint;
import org.teiid.query.sql.lang.FromClause;
import org.teiid.query.sql.lang.JoinType;
+import org.teiid.query.sql.lang.Limit;
import org.teiid.query.sql.lang.Option;
import org.teiid.query.sql.lang.QueryCommand;
import org.teiid.query.sql.lang.SetQuery;
@@ -213,6 +214,16 @@
return hint;
}
+ boolean isNonStrictHint(Token t) {
+ String[] parts = getComment(t).split("\\s"); //$NON-NLS-1$
+ for (int i = 0; i < parts.length; i++) {
+ if (parts[i].equalsIgnoreCase(Limit.NON_STRICT)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private static Pattern CACHE_HINT = Pattern.compile("/\\*\\+?\\s*cache(\\(\\s*(pref_mem)?\\s*(ttl:\\d{1,19})?\\s*(updatable)?\\s*(scope:(session|vdb|user))?[^\\)]*\\))?[^\\*]*\\*\\/.*", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$
static CacheHint getQueryCacheOption(String query) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/Limit.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/Limit.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/Limit.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -32,10 +32,13 @@
public class Limit implements LanguageObject {
+
+ public static String NON_STRICT = "NON_STRICT"; //$NON-NLS-1$
private Expression offset;
private Expression rowLimit;
private boolean implicit;
+ private boolean strict = true;
public Limit(Expression offset, Expression rowLimit) {
this.offset = offset;
@@ -46,6 +49,14 @@
}
+ public void setStrict(boolean strict) {
+ this.strict = strict;
+ }
+
+ public boolean isStrict() {
+ return strict;
+ }
+
public boolean isImplicit() {
return implicit;
}
@@ -96,6 +107,7 @@
public Limit clone() {
Limit clone = new Limit();
clone.implicit = this.implicit;
+ clone.strict = this.strict;
if (this.rowLimit != null) {
clone.setRowLimit((Expression) this.rowLimit.clone());
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -1777,6 +1777,14 @@
}
public void visit( Limit obj ) {
+ if (!obj.isStrict()) {
+ append(BEGIN_HINT);
+ append(SPACE);
+ append(Limit.NON_STRICT);
+ append(SPACE);
+ append(END_HINT);
+ append(SPACE);
+ }
if (obj.getRowLimit() == null) {
append(OFFSET);
append(SPACE);
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-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-02 19:48:52 UTC (rev 3603)
@@ -3164,8 +3164,10 @@
{
Expression limit = null;
Expression offset = null;
+ Token t = null;
}
{
+ {t = getToken(1);}
((<LIMIT> offset = intParam(info)
[<COMMA> limit = intParam(info)])
{
@@ -3180,7 +3182,9 @@
|
(limit = fetchLimit(info)))
{
- return new Limit(offset, limit);
+ Limit result = new Limit(offset, limit);
+ result.setStrict(!isNonStrictHint(t));
+ return result;
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -709,7 +709,7 @@
// pm3 model supports order by
capFinder.addCapabilities("pm3", caps); //$NON-NLS-1$
- String sql = "SELECT * FROM (SELECT * FROM pm3.g1 limit 100) as v1 where v1.e1 = 1";//$NON-NLS-1$
+ String sql = "SELECT * FROM (SELECT * FROM pm3.g1 /*+ non_strict */ limit 100) as v1 where v1.e1 = 1";//$NON-NLS-1$
String[] expectedSql = new String[] {
"SELECT pm3.g1.e1, pm3.g1.e2, pm3.g1.e3, pm3.g1.e4 FROM pm3.g1 WHERE pm3.g1.e1 = '1' LIMIT 100" //$NON-NLS-1$
};
@@ -852,7 +852,7 @@
* Note here that the criteria made it to the having clause
*/
@Test public void testAggregateCriteriaOverUnSortedLimit() {
- String sql = "select a from (SELECT MAX(e2) as a FROM pm1.g1 GROUP BY e2 LIMIT 1) x where a = 0"; //$NON-NLS-1$
+ String sql = "select a from (SELECT MAX(e2) as a FROM pm1.g1 GROUP BY e2 /*+ non_strict */ LIMIT 1) x where a = 0"; //$NON-NLS-1$
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java 2011-11-02 16:50:24 UTC (rev 3602)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java 2011-11-02 19:48:52 UTC (rev 3603)
@@ -1162,4 +1162,15 @@
assertEquals("SELECT a FROM /*+ NO_UNNEST */ (SELECT a FROM db.g WHERE a2 = 5) AS x", QueryParser.getQueryParser().parseCommand(sql, new ParseInfo()).toString()); //$NON-NLS-1$
}
+ @Test public void testNonStrictLimit() throws QueryParserException {
+ String sql = "SELECT a FROM x /*+ non_strict */ limit 1"; //$NON-NLS-1$
+ assertEquals("SELECT a FROM x /*+ NON_STRICT */ LIMIT 1", QueryParser.getQueryParser().parseCommand(sql, new ParseInfo()).toString()); //$NON-NLS-1$
+
+ sql = "SELECT a FROM x /*+ non_strict */ offset 1 row"; //$NON-NLS-1$
+ assertEquals("SELECT a FROM x /*+ NON_STRICT */ OFFSET 1 ROWS", QueryParser.getQueryParser().parseCommand(sql, new ParseInfo()).toString()); //$NON-NLS-1$
+
+ sql = "SELECT a FROM x /*+ non_strict */ fetch first 1 rows only"; //$NON-NLS-1$
+ assertEquals("SELECT a FROM x /*+ NON_STRICT */ LIMIT 1", QueryParser.getQueryParser().parseCommand(sql, new ParseInfo()).toString()); //$NON-NLS-1$
+ }
+
}
13 years, 1 month
teiid SVN: r3602 - in trunk: documentation/developer-guide/src/main/docbook/en-US/content and 5 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-02 12:50:24 -0400 (Wed, 02 Nov 2011)
New Revision: 3602
Modified:
trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java
trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java
trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWork.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ExecutionContextImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java
trunk/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java
trunk/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java
Log:
TEIID-1802 adding executioncontext dataavailable method
Modified: trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -25,7 +25,7 @@
/**
* Used by asynch connectors to indicate data is not available
- * and results should be polled for after the given delay.
+ * and results should be polled for after the given delay in milliseconds.
*/
public class DataNotAvailableException extends TeiidRuntimeException {
@@ -33,9 +33,24 @@
private long retryDelay = 0;
+ /**
+ * Indicate that the engine should not poll for results and will be notified
+ * via the {@link ExecutionContext#dataAvailable()} method.
+ */
+ public static final DataNotAvailableException NO_POLLING = new DataNotAvailableException(-1);
+
+ /**
+ * Uses a delay of 0, which implies an immediate poll for results.
+ */
public DataNotAvailableException() {
}
+ /**
+ * Uses the given retryDelay. Negative values indicate that the
+ * engine should not poll for results (see also {@link DataNotAvailableException#NO_POLLING} and will be notified
+ * via the {@link ExecutionContext#dataAvailable()} method.
+ * @param retryDelay in milliseconds
+ */
public DataNotAvailableException(long retryDelay) {
this.retryDelay = retryDelay;
}
Modified: trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -146,4 +146,10 @@
* @return
*/
Session getSession();
+
+ /**
+ * Signal the engine that data is available and processing should be
+ * resumed.
+ */
+ void dataAvailable();
}
Modified: trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
===================================================================
--- trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2011-11-02 16:50:24 UTC (rev 3602)
@@ -258,12 +258,16 @@
<section>
<title>Asynchronous Executions</title>
<para>In some scenarios, a translator needs to execute
- asynchronously and allow the executing thread to perform other work. To allow this, you should Throw a DataNotAvailableExecption during a retrival method, rather than explicitly waiting or sleeping for the results. The
- DataNotAvailableException may take a delay parameter in its
+ asynchronously and allow the executing thread to perform other work. To allow this, you should Throw a <code>DataNotAvailableExecption</code> during a retrival method, rather than explicitly waiting or sleeping for the results.
+ <note><para>A <code>DataNotAvailableException</code> should not be thrown by the execute method.</para><note>
+ The
+ <code>DataNotAvailableException</code> may take a delay parameter in its
constructor to indicate how long the system should wait befor polling
- for results. Any non-negative value is allowed.
+ for results. Any non-negative value indicates a time until the next polling should be performed.
+ The <code>DataNotAvailableException.NO_POLLING</code> exception (or any DataNotAvailableException with a negative delay) can be thrown to indicate that
+ the execution will call <code>ExecutionContext.dataAvailable<c/ode> to indicate processing should resume.
</para>
- <para>Since the exection and the associated connection are not closed until the work has completed, care should be taken if using asynchronous executions that hold a lot of state.</para>
+ <note><para>Since the exection and the associated connection are not closed until the work has completed, care should be taken if using asynchronous executions that hold a lot of state.</para></note>
</section>
<section>
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWork.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWork.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWork.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -23,6 +23,7 @@
package org.teiid.dqp.internal.datamgr;
import org.teiid.common.buffer.BlockedException;
+import org.teiid.dqp.internal.process.RequestWorkItem;
import org.teiid.dqp.message.AtomicResultsMessage;
import org.teiid.translator.TranslatorException;
@@ -40,4 +41,8 @@
AtomicResultsMessage execute() throws TranslatorException, BlockedException;
+ void setRequestWorkItem(RequestWorkItem item);
+
+ boolean isDataAvailable();
+
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -22,7 +22,6 @@
package org.teiid.dqp.internal.datamgr;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -30,9 +29,11 @@
import javax.resource.ResourceException;
import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.client.ResizingArrayList;
import org.teiid.common.buffer.BlockedException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.util.Assertion;
+import org.teiid.dqp.internal.process.RequestWorkItem;
import org.teiid.dqp.message.AtomicRequestID;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.AtomicResultsMessage;
@@ -108,6 +109,11 @@
this.securityContext.setTransactional(requestMsg.isTransactional());
}
+ @Override
+ public void setRequestWorkItem(RequestWorkItem item) {
+ this.securityContext.setRequestWorkItem(item);
+ }
+
public AtomicRequestID getId() {
return id;
}
@@ -137,6 +143,7 @@
}
public void close() {
+ this.securityContext.setRequestWorkItem(null);
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Processing Close :", this.requestMsg.getCommand()}); //$NON-NLS-1$
if (!error) {
manager.logSRCCommand(this.requestMsg, this.securityContext, Event.END, this.rowCount);
@@ -273,12 +280,12 @@
Assertion.assertTrue(!this.lastBatch);
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Getting results from connector"}); //$NON-NLS-1$
int batchSize = 0;
- List<List> rows = new ArrayList<List>(batchSize/4);
+ List<List<?>> rows = new ResizingArrayList<List<?>>(batchSize/4);
try {
while (batchSize < this.requestMsg.getFetchSize()) {
- List row = this.execution.next();
+ List<?> row = this.execution.next();
if (row == null) {
this.lastBatch = true;
break;
@@ -306,14 +313,14 @@
}
}
} catch (DataNotAvailableException e) {
- if (rows.size() == 0) {
+ if (rows.size() == 0 && this.rowCount != 0) {
throw e;
}
}
if (lastBatch) {
if (this.procedureBatchHandler != null) {
- List row = this.procedureBatchHandler.getParameterRow();
+ List<?> row = this.procedureBatchHandler.getParameterRow();
if (row != null) {
rows.add(row);
this.rowCount++;
@@ -357,5 +364,10 @@
public String toString() {
return this.id.toString();
}
+
+ @Override
+ public boolean isDataAvailable() {
+ return this.securityContext.isDataAvailable();
+ }
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ExecutionContextImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ExecutionContextImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ExecutionContextImpl.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -33,6 +33,7 @@
import org.teiid.adminapi.Session;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.util.HashCodeUtil;
+import org.teiid.dqp.internal.process.RequestWorkItem;
import org.teiid.translator.ExecutionContext;
@@ -66,6 +67,8 @@
private int batchSize = BufferManager.DEFAULT_CONNECTOR_BATCH_SIZE;
private List<Exception> warnings = new LinkedList<Exception>();
private Session session;
+ private RequestWorkItem worktItem;
+ private boolean dataAvailable;
public ExecutionContextImpl(String vdbName, int vdbVersion, Serializable executionPayload,
String originalConnectionID, String connectorName, String requestId, String partId, String execCount) {
@@ -215,4 +218,23 @@
public void setSession(Session session) {
this.session = session;
}
+
+ public void setRequestWorkItem(RequestWorkItem item) {
+ this.worktItem = item;
+ }
+
+ @Override
+ public synchronized void dataAvailable() {
+ RequestWorkItem requestWorkItem = this.worktItem;
+ dataAvailable = true;
+ if (requestWorkItem != null) {
+ requestWorkItem.moreWork();
+ }
+ }
+
+ public synchronized boolean isDataAvailable() {
+ boolean result = dataAvailable;
+ dataAvailable = false;
+ return result;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -202,6 +202,7 @@
}
ConnectorManagerRepository cmr = workItem.getDqpWorkContext().getVDB().getAttachment(ConnectorManagerRepository.class);
ConnectorWork work = cmr.getConnectorManager(aqr.getConnectorName()).registerRequest(aqr);
+ work.setRequestWorkItem(workItem);
return new DataTierTupleSource(aqr, workItem, work, this, limit);
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -238,12 +238,16 @@
} catch (TranslatorException e) {
results = exceptionOccurred(e, true);
} catch (DataNotAvailableException e) {
- workItem.scheduleWork(new Runnable() {
- @Override
- public void run() {
- workItem.moreWork();
- }
- }, 10, e.getRetryDelay());
+ if (e.getRetryDelay() >= 0) {
+ workItem.scheduleWork(new Runnable() {
+ @Override
+ public void run() {
+ workItem.moreWork();
+ }
+ }, 10, e.getRetryDelay());
+ } else if (this.cwi.isDataAvailable()) {
+ continue;
+ }
throw BlockedException.block(aqr.getAtomicRequestID(), "Blocking on DataNotAvailableException"); //$NON-NLS-1$
}
receiveResults(results);
@@ -326,7 +330,7 @@
return results;
}
- private AtomicResultsMessage getResults()
+ AtomicResultsMessage getResults()
throws BlockedException, TeiidComponentException,
TranslatorException {
AtomicResultsMessage results = null;
@@ -443,7 +447,7 @@
@Override
public void onCompletion(FutureWork<AtomicResultsMessage> future) {
if (!cancelAsynch) {
- workItem.moreWork();
+ workItem.moreWork(); //this is not necessary in some situations with DataNotAvailable
}
canAsynchClose = false;
if (closed.get()) {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -291,9 +291,13 @@
}
}
} catch (BlockedException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Request Thread", requestID, "- processor blocked"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_DQP, "Request Thread", requestID, "- processor blocked"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
} catch (QueryProcessor.ExpiredTimeSliceException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Request Thread", requestID, "- time slice expired"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_DQP, "Request Thread", requestID, "- time slice expired"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
this.moreWork();
} catch (Throwable e) {
handleThrowable(e);
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -587,6 +587,15 @@
assertEquals(1, this.core.getLongRunningRequests().size());
}
+ @Test public void testDataAvailable() throws Exception {
+ agds.dataNotAvailable = -1;
+ RequestMessage reqMsg = exampleRequestMessage("select * FROM BQT1.SmallA");
+ ResultsMessage results = execute("A", 1, reqMsg);
+ if (results.getException() != null) {
+ throw results.getException();
+ }
+ }
+
public void helpTestVisibilityFails(String sql) throws Exception {
RequestMessage reqMsg = exampleRequestMessage(sql);
reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -168,4 +168,21 @@
}
}
+ @Test public void testAsynch() throws Exception {
+ this.connectorManager.dataNotAvailable = 10;
+ this.connectorManager.setRows(0);
+ helpSetup(3);
+ boolean blocked = false;
+ while (true) {
+ try {
+ assertNull(info.nextTuple());
+ break;
+ } catch (BlockedException e) {
+ blocked = true;
+ Thread.sleep(50);
+ }
+ }
+ assertTrue(blocked);
+ }
+
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -35,6 +35,7 @@
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorWork;
import org.teiid.dqp.internal.datamgr.ConnectorWorkItem;
+import org.teiid.dqp.internal.process.RequestWorkItem;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.AtomicResultsMessage;
import org.teiid.query.optimizer.TestOptimizer;
@@ -55,7 +56,7 @@
private int rows = 10;
private SourceCapabilities caps;
public boolean throwExceptionOnExecute;
- public int dataNotAvailable = -1;
+ public int dataNotAvailable = -2;
public int sleep;
private final AtomicInteger executeCount = new AtomicInteger();
private final AtomicInteger closeCount = new AtomicInteger();
@@ -98,9 +99,31 @@
final AtomicResultsMessage msg = ConnectorWorkItem.createResultsMessage(results);
msg.setFinalRow(rows);
return new ConnectorWork() {
+
+ RequestWorkItem item;
+ boolean returnedInitial;
+
+ @Override
+ public boolean isDataAvailable() {
+ return true;
+ }
+
+ @Override
+ public void setRequestWorkItem(RequestWorkItem item) {
+ this.item = item;
+ }
@Override
public AtomicResultsMessage more() throws TranslatorException {
+ if (dataNotAvailable == -1) {
+ dataNotAvailable = -2;
+ item.moreWork(); //this alone is not sufficient, we have to call the data available method to prevent
+ //timing issues
+ throw DataNotAvailableException.NO_POLLING;
+ }
+ if (returnedInitial) {
+ return msg;
+ }
throw new RuntimeException("Should not be called"); //$NON-NLS-1$
}
@@ -117,9 +140,13 @@
if (throwExceptionOnExecute) {
throw new TranslatorException("Connector Exception"); //$NON-NLS-1$
}
- if (dataNotAvailable > -1) {
+ if (dataNotAvailable > -2) {
int delay = dataNotAvailable;
- dataNotAvailable = -1;
+ if (delay == -1 && !returnedInitial) {
+ returnedInitial = true;
+ return ConnectorWorkItem.createResultsMessage(new List[0]);
+ }
+ dataNotAvailable = -2;
throw new DataNotAvailableException(delay);
}
return msg;
Modified: trunk/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java 2011-11-02 15:15:47 UTC (rev 3601)
+++ trunk/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java 2011-11-02 16:50:24 UTC (rev 3602)
@@ -21,16 +21,11 @@
*/
package org.teiid.transport;
-import java.util.Properties;
-
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.DefaultChannelPipeline;
import org.teiid.client.security.ILogon;
import org.teiid.common.buffer.StorageManager;
-import org.teiid.core.TeiidException;
-import org.teiid.jdbc.EmbeddedProfile;
import org.teiid.jdbc.TeiidDriver;
-import org.teiid.net.ServerConnection;
import org.teiid.net.TeiidURL.CONNECTION.AuthenticationType;
import org.teiid.net.socket.ObjectChannel;
@@ -46,14 +41,6 @@
super(config, new ClientServiceRegistryImpl(ClientServiceRegistry.Type.ODBC), storageManager, portOffset);
this.maxLobSize = maxLobSize;
this.driver = new TeiidDriver();
- this.driver.setEmbeddedProfile(new EmbeddedProfile() {
- @Override
- protected ServerConnection createServerConnection(Properties info)
- throws TeiidException {
- //When using the non-blocking api, we don't want to use the calling thread
- return new LocalServerConnection(info, false);
- }
- });
this.logonService = logon;
}
13 years, 1 month
teiid SVN: r3601 - in branches/as7: admin and 274 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-11-02 11:15:47 -0400 (Wed, 02 Nov 2011)
New Revision: 3601
Added:
branches/as7/cache-jbosscache/src/test/java/
branches/as7/client/src/main/java/org/teiid/client/ResizingArrayList.java
branches/as7/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java
branches/as7/common-core/src/main/java/org/teiid/core/util/ExecutorUtils.java
branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java
branches/as7/connectors/salesforce-api/src/main/resources/partner_v22.wsdl
branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java
branches/as7/documentation/reference/src/main/docbook/en-US/content/vdbs.xml
branches/as7/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheKey.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockByteBuffer.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockInputStream.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockOutputStream.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ConcurrentBitSet.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectInputStream.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectOutputStream.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBufferFrontedFileStoreCache.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestConcurrentBitSet.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java
branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
Removed:
branches/as7/client/src/main/java/org/teiid/jdbc/CancellationTimer.java
branches/as7/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
branches/as7/documentation/reference/src/main/docbook/en-US/content/multisource.xml
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockBitSetTree.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockClosedLongIntHashTable.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStoreCache.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockBitSetTree.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockClosedLongIntHashTable.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStoreCache.java
branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java
Modified:
branches/as7/
branches/as7/admin/pom.xml
branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java
branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
branches/as7/adminshell/pom.xml
branches/as7/adminshell/src/main/java/groovy/
branches/as7/adminshell/src/main/java/groovy/sql/
branches/as7/adminshell/src/main/java/groovy/sql/TeiidSql.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/
branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminHelpCommand.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminConsole.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminShell.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/GroovySqlExtensions.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/Help.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/MigrationUtil.java
branches/as7/adminshell/src/main/java/org/teiid/adminshell/SqlHelpCommand.java
branches/as7/adminshell/src/main/resources/org/
branches/as7/adminshell/src/main/resources/org/codehaus/
branches/as7/adminshell/src/main/resources/org/codehaus/groovy/
branches/as7/adminshell/src/main/resources/org/codehaus/groovy/tools/
branches/as7/adminshell/src/main/resources/org/codehaus/groovy/tools/shell/
branches/as7/adminshell/src/main/resources/org/codehaus/groovy/tools/shell/commands.xml
branches/as7/adminshell/src/main/resources/org/teiid/
branches/as7/adminshell/src/main/resources/org/teiid/adminshell/
branches/as7/adminshell/src/main/resources/org/teiid/adminshell/AdminHelpCommand.properties
branches/as7/adminshell/src/main/resources/org/teiid/adminshell/SqlHelpCommand.properties
branches/as7/adminshell/src/test/java/org/
branches/as7/adminshell/src/test/java/org/teiid/
branches/as7/adminshell/src/test/java/org/teiid/adminshell/
branches/as7/adminshell/src/test/java/org/teiid/adminshell/TestAdminShell.java
branches/as7/adminshell/src/test/resources/foo/
branches/as7/adminshell/src/test/resources/foo/bar.txt
branches/as7/api/pom.xml
branches/as7/api/src/main/java/org/teiid/events/
branches/as7/api/src/main/java/org/teiid/events/EventDistributor.java
branches/as7/api/src/main/java/org/teiid/events/EventDistributorFactory.java
branches/as7/api/src/main/java/org/teiid/language/Call.java
branches/as7/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java
branches/as7/build/kits/
branches/as7/build/kits/adminshell/
branches/as7/build/kits/jboss-container/
branches/as7/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
branches/as7/build/kits/jboss-container/teiid-releasenotes.html
branches/as7/build/pom.xml
branches/as7/cache-jbosscache/pom.xml
branches/as7/cache-jbosscache/src/main/java/org/
branches/as7/cache-jbosscache/src/main/java/org/teiid/
branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/
branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/
branches/as7/cache-jbosscache/src/main/java/org/teiid/events/
branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/
branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/
branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java
branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java
branches/as7/client-jdk15/pom.xml
branches/as7/client/pom.xml
branches/as7/client/src/main/java/org/teiid/client/BatchSerializer.java
branches/as7/client/src/main/java/org/teiid/client/ResultsMessage.java
branches/as7/client/src/main/java/org/teiid/client/util/
branches/as7/client/src/main/java/org/teiid/client/util/ExceptionHolder.java
branches/as7/client/src/main/java/org/teiid/client/util/ExceptionUtil.java
branches/as7/client/src/main/java/org/teiid/client/util/ResultsFuture.java
branches/as7/client/src/main/java/org/teiid/client/util/ResultsReceiver.java
branches/as7/client/src/main/java/org/teiid/jdbc/
branches/as7/client/src/main/java/org/teiid/jdbc/BaseDataSource.java
branches/as7/client/src/main/java/org/teiid/jdbc/BatchResults.java
branches/as7/client/src/main/java/org/teiid/jdbc/CallableStatementImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionListener.java
branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionProfile.java
branches/as7/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java
branches/as7/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/DeferredMetadataProvider.java
branches/as7/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
branches/as7/client/src/main/java/org/teiid/jdbc/ExecutionProperties.java
branches/as7/client/src/main/java/org/teiid/jdbc/FilteredResultsMetadata.java
branches/as7/client/src/main/java/org/teiid/jdbc/JDBCColumnNames.java
branches/as7/client/src/main/java/org/teiid/jdbc/JDBCColumnPositions.java
branches/as7/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java
branches/as7/client/src/main/java/org/teiid/jdbc/JDBCURL.java
branches/as7/client/src/main/java/org/teiid/jdbc/MetadataProvider.java
branches/as7/client/src/main/java/org/teiid/jdbc/ParameterMetaDataImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/PartialResultsWarning.java
branches/as7/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetMetaDataImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/SQLStates.java
branches/as7/client/src/main/java/org/teiid/jdbc/SocketProfile.java
branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/TeiidConnection.java
branches/as7/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java
branches/as7/client/src/main/java/org/teiid/jdbc/TeiidDriver.java
branches/as7/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java
branches/as7/client/src/main/java/org/teiid/jdbc/TeiidStatement.java
branches/as7/client/src/main/java/org/teiid/jdbc/WarningUtil.java
branches/as7/client/src/main/java/org/teiid/jdbc/WrapperImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/XAConnectionImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/XAResourceImpl.java
branches/as7/client/src/main/java/org/teiid/net/socket/
branches/as7/client/src/main/java/org/teiid/net/socket/Handshake.java
branches/as7/client/src/main/java/org/teiid/net/socket/Message.java
branches/as7/client/src/main/java/org/teiid/net/socket/ObjectChannel.java
branches/as7/client/src/main/java/org/teiid/net/socket/ObjectChannelFactory.java
branches/as7/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java
branches/as7/client/src/main/java/org/teiid/net/socket/ServerDiscovery.java
branches/as7/client/src/main/java/org/teiid/net/socket/ServiceInvocationStruct.java
branches/as7/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerInstance.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerInstanceFactory.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketUtil.java
branches/as7/client/src/main/java/org/teiid/net/socket/UrlServerDiscovery.java
branches/as7/client/src/main/resources/org/
branches/as7/client/src/main/resources/org/teiid/
branches/as7/client/src/main/resources/org/teiid/jdbc/
branches/as7/client/src/main/resources/org/teiid/net/
branches/as7/client/src/test/java/org/teiid/client/TestBatchSerializer.java
branches/as7/client/src/test/java/org/teiid/client/plan/
branches/as7/client/src/test/java/org/teiid/client/plan/TestPlanNode.java
branches/as7/client/src/test/java/org/teiid/client/util/
branches/as7/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java
branches/as7/client/src/test/java/org/teiid/client/util/TestResultsFuture.java
branches/as7/client/src/test/java/org/teiid/jdbc/
branches/as7/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestBatchResults.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestCallableStatement.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestConnection.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestDataTypeTransformer.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestJDBCURL.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestPreparedStatement.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestResultSet.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestSQLException.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestStatement.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestWrapperImpl.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestXAConnection.java
branches/as7/client/src/test/java/org/teiid/jdbc/util/
branches/as7/client/src/test/java/org/teiid/net/
branches/as7/client/src/test/java/org/teiid/net/TestTeiidURL.java
branches/as7/client/src/test/java/org/teiid/net/socket/
branches/as7/common-core/pom.xml
branches/as7/common-core/src/main/java/org/
branches/as7/common-core/src/main/java/org/teiid/
branches/as7/common-core/src/main/java/org/teiid/core/
branches/as7/common-core/src/main/java/org/teiid/core/BundleUtil.java
branches/as7/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java
branches/as7/common-core/src/main/java/org/teiid/core/CoreConstants.java
branches/as7/common-core/src/main/java/org/teiid/core/CorePlugin.java
branches/as7/common-core/src/main/java/org/teiid/core/TeiidComponentException.java
branches/as7/common-core/src/main/java/org/teiid/core/TeiidException.java
branches/as7/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java
branches/as7/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
branches/as7/common-core/src/main/java/org/teiid/core/crypto/
branches/as7/common-core/src/main/java/org/teiid/core/types/
branches/as7/common-core/src/main/java/org/teiid/core/types/BaseLob.java
branches/as7/common-core/src/main/java/org/teiid/core/types/BlobImpl.java
branches/as7/common-core/src/main/java/org/teiid/core/types/BlobType.java
branches/as7/common-core/src/main/java/org/teiid/core/types/ClobImpl.java
branches/as7/common-core/src/main/java/org/teiid/core/types/ClobType.java
branches/as7/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
branches/as7/common-core/src/main/java/org/teiid/core/types/InputStreamFactory.java
branches/as7/common-core/src/main/java/org/teiid/core/types/JDBCSQLTypeInfo.java
branches/as7/common-core/src/main/java/org/teiid/core/types/LobSearchUtil.java
branches/as7/common-core/src/main/java/org/teiid/core/types/NullType.java
branches/as7/common-core/src/main/java/org/teiid/core/types/SQLXMLImpl.java
branches/as7/common-core/src/main/java/org/teiid/core/types/Sequencable.java
branches/as7/common-core/src/main/java/org/teiid/core/types/SourceTransform.java
branches/as7/common-core/src/main/java/org/teiid/core/types/StandardXMLTranslator.java
branches/as7/common-core/src/main/java/org/teiid/core/types/Streamable.java
branches/as7/common-core/src/main/java/org/teiid/core/types/Transform.java
branches/as7/common-core/src/main/java/org/teiid/core/types/TransformationException.java
branches/as7/common-core/src/main/java/org/teiid/core/types/XMLTranslator.java
branches/as7/common-core/src/main/java/org/teiid/core/types/XMLType.java
branches/as7/common-core/src/main/java/org/teiid/core/types/basic/
branches/as7/common-core/src/main/java/org/teiid/core/util/
branches/as7/common-core/src/test/java/org/
branches/as7/common-core/src/test/java/org/teiid/
branches/as7/common-core/src/test/java/org/teiid/core/
branches/as7/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java
branches/as7/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java
branches/as7/common-core/src/test/java/org/teiid/core/crypto/
branches/as7/common-core/src/test/java/org/teiid/core/types/
branches/as7/common-core/src/test/java/org/teiid/core/types/TestBlobValue.java
branches/as7/common-core/src/test/java/org/teiid/core/types/TestClobValue.java
branches/as7/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java
branches/as7/common-core/src/test/java/org/teiid/core/types/TestSQLXMLImpl.java
branches/as7/common-core/src/test/java/org/teiid/core/types/TestXMLStreamSourceTranslator.java
branches/as7/common-core/src/test/java/org/teiid/core/types/TestXMLValue.java
branches/as7/common-core/src/test/java/org/teiid/core/types/basic/
branches/as7/common-core/src/test/java/org/teiid/core/util/
branches/as7/common-core/src/test/java/org/teiid/core/util/UnitTestUtil.java
branches/as7/common-core/src/test/java/org/teiid/query/
branches/as7/common-core/src/test/java/org/teiid/query/unittest/
branches/as7/connectors/connector-file/pom.xml
branches/as7/connectors/connector-file/src/main/java/org/teiid/resource/adapter/
branches/as7/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/
branches/as7/connectors/connector-file/src/main/resources/org/
branches/as7/connectors/connector-file/src/main/resources/org/teiid/
branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/
branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/
branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file/
branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file/i18n.properties
branches/as7/connectors/connector-file/src/test/java/org/
branches/as7/connectors/connector-file/src/test/java/org/teiid/
branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/
branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/adapter/
branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file/
branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file/TestFileConnection.java
branches/as7/connectors/connector-ldap/pom.xml
branches/as7/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/
branches/as7/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap/
branches/as7/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java
branches/as7/connectors/connector-salesforce/pom.xml
branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
branches/as7/connectors/connector-ws/pom.xml
branches/as7/connectors/connector-ws/src/main/resources/org/
branches/as7/connectors/connector-ws/src/main/resources/org/teiid/
branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/
branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/
branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws/
branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws/i18n.properties
branches/as7/connectors/pom.xml
branches/as7/connectors/salesforce-api/pom.xml
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java
branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java
branches/as7/connectors/sandbox/pom.xml
branches/as7/connectors/sandbox/translator-yahoo/pom.xml
branches/as7/connectors/translator-file/pom.xml
branches/as7/connectors/translator-jdbc/pom.xml
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/FunctionModifier.java
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/IngresExecutionFactory.java
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/LocateFunctionModifier.java
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/
branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java
branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
branches/as7/connectors/translator-ldap/pom.xml
branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/
branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/
branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
branches/as7/connectors/translator-loopback/pom.xml
branches/as7/connectors/translator-olap/pom.xml
branches/as7/connectors/translator-salesforce/pom.xml
branches/as7/connectors/translator-ws/pom.xml
branches/as7/console/pom.xml
branches/as7/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
branches/as7/console/src/main/resources/META-INF/rhq-plugin.xml
branches/as7/documentation/admin-guide/pom.xml
branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml
branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml
branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/security.xml
branches/as7/documentation/caching-guide/pom.xml
branches/as7/documentation/client-developers-guide/pom.xml
branches/as7/documentation/developer-guide/pom.xml
branches/as7/documentation/pom.xml
branches/as7/documentation/quick-start-example/pom.xml
branches/as7/documentation/reference/pom.xml
branches/as7/documentation/reference/src/main/docbook/en-US/Reference.xml
branches/as7/documentation/reference/src/main/docbook/en-US/content/architecture.xml
branches/as7/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
branches/as7/documentation/reference/src/main/docbook/en-US/content/translators.xml
branches/as7/engine/pom.xml
branches/as7/engine/src/main/java/org/teiid/api/
branches/as7/engine/src/main/java/org/teiid/api/exception/
branches/as7/engine/src/main/java/org/teiid/api/exception/query/
branches/as7/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java
branches/as7/engine/src/main/java/org/teiid/api/exception/query/UnresolvedSymbolDescription.java
branches/as7/engine/src/main/java/org/teiid/common/
branches/as7/engine/src/main/java/org/teiid/common/buffer/
branches/as7/engine/src/main/java/org/teiid/common/buffer/AbstractTupleSource.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/AutoCleanupUtil.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/BatchManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/BlockedException.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/Cache.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStore.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/IndexedTupleSource.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/LobManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/SPage.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/Serializer.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/StorageManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleSource.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ExtensibleBufferedOutputStream.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SplittableStorageManager.java
branches/as7/engine/src/main/java/org/teiid/core/
branches/as7/engine/src/main/java/org/teiid/core/id/
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AccessInfo.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java
branches/as7/engine/src/main/java/org/teiid/dqp/message/RequestID.java
branches/as7/engine/src/main/java/org/teiid/query/
branches/as7/engine/src/main/java/org/teiid/query/ObjectReplicator.java
branches/as7/engine/src/main/java/org/teiid/query/QueryPlugin.java
branches/as7/engine/src/main/java/org/teiid/query/ReplicatedObject.java
branches/as7/engine/src/main/java/org/teiid/query/analysis/
branches/as7/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java
branches/as7/engine/src/main/java/org/teiid/query/eval/
branches/as7/engine/src/main/java/org/teiid/query/function/
branches/as7/engine/src/main/java/org/teiid/query/function/CharsetUtils.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionForm.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionMetadataSource.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java
branches/as7/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
branches/as7/engine/src/main/java/org/teiid/query/function/UDFSource.java
branches/as7/engine/src/main/java/org/teiid/query/function/aggregate/
branches/as7/engine/src/main/java/org/teiid/query/function/metadata/
branches/as7/engine/src/main/java/org/teiid/query/function/source/
branches/as7/engine/src/main/java/org/teiid/query/mapping/
branches/as7/engine/src/main/java/org/teiid/query/mapping/relational/
branches/as7/engine/src/main/java/org/teiid/query/mapping/xml/
branches/as7/engine/src/main/java/org/teiid/query/metadata/
branches/as7/engine/src/main/java/org/teiid/query/metadata/TempMetadataID.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/
branches/as7/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/CommandPlanner.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/DdlPlanner.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/TriggerActionPlanner.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/capabilities/
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/AliasGenerator.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/OptimizerRule.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/PartitionAnalyzer.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/PlanHints.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RuleStack.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/xml/
branches/as7/engine/src/main/java/org/teiid/query/parser/
branches/as7/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
branches/as7/engine/src/main/java/org/teiid/query/processor/
branches/as7/engine/src/main/java/org/teiid/query/processor/BatchCollector.java
branches/as7/engine/src/main/java/org/teiid/query/processor/BatchIterator.java
branches/as7/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java
branches/as7/engine/src/main/java/org/teiid/query/processor/CollectionTupleSource.java
branches/as7/engine/src/main/java/org/teiid/query/processor/DdlPlan.java
branches/as7/engine/src/main/java/org/teiid/query/processor/ProcessorDataManager.java
branches/as7/engine/src/main/java/org/teiid/query/processor/ProcessorPlan.java
branches/as7/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
branches/as7/engine/src/main/java/org/teiid/query/processor/proc/
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java
branches/as7/engine/src/main/java/org/teiid/query/processor/xml/
branches/as7/engine/src/main/java/org/teiid/query/report/
branches/as7/engine/src/main/java/org/teiid/query/resolver/
branches/as7/engine/src/main/java/org/teiid/query/resolver/CommandResolver.java
branches/as7/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
branches/as7/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java
branches/as7/engine/src/main/java/org/teiid/query/resolver/VariableResolver.java
branches/as7/engine/src/main/java/org/teiid/query/resolver/command/
branches/as7/engine/src/main/java/org/teiid/query/resolver/util/
branches/as7/engine/src/main/java/org/teiid/query/rewriter/
branches/as7/engine/src/main/java/org/teiid/query/sql/
branches/as7/engine/src/main/java/org/teiid/query/sql/LanguageObject.java
branches/as7/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java
branches/as7/engine/src/main/java/org/teiid/query/sql/ProcedureReservedWords.java
branches/as7/engine/src/main/java/org/teiid/query/sql/lang/
branches/as7/engine/src/main/java/org/teiid/query/sql/navigator/
branches/as7/engine/src/main/java/org/teiid/query/sql/proc/
branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/
branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
branches/as7/engine/src/main/java/org/teiid/query/sql/util/
branches/as7/engine/src/main/java/org/teiid/query/sql/visitor/
branches/as7/engine/src/main/java/org/teiid/query/tempdata/
branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
branches/as7/engine/src/main/java/org/teiid/query/util/
branches/as7/engine/src/main/java/org/teiid/query/validator/
branches/as7/engine/src/main/java/org/teiid/query/xquery/
branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/
branches/as7/engine/src/main/java/org/teiid/vdb/
branches/as7/engine/src/main/java/org/teiid/vdb/runtime/
branches/as7/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties
branches/as7/engine/src/test/java/org/teiid/cache/
branches/as7/engine/src/test/java/org/teiid/cache/TestDefaultCache.java
branches/as7/engine/src/test/java/org/teiid/common/
branches/as7/engine/src/test/java/org/teiid/common/buffer/
branches/as7/engine/src/test/java/org/teiid/common/buffer/BufferManagerFactory.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/TestSTree.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStorageManager.java
branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestSizeUtility.java
branches/as7/engine/src/test/java/org/teiid/common/queue/
branches/as7/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java
branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java
branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestMetaDataProcessor.java
branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatementBatchedUpdate.java
branches/as7/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java
branches/as7/engine/src/test/java/org/teiid/query/
branches/as7/engine/src/test/java/org/teiid/query/analysis/
branches/as7/engine/src/test/java/org/teiid/query/function/
branches/as7/engine/src/test/java/org/teiid/query/function/TestFunction.java
branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionLibrary.java
branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java
branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionMethods.java
branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionTree.java
branches/as7/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.java
branches/as7/engine/src/test/java/org/teiid/query/function/metadata/
branches/as7/engine/src/test/java/org/teiid/query/function/source/
branches/as7/engine/src/test/java/org/teiid/query/mapping/
branches/as7/engine/src/test/java/org/teiid/query/mapping/xml/
branches/as7/engine/src/test/java/org/teiid/query/metadata/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/FakeFunctionMetadataSource.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/InlineViewCase.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestAccessPatterns.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestAggregatePushdown.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestAnsiJoinPushdown.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestComparableMetadataPushdown.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestDependentJoins.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestExpressionsInGroupBy.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestInlineView.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinPushdownRestrictions.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinWithFunction.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptionalJoins.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestPartitionedJoinPlanning.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestRuleRemoveSorts.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestSortOptimization.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestStoredProcedurePlanning.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestSubqueryPushdown.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestUnionPlanning.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/capabilities/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/proc/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestAliasGenerator.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java
branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/plantree/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/rules/
branches/as7/engine/src/test/java/org/teiid/query/optimizer/xml/
branches/as7/engine/src/test/java/org/teiid/query/parser/
branches/as7/engine/src/test/java/org/teiid/query/parser/TestParser.java
branches/as7/engine/src/test/java/org/teiid/query/processor/
branches/as7/engine/src/test/java/org/teiid/query/processor/FakeDataManager.java
branches/as7/engine/src/test/java/org/teiid/query/processor/FakeDataStore.java
branches/as7/engine/src/test/java/org/teiid/query/processor/FakeProcessorPlan.java
branches/as7/engine/src/test/java/org/teiid/query/processor/FakeTupleSource.java
branches/as7/engine/src/test/java/org/teiid/query/processor/HardcodedDataManager.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestAggregateProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestArrayTable.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestBaseProcessorPlan.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestBatchIterator.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestBatchedUpdatePlan.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestCollectionTupleSource.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestInherintlyUpdatableViews.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestInsertProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestJoinWithFunction.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestOptionalJoins.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestOrderByProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestSecurityFunctions.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestSetProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestTextTable.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestTriggerActions.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestVirtualDepJoin.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/eval/
branches/as7/engine/src/test/java/org/teiid/query/processor/proc/
branches/as7/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
branches/as7/engine/src/test/java/org/teiid/query/processor/relational/
branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java
branches/as7/engine/src/test/java/org/teiid/query/processor/xml/
branches/as7/engine/src/test/java/org/teiid/query/resolver/
branches/as7/engine/src/test/java/org/teiid/query/rewriter/
branches/as7/engine/src/test/java/org/teiid/query/sql/
branches/as7/engine/src/test/java/org/teiid/query/sql/lang/
branches/as7/engine/src/test/java/org/teiid/query/sql/proc/
branches/as7/engine/src/test/java/org/teiid/query/sql/symbol/
branches/as7/engine/src/test/java/org/teiid/query/sql/util/
branches/as7/engine/src/test/java/org/teiid/query/sql/visitor/
branches/as7/engine/src/test/java/org/teiid/query/unittest/
branches/as7/engine/src/test/java/org/teiid/query/util/
branches/as7/engine/src/test/java/org/teiid/query/validator/
branches/as7/engine/src/test/java/org/teiid/vdb/
branches/as7/engine/src/test/java/org/teiid/vdb/runtime/
branches/as7/engine/src/test/resources/text/
branches/as7/engine/src/test/resources/text/TextParts_HeaderRow2.csv
branches/as7/engine/src/test/resources/text/cdm_dos.txt
branches/as7/engine/src/test/resources/text/cdm_dos_win.txt
branches/as7/engine/src/test/resources/text/test-file.txt.csv
branches/as7/hibernate-dialect/pom.xml
branches/as7/hibernate-dialect/src/main/java/org/teiid/dialect/TeiidDialect.java
branches/as7/jboss-integration/pom.xml
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt
branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt
branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml
branches/as7/metadata/pom.xml
branches/as7/metadata/src/test/java/org/teiid/cdk/
branches/as7/metadata/src/test/java/org/teiid/cdk/api/
branches/as7/metadata/src/test/java/org/teiid/cdk/unittest/
branches/as7/metadata/src/test/java/org/teiid/core/
branches/as7/metadata/src/test/java/org/teiid/core/util/
branches/as7/metadata/src/test/java/org/teiid/internal/
branches/as7/metadata/src/test/java/org/teiid/internal/core/
branches/as7/metadata/src/test/java/org/teiid/internal/core/index/
branches/as7/pom.xml
branches/as7/runtime/pom.xml
branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
branches/as7/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
branches/as7/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
branches/as7/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
branches/as7/runtime/src/main/java/org/teiid/transport/pg/
branches/as7/runtime/src/main/java/org/teiid/transport/pg/PGbytea.java
branches/as7/runtime/src/main/resources/org/teiid/transport/
branches/as7/runtime/src/test/java/org/teiid/deployers/TestExtendedPropertyMetadata.java
branches/as7/runtime/src/test/java/org/teiid/dqp/
branches/as7/runtime/src/test/java/org/teiid/dqp/service/
branches/as7/runtime/src/test/java/org/teiid/dqp/service/buffer/
branches/as7/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
branches/as7/test-integration/common/pom.xml
branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
branches/as7/test-integration/common/src/test/java/org/teiid/cdk/
branches/as7/test-integration/common/src/test/java/org/teiid/cdk/api/
branches/as7/test-integration/common/src/test/java/org/teiid/dqp/
branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/
branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/process/
branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java
branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
branches/as7/test-integration/common/src/test/java/org/teiid/transport/
branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java
branches/as7/test-integration/common/src/test/resources/TestJDBCSocketTransport/
branches/as7/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected
branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/
branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testColumnMetadataWithAlias.expected
branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testPk.expected
branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testPkPrepared.expected
branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testReferenceKeyColumns.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected
branches/as7/test-integration/db/pom.xml
branches/as7/test-integration/db/src/main/java/org/teiid/internal/
branches/as7/test-integration/db/src/main/java/org/teiid/internal/core/
branches/as7/test-integration/db/src/main/java/org/teiid/internal/core/xml/
branches/as7/test-integration/db/src/test/java/com/
branches/as7/test-integration/db/src/test/java/org/teiid/internal/
branches/as7/test-integration/db/src/test/java/org/teiid/internal/core/
branches/as7/test-integration/pom.xml
Log:
TEIID-1720: forward merge svn merge -r 3506:3597
Property changes on: branches/as7
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:3188-3450,3452-3506
+ /branches/7.4.x:3535-3555
/trunk:3188-3450,3452-3597
Modified: branches/as7/admin/pom.xml
===================================================================
--- branches/as7/admin/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/admin/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-admin</artifactId>
Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -94,6 +94,7 @@
private VDB.Status status = VDB.Status.INACTIVE;
private ConnectionType connectionType = VDB.ConnectionType.BY_VERSION;
private boolean removed;
+ private long queryTimeout = Long.MIN_VALUE;
@XmlAttribute(name = "name", required = true)
public String getName() {
@@ -344,4 +345,15 @@
public boolean isPreview() {
return Boolean.valueOf(getPropertyValue("preview")); //$NON-NLS-1$
}
+ public long getQueryTimeout() {
+ if (queryTimeout == Long.MIN_VALUE) {
+ String timeout = getPropertyValue("query-timeout"); //$NON-NLS-1$
+ if (timeout != null) {
+ queryTimeout = Math.max(0, Long.parseLong(timeout));
+ } else {
+ queryTimeout = 0;
+ }
+ }
+ return queryTimeout;
+ }
}
Modified: branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java
===================================================================
--- branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestRequestMetadata.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -57,76 +57,71 @@
return request;
}
- public static final String desc = "{\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"OBJECT\"\n" +
+ public static final String desc = "{\"attributes\" : {\n" +
+ " \"execution-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
+ " },\n" +
+ " \"description\" : \"Unique Identifier for Request\",\n" +
+ " \"required\" : true\n" +
" },\n" +
- " \"attributes\" : {\n" +
- " \"execution-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"Unique Identifier for Request\",\n" +
- " \"required\" : true\n" +
+ " \"session-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"session-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Session Identifier\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Session Identifier\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"start-time\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
" },\n" +
- " \"start-time\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"Start time for the request\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Start time for the request\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"command\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"command\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Executing Command\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Executing Command\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"source-request\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"BOOLEAN\"\n" +
" },\n" +
- " \"source-request\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"BOOLEAN\"\n" +
- " },\n" +
- " \"description\" : \"Is this Connector level request\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Is this Connector level request\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"node-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"INT\"\n" +
" },\n" +
- " \"node-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"INT\"\n" +
- " },\n" +
- " \"description\" : \"Node Identifier\",\n" +
- " \"required\" : false\n" +
+ " \"description\" : \"Node Identifier\",\n" +
+ " \"required\" : false\n" +
+ " },\n" +
+ " \"transaction-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"transaction-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Get Transaction XID if transaction involved\",\n" +
- " \"required\" : false\n" +
+ " \"description\" : \"Get Transaction XID if transaction involved\",\n" +
+ " \"required\" : false\n" +
+ " },\n" +
+ " \"processing-state\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"processing-state\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"State of the Request\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"State of the Request\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"thread-state\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"thread-state\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Thread state\",\n" +
- " \"required\" : true\n" +
- " }\n" +
+ " \"description\" : \"Thread state\",\n" +
+ " \"required\" : true\n" +
" }\n" +
- "}";
+ "}}";
@Test public void testDescribe() {
assertEquals(desc, VDBMetadataMapper.RequestMetadataMapper.INSTANCE.describe(new ModelNode()).toJSONString(false));
}
Modified: branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
===================================================================
--- branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -51,83 +51,78 @@
}
- private static final String describe = "{\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"OBJECT\"\n" +
+ private static final String describe = "{\"attributes\" : {\n" +
+ " \"application-name\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
+ " },\n" +
+ " \"description\" : \"Application assosiated with Session\",\n" +
+ " \"required\" : false\n" +
" },\n" +
- " \"attributes\" : {\n" +
- " \"application-name\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Application assosiated with Session\",\n" +
- " \"required\" : false\n" +
+ " \"created-time\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
" },\n" +
- " \"created-time\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"When session created\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"When session created\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"client-host-address\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
" },\n" +
- " \"client-host-address\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"Host name from where the session created\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Host name from where the session created\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"ip-address\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"ip-address\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"IP address from where session is created\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"IP address from where session is created\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"last-ping-time\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
" },\n" +
- " \"last-ping-time\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"Last ping time\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Last ping time\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"session-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"session-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Session Identifier\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Session Identifier\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"user-name\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"user-name\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"User name associated with session\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"User name associated with session\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"vdb-name\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"vdb-name\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"The Virtual Database Name\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"The Virtual Database Name\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"vdb-version\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"INT\"\n" +
" },\n" +
- " \"vdb-version\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"INT\"\n" +
- " },\n" +
- " \"description\" : \"The Virtual Database Version\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"The Virtual Database Version\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"security-domain\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"security-domain\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Security domain that session used for login\",\n" +
- " \"required\" : false\n" +
- " }\n" +
+ " \"description\" : \"Security domain that session used for login\",\n" +
+ " \"required\" : false\n" +
" }\n" +
- "}";
+ "}}";
@Test public void testDescribe() {
ModelNode n = VDBMetadataMapper.SessionMetadataMapper.INSTANCE.describe(new ModelNode());
Modified: branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java
===================================================================
--- branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/admin/src/test/java/org/teiid/adminapi/impl/TestTransactionMetadata.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -48,41 +48,36 @@
assertEquals(tm.getScope(), tm1.getScope());
}
- private static final String describe = "{\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"OBJECT\"\n" +
+ private static final String describe = "{\"attributes\" : {\n" +
+ " \"session-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
+ " },\n" +
+ " \"description\" : \"Session Identifier\",\n" +
+ " \"required\" : true\n" +
" },\n" +
- " \"attributes\" : {\n" +
- " \"session-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Session Identifier\",\n" +
- " \"required\" : true\n" +
+ " \"txn-created-time\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
" },\n" +
- " \"txn-created-time\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"Transaction created time\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Transaction created time\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"txn-scope\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
" },\n" +
- " \"txn-scope\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"LONG\"\n" +
- " },\n" +
- " \"description\" : \"Transaction scope (Request, Local, Global)\",\n" +
- " \"required\" : true\n" +
+ " \"description\" : \"Transaction scope (Request, Local, Global)\",\n" +
+ " \"required\" : true\n" +
+ " },\n" +
+ " \"txn-id\" : {\n" +
+ " \"type\" : {\n" +
+ " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
" },\n" +
- " \"txn-id\" : {\n" +
- " \"type\" : {\n" +
- " \"TYPE_MODEL_VALUE\" : \"STRING\"\n" +
- " },\n" +
- " \"description\" : \"Transaction Identifier (XID)\",\n" +
- " \"required\" : true\n" +
- " }\n" +
+ " \"description\" : \"Transaction Identifier (XID)\",\n" +
+ " \"required\" : true\n" +
" }\n" +
- "}";
+ "}}";
@Test
public void testDescribe() {
ModelNode n = VDBMetadataMapper.TransactionMetadataMapper.INSTANCE.describe(new ModelNode());
Modified: branches/as7/adminshell/pom.xml
===================================================================
--- branches/as7/adminshell/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/adminshell/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-adminshell</artifactId>
@@ -37,13 +37,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
<version>4.4</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>jline</groupId>
Property changes on: branches/as7/adminshell/src/main/java/groovy
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/groovy:3535-3555*
/trunk/adminshell/src/main/java/groovy:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/groovy/sql
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/groovy/sql:3535-3555*
/trunk/adminshell/src/main/java/groovy/sql:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/groovy/sql/TeiidSql.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/groovy/sql/TeiidSql.java:3535-3555
/trunk/adminshell/src/main/java/groovy/sql/TeiidSql.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell:3535-3555*
/trunk/adminshell/src/main/java/org/teiid/adminshell:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminHelpCommand.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/AdminHelpCommand.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/AdminHelpCommand.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.1.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java:2901-2940
/trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java:3188-3450,3452-3506
+ /branches/7.1.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java:2901-2940
/branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java:3188-3450,3452-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminConsole.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminConsole.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminConsole.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminShell.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminShell.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/GroovyAdminShell.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/GroovySqlExtensions.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/GroovySqlExtensions.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/GroovySqlExtensions.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/Help.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/Help.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/Help.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/MigrationUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/MigrationUtil.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/MigrationUtil.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/java/org/teiid/adminshell/SqlHelpCommand.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/java/org/teiid/adminshell/SqlHelpCommand.java:3535-3555
/trunk/adminshell/src/main/java/org/teiid/adminshell/SqlHelpCommand.java:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org:3535-3555*
/trunk/adminshell/src/main/resources/org:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/codehaus
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/codehaus:3535-3555*
/trunk/adminshell/src/main/resources/org/codehaus:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/codehaus/groovy
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/codehaus/groovy:3535-3555*
/trunk/adminshell/src/main/resources/org/codehaus/groovy:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/codehaus/groovy/tools
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/codehaus/groovy/tools:3535-3555*
/trunk/adminshell/src/main/resources/org/codehaus/groovy/tools:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/codehaus/groovy/tools/shell
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/codehaus/groovy/tools/shell:3535-3555*
/trunk/adminshell/src/main/resources/org/codehaus/groovy/tools/shell:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/codehaus/groovy/tools/shell/commands.xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/codehaus/groovy/tools/shell/commands.xml:3535-3555
/trunk/adminshell/src/main/resources/org/codehaus/groovy/tools/shell/commands.xml:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/teiid:3535-3555*
/trunk/adminshell/src/main/resources/org/teiid:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/teiid/adminshell
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/teiid/adminshell:3535-3555*
/trunk/adminshell/src/main/resources/org/teiid/adminshell:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/teiid/adminshell/AdminHelpCommand.properties
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/teiid/adminshell/AdminHelpCommand.properties:3535-3555
/trunk/adminshell/src/main/resources/org/teiid/adminshell/AdminHelpCommand.properties:3507-3597
Property changes on: branches/as7/adminshell/src/main/resources/org/teiid/adminshell/SqlHelpCommand.properties
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/main/resources/org/teiid/adminshell/SqlHelpCommand.properties:3535-3555
/trunk/adminshell/src/main/resources/org/teiid/adminshell/SqlHelpCommand.properties:3507-3597
Property changes on: branches/as7/adminshell/src/test/java/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/test/java/org:3535-3555*
/trunk/adminshell/src/test/java/org:3507-3597
Property changes on: branches/as7/adminshell/src/test/java/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/test/java/org/teiid:3535-3555*
/trunk/adminshell/src/test/java/org/teiid:3507-3597
Property changes on: branches/as7/adminshell/src/test/java/org/teiid/adminshell
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/test/java/org/teiid/adminshell:3535-3555*
/trunk/adminshell/src/test/java/org/teiid/adminshell:3507-3597
Property changes on: branches/as7/adminshell/src/test/java/org/teiid/adminshell/TestAdminShell.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/test/java/org/teiid/adminshell/TestAdminShell.java:3535-3555
/trunk/adminshell/src/test/java/org/teiid/adminshell/TestAdminShell.java:3507-3597
Property changes on: branches/as7/adminshell/src/test/resources/foo
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/test/resources/foo:3535-3555*
/trunk/adminshell/src/test/resources/foo:3507-3597
Property changes on: branches/as7/adminshell/src/test/resources/foo/bar.txt
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/adminshell/src/test/resources/foo/bar.txt:3535-3555
/trunk/adminshell/src/test/resources/foo/bar.txt:3507-3597
Modified: branches/as7/api/pom.xml
===================================================================
--- branches/as7/api/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/api/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-api</artifactId>
Property changes on: branches/as7/api/src/main/java/org/teiid/events
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/api/src/main/java/org/teiid/events:3535-3555*
/trunk/api/src/main/java/org/teiid/events:3507-3597
Property changes on: branches/as7/api/src/main/java/org/teiid/events/EventDistributor.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/api/src/main/java/org/teiid/events/EventDistributor.java:3340-3349
/trunk/api/src/main/java/org/teiid/events/EventDistributor.java:3188-3450,3452-3506
+ /branches/7.4.x/api/src/main/java/org/teiid/events/EventDistributor.java:3340-3349,3535-3555
/trunk/api/src/main/java/org/teiid/events/EventDistributor.java:3188-3450,3452-3597
Property changes on: branches/as7/api/src/main/java/org/teiid/events/EventDistributorFactory.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/api/src/main/java/org/teiid/events/EventDistributorFactory.java:3535-3555
/trunk/api/src/main/java/org/teiid/events/EventDistributorFactory.java:3507-3597
Modified: branches/as7/api/src/main/java/org/teiid/language/Call.java
===================================================================
--- branches/as7/api/src/main/java/org/teiid/language/Call.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/api/src/main/java/org/teiid/language/Call.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -93,6 +93,9 @@
return null;
}
+ /**
+ * @return the result set types or a zero length array if no result set is returned
+ */
public Class<?>[] getResultSetColumnTypes() {
ColumnSet<Procedure> resultSet = this.metadataObject.getResultSet();
if (resultSet == null) {
Modified: branches/as7/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java
===================================================================
--- branches/as7/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -81,6 +81,7 @@
import org.teiid.language.SQLConstants.Tokens;
import org.teiid.language.SortSpecification.Ordering;
import org.teiid.metadata.AbstractMetadataRecord;
+import org.teiid.metadata.Table;
/**
@@ -434,13 +435,7 @@
}
public void visit(NamedTable obj) {
- AbstractMetadataRecord groupID = obj.getMetadataObject();
- if(groupID != null) {
- buffer.append(getName(groupID));
- } else {
- buffer.append(obj.getName());
- }
-
+ appendBaseName(obj);
if (obj.getCorrelationName() != null) {
buffer.append(Tokens.SPACE);
if (useAsInGroupAlias()){
@@ -450,6 +445,15 @@
buffer.append(obj.getCorrelationName());
}
}
+
+ protected void appendBaseName(NamedTable obj) {
+ Table groupID = obj.getMetadataObject();
+ if(groupID != null) {
+ buffer.append(getName(groupID));
+ } else {
+ buffer.append(obj.getName());
+ }
+ }
/**
* Indicates whether group alias should be of the form
Property changes on: branches/as7/build/kits
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/build/kits:3535-3555*
/trunk/build/kits:3507-3597
Property changes on: branches/as7/build/kits/adminshell
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/build/kits/adminshell:3535-3555
/trunk/build/kits/adminshell:3507-3597
Property changes on: branches/as7/build/kits/jboss-container
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/build/kits/jboss-container:3535-3555
/trunk/build/kits/jboss-container:3507-3597
Modified: branches/as7/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- branches/as7/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,10 +24,10 @@
<property name="useDisk">true</property>
<!-- Directory location for the buffer files -->
<property name="diskDirectory">${jboss.server.temp.dir}/teiid</property>
- <!-- The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 512) -->
- <property name="processorBatchSize">512</property>
- <!-- The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 1024) -->
- <property name="connectorBatchSize">1024</property>
+ <!-- The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 256) -->
+ <property name="processorBatchSize">256</property>
+ <!-- The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 512) -->
+ <property name="connectorBatchSize">512</property>
<!--
The approximate amount of buffer memory in kilobytes allowable for a single processing operation (sort, grouping, etc.) regardless of existing memory commitments. -1 means to automatically calculate a value (default -1).
See the admin guide for more.
@@ -48,6 +48,14 @@
However inline lob values are not supported by pre-7.6 clients, so disable this
property if using older clients utilizing lobs. (default true) -->
<property name="inlineLobs">true</property>
+ <!-- Memory buffer space used by the buffer manager in MB. -1 determines the setting automatically from the maxReserveKB (default -1).
+ This value cannot be smaller than maxStorageObjectSize.-->
+ <property name="memoryBufferSpace">-1</property>
+ <!-- Set to true to hold the memory buffer off-heap. If true you must ensure that the VM can allocate that much direct memory (default false). -->
+ <property name="memoryBufferOffHeap">false</property>
+ <!-- The maximum size of a buffer managed object (typically a table page or a results batch) in bytes (default 8388608 or 8MB).
+ Setting this value too high will reduce the effectiveness of the memory buffer.-->
+ <property name="maxStorageObjectSize">8388608</property>
</bean>
<bean name="CacheFactory" class="org.teiid.cache.jboss.ClusterableCacheFactory">
@@ -138,6 +146,8 @@
<property name="objectReplicatorName">teiid/replicator</property>
<!-- Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true) -->
<property name="detectingChangeEvents">true</property>
+ <!-- Set the default query timeout for all queries in milliseconds. 0 indicates no timeout. Lesser timeout values may be set per VDB or by clients. (default 0) -->
+ <property name="queryTimeout">0</property>
</bean>
<!-- An authorization validator that by default uses data role information stored in VDBs -->
@@ -229,6 +239,9 @@
<property name="truststorePassword">passwd</property>
<!-- 1-way, 2-way, anonymous -->
<property name="authenticationMode">anonymous</property>
+ <!-- uncomment for enforcing the minimum 128 bit encryption, edit or supply only supported cipher suites from JVM
+ <property name="enabledCipherSuites">SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_KRB5_WITH_RC4_128_MD5,TLS_KRB5_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_KRB5_WITH_3DES_EDE_CBC_MD5,TLS_KRB5_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA</property>
+ -->
</bean>
<!-- JDBC Socket connection properties (SSL see below) -->
Modified: branches/as7/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- branches/as7/build/kits/jboss-container/teiid-releasenotes.html 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/build/kits/jboss-container/teiid-releasenotes.html 2011-11-02 15:15:47 UTC (rev 3601)
@@ -30,7 +30,11 @@
<LI><B>File Enhancements</B> - the file translator can now optionally (via the ExceptionIfFileNotFound property) throw an exception if the path refers to a file that doesn't exist. The file resource adapter can be configured to map file names and can prevent parent path .. references. See the Admin Guide or the file-ds.xml template for more.
<LI><B>TEXTTABLE Enhancements</B> - TEXTTABLE can now parse fixed width files that do not use a row delimiter and can optionally produce fixed values that haven't been trimmed.
<LI><B>Temp table transactions</B> - Internal materialized views and temp table usage from a session and within procedures can take advantage of greater transaction support.
- <LI><B>Buffering Improvements</B> - Added the ability to inline memory based or small lobs and added tracking of the memory held by soft references.
+ <LI><B>Buffering Improvements</B> - Added the ability to inline memory based or small lobs and added tracking of the memory held by soft references. Also switched to a concurrent LFRU algorithm that significantly reduces writes and read misses with temporary tables. Added a memory buffer to better handle file storage.
+ The memory buffer may be optional be configured as off-heap for better large memory performance - see the Admin Guide for more. Overhead is now tracked to help prevent memory errors when dealing with 10s of millions or more of batches/pages. Serialization and disk utilization were also improved.
+ <LI><B>GSSAPI</B> - both the Teiid JDBC client/server and the ODBC pg backend can now support GSSAPI for single sign-on.
+ <LI><B>Server-side Query Timeouts</B> - default query timeouts can be configured at both the VDB (via the query-timeout VDB property) and entire server (via the teiid-jboss-beans.xml queryTimeout property).
+ <LI><B>Native Queries</B> - added the ability to specify native query SQL for JDBC physical tables and stored procedures via extension metadata.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
@@ -44,6 +48,7 @@
<ul>
<li>Leave was added as a reserved word.
<li>Lob inlining is incompatible with clients older than 7.6. If a 7.6 server will have older clients that use lobs connect to it, then the BufferService property inlineLobs should be set to false in the teiid-jboss-beans.xml file.
+ <li>Oracle translators assume they are using Oracle supplied drivers. If that is not the case, set the Oracle translator execution property oracleSuppliedDriver to false.
</ul>
<h4>from 7.4</h4>
@@ -116,6 +121,12 @@
<h4>from 7.4</h4>
<ul>
+ <li>The configuration for the buffer service now defaults to 256/512 for processor and connector batch sizes respectively. The buffer service also has 4 new properties inlineLobs, memoryBufferSpace, memoryBufferOffHeap, and maxStorageObjectSize.
+ If you were explicitly setting the value for maxReserveKb, you should consider lowering that value to account for the memory buffer and/or explicitly set the memoryBufferSpace.
+</ul>
+
+<h4>from 7.4</h4>
+<ul>
<LI>The configuration for authorization has been moved off of the RuntimeEngineDeployer bean and onto separate AuthorizationValidator and PolicyDecider beans.
<LI>The configuration for the buffer manager has been simplified to refer to memory sizes in KB, rather than batch columns.
</ul>
Modified: branches/as7/build/pom.xml
===================================================================
--- branches/as7/build/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/build/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid</artifactId>
Modified: branches/as7/cache-jbosscache/pom.xml
===================================================================
--- branches/as7/cache-jbosscache/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/cache-jbosscache/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-cache-jbosscache</artifactId>
Property changes on: branches/as7/cache-jbosscache/src/main/java/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org:3535-3555*
/trunk/cache-jbosscache/src/main/java/org:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid:3535-3555*
/trunk/cache-jbosscache/src/main/java/org/teiid:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/cache:3535-3555*
/trunk/cache-jbosscache/src/main/java/org/teiid/cache:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss:3535-3555
/trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/events
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/events:3535-3555*
/trunk/cache-jbosscache/src/main/java/org/teiid/events:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/replication:3535-3555*
/trunk/cache-jbosscache/src/main/java/org/teiid/replication:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss:3535-3555*
/trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java:3535-3555
/trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java:3535-3555
/trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java:3535-3555
/trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java:3507-3597
Property changes on: branches/as7/cache-jbosscache/src/test/java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/cache-jbosscache/src/test/java:3535-3555*
/trunk/cache-jbosscache/src/test/java:3507-3597
Modified: branches/as7/client/pom.xml
===================================================================
--- branches/as7/client/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client</artifactId>
@@ -20,25 +20,5 @@
<artifactId>teiid-common-core</artifactId>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-dmr</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller-client</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-cli</artifactId>
- <scope>provided</scope>
- </dependency>
- <!--
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
- -->
</dependencies>
</project>
\ No newline at end of file
Modified: branches/as7/client/src/main/java/org/teiid/client/BatchSerializer.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/client/BatchSerializer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client/src/main/java/org/teiid/client/BatchSerializer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,21 +22,28 @@
package org.teiid.client;
+import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.ObjectStreamConstants;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TimeZone;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.core.types.BlobType;
+import org.teiid.core.types.ClobType;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.types.XMLType;
import org.teiid.jdbc.JDBCPlugin;
@@ -45,12 +52,12 @@
* @since 4.2
*/
public class BatchSerializer {
-
+
private BatchSerializer() {} // Uninstantiable
private static ColumnSerializer defaultSerializer = new ColumnSerializer();
- private static final Map<String, ColumnSerializer> serializers = new HashMap<String, ColumnSerializer>();
+ private static final Map<String, ColumnSerializer> serializers = new HashMap<String, ColumnSerializer>(128);
static {
serializers.put(DataTypeManager.DefaultDataTypes.BIG_DECIMAL, new BigDecimalColumnSerializer());
serializers.put(DataTypeManager.DefaultDataTypes.BIG_INTEGER, new BigIntegerColumnSerializer());
@@ -67,6 +74,130 @@
serializers.put(DataTypeManager.DefaultDataTypes.TIMESTAMP, new TimestampColumnSerializer());
}
+ private static final Map<String, ColumnSerializer> version1serializers = new HashMap<String, ColumnSerializer>(128);
+ static {
+ version1serializers.put(DataTypeManager.DefaultDataTypes.DATE, new DateColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.TIME, new TimeColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.STRING, new StringColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.CLOB, new ClobColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.BLOB, new BlobColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.XML, new XmlColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.NULL, new NullColumnSerializer1());
+ version1serializers.put(DataTypeManager.DefaultDataTypes.OBJECT, new ObjectColumnSerializer1());
+ }
+
+ public static final class ObjectColumnSerializer1 extends ColumnSerializer {
+
+ @Override
+ protected void writeObject(ObjectOutput out, Object obj)
+ throws IOException {
+ int code = DataTypeManager.getTypeCode(obj.getClass());
+ out.writeByte((byte)code);
+ if (code == DataTypeManager.DefaultTypeCodes.BOOLEAN) {
+ if (Boolean.TRUE.equals(obj)) {
+ out.write((byte)1);
+ } else {
+ out.write((byte)0);
+ }
+ } else if (code != DataTypeManager.DefaultTypeCodes.OBJECT) {
+ ColumnSerializer s = getSerializer(DataTypeManager.getDataTypeName(obj.getClass()), (byte)1);
+ s.writeObject(out, obj);
+ } else {
+ super.writeObject(out, obj);
+ }
+ }
+
+ @Override
+ protected Object readObject(ObjectInput in) throws IOException,
+ ClassNotFoundException {
+ int code = in.readByte();
+ if (code == DataTypeManager.DefaultTypeCodes.BOOLEAN) {
+ if (in.readByte() == (byte)0) {
+ return Boolean.FALSE;
+ }
+ return Boolean.TRUE;
+ }
+ if (code != DataTypeManager.DefaultTypeCodes.OBJECT) {
+ ColumnSerializer s = getSerializer(DataTypeManager.getDataTypeName(DataTypeManager.getClass(code)), (byte)1);
+ return s.readObject(in);
+ }
+ return super.readObject(in);
+ }
+
+ }
+
+ private static final int MAX_UTF = 0xFFFF/3; //this is greater than the expected max length of Teiid Strings
+
+ private static class StringColumnSerializer1 extends ColumnSerializer {
+ @Override
+ protected void writeObject(ObjectOutput out, Object obj) throws IOException {
+ String str = (String)obj;
+ if (str.length() <= MAX_UTF) {
+ //skip object serialization if we have a short string
+ out.writeByte(ObjectStreamConstants.TC_STRING);
+ out.writeUTF(str);
+ } else {
+ out.writeByte(ObjectStreamConstants.TC_LONGSTRING);
+ out.writeObject(obj);
+ }
+ }
+
+ @Override
+ protected Object readObject(ObjectInput in) throws IOException,
+ ClassNotFoundException {
+ if (in.readByte() == ObjectStreamConstants.TC_STRING) {
+ return in.readUTF();
+ }
+ return super.readObject(in);
+ }
+ }
+
+ private static class NullColumnSerializer1 extends ColumnSerializer {
+ @Override
+ public void writeColumn(ObjectOutput out, int col,
+ List<? extends List<?>> batch) throws IOException {
+ }
+
+ @Override
+ public void readColumn(ObjectInput in, int col,
+ List<List<Object>> batch, byte[] isNull) throws IOException,
+ ClassNotFoundException {
+ }
+ }
+
+ private static class ClobColumnSerializer1 extends ColumnSerializer {
+ protected void writeObject(ObjectOutput out, Object obj) throws IOException {
+ ((Externalizable)obj).writeExternal(out);
+ }
+ protected Object readObject(ObjectInput in) throws IOException, ClassNotFoundException {
+ ClobType ct = new ClobType();
+ ct.readExternal(in);
+ return ct;
+ }
+ }
+
+ private static class BlobColumnSerializer1 extends ColumnSerializer {
+ protected void writeObject(ObjectOutput out, Object obj) throws IOException {
+ ((Externalizable)obj).writeExternal(out);
+ }
+ protected Object readObject(ObjectInput in) throws IOException, ClassNotFoundException {
+ BlobType bt = new BlobType();
+ bt.readExternal(in);
+ return bt;
+ }
+ }
+
+ private static class XmlColumnSerializer1 extends ColumnSerializer {
+ protected void writeObject(ObjectOutput out, Object obj) throws IOException {
+ ((Externalizable)obj).writeExternal(out);
+ }
+ protected Object readObject(ObjectInput in) throws IOException, ClassNotFoundException {
+ XMLType xt = new XMLType();
+ xt.readExternal(in);
+ return xt;
+ }
+ }
+
/**
* Packs the (boolean) information about whether data values in the column are null
* into bytes so that we send ~n/8 instead of n bytes.
@@ -338,6 +469,34 @@
}
}
+ static int DATE_NORMALIZER = 0;
+
+ static {
+ Calendar c = Calendar.getInstance();
+ c.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
+ c.set(1900, 0, 1, 0, 0, 0);
+ c.set(Calendar.MILLISECOND, 0);
+ DATE_NORMALIZER = -(int)(c.getTime().getTime()/60000); //support a 32 bit range starting at this value
+ }
+
+ private static class DateColumnSerializer1 extends ColumnSerializer {
+ protected void writeObject(ObjectOutput out, Object obj) throws IOException {
+ out.writeInt((int)(((java.sql.Date)obj).getTime()/60000) + DATE_NORMALIZER);
+ }
+ protected Object readObject(ObjectInput in) throws IOException {
+ return new java.sql.Date(((in.readInt()&0xffffffffL) - DATE_NORMALIZER)*60000);
+ }
+ }
+
+ private static class TimeColumnSerializer1 extends ColumnSerializer {
+ protected void writeObject(ObjectOutput out, Object obj) throws IOException {
+ out.writeInt((int)(((Time)obj).getTime()/1000));
+ }
+ protected Object readObject(ObjectInput in) throws IOException {
+ return new Time((in.readInt()&0xffffffffL)*1000);
+ }
+ }
+
private static class TimestampColumnSerializer extends ColumnSerializer {
protected void writeObject(ObjectOutput out, Object obj) throws IOException {
Timestamp ts = (Timestamp)obj;
@@ -351,15 +510,25 @@
}
}
- private static ColumnSerializer getSerializer(String type) {
- ColumnSerializer cs = serializers.get((type == null) ? DataTypeManager.DefaultDataTypes.OBJECT : type);
+ private static ColumnSerializer getSerializer(String type, byte version) {
+ ColumnSerializer cs = null;
+ if (version == 1) {
+ cs = version1serializers.get((type == null) ? DataTypeManager.DefaultDataTypes.OBJECT : type);
+ }
+ if (cs == null) {
+ cs = serializers.get((type == null) ? DataTypeManager.DefaultDataTypes.OBJECT : type);
+ }
if (cs == null) {
return defaultSerializer;
}
return cs;
}
+
+ public static void writeBatch(ObjectOutput out, String[] types, List<? extends List<?>> batch) throws IOException {
+ writeBatch(out, types, batch, (byte)1);
+ }
- public static void writeBatch(ObjectOutput out, String[] types, List<? extends List<?>> batch) throws IOException {
+ public static void writeBatch(ObjectOutput out, String[] types, List<? extends List<?>> batch, byte version) throws IOException {
if (batch == null) {
out.writeInt(-1);
} else {
@@ -368,7 +537,7 @@
int columns = types.length;
out.writeInt(columns);
for(int i = 0; i < columns; i++) {
- ColumnSerializer serializer = getSerializer(types[i]);
+ ColumnSerializer serializer = getSerializer(types[i], version);
try {
serializer.writeColumn(out, i, batch);
} catch (ClassCastException e) {
@@ -389,12 +558,16 @@
}
public static List<List<Object>> readBatch(ObjectInput in, String[] types) throws IOException, ClassNotFoundException {
+ return readBatch(in, types, (byte)1);
+ }
+
+ public static List<List<Object>> readBatch(ObjectInput in, String[] types, byte version) throws IOException, ClassNotFoundException {
int rows = in.readInt();
if (rows == 0) {
return new ArrayList<List<Object>>(0);
} else if (rows > 0) {
int columns = in.readInt();
- List<List<Object>> batch = new ArrayList<List<Object>>(rows);
+ List<List<Object>> batch = new ResizingArrayList<List<Object>>(rows);
int numBytes = rows/8;
int extraRows = rows % 8;
for (int currentRow = 0; currentRow < rows; currentRow++) {
@@ -402,7 +575,7 @@
}
byte[] isNullBuffer = new byte[(extraRows > 0) ? numBytes + 1: numBytes];
for (int col = 0; col < columns; col++) {
- getSerializer(types[col]).readColumn(in, col, batch, isNullBuffer);
+ getSerializer(types[col], version).readColumn(in, col, batch, isNullBuffer);
}
return batch;
}
Copied: branches/as7/client/src/main/java/org/teiid/client/ResizingArrayList.java (from rev 3597, trunk/client/src/main/java/org/teiid/client/ResizingArrayList.java)
===================================================================
--- branches/as7/client/src/main/java/org/teiid/client/ResizingArrayList.java (rev 0)
+++ branches/as7/client/src/main/java/org/teiid/client/ResizingArrayList.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,176 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.client;
+
+import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.RandomAccess;
+
+/**
+ * Modified {@link ArrayList} that resizes up and down by powers of 2.
+ *
+ * @param <T>
+ */
+@SuppressWarnings("unchecked")
+public class ResizingArrayList<T> extends AbstractList<T> implements RandomAccess {
+
+ public static final int MIN_SHRINK_SIZE = 32;
+
+ protected Object[] elementData;
+ protected int size;
+
+ public ResizingArrayList() {
+ this(MIN_SHRINK_SIZE);
+ }
+
+ public ResizingArrayList(int initialCapacity) {
+ this.elementData = new Object[initialCapacity];
+ }
+
+ public ResizingArrayList(Collection<? extends T> c) {
+ elementData = c.toArray();
+ size = elementData.length;
+ // c.toArray might (incorrectly) not return Object[] (see 6260652)
+ if (elementData.getClass() != Object[].class)
+ elementData = Arrays.copyOf(elementData, size, Object[].class);
+ }
+
+ @Override
+ public T get(int index) {
+ rangeCheck(index, false);
+ return (T) elementData[index];
+ }
+
+ public int getModCount() {
+ return modCount;
+ }
+
+ public void add(int index, T element) {
+ rangeCheck(index, true);
+ modCount++;
+ ensureCapacity(size+1);
+ System.arraycopy(elementData, index, elementData, index + 1,
+ size - index);
+ elementData[index] = element;
+ size++;
+ }
+
+ protected void ensureCapacity(int capacity) {
+ if (capacity <= elementData.length) {
+ return;
+ }
+ int newCapacity = 1 << (32 - Integer.numberOfLeadingZeros(capacity - 1));
+ int lowerCapacity = newCapacity*70/99; //SQRT(2)
+ if (lowerCapacity > capacity) {
+ newCapacity = lowerCapacity;
+ }
+ elementData = Arrays.copyOf(elementData, newCapacity);
+ }
+
+ public T set(int index, T element) {
+ rangeCheck(index, false);
+ T old = (T) elementData[index];
+ elementData[index] = element;
+ return old;
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends T> c) {
+ return addAll(size, c);
+ }
+
+ @Override
+ public boolean addAll(int index, Collection<? extends T> c) {
+ rangeCheck(index, true);
+ modCount++;
+ int numNew = c.size();
+ ensureCapacity(size + numNew);
+ for (T t : c) {
+ elementData[index++] = t;
+ }
+ size += numNew;
+ return numNew != 0;
+ }
+
+ @Override
+ public T remove(int index) {
+ T oldValue = get(index);
+ modCount++;
+ int numMoved = size - index - 1;
+ if (numMoved > 0) {
+ System.arraycopy(elementData, index+1, elementData, index, numMoved);
+ }
+ elementData[--size] = null;
+ int halfLength = elementData.length/2;
+ if (size <= halfLength && elementData.length > MIN_SHRINK_SIZE) {
+ int newSize = Math.max(halfLength*99/70, MIN_SHRINK_SIZE);
+ Object[] next = new Object[newSize];
+ System.arraycopy(elementData, 0, next, 0, size);
+ elementData = next;
+ }
+ return oldValue;
+ }
+
+ private void rangeCheck(int index, boolean inclusive) {
+ if (index > size || (!inclusive && index == size)) {
+ throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ @Override
+ public void clear() {
+ modCount++;
+ if (size <= MIN_SHRINK_SIZE) {
+ for (int i = 0; i < size; i++) {
+ elementData[i] = null;
+ }
+ } else {
+ elementData = new Object[MIN_SHRINK_SIZE];
+ }
+ size = 0;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return Arrays.copyOf(elementData, size);
+ }
+
+ public <U extends Object> U[] toArray(U[] a) {
+ if (a.length < size) {
+ return (U[]) Arrays.copyOf(elementData, size, a.getClass());
+ }
+ System.arraycopy(elementData, 0, a, 0, size);
+ if (a.length > size) {
+ a[size] = null;
+ }
+ return a;
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+}
Modified: branches/as7/client/src/main/java/org/teiid/client/ResultsMessage.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/client/ResultsMessage.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client/src/main/java/org/teiid/client/ResultsMessage.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -72,6 +72,8 @@
/** OPTION DEBUG log if OPTION DEBUG was used */
private String debugLog;
+
+ private byte clientSerializationVersion;
/**
* Query plan annotations, if OPTION SHOWPLAN or OPTION PLANONLY was used:
@@ -240,7 +242,7 @@
dataTypes = ExternalizeUtil.readStringArray(in);
// Row data
- results = BatchSerializer.readBatch(in, dataTypes);
+ results = BatchSerializer.readBatch(in, dataTypes, (byte)0);
// Plan Descriptions
planDescription = (PlanNode)in.readObject();
@@ -272,7 +274,7 @@
ExternalizeUtil.writeArray(out, dataTypes);
// Results data
- BatchSerializer.writeBatch(out, dataTypes, results);
+ BatchSerializer.writeBatch(out, dataTypes, results, (byte)0);
// Plan descriptions
out.writeObject(this.planDescription);
@@ -347,5 +349,13 @@
public boolean isUpdateResult() {
return isUpdateResult;
}
+
+ public byte getClientSerializationVersion() {
+ return clientSerializationVersion;
+ }
+
+ public void setClientSerializationVersion(byte clientSerializationVersion) {
+ this.clientSerializationVersion = clientSerializationVersion;
+ }
}
Property changes on: branches/as7/client/src/main/java/org/teiid/client/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/client/util:3535-3555*
/trunk/client/src/main/java/org/teiid/client/util:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/client/util/ExceptionHolder.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/client/util/ExceptionHolder.java:3535-3555
/trunk/client/src/main/java/org/teiid/client/util/ExceptionHolder.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/client/util/ExceptionUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/client/util/ExceptionUtil.java:3535-3555
/trunk/client/src/main/java/org/teiid/client/util/ExceptionUtil.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/client/util/ResultsFuture.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/client/util/ResultsFuture.java:3535-3555
/trunk/client/src/main/java/org/teiid/client/util/ResultsFuture.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/client/util/ResultsReceiver.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/client/util/ResultsReceiver.java:3535-3555
/trunk/client/src/main/java/org/teiid/client/util/ResultsReceiver.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc:3535-3555*
/trunk/client/src/main/java/org/teiid/jdbc:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/BaseDataSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/BaseDataSource.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/BaseDataSource.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/BatchResults.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/BatchResults.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/BatchResults.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/CallableStatementImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/CallableStatementImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/CallableStatementImpl.java:3507-3597
Deleted: branches/as7/client/src/main/java/org/teiid/jdbc/CancellationTimer.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/CancellationTimer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/CancellationTimer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.jdbc;
-
-import java.util.TreeSet;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Specialized timer that actively purges tasks in lg(n) time
- */
-public class CancellationTimer {
- private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
- private static AtomicInteger id = new AtomicInteger();
-
- static abstract class CancelTask implements Runnable, Comparable<CancelTask> {
- long endTime;
- int seqId = id.get();
-
- public CancelTask(long delay) {
- this.endTime = System.currentTimeMillis() + delay;
- }
-
- @Override
- public int compareTo(CancelTask o) {
- int result = Long.signum(this.endTime = o.endTime);
- if (result == 0) {
- return seqId = o.seqId;
- }
- return result;
- }
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof CancelTask)) {
- return false;
- }
- return this.compareTo((CancelTask)obj) == 0;
- }
- }
-
- private TreeSet<CancelTask> cancelQueue = new TreeSet<CancelTask>();
- private Thread thread;
-
- public CancellationTimer(String name) {
- thread = new Thread(new Runnable() {
-
- @Override
- public void run() {
- while (true) {
- try {
- doCancellations();
- } catch (InterruptedException e) {
- break;
- }
- }
- }
- }, name);
- thread.setDaemon(true);
- thread.start();
- }
-
- private void doCancellations() throws InterruptedException {
- CancelTask task = null;
- synchronized (this) {
- if (cancelQueue.isEmpty()) {
- this.wait();
- return;
- }
- task = cancelQueue.first();
- long toWait = task.endTime - System.currentTimeMillis();
- if (toWait > 0) {
- this.wait(toWait);
- return;
- }
- cancelQueue.pollFirst();
- }
- try {
- task.run();
- } catch (Throwable t) {
- logger.log(Level.SEVERE, "Unexpected exception running task", t); //$NON-NLS-1$
- }
- }
-
- public void add(CancelTask task) {
- synchronized (this) {
- this.cancelQueue.add(task);
- this.notifyAll();
- }
- }
-
- public void remove(CancelTask task) {
- synchronized (this) {
- this.cancelQueue.remove(task);
- this.notifyAll();
- }
- }
-
-}
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java:3149-3217
/trunk/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java:3149-3217,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionListener.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ConnectionListener.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ConnectionListener.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionProfile.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ConnectionProfile.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ConnectionProfile.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/DataTypeTransformer.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java:3281-3325
/trunk/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java:3281-3325,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/DeferredMetadataProvider.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/DeferredMetadataProvider.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/DeferredMetadataProvider.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3149-3217
/trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3149-3217,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java:3188-3450,3452-3597
Copied: branches/as7/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java (from rev 3597, trunk/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java)
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java (rev 0)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import java.util.NoSuchElementException;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.Executor;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.teiid.core.util.ExecutorUtils;
+
+/**
+ * Specialized timer that can purge tasks in lg(n) time
+ * Uses lock escalation to minimize contention for adding/removing tasks.
+ * Will only hold a thread while there are pending tasks.
+ */
+public class EnhancedTimer {
+
+ private static final Logger LOGGER = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
+ private static AtomicLong id = new AtomicLong();
+
+ public class Task implements Comparable<Task>, Runnable {
+ final long endTime;
+ final long seqId = id.getAndIncrement();
+ final Runnable task;
+
+ public Task(Runnable task, long delay) {
+ this.endTime = System.currentTimeMillis() + delay;
+ this.task = task;
+ }
+
+ @Override
+ public void run() {
+ this.task.run();
+ }
+
+ @Override
+ public int compareTo(Task o) {
+ int result = Long.signum(this.endTime - o.endTime);
+ if (result == 0) {
+ return Long.signum(seqId - o.seqId);
+ }
+ return result;
+ }
+
+ public boolean cancel() {
+ lock.readLock().lock();
+ try {
+ return queue.remove(this);
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+ }
+
+ private final ConcurrentSkipListSet<Task> queue = new ConcurrentSkipListSet<Task>();
+ private final Executor taskExecutor;
+ private final Executor bossExecutor;
+ private boolean running;
+ private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+
+ /**
+ * Constructs a new Timer that directly executes tasks off of a single-thread thread pool.
+ * @param name
+ */
+ public EnhancedTimer(final String name) {
+ this.taskExecutor = ExecutorUtils.getDirectExecutor();
+ this.bossExecutor = ExecutorUtils.newFixedThreadPool(1, name);
+ }
+
+ public EnhancedTimer(Executor bossExecutor, Executor taskExecutor) {
+ this.taskExecutor = taskExecutor;
+ this.bossExecutor = bossExecutor;
+ }
+
+ private void start() {
+ bossExecutor.execute(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ while (doCancellations()) {
+ }
+ } catch (InterruptedException e) {
+ }
+ }
+ });
+ running = true;
+ }
+
+ private boolean doCancellations() throws InterruptedException {
+ Task task = null;
+ lock.writeLock().lock();
+ try {
+ if (queue.isEmpty()) {
+ synchronized (this) {
+ lock.writeLock().unlock();
+ running = false;
+ return false;
+ }
+ }
+ task = queue.first();
+ long toWait = task.endTime - System.currentTimeMillis();
+ if (toWait > 0) {
+ synchronized (this) {
+ lock.writeLock().unlock();
+ this.wait(toWait);
+ return true; //try again (guards against spurious wake-ups)
+ }
+ }
+ queue.pollFirst();
+ } finally {
+ if (lock.writeLock().isHeldByCurrentThread()) {
+ lock.writeLock().unlock();
+ }
+ }
+ try {
+ taskExecutor.execute(task);
+ } catch (Throwable t) {
+ LOGGER.log(Level.SEVERE, "Unexpected exception running task", t); //$NON-NLS-1$
+ }
+ return true;
+ }
+
+ /**
+ * Add a delayed task
+ * @param task
+ * @param delay in ms
+ * @return a cancellable Task
+ */
+ public Task add(Runnable task, long delay) {
+ Task result = new Task(task, delay);
+ lock.readLock().lock();
+ try {
+ if (this.queue.add(result)
+ && this.queue.first() == result) {
+ //only need to synchronize when this is the first task
+ synchronized (this) {
+ if (!running) {
+ start();
+ }
+ this.notifyAll();
+ }
+ }
+ } catch (NoSuchElementException e) {
+ //shouldn't happen
+ } finally {
+ lock.readLock().unlock();
+ }
+ return result;
+ }
+
+ public int getQueueSize() {
+ return queue.size();
+ }
+
+}
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/EnhancedTimer.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ExecutionProperties.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ExecutionProperties.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ExecutionProperties.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/FilteredResultsMetadata.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/FilteredResultsMetadata.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/FilteredResultsMetadata.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/JDBCColumnNames.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/JDBCColumnNames.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/JDBCColumnNames.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/JDBCColumnPositions.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/JDBCColumnPositions.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/JDBCColumnPositions.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/JDBCURL.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/JDBCURL.java:3149-3217,3281-3325
/trunk/client/src/main/java/org/teiid/jdbc/JDBCURL.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/JDBCURL.java:3149-3217,3281-3325,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/JDBCURL.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/MetadataProvider.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/MetadataProvider.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/MetadataProvider.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ParameterMetaDataImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ParameterMetaDataImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ParameterMetaDataImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/PartialResultsWarning.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/PartialResultsWarning.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/PartialResultsWarning.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetMetaDataImpl.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ResultSetMetaDataImpl.java:3281-3325
/trunk/client/src/main/java/org/teiid/jdbc/ResultSetMetaDataImpl.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/ResultSetMetaDataImpl.java:3281-3325,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/ResultSetMetaDataImpl.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/SQLStates.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/SQLStates.java:3220-3275
/trunk/client/src/main/java/org/teiid/jdbc/SQLStates.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/SQLStates.java:3220-3275,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/SQLStates.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/SocketProfile.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/SocketProfile.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/SocketProfile.java:3507-3597
Modified: branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -63,19 +63,18 @@
import org.teiid.core.types.SQLXMLImpl;
import org.teiid.core.util.SqlUtil;
import org.teiid.core.util.StringUtil;
-import org.teiid.jdbc.CancellationTimer.CancelTask;
+import org.teiid.jdbc.EnhancedTimer.Task;
import org.teiid.net.TeiidURL;
public class StatementImpl extends WrapperImpl implements TeiidStatement {
private static Logger logger = Logger.getLogger("org.teiid.jdbc"); //$NON-NLS-1$
- static CancellationTimer cancellationTimer = new CancellationTimer("Teiid Statement Timeout"); //$NON-NLS-1$
+ static EnhancedTimer cancellationTimer = new EnhancedTimer("Teiid Statement Timeout"); //$NON-NLS-1$
- private static final class QueryTimeoutCancelTask extends CancelTask {
+ private static final class QueryTimeoutCancelTask implements Runnable {
private WeakReference<StatementImpl> ref;
- private QueryTimeoutCancelTask(long delay, StatementImpl stmt) {
- super(delay);
+ private QueryTimeoutCancelTask(StatementImpl stmt) {
this.ref = new WeakReference<StatementImpl>(stmt);
}
@@ -98,6 +97,8 @@
// integer indicating no maximum limit - used in some metadata-ish methods.
private static final int NO_LIMIT = 0;
+
+ private QueryTimeoutCancelTask cancelTask = new QueryTimeoutCancelTask(this);
//######## Configuration state #############
private ConnectionImpl driverConnection;
@@ -571,12 +572,11 @@
ResultsFuture.CompletionListener<ResultsMessage> compeletionListener = null;
if (queryTimeoutMS > 0) {
- final CancelTask c = new QueryTimeoutCancelTask(queryTimeoutMS, this);
- cancellationTimer.add(c);
+ final Task c = cancellationTimer.add(cancelTask, queryTimeoutMS);
compeletionListener = new ResultsFuture.CompletionListener<ResultsMessage>() {
@Override
public void onCompletion(ResultsFuture<ResultsMessage> future) {
- cancellationTimer.remove(c);
+ c.cancel();
}
};
}
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/StatementImpl.java:3149-3217,3220-3275,3281-3325,3355-3365
/trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/StatementImpl.java:3149-3217,3220-3275,3281-3325,3355-3365,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/TeiidConnection.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/TeiidConnection.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/TeiidConnection.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/TeiidDriver.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/TeiidDriver.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/TeiidDriver.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java:3220-3275
/trunk/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java:3220-3275,3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/TeiidStatement.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/TeiidStatement.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/TeiidStatement.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/WarningUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/WarningUtil.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/WarningUtil.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/WrapperImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/WrapperImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/WrapperImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/XAConnectionImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/XAConnectionImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/XAConnectionImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/jdbc/XAResourceImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/jdbc/XAResourceImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/jdbc/XAResourceImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket:3535-3555*
/trunk/client/src/main/java/org/teiid/net/socket:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/Handshake.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/Handshake.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/Handshake.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/Message.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/Message.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/Message.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/ObjectChannel.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/ObjectChannel.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/ObjectChannel.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/ObjectChannelFactory.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/ObjectChannelFactory.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/ObjectChannelFactory.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/ServerDiscovery.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/ServerDiscovery.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/ServerDiscovery.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/ServiceInvocationStruct.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/ServiceInvocationStruct.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/ServiceInvocationStruct.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java:3149-3217
/trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java:3149-3217,3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerInstance.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketServerInstance.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstance.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerInstanceFactory.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketServerInstanceFactory.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceFactory.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/SocketUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/SocketUtil.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/SocketUtil.java:3507-3597
Property changes on: branches/as7/client/src/main/java/org/teiid/net/socket/UrlServerDiscovery.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/java/org/teiid/net/socket/UrlServerDiscovery.java:3535-3555
/trunk/client/src/main/java/org/teiid/net/socket/UrlServerDiscovery.java:3507-3597
Property changes on: branches/as7/client/src/main/resources/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/resources/org:3535-3555*
/trunk/client/src/main/resources/org:3507-3597
Property changes on: branches/as7/client/src/main/resources/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/resources/org/teiid:3535-3555*
/trunk/client/src/main/resources/org/teiid:3507-3597
Property changes on: branches/as7/client/src/main/resources/org/teiid/jdbc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/resources/org/teiid/jdbc:3535-3555
/trunk/client/src/main/resources/org/teiid/jdbc:3507-3597
Property changes on: branches/as7/client/src/main/resources/org/teiid/net
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/main/resources/org/teiid/net:3535-3555*
/trunk/client/src/main/resources/org/teiid/net:3507-3597
Modified: branches/as7/client/src/test/java/org/teiid/client/TestBatchSerializer.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/client/TestBatchSerializer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client/src/test/java/org/teiid/client/TestBatchSerializer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,15 +29,13 @@
import java.io.ObjectOutputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
import java.util.Arrays;
import java.util.List;
import junit.framework.TestCase;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.TimestampWithTimezone;
@@ -47,22 +45,6 @@
*/
public class TestBatchSerializer extends TestCase {
- private static void assertEqual(List[] expectedBatch, List[] batch) {
- if (expectedBatch == null) {
- assertNull(batch);
- return;
- }
- assertEquals(expectedBatch.length, batch.length);
- if (expectedBatch.length > 0) {
- int columns = expectedBatch[0].size();
- for (int row = 0; row < expectedBatch.length; row++) {
- for (int col = 0; col < columns; col++) {
- assertEquals(expectedBatch[row].get(col), batch[row].get(col));
- }
- }
- }
- }
-
private static void helpTestSerialization(String[] types, List<?>[] batch) throws IOException, ClassNotFoundException {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(byteStream);
@@ -94,7 +76,8 @@
DataTypeManager.DefaultDataTypes.SHORT,
DataTypeManager.DefaultDataTypes.STRING,
DataTypeManager.DefaultDataTypes.TIME,
- DataTypeManager.DefaultDataTypes.TIMESTAMP
+ DataTypeManager.DefaultDataTypes.TIMESTAMP,
+ DataTypeManager.DefaultDataTypes.OBJECT,
};
private static String sampleString(int length) {
char[] chars = new char[length];
@@ -104,51 +87,27 @@
return new String(chars);
}
- private static List[] sampleBatch(int rows) {
- List[] batch = new List[rows];
+ private static List<?>[] sampleBatchWithNulls(int rows) {
+ List<?>[] batch = new List[rows];
for (int i = 0; i < rows; i++) {
- long currentTime = System.currentTimeMillis();
- Object[] data = { new BigDecimal("" + i), //$NON-NLS-1$
- new BigInteger(Integer.toString(i)),
- (i%2 == 0) ? Boolean.FALSE: Boolean.TRUE,
- new Byte((byte)i),
- new Character((char)i),
- new Date(currentTime),
- new Double(i),
- new Float(i),
- new Integer(i),
- new Long(i),
- new Short((short)i),
- sampleString(i),
- new Time(currentTime),
- new Timestamp(currentTime)
- };
- batch[i] = Arrays.asList(data);
- }
- return batch;
- }
-
- private static List[] sampleBatchWithNulls(int rows) {
- List[] batch = new List[rows];
-
- for (int i = 0; i < rows; i++) {
- long currentTime = System.currentTimeMillis();
+ java.util.Date d = new java.util.Date();
int mod = i%14;
Object[] data = { (mod == 0) ? null : new BigDecimal("" + i), //$NON-NLS-1$
(mod == 1) ? null : new BigInteger(Integer.toString(i)),
(mod == 2) ? null : ((i%2 == 0) ? Boolean.FALSE: Boolean.TRUE),
(mod == 3) ? null : new Byte((byte)i),
(mod == 4) ? null : new Character((char)i),
- (mod == 5) ? null : new Date(currentTime),
+ (mod == 5) ? null : TimestampWithTimezone.createDate(d),
(mod == 6) ? null : new Double(i),
(mod == 7) ? null : new Float(i),
(mod == 8) ? null : new Integer(i),
(mod == 9) ? null : new Long(i),
(mod == 10) ? null : new Short((short)i),
(mod == 11) ? null : sampleString(i),
- (mod == 12) ? null : new Time(currentTime),
- (mod == 13) ? null : new Timestamp(currentTime)
+ (mod == 12) ? null : TimestampWithTimezone.createTime(d),
+ (mod == 13) ? null : TimestampWithTimezone.createTimestamp(d),
+ (mod == 14) ? null : TimestampWithTimezone.createTimestamp(d),
};
batch[i] = Arrays.asList(data);
}
@@ -158,23 +117,16 @@
public void testSerializeBasicTypes() throws Exception {
// The number 8 is important here because boolean isNull information is packed into bytes,
// so we want to make sure the boundary cases are handled correctly
- helpTestSerialization(sampleBatchTypes, sampleBatch(1)); // Less than 8 rows
- helpTestSerialization(sampleBatchTypes, sampleBatch(8)); // Exactly 8 rows
- helpTestSerialization(sampleBatchTypes, sampleBatch(17)); // More than 8 rows, but not a multiple of 8
- helpTestSerialization(sampleBatchTypes, sampleBatch(120)); // A multiple of 8 rows
- helpTestSerialization(sampleBatchTypes, sampleBatch(833)); // A bunch of rows. This should also test large strings
+ helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(1)); // Less than 8 rows
+ helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(8)); // Exactly 8 rows
+ helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(17)); // More than 8 rows, but not a multiple of 8
+ helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(120)); // A multiple of 8 rows
+ helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(833)); // A bunch of rows. This should also test large strings
+ helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(4096)); // A bunch of rows. This should also test large strings
}
- public void testSerializeBasicTypesWithNulls() throws Exception {
- helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(1));
- helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(8));
- helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(17));
- helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(120));
- helpTestSerialization(sampleBatchTypes, sampleBatchWithNulls(833));
- }
-
public void testSerializeLargeStrings() throws Exception {
- List row = Arrays.asList(new Object[] {sampleString(66666)});
+ List<?> row = Arrays.asList(new Object[] {sampleString(66666)});
helpTestSerialization(new String[] {DataTypeManager.DefaultDataTypes.STRING}, new List[] {row});
}
Property changes on: branches/as7/client/src/test/java/org/teiid/client/plan
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/client/plan:3535-3555*
/trunk/client/src/test/java/org/teiid/client/plan:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/client/plan/TestPlanNode.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/client/plan/TestPlanNode.java:3535-3555
/trunk/client/src/test/java/org/teiid/client/plan/TestPlanNode.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/client/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/client/util:3535-3555*
/trunk/client/src/test/java/org/teiid/client/util:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java:3535-3555
/trunk/client/src/test/java/org/teiid/client/util/TestExceptionHolder.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/client/util/TestResultsFuture.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/client/util/TestResultsFuture.java:3535-3555
/trunk/client/src/test/java/org/teiid/client/util/TestResultsFuture.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc:3535-3555*
/trunk/client/src/test/java/org/teiid/jdbc:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestBatchResults.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestBatchResults.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestBatchResults.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestCallableStatement.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestCallableStatement.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestCallableStatement.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestConnection.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestConnection.java:3281-3325
/trunk/client/src/test/java/org/teiid/jdbc/TestConnection.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestConnection.java:3281-3325,3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestConnection.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestDataTypeTransformer.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestDataTypeTransformer.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestDataTypeTransformer.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestEmbeddedProfile.java:3507-3597
Copied: branches/as7/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java (from rev 3597, trunk/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java)
===================================================================
--- branches/as7/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java (rev 0)
+++ branches/as7/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.teiid.jdbc.EnhancedTimer.Task;
+
+@SuppressWarnings("nls")
+public class TestEnhancedTimer {
+
+ private final class SimpleCancelTask implements Runnable {
+ @Override
+ public void run() {
+ }
+ }
+
+ @Test public void testRemove() {
+ EnhancedTimer ct = new EnhancedTimer("foo");
+ SimpleCancelTask sct = new SimpleCancelTask();
+ Task tt = ct.add(sct, 20000);
+ Task tt1 = ct.add(sct, 20000);
+ assertTrue(tt.compareTo(tt1) < 0);
+ Task tt2 = ct.add(sct, 10000);
+ assertEquals(3, ct.getQueueSize());
+ tt.cancel();
+ tt1.cancel();
+ tt2.cancel();
+ assertEquals(0, ct.getQueueSize());
+ }
+
+}
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestEnhancedTimer.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestJDBCURL.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestJDBCURL.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestJDBCURL.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestPreparedStatement.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestPreparedStatement.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestPreparedStatement.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestResultSet.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestResultSet.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestResultSet.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestSQLException.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestSQLException.java:3220-3275
/trunk/client/src/test/java/org/teiid/jdbc/TestSQLException.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestSQLException.java:3220-3275,3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestSQLException.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestStatement.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestStatement.java:3149-3217,3220-3275
/trunk/client/src/test/java/org/teiid/jdbc/TestStatement.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestStatement.java:3149-3217,3220-3275,3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestStatement.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java:3149-3217,3281-3325
/trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java:3188-3450,3452-3506
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java:3149-3217,3281-3325,3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java:3188-3450,3452-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestWrapperImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestWrapperImpl.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestWrapperImpl.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/TestXAConnection.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/TestXAConnection.java:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/TestXAConnection.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/jdbc/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/jdbc/util:3535-3555
/trunk/client/src/test/java/org/teiid/jdbc/util:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/net
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/net:3535-3555*
/trunk/client/src/test/java/org/teiid/net:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/net/TestTeiidURL.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/net/TestTeiidURL.java:3535-3555
/trunk/client/src/test/java/org/teiid/net/TestTeiidURL.java:3507-3597
Property changes on: branches/as7/client/src/test/java/org/teiid/net/socket
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/client/src/test/java/org/teiid/net/socket:3535-3555
/trunk/client/src/test/java/org/teiid/net/socket:3507-3597
Modified: branches/as7/client-jdk15/pom.xml
===================================================================
--- branches/as7/client-jdk15/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/client-jdk15/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client-jdk15</artifactId>
Modified: branches/as7/common-core/pom.xml
===================================================================
--- branches/as7/common-core/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/common-core/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-common-core</artifactId>
Property changes on: branches/as7/common-core/src/main/java/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org:3535-3555*
/trunk/common-core/src/main/java/org:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid:3535-3555*
/trunk/common-core/src/main/java/org/teiid:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core:3535-3555*
/trunk/common-core/src/main/java/org/teiid/core:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/BundleUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/BundleUtil.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/BundleUtil.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/CoreConstants.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/CoreConstants.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/CoreConstants.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/CorePlugin.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/CorePlugin.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/CorePlugin.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/TeiidComponentException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/TeiidComponentException.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/TeiidComponentException.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/TeiidException.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/common-core/src/main/java/org/teiid/core/TeiidException.java:3220-3275
/trunk/common-core/src/main/java/org/teiid/core/TeiidException.java:3188-3450,3452-3506
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/TeiidException.java:3220-3275,3535-3555
/trunk/common-core/src/main/java/org/teiid/core/TeiidException.java:3188-3450,3452-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java:3220-3275
/trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java:3188-3450,3452-3506
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java:3220-3275,3535-3555
/trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java:3188-3450,3452-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/crypto
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/crypto:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/crypto:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types:3535-3555*
/trunk/common-core/src/main/java/org/teiid/core/types:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/BaseLob.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/BaseLob.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/BaseLob.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/BlobImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/BlobImpl.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/BlobImpl.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/BlobType.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/BlobType.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/BlobType.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/ClobImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/ClobImpl.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/ClobImpl.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/ClobType.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/ClobType.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java:3507-3597
Modified: branches/as7/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
--- branches/as7/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -75,6 +75,8 @@
* need to load the Class object, which may not be in the classpath. The
* advantage of the Class option is speed.
* </p>
+ *
+ * TODO: refactor the string/class/code into an enum
*/
public class DataTypeManager {
@@ -224,6 +226,62 @@
public static final Class<ClobType> CLOB = ClobType.class;
public static final Class<XMLType> XML = XMLType.class;
}
+
+ public static final class DefaultTypeCodes {
+ public static final int STRING = 0;
+ public static final int CHAR = 1;
+ public static final int BOOLEAN = 2;
+ public static final int BYTE = 3;
+ public static final int SHORT = 4;
+ public static final int INTEGER = 5;
+ public static final int LONG = 6;
+ public static final int BIGINTEGER = 7;
+ public static final int FLOAT = 8;
+ public static final int DOUBLE = 9;
+ public static final int BIGDECIMAL = 10;
+ public static final int DATE = 11;
+ public static final int TIME = 12;
+ public static final int TIMESTAMP = 13;
+ public static final int OBJECT = 14;
+ public static final int BLOB = 15;
+ public static final int CLOB = 16;
+ public static final int XML = 17;
+ public static final int NULL = 18;
+ }
+
+ private static final Map<Class<?>, Integer> typeMap = new LinkedHashMap<Class<?>, Integer>(64);
+ private static final List<Class<?>> typeList;
+
+ static {
+ typeMap.put(DataTypeManager.DefaultDataClasses.STRING, DefaultTypeCodes.STRING);
+ typeMap.put(DataTypeManager.DefaultDataClasses.CHAR, DefaultTypeCodes.CHAR);
+ typeMap.put(DataTypeManager.DefaultDataClasses.BOOLEAN, DefaultTypeCodes.BOOLEAN);
+ typeMap.put(DataTypeManager.DefaultDataClasses.BYTE, DefaultTypeCodes.BYTE);
+ typeMap.put(DataTypeManager.DefaultDataClasses.SHORT, DefaultTypeCodes.SHORT);
+ typeMap.put(DataTypeManager.DefaultDataClasses.INTEGER, DefaultTypeCodes.INTEGER);
+ typeMap.put(DataTypeManager.DefaultDataClasses.LONG, DefaultTypeCodes.LONG);
+ typeMap.put(DataTypeManager.DefaultDataClasses.BIG_INTEGER, DefaultTypeCodes.BIGINTEGER);
+ typeMap.put(DataTypeManager.DefaultDataClasses.FLOAT, DefaultTypeCodes.FLOAT);
+ typeMap.put(DataTypeManager.DefaultDataClasses.DOUBLE, DefaultTypeCodes.DOUBLE);
+ typeMap.put(DataTypeManager.DefaultDataClasses.BIG_DECIMAL, DefaultTypeCodes.BIGDECIMAL);
+ typeMap.put(DataTypeManager.DefaultDataClasses.DATE, DefaultTypeCodes.DATE);
+ typeMap.put(DataTypeManager.DefaultDataClasses.TIME, DefaultTypeCodes.TIME);
+ typeMap.put(DataTypeManager.DefaultDataClasses.TIMESTAMP, DefaultTypeCodes.TIMESTAMP);
+ typeMap.put(DataTypeManager.DefaultDataClasses.OBJECT, DefaultTypeCodes.OBJECT);
+ typeMap.put(DataTypeManager.DefaultDataClasses.BLOB, DefaultTypeCodes.BLOB);
+ typeMap.put(DataTypeManager.DefaultDataClasses.CLOB, DefaultTypeCodes.CLOB);
+ typeMap.put(DataTypeManager.DefaultDataClasses.XML, DefaultTypeCodes.XML);
+ typeMap.put(DataTypeManager.DefaultDataClasses.NULL, DefaultTypeCodes.NULL);
+ typeList = new ArrayList<Class<?>>(typeMap.keySet());
+ }
+
+ public static int getTypeCode(Class<?> source) {
+ return typeMap.get(source).intValue();
+ }
+
+ public static Class<?> getClass(int code) {
+ return typeList.get(code);
+ }
/**
* Doubly-nested map of String srcType --> Map of String targetType -->
@@ -340,14 +398,20 @@
* this is simply the class of the object. Some special cases are when the
* value is of type Object or Null.
*/
- public static Class determineDataTypeClass(Object value) {
+ public static Class<?> determineDataTypeClass(Object value) {
// Handle null case
if (value == null) {
return DefaultDataClasses.NULL;
}
-
- return getDataTypeClass(getDataTypeName(convertToRuntimeType(value)
- .getClass()));
+ Class<?> clazz = value.getClass();
+ if (DATA_TYPE_CLASSES.contains(clazz)) {
+ return clazz;
+ }
+ clazz = convertToRuntimeType(value).getClass();
+ if (DATA_TYPE_CLASSES.contains(clazz)) {
+ return clazz;
+ }
+ return DefaultDataClasses.OBJECT;
}
/**
@@ -748,7 +812,7 @@
return null;
}
Class<?> c = value.getClass();
- if (getAllDataTypeClasses().contains(c)) {
+ if (DATA_TYPE_CLASSES.contains(c)) {
return value;
}
SourceTransform t = sourceConverters.get(c);
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/InputStreamFactory.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/InputStreamFactory.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/InputStreamFactory.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/JDBCSQLTypeInfo.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/JDBCSQLTypeInfo.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/JDBCSQLTypeInfo.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/LobSearchUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/LobSearchUtil.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/LobSearchUtil.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/NullType.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/NullType.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/NullType.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/SQLXMLImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/SQLXMLImpl.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/SQLXMLImpl.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/Sequencable.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/Sequencable.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/Sequencable.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/SourceTransform.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/SourceTransform.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/SourceTransform.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/StandardXMLTranslator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/StandardXMLTranslator.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/StandardXMLTranslator.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/Streamable.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/Streamable.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/Streamable.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/Transform.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/Transform.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/Transform.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/TransformationException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/TransformationException.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/TransformationException.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/XMLTranslator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/XMLTranslator.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/XMLTranslator.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/XMLType.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/XMLType.java:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/XMLType.java:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/types/basic
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/types/basic:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/types/basic:3507-3597
Property changes on: branches/as7/common-core/src/main/java/org/teiid/core/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/main/java/org/teiid/core/util:3535-3555
/trunk/common-core/src/main/java/org/teiid/core/util:3507-3597
Copied: branches/as7/common-core/src/main/java/org/teiid/core/util/ExecutorUtils.java (from rev 3597, trunk/common-core/src/main/java/org/teiid/core/util/ExecutorUtils.java)
===================================================================
--- branches/as7/common-core/src/main/java/org/teiid/core/util/ExecutorUtils.java (rev 0)
+++ branches/as7/common-core/src/main/java/org/teiid/core/util/ExecutorUtils.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.core.util;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+public class ExecutorUtils {
+
+ /**
+ * Creates a fixed thread pool with named daemon threads that will expire after 60 seconds of
+ * inactivity.
+ * @param nThreads
+ * @param name
+ * @return
+ */
+ public static ExecutorService newFixedThreadPool(int nThreads, String name) {
+ return newFixedThreadPool(nThreads, Integer.MAX_VALUE, name);
+ }
+
+ public static ExecutorService newFixedThreadPool(int nThreads, int maxQueue, String name) {
+ ThreadPoolExecutor tpe = new ThreadPoolExecutor(nThreads, nThreads,
+ 60L, TimeUnit.SECONDS,
+ maxQueue==0?new SynchronousQueue<Runnable>():new LinkedBlockingQueue<Runnable>(maxQueue), new NamedThreadFactory(name));
+ tpe.allowCoreThreadTimeOut(true);
+ return tpe;
+ }
+
+ private static Executor direct = new Executor() {
+
+ @Override
+ public void execute(Runnable command) {
+ command.run();
+ }
+ };
+
+ public static Executor getDirectExecutor() {
+ return direct;
+ }
+}
Property changes on: branches/as7/common-core/src/test/java/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org:3535-3555*
/trunk/common-core/src/test/java/org:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid:3535-3555*
/trunk/common-core/src/test/java/org/teiid:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core:3535-3555*
/trunk/common-core/src/test/java/org/teiid/core:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java:3220-3275
/trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java:3188-3450,3452-3506
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java:3220-3275,3535-3555
/trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java:3188-3450,3452-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/crypto
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/crypto:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/crypto:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types:3535-3555*
/trunk/common-core/src/test/java/org/teiid/core/types:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/TestBlobValue.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/TestBlobValue.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/TestBlobValue.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/TestClobValue.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/TestClobValue.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/TestClobValue.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/TestDataTypeManager.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/TestSQLXMLImpl.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/TestSQLXMLImpl.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/TestSQLXMLImpl.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/TestXMLStreamSourceTranslator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/TestXMLStreamSourceTranslator.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/TestXMLStreamSourceTranslator.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/TestXMLValue.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/TestXMLValue.java:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/TestXMLValue.java:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/types/basic
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/types/basic:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/types/basic:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/core/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/core/util:3535-3555
/trunk/common-core/src/test/java/org/teiid/core/util:3507-3597
Modified: branches/as7/common-core/src/test/java/org/teiid/core/util/UnitTestUtil.java
===================================================================
--- branches/as7/common-core/src/test/java/org/teiid/core/util/UnitTestUtil.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/common-core/src/test/java/org/teiid/core/util/UnitTestUtil.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -50,6 +50,45 @@
*/
public class UnitTestUtil {
+ public static final class LogFormatter extends Formatter {
+ @Override
+ public String format(LogRecord record) {
+ final StringBuilder result = new StringBuilder();
+ result.append(new Timestamp(record.getMillis()));
+ result.append(" "); //$NON-NLS-1$
+ result.append(record.getLoggerName());
+ result.append(" "); //$NON-NLS-1$
+ result.append(record.getLevel());
+ result.append(" "); //$NON-NLS-1$
+ result.append(Thread.currentThread().getName());
+ result.append(" "); //$NON-NLS-1$
+ result.append(record.getMessage());
+ result.append('\n');
+ if (record.getThrown() != null) {
+ record.getThrown().printStackTrace(new PrintWriter(new Writer() {
+
+ @Override
+ public void close() throws IOException {
+
+ }
+
+ @Override
+ public void flush() throws IOException {
+
+ }
+
+ @Override
+ public void write(char[] cbuf, int off, int len)
+ throws IOException {
+ result.append(new String(cbuf, off, len));
+ }
+ }));
+ result.append('\n');
+ }
+ return result.toString();
+ }
+ }
+
public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
private static final String DEFAULT_TESTDATA_PATH = "src/test/resources"; //$NON-NLS-1$
@@ -419,45 +458,7 @@
} else {
logger.setUseParentHandlers(false);
ConsoleHandler ch = new ConsoleHandler();
- ch.setFormatter(new Formatter() {
-
- @Override
- public String format(LogRecord record) {
- final StringBuilder result = new StringBuilder();
- result.append(new Timestamp(record.getMillis()));
- result.append(" "); //$NON-NLS-1$
- result.append(record.getLoggerName());
- result.append(" "); //$NON-NLS-1$
- result.append(record.getLevel());
- result.append(" "); //$NON-NLS-1$
- result.append(record.getThreadID());
- result.append(" "); //$NON-NLS-1$
- result.append(record.getMessage());
- result.append('\n');
- if (record.getThrown() != null) {
- record.getThrown().printStackTrace(new PrintWriter(new Writer() {
-
- @Override
- public void close() throws IOException {
-
- }
-
- @Override
- public void flush() throws IOException {
-
- }
-
- @Override
- public void write(char[] cbuf, int off, int len)
- throws IOException {
- result.append(new String(cbuf, off, len));
- }
- }));
- result.append('\n');
- }
- return result.toString();
- }
- });
+ ch.setFormatter(new LogFormatter());
ch.setLevel(Level.FINEST);
logger.addHandler(ch);
}
Property changes on: branches/as7/common-core/src/test/java/org/teiid/query
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/query:3535-3555*
/trunk/common-core/src/test/java/org/teiid/query:3507-3597
Property changes on: branches/as7/common-core/src/test/java/org/teiid/query/unittest
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/common-core/src/test/java/org/teiid/query/unittest:3535-3555
/trunk/common-core/src/test/java/org/teiid/query/unittest:3507-3597
Modified: branches/as7/connectors/connector-file/pom.xml
===================================================================
--- branches/as7/connectors/connector-file/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/connector-file/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-file</artifactId>
Property changes on: branches/as7/connectors/connector-file/src/main/java/org/teiid/resource/adapter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/java/org/teiid/resource/adapter:3535-3555*
/trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file:3535-3555
/trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/resources/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/resources/org:3535-3555*
/trunk/connectors/connector-file/src/main/resources/org:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/resources/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/resources/org/teiid:3535-3555*
/trunk/connectors/connector-file/src/main/resources/org/teiid:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/resources/org/teiid/resource:3535-3555*
/trunk/connectors/connector-file/src/main/resources/org/teiid/resource:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/adapter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/resources/org/teiid/resource/adapter:3535-3555*
/trunk/connectors/connector-file/src/main/resources/org/teiid/resource/adapter:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file:3535-3555*
/trunk/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file/i18n.properties
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file/i18n.properties:3535-3555
/trunk/connectors/connector-file/src/main/resources/org/teiid/resource/adapter/file/i18n.properties:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/test/java/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/test/java/org:3535-3555*
/trunk/connectors/connector-file/src/test/java/org:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/test/java/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/test/java/org/teiid:3535-3555*
/trunk/connectors/connector-file/src/test/java/org/teiid:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/test/java/org/teiid/resource
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/test/java/org/teiid/resource:3535-3555*
/trunk/connectors/connector-file/src/test/java/org/teiid/resource:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/adapter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/test/java/org/teiid/resource/adapter:3535-3555*
/trunk/connectors/connector-file/src/test/java/org/teiid/resource/adapter:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file:3535-3555*
/trunk/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file:3507-3597
Property changes on: branches/as7/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file/TestFileConnection.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file/TestFileConnection.java:3535-3555
/trunk/connectors/connector-file/src/test/java/org/teiid/resource/adapter/file/TestFileConnection.java:3507-3597
Modified: branches/as7/connectors/connector-ldap/pom.xml
===================================================================
--- branches/as7/connectors/connector-ldap/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/connector-ldap/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ldap</artifactId>
Property changes on: branches/as7/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter:3535-3555*
/trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter:3507-3597
Property changes on: branches/as7/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap:3535-3555
/trunk/connectors/connector-ldap/src/main/java/org/teiid/resource/adapter/ldap:3507-3597
Modified: branches/as7/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java
===================================================================
--- branches/as7/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/connector-ldap/src/test/java/org/teiid/resource/adapter/ldap/TestLDAPConnection.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -30,10 +30,8 @@
import org.junit.Test;
import org.mockito.Mockito;
-import org.teiid.resource.adapter.ldap.LDAPConnectionImpl;
-import org.teiid.resource.adapter.ldap.LDAPManagedConnectionFactory;
-
+@SuppressWarnings("nls")
public class TestLDAPConnection {
public static class FakeFactory implements InitialContextFactory {
Modified: branches/as7/connectors/connector-salesforce/pom.xml
===================================================================
--- branches/as7/connectors/connector-salesforce/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/connector-salesforce/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-salesforce</artifactId>
Modified: branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
===================================================================
--- branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,6 +29,9 @@
import javax.resource.ResourceException;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.handler.PortInfo;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
@@ -82,7 +85,7 @@
String getUserName() throws ResourceException {
try {
- return sfSoap.getUserInfo(sh).getUserName();
+ return sfSoap.getUserInfo().getUserName();
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
throw new ResourceException(e);
}
@@ -110,9 +113,17 @@
BusFactory.setThreadDefaultBus(mcf.getBus());
try {
sfService = new SforceService();
+ sh = new SessionHeader();
+
+ // Session Id must be passed in soapHeader - add the handler
+ sfService.setHandlerResolver(new SalesforceHandlerResolver(sh));
+
sfSoap = sfService.getSoap();
((BindingProvider)sfSoap).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url.toExternalForm());
loginResult = sfSoap.login(username, password);
+
+ // Set the SessionId after login, for subsequent calls
+ sh.setSessionId(loginResult.getSessionId());
} catch (LoginFault e) {
throw new ResourceException(e);
} catch (InvalidIdFault e) {
@@ -123,9 +134,7 @@
BusFactory.setThreadDefaultBus(bus);
}
LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Login was successful for username " + username); //$NON-NLS-1$
-
- sh = new SessionHeader();
- sh.setSessionId(loginResult.getSessionId());
+
// Reset the SOAP endpoint to the returned server URL
((BindingProvider)sfSoap).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,loginResult.getServerUrl());
// or maybe org.apache.cxf.message.Message.ENDPOINT_ADDRESS
@@ -136,7 +145,7 @@
// Test the connection.
try {
- sfSoap.getUserInfo(sh);
+ sfSoap.getUserInfo();
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
throw new ResourceException(e);
}
@@ -150,7 +159,7 @@
result = false;
} else {
try {
- sfSoap.getServerTimestamp(sh);
+ sfSoap.getServerTimestamp();
} catch (Throwable t) {
LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Caught Throwable in isAlive", t); //$NON-NLS-1$
result = false;
@@ -171,12 +180,12 @@
qo.setBatchSize(batchSize);
try {
if(queryAll != null && queryAll) {
- qr = sfSoap.queryAll(queryString, sh);
+ qr = sfSoap.queryAll(queryString);
} else {
MruHeader mruHeader = partnerFactory.createMruHeader();
mruHeader.setUpdateMru(false);
- qr = sfSoap.query(queryString, sh);
+ qr = sfSoap.query(queryString);
}
} catch (InvalidFieldFault e) {
throw new ResourceException(e);
@@ -198,7 +207,7 @@
QueryOptions qo = partnerFactory.createQueryOptions();
qo.setBatchSize(batchSize);
try {
- return sfSoap.queryMore(queryLocator, sh);
+ return sfSoap.queryMore(queryLocator);
} catch (InvalidFieldFault e) {
throw new ResourceException(e);
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
@@ -212,7 +221,7 @@
public int delete(String[] ids) throws ResourceException {
List<DeleteResult> results = null;
try {
- results = sfSoap.delete(Arrays.asList(ids), sh);
+ results = sfSoap.delete(Arrays.asList(ids));
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
throw new ResourceException(e);
}
@@ -250,7 +259,7 @@
objects.add(toCreate);
List<SaveResult> result;
try {
- result = sfSoap.create(objects, sh);
+ result = sfSoap.create(objects);
} catch (InvalidFieldFault e) {
throw new ResourceException(e);
} catch (com.sforce.soap.partner.InvalidSObjectFault e) {
@@ -275,7 +284,7 @@
}
List<SaveResult> result;
try {
- result = sfSoap.update(params, sh);
+ result = sfSoap.update(params);
} catch (InvalidFieldFault e) {
throw new ResourceException(e);
} catch (com.sforce.soap.partner.InvalidSObjectFault e) {
@@ -300,7 +309,7 @@
public UpdatedResult getUpdated(String objectType, XMLGregorianCalendar startDate, XMLGregorianCalendar endDate) throws ResourceException {
GetUpdatedResult updated;
try {
- updated = sfSoap.getUpdated(objectType, startDate, endDate, sh);
+ updated = sfSoap.getUpdated(objectType, startDate, endDate);
} catch (com.sforce.soap.partner.InvalidSObjectFault e) {
throw new ResourceException(e);
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
@@ -316,7 +325,7 @@
XMLGregorianCalendar endCalendar) throws ResourceException {
GetDeletedResult deleted;
try {
- deleted = sfSoap.getDeleted(objectName, startCalendar, endCalendar, sh);
+ deleted = sfSoap.getDeleted(objectName, startCalendar, endCalendar);
} catch (com.sforce.soap.partner.InvalidSObjectFault e) {
throw new ResourceException(e);
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
@@ -342,7 +351,7 @@
public QueryResult retrieve(String fieldList, String sObjectType, List<String> ids) throws ResourceException {
try {
- List<SObject> objects = sfSoap.retrieve(fieldList, sObjectType, ids, sh);
+ List<SObject> objects = sfSoap.retrieve(fieldList, sObjectType, ids);
QueryResult result = new QueryResult();
for (SObject sObject : objects) {
if (sObject != null) {
@@ -368,7 +377,7 @@
public DescribeGlobalResult getObjects() throws ResourceException {
try {
- return sfSoap.describeGlobal(sh);
+ return sfSoap.describeGlobal();
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
throw new ResourceException(e);
}
@@ -376,7 +385,7 @@
public DescribeSObjectResult getObjectMetaData(String objectName) throws ResourceException {
try {
- return sfSoap.describeSObject(objectName, sh);
+ return sfSoap.describeSObject(objectName);
} catch (com.sforce.soap.partner.InvalidSObjectFault e) {
throw new ResourceException(e);
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
@@ -392,6 +401,5 @@
@Override
public boolean isAlive() {
return isValid();
- }
-
+ }
}
Copied: branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java (from rev 3597, trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java)
===================================================================
--- branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java (rev 0)
+++ branches/as7/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,85 @@
+package org.teiid.resource.adapter.salesforce;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.PortInfo;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import com.sforce.soap.partner.SessionHeader;
+
+/* Handler which adds the SessionId info to the SOAP Header
+ *
+ */
+class SalesforceHandlerResolver implements HandlerResolver {
+
+ private SalesforceHeaderHandler headerHandler = null;
+
+ public SalesforceHandlerResolver(SessionHeader sh) {
+ this.headerHandler = new SalesforceHeaderHandler(sh);
+ }
+
+ public List<Handler> getHandlerChain(PortInfo portInfo) {
+ List<Handler> handlerChain = new ArrayList<Handler>();
+
+ handlerChain.add(this.headerHandler);
+
+ return handlerChain;
+ }
+
+ class SalesforceHeaderHandler implements SOAPHandler<SOAPMessageContext> {
+
+ SessionHeader sh = null;
+
+ public SalesforceHeaderHandler(SessionHeader sh) {
+ this.sh = sh;
+ }
+
+ public boolean handleMessage(SOAPMessageContext smc) {
+ QName sessionHeader = new QName("urn:partner.soap.sforce.com", "SessionHeader"); //$NON-NLS-1$ //$NON-NLS-2$
+ QName sessionId = new QName("urn:partner.soap.sforce.com", "sessionId");
+ try {
+ // If the SessionHeader is null, or the session id is null - do nothing.
+ if (sh!=null && sh.getSessionId()!=null) {
+ SOAPMessage message = smc.getMessage();
+ SOAPPart part = message.getSOAPPart();
+ SOAPEnvelope envelope = part.getEnvelope();
+ SOAPHeader header = envelope.getHeader();
+ if (header == null) header = envelope.addHeader();
+ SOAPHeaderElement sessionHeaderElement = header.addHeaderElement(sessionHeader);
+ SOAPElement sessionIdElement = sessionHeaderElement.addChildElement(sessionId);
+ sessionIdElement.addTextNode(sh.getSessionId());
+ }
+
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+
+ public Set getHeaders() {
+ return null;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void close(MessageContext context) {
+ }
+ }
+}
Modified: branches/as7/connectors/connector-ws/pom.xml
===================================================================
--- branches/as7/connectors/connector-ws/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/connector-ws/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ws</artifactId>
Property changes on: branches/as7/connectors/connector-ws/src/main/resources/org
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ws/src/main/resources/org:3535-3555*
/trunk/connectors/connector-ws/src/main/resources/org:3507-3597
Property changes on: branches/as7/connectors/connector-ws/src/main/resources/org/teiid
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ws/src/main/resources/org/teiid:3535-3555*
/trunk/connectors/connector-ws/src/main/resources/org/teiid:3507-3597
Property changes on: branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ws/src/main/resources/org/teiid/resource:3535-3555*
/trunk/connectors/connector-ws/src/main/resources/org/teiid/resource:3507-3597
Property changes on: branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter:3535-3555*
/trunk/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter:3507-3597
Property changes on: branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws:3535-3555*
/trunk/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws:3507-3597
Property changes on: branches/as7/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws/i18n.properties
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws/i18n.properties:3535-3555
/trunk/connectors/connector-ws/src/main/resources/org/teiid/resource/adapter/ws/i18n.properties:3507-3597
Modified: branches/as7/connectors/pom.xml
===================================================================
--- branches/as7/connectors/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: branches/as7/connectors/salesforce-api/pom.xml
===================================================================
--- branches/as7/connectors/salesforce-api/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>salesforce-api</artifactId>
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,54 @@
+
+package com.sforce.soap.partner;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="allOrNone" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "allOrNone"
+})
+@XmlRootElement(name = "AllOrNoneHeader")
+public class AllOrNoneHeader {
+
+ protected boolean allOrNone;
+
+ /**
+ * Gets the value of the allOrNone property.
+ *
+ */
+ public boolean isAllOrNone() {
+ return allOrNone;
+ }
+
+ /**
+ * Sets the value of the allOrNone property.
+ *
+ */
+ public void setAllOrNone(boolean value) {
+ this.allOrNone = value;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,124 @@
+
+package com.sforce.soap.partner;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DataCategory complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DataCategory">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="childCategories" type="{urn:partner.soap.sforce.com}DataCategory" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataCategory", propOrder = {
+ "childCategories",
+ "label",
+ "name"
+})
+public class DataCategory {
+
+ protected List<DataCategory> childCategories;
+ @XmlElement(required = true)
+ protected String label;
+ @XmlElement(required = true)
+ protected String name;
+
+ /**
+ * Gets the value of the childCategories property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the childCategories property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getChildCategories().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DataCategory }
+ *
+ *
+ */
+ public List<DataCategory> getChildCategories() {
+ if (childCategories == null) {
+ childCategories = new ArrayList<DataCategory>();
+ }
+ return this.childCategories;
+ }
+
+ /**
+ * Gets the value of the label property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * Sets the value of the label property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLabel(String value) {
+ this.label = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,90 @@
+
+package com.sforce.soap.partner;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DataCategoryGroupSobjectTypePair complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DataCategoryGroupSobjectTypePair">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="dataCategoryGroupName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="sobject" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataCategoryGroupSobjectTypePair", propOrder = {
+ "dataCategoryGroupName",
+ "sobject"
+})
+public class DataCategoryGroupSobjectTypePair {
+
+ @XmlElement(required = true)
+ protected String dataCategoryGroupName;
+ @XmlElement(required = true)
+ protected String sobject;
+
+ /**
+ * Gets the value of the dataCategoryGroupName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDataCategoryGroupName() {
+ return dataCategoryGroupName;
+ }
+
+ /**
+ * Sets the value of the dataCategoryGroupName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDataCategoryGroupName(String value) {
+ this.dataCategoryGroupName = value;
+ }
+
+ /**
+ * Gets the value of the sobject property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSobject() {
+ return sobject;
+ }
+
+ /**
+ * Sets the value of the sobject property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSobject(String value) {
+ this.sobject = value;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,165 @@
+
+package com.sforce.soap.partner;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DescribeDataCategoryGroupResult complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DescribeDataCategoryGroupResult">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="categoryCount" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="sobject" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DescribeDataCategoryGroupResult", propOrder = {
+ "categoryCount",
+ "description",
+ "label",
+ "name",
+ "sobject"
+})
+public class DescribeDataCategoryGroupResult {
+
+ protected int categoryCount;
+ @XmlElement(required = true)
+ protected String description;
+ @XmlElement(required = true)
+ protected String label;
+ @XmlElement(required = true)
+ protected String name;
+ @XmlElement(required = true)
+ protected String sobject;
+
+ /**
+ * Gets the value of the categoryCount property.
+ *
+ */
+ public int getCategoryCount() {
+ return categoryCount;
+ }
+
+ /**
+ * Sets the value of the categoryCount property.
+ *
+ */
+ public void setCategoryCount(int value) {
+ this.categoryCount = value;
+ }
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDescription(String value) {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the label property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * Sets the value of the label property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLabel(String value) {
+ this.label = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the sobject property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSobject() {
+ return sobject;
+ }
+
+ /**
+ * Sets the value of the sobject property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSobject(String value) {
+ this.sobject = value;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,180 @@
+
+package com.sforce.soap.partner;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DescribeDataCategoryGroupStructureResult complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DescribeDataCategoryGroupStructureResult">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="sobject" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="topCategories" type="{urn:partner.soap.sforce.com}DataCategory" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DescribeDataCategoryGroupStructureResult", propOrder = {
+ "description",
+ "label",
+ "name",
+ "sobject",
+ "topCategories"
+})
+public class DescribeDataCategoryGroupStructureResult {
+
+ @XmlElement(required = true)
+ protected String description;
+ @XmlElement(required = true)
+ protected String label;
+ @XmlElement(required = true)
+ protected String name;
+ @XmlElement(required = true)
+ protected String sobject;
+ protected List<DataCategory> topCategories;
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDescription(String value) {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the label property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * Sets the value of the label property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLabel(String value) {
+ this.label = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the sobject property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSobject() {
+ return sobject;
+ }
+
+ /**
+ * Sets the value of the sobject property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSobject(String value) {
+ this.sobject = value;
+ }
+
+ /**
+ * Gets the value of the topCategories property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the topCategories property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getTopCategories().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DataCategory }
+ *
+ *
+ */
+ public List<DataCategory> getTopCategories() {
+ if (topCategories == null) {
+ topCategories = new ArrayList<DataCategory>();
+ }
+ return this.topCategories;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,88 @@
+
+package com.sforce.soap.partner;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="pairs" type="{urn:partner.soap.sforce.com}DataCategoryGroupSobjectTypePair" maxOccurs="100" minOccurs="0"/>
+ * <element name="topCategoriesOnly" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "pairs",
+ "topCategoriesOnly"
+})
+@XmlRootElement(name = "describeDataCategoryGroupStructures")
+public class DescribeDataCategoryGroupStructures {
+
+ protected List<DataCategoryGroupSobjectTypePair> pairs;
+ protected boolean topCategoriesOnly;
+
+ /**
+ * Gets the value of the pairs property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the pairs property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPairs().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DataCategoryGroupSobjectTypePair }
+ *
+ *
+ */
+ public List<DataCategoryGroupSobjectTypePair> getPairs() {
+ if (pairs == null) {
+ pairs = new ArrayList<DataCategoryGroupSobjectTypePair>();
+ }
+ return this.pairs;
+ }
+
+ /**
+ * Gets the value of the topCategoriesOnly property.
+ *
+ */
+ public boolean isTopCategoriesOnly() {
+ return topCategoriesOnly;
+ }
+
+ /**
+ * Sets the value of the topCategoriesOnly property.
+ *
+ */
+ public void setTopCategoriesOnly(boolean value) {
+ this.topCategoriesOnly = value;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,69 @@
+
+package com.sforce.soap.partner;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="result" type="{urn:partner.soap.sforce.com}DescribeDataCategoryGroupStructureResult" maxOccurs="100" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "result"
+})
+@XmlRootElement(name = "describeDataCategoryGroupStructuresResponse")
+public class DescribeDataCategoryGroupStructuresResponse {
+
+ protected List<DescribeDataCategoryGroupStructureResult> result;
+
+ /**
+ * Gets the value of the result property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the result property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getResult().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DescribeDataCategoryGroupStructureResult }
+ *
+ *
+ */
+ public List<DescribeDataCategoryGroupStructureResult> getResult() {
+ if (result == null) {
+ result = new ArrayList<DescribeDataCategoryGroupStructureResult>();
+ }
+ return this.result;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,69 @@
+
+package com.sforce.soap.partner;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="sObjectType" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="10" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "sObjectType"
+})
+@XmlRootElement(name = "describeDataCategoryGroups")
+public class DescribeDataCategoryGroups {
+
+ protected List<String> sObjectType;
+
+ /**
+ * Gets the value of the sObjectType property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the sObjectType property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getSObjectType().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List<String> getSObjectType() {
+ if (sObjectType == null) {
+ sObjectType = new ArrayList<String>();
+ }
+ return this.sObjectType;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,69 @@
+
+package com.sforce.soap.partner;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="result" type="{urn:partner.soap.sforce.com}DescribeDataCategoryGroupResult" maxOccurs="100" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "result"
+})
+@XmlRootElement(name = "describeDataCategoryGroupsResponse")
+public class DescribeDataCategoryGroupsResponse {
+
+ protected List<DescribeDataCategoryGroupResult> result;
+
+ /**
+ * Gets the value of the result property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the result property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getResult().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DescribeDataCategoryGroupResult }
+ *
+ *
+ */
+ public List<DescribeDataCategoryGroupResult> getResult() {
+ if (result == null) {
+ result = new ArrayList<DescribeDataCategoryGroupResult>();
+ }
+ return this.result;
+ }
+
+}
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -23,6 +23,7 @@
* <element name="customSetting" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="deletable" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="deprecatedAndHidden" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * <element name="feedEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="keyPrefix" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="labelPlural" type="{http://www.w3.org/2001/XMLSchema}string"/>
@@ -52,6 +53,7 @@
"customSetting",
"deletable",
"deprecatedAndHidden",
+ "feedEnabled",
"keyPrefix",
"label",
"labelPlural",
@@ -74,6 +76,7 @@
protected boolean customSetting;
protected boolean deletable;
protected boolean deprecatedAndHidden;
+ protected boolean feedEnabled;
@XmlElement(required = true, nillable = true)
protected String keyPrefix;
@XmlElement(required = true)
@@ -189,6 +192,22 @@
}
/**
+ * Gets the value of the feedEnabled property.
+ *
+ */
+ public boolean isFeedEnabled() {
+ return feedEnabled;
+ }
+
+ /**
+ * Sets the value of the feedEnabled property.
+ *
+ */
+ public void setFeedEnabled(boolean value) {
+ this.feedEnabled = value;
+ }
+
+ /**
* Gets the value of the keyPrefix property.
*
* @return
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -6,24 +6,22 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
- * <p>Java class for DescribeLayout complex type.
+ * <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
- * <complexType name="DescribeLayout">
+ * <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
- * <element name="buttonLayoutSection" type="{urn:partner.soap.sforce.com}DescribeLayoutButtonSection" minOccurs="0"/>
- * <element name="detailLayoutSections" type="{urn:partner.soap.sforce.com}DescribeLayoutSection" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="editLayoutSections" type="{urn:partner.soap.sforce.com}DescribeLayoutSection" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="id" type="{urn:partner.soap.sforce.com}ID"/>
- * <element name="relatedLists" type="{urn:partner.soap.sforce.com}RelatedList" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="sObjectType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="recordTypeIds" type="{urn:partner.soap.sforce.com}ID" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
@@ -33,155 +31,68 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "DescribeLayout", propOrder = {
- "buttonLayoutSection",
- "detailLayoutSections",
- "editLayoutSections",
- "id",
- "relatedLists"
+@XmlType(name = "", propOrder = {
+ "sObjectType",
+ "recordTypeIds"
})
+@XmlRootElement(name = "describeLayout")
public class DescribeLayout {
- protected DescribeLayoutButtonSection buttonLayoutSection;
- protected List<DescribeLayoutSection> detailLayoutSections;
- protected List<DescribeLayoutSection> editLayoutSections;
@XmlElement(required = true)
- protected String id;
- protected List<RelatedList> relatedLists;
+ protected String sObjectType;
+ protected List<String> recordTypeIds;
/**
- * Gets the value of the buttonLayoutSection property.
+ * Gets the value of the sObjectType property.
*
* @return
* possible object is
- * {@link DescribeLayoutButtonSection }
- *
- */
- public DescribeLayoutButtonSection getButtonLayoutSection() {
- return buttonLayoutSection;
- }
-
- /**
- * Sets the value of the buttonLayoutSection property.
- *
- * @param value
- * allowed object is
- * {@link DescribeLayoutButtonSection }
- *
- */
- public void setButtonLayoutSection(DescribeLayoutButtonSection value) {
- this.buttonLayoutSection = value;
- }
-
- /**
- * Gets the value of the detailLayoutSections property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the detailLayoutSections property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getDetailLayoutSections().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link DescribeLayoutSection }
- *
- *
- */
- public List<DescribeLayoutSection> getDetailLayoutSections() {
- if (detailLayoutSections == null) {
- detailLayoutSections = new ArrayList<DescribeLayoutSection>();
- }
- return this.detailLayoutSections;
- }
-
- /**
- * Gets the value of the editLayoutSections property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the editLayoutSections property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getEditLayoutSections().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link DescribeLayoutSection }
- *
- *
- */
- public List<DescribeLayoutSection> getEditLayoutSections() {
- if (editLayoutSections == null) {
- editLayoutSections = new ArrayList<DescribeLayoutSection>();
- }
- return this.editLayoutSections;
- }
-
- /**
- * Gets the value of the id property.
- *
- * @return
- * possible object is
* {@link String }
*
*/
- public String getId() {
- return id;
+ public String getSObjectType() {
+ return sObjectType;
}
/**
- * Sets the value of the id property.
+ * Sets the value of the sObjectType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
- public void setId(String value) {
- this.id = value;
+ public void setSObjectType(String value) {
+ this.sObjectType = value;
}
/**
- * Gets the value of the relatedLists property.
+ * Gets the value of the recordTypeIds property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the relatedLists property.
+ * This is why there is not a <CODE>set</CODE> method for the recordTypeIds property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getRelatedLists().add(newItem);
+ * getRecordTypeIds().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
- * {@link RelatedList }
+ * {@link String }
*
*
*/
- public List<RelatedList> getRelatedLists() {
- if (relatedLists == null) {
- relatedLists = new ArrayList<RelatedList>();
+ public List<String> getRecordTypeIds() {
+ if (recordTypeIds == null) {
+ recordTypeIds = new ArrayList<String>();
}
- return this.relatedLists;
+ return this.recordTypeIds;
}
}
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -39,7 +39,7 @@
public class DescribeLayoutResult {
@XmlElement(required = true)
- protected List<DescribeLayout> layouts;
+ protected List<DescribeLayout2> layouts;
protected List<RecordTypeMapping> recordTypeMappings;
protected boolean recordTypeSelectorRequired;
@@ -61,13 +61,13 @@
*
* <p>
* Objects of the following type(s) are allowed in the list
- * {@link DescribeLayout }
+ * {@link DescribeLayout2 }
*
*
*/
- public List<DescribeLayout> getLayouts() {
+ public List<DescribeLayout2> getLayouts() {
if (layouts == null) {
- layouts = new ArrayList<DescribeLayout>();
+ layouts = new ArrayList<DescribeLayout2>();
}
return this.layouts;
}
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -26,6 +26,7 @@
* <element name="customSetting" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="deletable" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="deprecatedAndHidden" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * <element name="feedEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="fields" type="{urn:partner.soap.sforce.com}Field" maxOccurs="unbounded" minOccurs="0"/>
* <element name="keyPrefix" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/>
@@ -61,6 +62,7 @@
"customSetting",
"deletable",
"deprecatedAndHidden",
+ "feedEnabled",
"fields",
"keyPrefix",
"label",
@@ -89,6 +91,7 @@
protected boolean customSetting;
protected boolean deletable;
protected boolean deprecatedAndHidden;
+ protected boolean feedEnabled;
@XmlElement(nillable = true)
protected List<Field> fields;
@XmlElement(required = true, nillable = true)
@@ -242,6 +245,22 @@
}
/**
+ * Gets the value of the feedEnabled property.
+ *
+ */
+ public boolean isFeedEnabled() {
+ return feedEnabled;
+ }
+
+ /**
+ * Sets the value of the feedEnabled property.
+ *
+ */
+ public void setFeedEnabled(boolean value) {
+ this.feedEnabled = value;
+ }
+
+ /**
* Gets the value of the fields property.
*
* <p>
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -21,6 +21,8 @@
* <sequence>
* <element name="infoFields" type="{urn:partner.soap.sforce.com}DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="screenPopOptions" type="{urn:partner.soap.sforce.com}DescribeSoftphoneScreenPopOption" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="screenPopsOpenWithin" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="sections" type="{urn:partner.soap.sforce.com}DescribeSoftphoneLayoutSection" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
@@ -34,6 +36,8 @@
@XmlType(name = "DescribeSoftphoneLayoutCallType", propOrder = {
"infoFields",
"name",
+ "screenPopOptions",
+ "screenPopsOpenWithin",
"sections"
})
public class DescribeSoftphoneLayoutCallType {
@@ -42,6 +46,8 @@
protected List<DescribeSoftphoneLayoutInfoField> infoFields;
@XmlElement(required = true)
protected String name;
+ protected List<DescribeSoftphoneScreenPopOption> screenPopOptions;
+ protected String screenPopsOpenWithin;
protected List<DescribeSoftphoneLayoutSection> sections;
/**
@@ -98,6 +104,59 @@
}
/**
+ * Gets the value of the screenPopOptions property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the screenPopOptions property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getScreenPopOptions().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link DescribeSoftphoneScreenPopOption }
+ *
+ *
+ */
+ public List<DescribeSoftphoneScreenPopOption> getScreenPopOptions() {
+ if (screenPopOptions == null) {
+ screenPopOptions = new ArrayList<DescribeSoftphoneScreenPopOption>();
+ }
+ return this.screenPopOptions;
+ }
+
+ /**
+ * Gets the value of the screenPopsOpenWithin property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getScreenPopsOpenWithin() {
+ return screenPopsOpenWithin;
+ }
+
+ /**
+ * Sets the value of the screenPopsOpenWithin property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setScreenPopsOpenWithin(String value) {
+ this.screenPopsOpenWithin = value;
+ }
+
+ /**
* Gets the value of the sections property.
*
* <p>
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,118 @@
+
+package com.sforce.soap.partner;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for DescribeSoftphoneScreenPopOption complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DescribeSoftphoneScreenPopOption">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="matchType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="screenPopData" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="screenPopType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DescribeSoftphoneScreenPopOption", propOrder = {
+ "matchType",
+ "screenPopData",
+ "screenPopType"
+})
+public class DescribeSoftphoneScreenPopOption {
+
+ @XmlElement(required = true)
+ protected String matchType;
+ @XmlElement(required = true)
+ protected String screenPopData;
+ @XmlElement(required = true)
+ protected String screenPopType;
+
+ /**
+ * Gets the value of the matchType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMatchType() {
+ return matchType;
+ }
+
+ /**
+ * Sets the value of the matchType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMatchType(String value) {
+ this.matchType = value;
+ }
+
+ /**
+ * Gets the value of the screenPopData property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getScreenPopData() {
+ return screenPopData;
+ }
+
+ /**
+ * Sets the value of the screenPopData property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setScreenPopData(String value) {
+ this.screenPopData = value;
+ }
+
+ /**
+ * Gets the value of the screenPopType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getScreenPopType() {
+ return screenPopType;
+ }
+
+ /**
+ * Sets the value of the screenPopType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setScreenPopType(String value) {
+ this.screenPopType = value;
+ }
+
+}
Copied: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java (from rev 3597, trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,54 @@
+
+package com.sforce.soap.partner;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="disableFeedTracking" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "disableFeedTracking"
+})
+@XmlRootElement(name = "DisableFeedTrackingHeader")
+public class DisableFeedTrackingHeader {
+
+ protected boolean disableFeedTracking;
+
+ /**
+ * Gets the value of the disableFeedTracking property.
+ *
+ */
+ public boolean isDisableFeedTracking() {
+ return disableFeedTracking;
+ }
+
+ /**
+ * Sets the value of the disableFeedTracking property.
+ *
+ */
+ public void setDisableFeedTracking(boolean value) {
+ this.disableFeedTracking = value;
+ }
+
+}
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -34,6 +34,7 @@
* <element name="digits" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="externalId" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="filterable" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * <element name="groupable" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="htmlFormatted" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="idLookup" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="inlineHelpText" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
@@ -81,6 +82,7 @@
"digits",
"externalId",
"filterable",
+ "groupable",
"htmlFormatted",
"idLookup",
"inlineHelpText",
@@ -121,6 +123,7 @@
protected int digits;
protected Boolean externalId;
protected boolean filterable;
+ protected boolean groupable;
protected Boolean htmlFormatted;
protected boolean idLookup;
protected String inlineHelpText;
@@ -431,6 +434,22 @@
}
/**
+ * Gets the value of the groupable property.
+ *
+ */
+ public boolean isGroupable() {
+ return groupable;
+ }
+
+ /**
+ * Sets the value of the groupable property.
+ *
+ */
+ public void setGroupable(boolean value) {
+ this.groupable = value;
+ }
+
+ /**
* Gets the value of the htmlFormatted property.
*
* @return
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -34,6 +34,7 @@
* <enumeration value="url"/>
* <enumeration value="email"/>
* <enumeration value="encryptedstring"/>
+ * <enumeration value="datacategorygroupreference"/>
* <enumeration value="anyType"/>
* </restriction>
* </simpleType>
@@ -84,6 +85,8 @@
EMAIL("email"),
@XmlEnumValue("encryptedstring")
ENCRYPTEDSTRING("encryptedstring"),
+ @XmlEnumValue("datacategorygroupreference")
+ DATACATEGORYGROUPREFERENCE("datacategorygroupreference"),
@XmlEnumValue("anyType")
ANY_TYPE("anyType");
private final String value;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -19,6 +19,7 @@
* <sequence>
* <element name="accessibilityMode" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="currencySymbol" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="orgAttachmentFileSizeLimit" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="orgDefaultCurrencyIsoCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="orgDisallowHtmlAttachments" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="orgHasPersonAccounts" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
@@ -27,6 +28,7 @@
* <element name="organizationName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="profileId" type="{urn:partner.soap.sforce.com}ID"/>
* <element name="roleId" type="{urn:partner.soap.sforce.com}ID"/>
+ * <element name="sessionSecondsValid" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="userDefaultCurrencyIsoCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="userEmail" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="userFullName" type="{http://www.w3.org/2001/XMLSchema}string"/>
@@ -49,6 +51,7 @@
@XmlType(name = "GetUserInfoResult", propOrder = {
"accessibilityMode",
"currencySymbol",
+ "orgAttachmentFileSizeLimit",
"orgDefaultCurrencyIsoCode",
"orgDisallowHtmlAttachments",
"orgHasPersonAccounts",
@@ -57,6 +60,7 @@
"organizationName",
"profileId",
"roleId",
+ "sessionSecondsValid",
"userDefaultCurrencyIsoCode",
"userEmail",
"userFullName",
@@ -73,6 +77,7 @@
protected boolean accessibilityMode;
@XmlElement(required = true, nillable = true)
protected String currencySymbol;
+ protected int orgAttachmentFileSizeLimit;
@XmlElement(required = true, nillable = true)
protected String orgDefaultCurrencyIsoCode;
protected boolean orgDisallowHtmlAttachments;
@@ -86,6 +91,7 @@
protected String profileId;
@XmlElement(required = true, nillable = true)
protected String roleId;
+ protected int sessionSecondsValid;
@XmlElement(required = true, nillable = true)
protected String userDefaultCurrencyIsoCode;
@XmlElement(required = true)
@@ -148,6 +154,22 @@
}
/**
+ * Gets the value of the orgAttachmentFileSizeLimit property.
+ *
+ */
+ public int getOrgAttachmentFileSizeLimit() {
+ return orgAttachmentFileSizeLimit;
+ }
+
+ /**
+ * Sets the value of the orgAttachmentFileSizeLimit property.
+ *
+ */
+ public void setOrgAttachmentFileSizeLimit(int value) {
+ this.orgAttachmentFileSizeLimit = value;
+ }
+
+ /**
* Gets the value of the orgDefaultCurrencyIsoCode property.
*
* @return
@@ -316,6 +338,22 @@
}
/**
+ * Gets the value of the sessionSecondsValid property.
+ *
+ */
+ public int getSessionSecondsValid() {
+ return sessionSecondsValid;
+ }
+
+ /**
+ * Sets the value of the sessionSecondsValid property.
+ *
+ */
+ public void setSessionSecondsValid(int value) {
+ this.sessionSecondsValid = value;
+ }
+
+ /**
* Gets the value of the userDefaultCurrencyIsoCode property.
*
* @return
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "InvalidFieldFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class InvalidFieldFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.InvalidFieldFault invalidFieldFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "InvalidIdFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class InvalidIdFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.InvalidIdFault invalidIdFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "InvalidNewPasswordFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class InvalidNewPasswordFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.InvalidNewPasswordFault invalidNewPasswordFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "InvalidQueryLocatorFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class InvalidQueryLocatorFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.InvalidQueryLocatorFault invalidQueryLocatorFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "InvalidSObjectFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class InvalidSObjectFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.InvalidSObjectFault invalidSObjectFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "LoginFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class LoginFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.LoginFault loginFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "MalformedQueryFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class MalformedQueryFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.MalformedQueryFault malformedQueryFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "MalformedSearchFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class MalformedSearchFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.MalformedSearchFault malformedSearchFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,11 +24,11 @@
@XmlRegistry
public class ObjectFactory {
+ private final static QName _EmailFileAttachmentContentType_QNAME = new QName("urn:partner.soap.sforce.com", "contentType");
+ private final static QName _EmailFileAttachmentBody_QNAME = new QName("urn:partner.soap.sforce.com", "body");
private final static QName _SingleEmailMessageOrgWideEmailAddressId_QNAME = new QName("urn:partner.soap.sforce.com", "orgWideEmailAddressId");
private final static QName _SingleEmailMessageInReplyTo_QNAME = new QName("urn:partner.soap.sforce.com", "inReplyTo");
private final static QName _SingleEmailMessageReferences_QNAME = new QName("urn:partner.soap.sforce.com", "references");
- private final static QName _EmailFileAttachmentContentType_QNAME = new QName("urn:partner.soap.sforce.com", "contentType");
- private final static QName _EmailFileAttachmentBody_QNAME = new QName("urn:partner.soap.sforce.com", "body");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.sforce.soap.partner
@@ -38,158 +38,166 @@
}
/**
- * Create an instance of {@link Merge }
+ * Create an instance of {@link GetUserInfoResponse }
*
*/
- public Merge createMerge() {
- return new Merge();
+ public GetUserInfoResponse createGetUserInfoResponse() {
+ return new GetUserInfoResponse();
}
/**
- * Create an instance of {@link CallOptions }
+ * Create an instance of {@link Retrieve }
*
*/
- public CallOptions createCallOptions() {
- return new CallOptions();
+ public Retrieve createRetrieve() {
+ return new Retrieve();
}
/**
- * Create an instance of {@link LeadConvertResult }
+ * Create an instance of {@link SearchResult }
*
*/
- public LeadConvertResult createLeadConvertResult() {
- return new LeadConvertResult();
+ public SearchResult createSearchResult() {
+ return new SearchResult();
}
/**
- * Create an instance of {@link SearchResult }
+ * Create an instance of {@link PackageVersionHeader }
*
*/
- public SearchResult createSearchResult() {
- return new SearchResult();
+ public PackageVersionHeader createPackageVersionHeader() {
+ return new PackageVersionHeader();
}
/**
- * Create an instance of {@link ProcessRequest }
+ * Create an instance of {@link ProcessWorkitemRequest }
*
*/
- public ProcessRequest createProcessRequest() {
- return new ProcessRequest();
+ public ProcessWorkitemRequest createProcessWorkitemRequest() {
+ return new ProcessWorkitemRequest();
}
/**
- * Create an instance of {@link DeleteResult }
+ * Create an instance of {@link SingleEmailMessage }
*
*/
- public DeleteResult createDeleteResult() {
- return new DeleteResult();
+ public SingleEmailMessage createSingleEmailMessage() {
+ return new SingleEmailMessage();
}
/**
- * Create an instance of {@link DescribeTab }
+ * Create an instance of {@link Field }
*
*/
- public DescribeTab createDescribeTab() {
- return new DescribeTab();
+ public Field createField() {
+ return new Field();
}
/**
- * Create an instance of {@link DescribeLayoutResult }
+ * Create an instance of {@link ChildRelationship }
*
*/
- public DescribeLayoutResult createDescribeLayoutResult() {
- return new DescribeLayoutResult();
+ public ChildRelationship createChildRelationship() {
+ return new ChildRelationship();
}
/**
- * Create an instance of {@link Retrieve }
+ * Create an instance of {@link DescribeTab }
*
*/
- public Retrieve createRetrieve() {
- return new Retrieve();
+ public DescribeTab createDescribeTab() {
+ return new DescribeTab();
}
/**
- * Create an instance of {@link Delete }
+ * Create an instance of {@link ProcessSubmitRequest }
*
*/
- public Delete createDelete() {
- return new Delete();
+ public ProcessSubmitRequest createProcessSubmitRequest() {
+ return new ProcessSubmitRequest();
}
/**
- * Create an instance of {@link DescribeTabSetResult }
+ * Create an instance of {@link RecordTypeMapping }
*
*/
- public DescribeTabSetResult createDescribeTabSetResult() {
- return new DescribeTabSetResult();
+ public RecordTypeMapping createRecordTypeMapping() {
+ return new RecordTypeMapping();
}
/**
- * Create an instance of {@link Update }
+ * Create an instance of {@link DescribeDataCategoryGroupStructures }
*
*/
- public Update createUpdate() {
- return new Update();
+ public DescribeDataCategoryGroupStructures createDescribeDataCategoryGroupStructures() {
+ return new DescribeDataCategoryGroupStructures();
}
/**
- * Create an instance of {@link Login }
+ * Create an instance of {@link SetPassword }
*
*/
- public Login createLogin() {
- return new Login();
+ public SetPassword createSetPassword() {
+ return new SetPassword();
}
/**
- * Create an instance of {@link DescribeSObjectResponse }
+ * Create an instance of {@link DescribeSoftphoneLayoutItem }
*
*/
- public DescribeSObjectResponse createDescribeSObjectResponse() {
- return new DescribeSObjectResponse();
+ public DescribeSoftphoneLayoutItem createDescribeSoftphoneLayoutItem() {
+ return new DescribeSoftphoneLayoutItem();
}
/**
- * Create an instance of {@link QueryAll }
+ * Create an instance of {@link QueryOptions }
*
*/
- public QueryAll createQueryAll() {
- return new QueryAll();
+ public QueryOptions createQueryOptions() {
+ return new QueryOptions();
}
/**
- * Create an instance of {@link Error }
+ * Create an instance of {@link DescribeLayoutButtonSection }
*
*/
- public Error createError() {
- return new Error();
+ public DescribeLayoutButtonSection createDescribeLayoutButtonSection() {
+ return new DescribeLayoutButtonSection();
}
/**
- * Create an instance of {@link LogoutResponse }
+ * Create an instance of {@link GetServerTimestampResult }
*
*/
- public LogoutResponse createLogoutResponse() {
- return new LogoutResponse();
+ public GetServerTimestampResult createGetServerTimestampResult() {
+ return new GetServerTimestampResult();
}
/**
- * Create an instance of {@link SingleEmailMessage }
+ * Create an instance of {@link LoginResult }
*
*/
- public SingleEmailMessage createSingleEmailMessage() {
- return new SingleEmailMessage();
+ public LoginResult createLoginResult() {
+ return new LoginResult();
}
/**
- * Create an instance of {@link UserTerritoryDeleteHeader }
+ * Create an instance of {@link DescribeSoftphoneLayout }
*
*/
- public UserTerritoryDeleteHeader createUserTerritoryDeleteHeader() {
- return new UserTerritoryDeleteHeader();
+ public DescribeSoftphoneLayout createDescribeSoftphoneLayout() {
+ return new DescribeSoftphoneLayout();
}
/**
+ * Create an instance of {@link InvalidateSessions }
+ *
+ */
+ public InvalidateSessions createInvalidateSessions() {
+ return new InvalidateSessions();
+ }
+
+ /**
* Create an instance of {@link DescribeLayoutRow }
*
*/
@@ -198,307 +206,307 @@
}
/**
- * Create an instance of {@link GetServerTimestampResult }
+ * Create an instance of {@link MassEmailMessage }
*
*/
- public GetServerTimestampResult createGetServerTimestampResult() {
- return new GetServerTimestampResult();
+ public MassEmailMessage createMassEmailMessage() {
+ return new MassEmailMessage();
}
/**
- * Create an instance of {@link DebuggingInfo }
+ * Create an instance of {@link Query }
*
*/
- public DebuggingInfo createDebuggingInfo() {
- return new DebuggingInfo();
+ public Query createQuery() {
+ return new Query();
}
/**
- * Create an instance of {@link PicklistEntry }
+ * Create an instance of {@link DataCategoryGroupSobjectTypePair }
*
*/
- public PicklistEntry createPicklistEntry() {
- return new PicklistEntry();
+ public DataCategoryGroupSobjectTypePair createDataCategoryGroupSobjectTypePair() {
+ return new DataCategoryGroupSobjectTypePair();
}
/**
- * Create an instance of {@link DescribeSObjectsResponse }
+ * Create an instance of {@link CreateResponse }
*
*/
- public DescribeSObjectsResponse createDescribeSObjectsResponse() {
- return new DescribeSObjectsResponse();
+ public CreateResponse createCreateResponse() {
+ return new CreateResponse();
}
/**
- * Create an instance of {@link DescribeSoftphoneLayoutItem }
+ * Create an instance of {@link LogoutResponse }
*
*/
- public DescribeSoftphoneLayoutItem createDescribeSoftphoneLayoutItem() {
- return new DescribeSoftphoneLayoutItem();
+ public LogoutResponse createLogoutResponse() {
+ return new LogoutResponse();
}
/**
- * Create an instance of {@link RecordTypeMapping }
+ * Create an instance of {@link DescribeDataCategoryGroupResult }
*
*/
- public RecordTypeMapping createRecordTypeMapping() {
- return new RecordTypeMapping();
+ public DescribeDataCategoryGroupResult createDescribeDataCategoryGroupResult() {
+ return new DescribeDataCategoryGroupResult();
}
/**
- * Create an instance of {@link DescribeGlobalSObjectResult }
+ * Create an instance of {@link SaveResult }
*
*/
- public DescribeGlobalSObjectResult createDescribeGlobalSObjectResult() {
- return new DescribeGlobalSObjectResult();
+ public SaveResult createSaveResult() {
+ return new SaveResult();
}
/**
- * Create an instance of {@link LoginResult }
+ * Create an instance of {@link Create }
*
*/
- public LoginResult createLoginResult() {
- return new LoginResult();
+ public Create createCreate() {
+ return new Create();
}
/**
- * Create an instance of {@link GetUserInfoResponse }
+ * Create an instance of {@link SendEmail }
*
*/
- public GetUserInfoResponse createGetUserInfoResponse() {
- return new GetUserInfoResponse();
+ public SendEmail createSendEmail() {
+ return new SendEmail();
}
/**
- * Create an instance of {@link Undelete }
+ * Create an instance of {@link MergeResponse }
*
*/
- public Undelete createUndelete() {
- return new Undelete();
+ public MergeResponse createMergeResponse() {
+ return new MergeResponse();
}
/**
- * Create an instance of {@link Logout }
+ * Create an instance of {@link DescribeTabSetResult }
*
*/
- public Logout createLogout() {
- return new Logout();
+ public DescribeTabSetResult createDescribeTabSetResult() {
+ return new DescribeTabSetResult();
}
/**
- * Create an instance of {@link UpsertResponse }
+ * Create an instance of {@link DescribeSoftphoneLayoutSection }
*
*/
- public UpsertResponse createUpsertResponse() {
- return new UpsertResponse();
+ public DescribeSoftphoneLayoutSection createDescribeSoftphoneLayoutSection() {
+ return new DescribeSoftphoneLayoutSection();
}
/**
- * Create an instance of {@link RecordTypeInfo }
+ * Create an instance of {@link DescribeGlobalResult }
*
*/
- public RecordTypeInfo createRecordTypeInfo() {
- return new RecordTypeInfo();
+ public DescribeGlobalResult createDescribeGlobalResult() {
+ return new DescribeGlobalResult();
}
/**
- * Create an instance of {@link LeadConvert }
+ * Create an instance of {@link DescribeGlobalResponse }
*
*/
- public LeadConvert createLeadConvert() {
- return new LeadConvert();
+ public DescribeGlobalResponse createDescribeGlobalResponse() {
+ return new DescribeGlobalResponse();
}
/**
- * Create an instance of {@link ResetPasswordResult }
+ * Create an instance of {@link RecordTypeInfo }
*
*/
- public ResetPasswordResult createResetPasswordResult() {
- return new ResetPasswordResult();
+ public RecordTypeInfo createRecordTypeInfo() {
+ return new RecordTypeInfo();
}
/**
- * Create an instance of {@link ProcessSubmitRequest }
+ * Create an instance of {@link MergeResult }
*
*/
- public ProcessSubmitRequest createProcessSubmitRequest() {
- return new ProcessSubmitRequest();
+ public MergeResult createMergeResult() {
+ return new MergeResult();
}
/**
- * Create an instance of {@link MruHeader }
+ * Create an instance of {@link QueryAll }
*
*/
- public MruHeader createMruHeader() {
- return new MruHeader();
+ public QueryAll createQueryAll() {
+ return new QueryAll();
}
/**
- * Create an instance of {@link EmptyRecycleBin }
+ * Create an instance of {@link DebuggingInfo }
*
*/
- public EmptyRecycleBin createEmptyRecycleBin() {
- return new EmptyRecycleBin();
+ public DebuggingInfo createDebuggingInfo() {
+ return new DebuggingInfo();
}
/**
- * Create an instance of {@link MergeResponse }
+ * Create an instance of {@link ProcessResponse }
*
*/
- public MergeResponse createMergeResponse() {
- return new MergeResponse();
+ public ProcessResponse createProcessResponse() {
+ return new ProcessResponse();
}
/**
- * Create an instance of {@link ResetPassword }
+ * Create an instance of {@link UserTerritoryDeleteHeader }
*
*/
- public ResetPassword createResetPassword() {
- return new ResetPassword();
+ public UserTerritoryDeleteHeader createUserTerritoryDeleteHeader() {
+ return new UserTerritoryDeleteHeader();
}
/**
- * Create an instance of {@link DeleteResponse }
+ * Create an instance of {@link Upsert }
*
*/
- public DeleteResponse createDeleteResponse() {
- return new DeleteResponse();
+ public Upsert createUpsert() {
+ return new Upsert();
}
/**
- * Create an instance of {@link DescribeLayoutButton }
+ * Create an instance of {@link Search }
*
*/
- public DescribeLayoutButton createDescribeLayoutButton() {
- return new DescribeLayoutButton();
+ public Search createSearch() {
+ return new Search();
}
/**
- * Create an instance of {@link SetPasswordResult }
+ * Create an instance of {@link QueryMore }
*
*/
- public SetPasswordResult createSetPasswordResult() {
- return new SetPasswordResult();
+ public QueryMore createQueryMore() {
+ return new QueryMore();
}
/**
- * Create an instance of {@link ProcessResponse }
+ * Create an instance of {@link GetUpdatedResponse }
*
*/
- public ProcessResponse createProcessResponse() {
- return new ProcessResponse();
+ public GetUpdatedResponse createGetUpdatedResponse() {
+ return new GetUpdatedResponse();
}
/**
- * Create an instance of {@link DebuggingHeader }
+ * Create an instance of {@link Merge }
*
*/
- public DebuggingHeader createDebuggingHeader() {
- return new DebuggingHeader();
+ public Merge createMerge() {
+ return new Merge();
}
/**
- * Create an instance of {@link Upsert }
+ * Create an instance of {@link Delete }
*
*/
- public Upsert createUpsert() {
- return new Upsert();
+ public Delete createDelete() {
+ return new Delete();
}
/**
- * Create an instance of {@link GetDeletedResult }
+ * Create an instance of {@link SetPasswordResponse }
*
*/
- public GetDeletedResult createGetDeletedResult() {
- return new GetDeletedResult();
+ public SetPasswordResponse createSetPasswordResponse() {
+ return new SetPasswordResponse();
}
/**
- * Create an instance of {@link DescribeLayoutComponent }
+ * Create an instance of {@link QueryResult }
*
*/
- public DescribeLayoutComponent createDescribeLayoutComponent() {
- return new DescribeLayoutComponent();
+ public QueryResult createQueryResult() {
+ return new QueryResult();
}
/**
- * Create an instance of {@link SearchResponse }
+ * Create an instance of {@link EmailFileAttachment }
*
*/
- public SearchResponse createSearchResponse() {
- return new SearchResponse();
+ public EmailFileAttachment createEmailFileAttachment() {
+ return new EmailFileAttachment();
}
/**
- * Create an instance of {@link RelatedListSort }
+ * Create an instance of {@link DescribeLayoutSection }
*
*/
- public RelatedListSort createRelatedListSort() {
- return new RelatedListSort();
+ public DescribeLayoutSection createDescribeLayoutSection() {
+ return new DescribeLayoutSection();
}
/**
- * Create an instance of {@link SearchRecord }
+ * Create an instance of {@link ConvertLeadResponse }
*
*/
- public SearchRecord createSearchRecord() {
- return new SearchRecord();
+ public ConvertLeadResponse createConvertLeadResponse() {
+ return new ConvertLeadResponse();
}
/**
- * Create an instance of {@link MassEmailMessage }
+ * Create an instance of {@link QueryResponse }
*
*/
- public MassEmailMessage createMassEmailMessage() {
- return new MassEmailMessage();
+ public QueryResponse createQueryResponse() {
+ return new QueryResponse();
}
/**
- * Create an instance of {@link DescribeLayoutButtonSection }
+ * Create an instance of {@link EmptyRecycleBin }
*
*/
- public DescribeLayoutButtonSection createDescribeLayoutButtonSection() {
- return new DescribeLayoutButtonSection();
+ public EmptyRecycleBin createEmptyRecycleBin() {
+ return new EmptyRecycleBin();
}
/**
- * Create an instance of {@link DescribeLayout }
+ * Create an instance of {@link LeadConvertResult }
*
*/
- public DescribeLayout createDescribeLayout() {
- return new DescribeLayout();
+ public LeadConvertResult createLeadConvertResult() {
+ return new LeadConvertResult();
}
/**
- * Create an instance of {@link GetUpdatedResponse }
+ * Create an instance of {@link EmptyRecycleBinResponse }
*
*/
- public GetUpdatedResponse createGetUpdatedResponse() {
- return new GetUpdatedResponse();
+ public EmptyRecycleBinResponse createEmptyRecycleBinResponse() {
+ return new EmptyRecycleBinResponse();
}
/**
- * Create an instance of {@link SendEmailResult }
+ * Create an instance of {@link GetUserInfo }
*
*/
- public SendEmailResult createSendEmailResult() {
- return new SendEmailResult();
+ public GetUserInfo createGetUserInfo() {
+ return new GetUserInfo();
}
/**
- * Create an instance of {@link DescribeGlobalResponse }
+ * Create an instance of {@link UpsertResult }
*
*/
- public DescribeGlobalResponse createDescribeGlobalResponse() {
- return new DescribeGlobalResponse();
+ public UpsertResult createUpsertResult() {
+ return new UpsertResult();
}
/**
- * Create an instance of {@link InvalidateSessionsResult }
+ * Create an instance of {@link InvalidateSessionsResponse }
*
*/
- public InvalidateSessionsResult createInvalidateSessionsResult() {
- return new InvalidateSessionsResult();
+ public InvalidateSessionsResponse createInvalidateSessionsResponse() {
+ return new InvalidateSessionsResponse();
}
/**
@@ -510,35 +518,35 @@
}
/**
- * Create an instance of {@link QueryMore }
+ * Create an instance of {@link MergeRequest }
*
*/
- public QueryMore createQueryMore() {
- return new QueryMore();
+ public MergeRequest createMergeRequest() {
+ return new MergeRequest();
}
/**
- * Create an instance of {@link InvalidateSessionsResponse }
+ * Create an instance of {@link DescribeSoftphoneLayoutCallType }
*
*/
- public InvalidateSessionsResponse createInvalidateSessionsResponse() {
- return new InvalidateSessionsResponse();
+ public DescribeSoftphoneLayoutCallType createDescribeSoftphoneLayoutCallType() {
+ return new DescribeSoftphoneLayoutCallType();
}
/**
- * Create an instance of {@link DescribeSoftphoneLayoutResponse }
+ * Create an instance of {@link LoginResponse }
*
*/
- public DescribeSoftphoneLayoutResponse createDescribeSoftphoneLayoutResponse() {
- return new DescribeSoftphoneLayoutResponse();
+ public LoginResponse createLoginResponse() {
+ return new LoginResponse();
}
/**
- * Create an instance of {@link SetPassword }
+ * Create an instance of {@link DescribeLayoutComponent }
*
*/
- public SetPassword createSetPassword() {
- return new SetPassword();
+ public DescribeLayoutComponent createDescribeLayoutComponent() {
+ return new DescribeLayoutComponent();
}
/**
@@ -550,182 +558,254 @@
}
/**
- * Create an instance of {@link QueryOptions }
+ * Create an instance of {@link LeadConvert }
*
*/
- public QueryOptions createQueryOptions() {
- return new QueryOptions();
+ public LeadConvert createLeadConvert() {
+ return new LeadConvert();
}
/**
- * Create an instance of {@link DescribeGlobal }
+ * Create an instance of {@link DeleteResult }
*
*/
- public DescribeGlobal createDescribeGlobal() {
- return new DescribeGlobal();
+ public DeleteResult createDeleteResult() {
+ return new DeleteResult();
}
/**
- * Create an instance of {@link SendEmail }
+ * Create an instance of {@link DeletedRecord }
*
*/
- public SendEmail createSendEmail() {
- return new SendEmail();
+ public DeletedRecord createDeletedRecord() {
+ return new DeletedRecord();
}
/**
- * Create an instance of {@link DescribeSoftphoneLayoutResult }
+ * Create an instance of {@link ConvertLead }
*
*/
- public DescribeSoftphoneLayoutResult createDescribeSoftphoneLayoutResult() {
- return new DescribeSoftphoneLayoutResult();
+ public ConvertLead createConvertLead() {
+ return new ConvertLead();
}
/**
- * Create an instance of {@link Search }
+ * Create an instance of {@link SetPasswordResult }
*
*/
- public Search createSearch() {
- return new Search();
+ public SetPasswordResult createSetPasswordResult() {
+ return new SetPasswordResult();
}
/**
- * Create an instance of {@link DescribeLayoutItem }
+ * Create an instance of {@link GetServerTimestamp }
*
*/
- public DescribeLayoutItem createDescribeLayoutItem() {
- return new DescribeLayoutItem();
+ public GetServerTimestamp createGetServerTimestamp() {
+ return new GetServerTimestamp();
}
/**
- * Create an instance of {@link DescribeSObjectResult }
+ * Create an instance of {@link SendEmailResult }
*
*/
- public DescribeSObjectResult createDescribeSObjectResult() {
- return new DescribeSObjectResult();
+ public SendEmailResult createSendEmailResult() {
+ return new SendEmailResult();
}
/**
- * Create an instance of {@link ProcessResult }
+ * Create an instance of {@link DescribeSObjectResponse }
*
*/
- public ProcessResult createProcessResult() {
- return new ProcessResult();
+ public DescribeSObjectResponse createDescribeSObjectResponse() {
+ return new DescribeSObjectResponse();
}
/**
- * Create an instance of {@link InvalidateSessions }
+ * Create an instance of {@link EmptyRecycleBinResult }
*
*/
- public InvalidateSessions createInvalidateSessions() {
- return new InvalidateSessions();
+ public EmptyRecycleBinResult createEmptyRecycleBinResult() {
+ return new EmptyRecycleBinResult();
}
/**
- * Create an instance of {@link PackageVersionHeader }
+ * Create an instance of {@link DescribeDataCategoryGroupStructuresResponse }
*
*/
- public PackageVersionHeader createPackageVersionHeader() {
- return new PackageVersionHeader();
+ public DescribeDataCategoryGroupStructuresResponse createDescribeDataCategoryGroupStructuresResponse() {
+ return new DescribeDataCategoryGroupStructuresResponse();
}
/**
- * Create an instance of {@link DescribeTabsResponse }
+ * Create an instance of {@link DisableFeedTrackingHeader }
*
*/
- public DescribeTabsResponse createDescribeTabsResponse() {
- return new DescribeTabsResponse();
+ public DisableFeedTrackingHeader createDisableFeedTrackingHeader() {
+ return new DisableFeedTrackingHeader();
}
/**
- * Create an instance of {@link SendEmailResponse }
+ * Create an instance of {@link DescribeLayout2 }
*
*/
- public SendEmailResponse createSendEmailResponse() {
- return new SendEmailResponse();
+ public DescribeLayout2 createDescribeLayout2() {
+ return new DescribeLayout2();
}
/**
- * Create an instance of {@link PicklistForRecordType }
+ * Create an instance of {@link GetUpdatedResult }
*
*/
- public PicklistForRecordType createPicklistForRecordType() {
- return new PicklistForRecordType();
+ public GetUpdatedResult createGetUpdatedResult() {
+ return new GetUpdatedResult();
}
/**
- * Create an instance of {@link AllowFieldTruncationHeader }
+ * Create an instance of {@link Update }
*
*/
- public AllowFieldTruncationHeader createAllowFieldTruncationHeader() {
- return new AllowFieldTruncationHeader();
+ public Update createUpdate() {
+ return new Update();
}
/**
- * Create an instance of {@link UpdateResponse }
+ * Create an instance of {@link RetrieveResponse }
*
*/
- public UpdateResponse createUpdateResponse() {
- return new UpdateResponse();
+ public RetrieveResponse createRetrieveResponse() {
+ return new RetrieveResponse();
}
/**
- * Create an instance of {@link QueryResponse }
+ * Create an instance of {@link RelatedList }
*
*/
- public QueryResponse createQueryResponse() {
- return new QueryResponse();
+ public RelatedList createRelatedList() {
+ return new RelatedList();
}
/**
- * Create an instance of {@link DescribeSoftphoneLayoutSection }
+ * Create an instance of {@link GetDeleted }
*
*/
- public DescribeSoftphoneLayoutSection createDescribeSoftphoneLayoutSection() {
- return new DescribeSoftphoneLayoutSection();
+ public GetDeleted createGetDeleted() {
+ return new GetDeleted();
}
/**
- * Create an instance of {@link CreateResponse }
+ * Create an instance of {@link UndeleteResult }
*
*/
- public CreateResponse createCreateResponse() {
- return new CreateResponse();
+ public UndeleteResult createUndeleteResult() {
+ return new UndeleteResult();
}
/**
- * Create an instance of {@link QueryResult }
+ * Create an instance of {@link Error }
*
*/
- public QueryResult createQueryResult() {
- return new QueryResult();
+ public Error createError() {
+ return new Error();
}
/**
- * Create an instance of {@link SaveResult }
+ * Create an instance of {@link DebuggingHeader }
*
*/
- public SaveResult createSaveResult() {
- return new SaveResult();
+ public DebuggingHeader createDebuggingHeader() {
+ return new DebuggingHeader();
}
/**
- * Create an instance of {@link DescribeSObject }
+ * Create an instance of {@link DescribeDataCategoryGroupStructureResult }
*
*/
- public DescribeSObject createDescribeSObject() {
- return new DescribeSObject();
+ public DescribeDataCategoryGroupStructureResult createDescribeDataCategoryGroupStructureResult() {
+ return new DescribeDataCategoryGroupStructureResult();
}
/**
- * Create an instance of {@link Process }
+ * Create an instance of {@link UndeleteResponse }
*
*/
- public Process createProcess() {
- return new Process();
+ public UndeleteResponse createUndeleteResponse() {
+ return new UndeleteResponse();
}
/**
+ * Create an instance of {@link PicklistForRecordType }
+ *
+ */
+ public PicklistForRecordType createPicklistForRecordType() {
+ return new PicklistForRecordType();
+ }
+
+ /**
+ * Create an instance of {@link DescribeSoftphoneLayoutInfoField }
+ *
+ */
+ public DescribeSoftphoneLayoutInfoField createDescribeSoftphoneLayoutInfoField() {
+ return new DescribeSoftphoneLayoutInfoField();
+ }
+
+ /**
+ * Create an instance of {@link DescribeLayoutResult }
+ *
+ */
+ public DescribeLayoutResult createDescribeLayoutResult() {
+ return new DescribeLayoutResult();
+ }
+
+ /**
+ * Create an instance of {@link DescribeSoftphoneLayoutResult }
+ *
+ */
+ public DescribeSoftphoneLayoutResult createDescribeSoftphoneLayoutResult() {
+ return new DescribeSoftphoneLayoutResult();
+ }
+
+ /**
+ * Create an instance of {@link DescribeLayoutButton }
+ *
+ */
+ public DescribeLayoutButton createDescribeLayoutButton() {
+ return new DescribeLayoutButton();
+ }
+
+ /**
+ * Create an instance of {@link DeleteResponse }
+ *
+ */
+ public DeleteResponse createDeleteResponse() {
+ return new DeleteResponse();
+ }
+
+ /**
+ * Create an instance of {@link MruHeader }
+ *
+ */
+ public MruHeader createMruHeader() {
+ return new MruHeader();
+ }
+
+ /**
+ * Create an instance of {@link SendEmailResponse }
+ *
+ */
+ public SendEmailResponse createSendEmailResponse() {
+ return new SendEmailResponse();
+ }
+
+ /**
+ * Create an instance of {@link GetUpdated }
+ *
+ */
+ public GetUpdated createGetUpdated() {
+ return new GetUpdated();
+ }
+
+ /**
* Create an instance of {@link AssignmentRuleHeader }
*
*/
@@ -734,179 +814,179 @@
}
/**
- * Create an instance of {@link GetServerTimestamp }
+ * Create an instance of {@link GetUserInfoResult }
*
*/
- public GetServerTimestamp createGetServerTimestamp() {
- return new GetServerTimestamp();
+ public GetUserInfoResult createGetUserInfoResult() {
+ return new GetUserInfoResult();
}
/**
- * Create an instance of {@link ConvertLeadResponse }
+ * Create an instance of {@link ResetPasswordResult }
*
*/
- public ConvertLeadResponse createConvertLeadResponse() {
- return new ConvertLeadResponse();
+ public ResetPasswordResult createResetPasswordResult() {
+ return new ResetPasswordResult();
}
/**
- * Create an instance of {@link Query }
+ * Create an instance of {@link ProcessResult }
*
*/
- public Query createQuery() {
- return new Query();
+ public ProcessResult createProcessResult() {
+ return new ProcessResult();
}
/**
- * Create an instance of {@link GetUserInfo }
+ * Create an instance of {@link InvalidateSessionsResult }
*
*/
- public GetUserInfo createGetUserInfo() {
- return new GetUserInfo();
+ public InvalidateSessionsResult createInvalidateSessionsResult() {
+ return new InvalidateSessionsResult();
}
/**
- * Create an instance of {@link GetDeletedResponse }
+ * Create an instance of {@link SessionHeader }
*
*/
- public GetDeletedResponse createGetDeletedResponse() {
- return new GetDeletedResponse();
+ public SessionHeader createSessionHeader() {
+ return new SessionHeader();
}
/**
- * Create an instance of {@link Create }
+ * Create an instance of {@link RelatedListColumn }
*
*/
- public Create createCreate() {
- return new Create();
+ public RelatedListColumn createRelatedListColumn() {
+ return new RelatedListColumn();
}
/**
- * Create an instance of {@link MergeResult }
+ * Create an instance of {@link Login }
*
*/
- public MergeResult createMergeResult() {
- return new MergeResult();
+ public Login createLogin() {
+ return new Login();
}
/**
- * Create an instance of {@link DescribeSoftphoneLayoutCallType }
+ * Create an instance of {@link SendEmailError }
*
*/
- public DescribeSoftphoneLayoutCallType createDescribeSoftphoneLayoutCallType() {
- return new DescribeSoftphoneLayoutCallType();
+ public SendEmailError createSendEmailError() {
+ return new SendEmailError();
}
/**
- * Create an instance of {@link DeletedRecord }
+ * Create an instance of {@link GetServerTimestampResponse }
*
*/
- public DeletedRecord createDeletedRecord() {
- return new DeletedRecord();
+ public GetServerTimestampResponse createGetServerTimestampResponse() {
+ return new GetServerTimestampResponse();
}
/**
- * Create an instance of {@link GetUpdated }
+ * Create an instance of {@link CallOptions }
*
*/
- public GetUpdated createGetUpdated() {
- return new GetUpdated();
+ public CallOptions createCallOptions() {
+ return new CallOptions();
}
/**
- * Create an instance of {@link GetDeleted }
+ * Create an instance of {@link DataCategory }
*
*/
- public GetDeleted createGetDeleted() {
- return new GetDeleted();
+ public DataCategory createDataCategory() {
+ return new DataCategory();
}
/**
- * Create an instance of {@link DescribeSoftphoneLayout }
+ * Create an instance of {@link QueryAllResponse }
*
*/
- public DescribeSoftphoneLayout createDescribeSoftphoneLayout() {
- return new DescribeSoftphoneLayout();
+ public QueryAllResponse createQueryAllResponse() {
+ return new QueryAllResponse();
}
/**
- * Create an instance of {@link EmptyRecycleBinResponse }
+ * Create an instance of {@link DescribeGlobalSObjectResult }
*
*/
- public EmptyRecycleBinResponse createEmptyRecycleBinResponse() {
- return new EmptyRecycleBinResponse();
+ public DescribeGlobalSObjectResult createDescribeGlobalSObjectResult() {
+ return new DescribeGlobalSObjectResult();
}
/**
- * Create an instance of {@link ConvertLead }
+ * Create an instance of {@link PicklistEntry }
*
*/
- public ConvertLead createConvertLead() {
- return new ConvertLead();
+ public PicklistEntry createPicklistEntry() {
+ return new PicklistEntry();
}
/**
- * Create an instance of {@link SessionHeader }
+ * Create an instance of {@link DescribeSObjects }
*
*/
- public SessionHeader createSessionHeader() {
- return new SessionHeader();
+ public DescribeSObjects createDescribeSObjects() {
+ return new DescribeSObjects();
}
/**
- * Create an instance of {@link LoginResponse }
+ * Create an instance of {@link Email }
*
*/
- public LoginResponse createLoginResponse() {
- return new LoginResponse();
+ public Email createEmail() {
+ return new Email();
}
/**
- * Create an instance of {@link DescribeGlobalResult }
+ * Create an instance of {@link DescribeTabsResponse }
*
*/
- public DescribeGlobalResult createDescribeGlobalResult() {
- return new DescribeGlobalResult();
+ public DescribeTabsResponse createDescribeTabsResponse() {
+ return new DescribeTabsResponse();
}
/**
- * Create an instance of {@link MergeRequest }
+ * Create an instance of {@link Process }
*
*/
- public MergeRequest createMergeRequest() {
- return new MergeRequest();
+ public Process createProcess() {
+ return new Process();
}
/**
- * Create an instance of {@link GetUserInfoResult }
+ * Create an instance of {@link DescribeLayoutItem }
*
*/
- public GetUserInfoResult createGetUserInfoResult() {
- return new GetUserInfoResult();
+ public DescribeLayoutItem createDescribeLayoutItem() {
+ return new DescribeLayoutItem();
}
/**
- * Create an instance of {@link ProcessWorkitemRequest }
+ * Create an instance of {@link ProcessRequest }
*
*/
- public ProcessWorkitemRequest createProcessWorkitemRequest() {
- return new ProcessWorkitemRequest();
+ public ProcessRequest createProcessRequest() {
+ return new ProcessRequest();
}
/**
- * Create an instance of {@link SetPasswordResponse }
+ * Create an instance of {@link Logout }
*
*/
- public SetPasswordResponse createSetPasswordResponse() {
- return new SetPasswordResponse();
+ public Logout createLogout() {
+ return new Logout();
}
/**
- * Create an instance of {@link ResetPasswordResponse }
+ * Create an instance of {@link RelatedListSort }
*
*/
- public ResetPasswordResponse createResetPasswordResponse() {
- return new ResetPasswordResponse();
+ public RelatedListSort createRelatedListSort() {
+ return new RelatedListSort();
}
/**
@@ -918,38 +998,46 @@
}
/**
- * Create an instance of {@link DescribeSoftphoneLayoutInfoField }
+ * Create an instance of {@link Undelete }
*
*/
- public DescribeSoftphoneLayoutInfoField createDescribeSoftphoneLayoutInfoField() {
- return new DescribeSoftphoneLayoutInfoField();
+ public Undelete createUndelete() {
+ return new Undelete();
}
/**
- * Create an instance of {@link MydescribeLayout }
+ * Create an instance of {@link DescribeSObjectsResponse }
*
*/
- public MydescribeLayout createMydescribeLayout() {
- return new MydescribeLayout();
+ public DescribeSObjectsResponse createDescribeSObjectsResponse() {
+ return new DescribeSObjectsResponse();
}
/**
- * Create an instance of {@link RelatedList }
+ * Create an instance of {@link GetDeletedResult }
*
*/
- public RelatedList createRelatedList() {
- return new RelatedList();
+ public GetDeletedResult createGetDeletedResult() {
+ return new GetDeletedResult();
}
/**
- * Create an instance of {@link RelatedListColumn }
+ * Create an instance of {@link SearchRecord }
*
*/
- public RelatedListColumn createRelatedListColumn() {
- return new RelatedListColumn();
+ public SearchRecord createSearchRecord() {
+ return new SearchRecord();
}
/**
+ * Create an instance of {@link GetDeletedResponse }
+ *
+ */
+ public GetDeletedResponse createGetDeletedResponse() {
+ return new GetDeletedResponse();
+ }
+
+ /**
* Create an instance of {@link PackageVersion }
*
*/
@@ -958,192 +1046,192 @@
}
/**
- * Create an instance of {@link UndeleteResponse }
+ * Create an instance of {@link DescribeLayoutResponse }
*
*/
- public UndeleteResponse createUndeleteResponse() {
- return new UndeleteResponse();
+ public DescribeLayoutResponse createDescribeLayoutResponse() {
+ return new DescribeLayoutResponse();
}
/**
- * Create an instance of {@link EmailFileAttachment }
+ * Create an instance of {@link ResetPassword }
*
*/
- public EmailFileAttachment createEmailFileAttachment() {
- return new EmailFileAttachment();
+ public ResetPassword createResetPassword() {
+ return new ResetPassword();
}
/**
- * Create an instance of {@link DescribeSObjects }
+ * Create an instance of {@link AllowFieldTruncationHeader }
*
*/
- public DescribeSObjects createDescribeSObjects() {
- return new DescribeSObjects();
+ public AllowFieldTruncationHeader createAllowFieldTruncationHeader() {
+ return new AllowFieldTruncationHeader();
}
/**
- * Create an instance of {@link QueryAllResponse }
+ * Create an instance of {@link DescribeGlobal }
*
*/
- public QueryAllResponse createQueryAllResponse() {
- return new QueryAllResponse();
+ public DescribeGlobal createDescribeGlobal() {
+ return new DescribeGlobal();
}
/**
- * Create an instance of {@link DescribeLayoutResponse }
+ * Create an instance of {@link DescribeDataCategoryGroups }
*
*/
- public DescribeLayoutResponse createDescribeLayoutResponse() {
- return new DescribeLayoutResponse();
+ public DescribeDataCategoryGroups createDescribeDataCategoryGroups() {
+ return new DescribeDataCategoryGroups();
}
/**
- * Create an instance of {@link EmptyRecycleBinResult }
+ * Create an instance of {@link SearchResponse }
*
*/
- public EmptyRecycleBinResult createEmptyRecycleBinResult() {
- return new EmptyRecycleBinResult();
+ public SearchResponse createSearchResponse() {
+ return new SearchResponse();
}
/**
- * Create an instance of {@link QueryMoreResponse }
+ * Create an instance of {@link DescribeSObject }
*
*/
- public QueryMoreResponse createQueryMoreResponse() {
- return new QueryMoreResponse();
+ public DescribeSObject createDescribeSObject() {
+ return new DescribeSObject();
}
/**
- * Create an instance of {@link UpsertResult }
+ * Create an instance of {@link AllOrNoneHeader }
*
*/
- public UpsertResult createUpsertResult() {
- return new UpsertResult();
+ public AllOrNoneHeader createAllOrNoneHeader() {
+ return new AllOrNoneHeader();
}
/**
- * Create an instance of {@link RetrieveResponse }
+ * Create an instance of {@link UpdateResponse }
*
*/
- public RetrieveResponse createRetrieveResponse() {
- return new RetrieveResponse();
+ public UpdateResponse createUpdateResponse() {
+ return new UpdateResponse();
}
/**
- * Create an instance of {@link GetServerTimestampResponse }
+ * Create an instance of {@link UpsertResponse }
*
*/
- public GetServerTimestampResponse createGetServerTimestampResponse() {
- return new GetServerTimestampResponse();
+ public UpsertResponse createUpsertResponse() {
+ return new UpsertResponse();
}
/**
- * Create an instance of {@link DescribeLayoutSection }
+ * Create an instance of {@link DescribeSObjectResult }
*
*/
- public DescribeLayoutSection createDescribeLayoutSection() {
- return new DescribeLayoutSection();
+ public DescribeSObjectResult createDescribeSObjectResult() {
+ return new DescribeSObjectResult();
}
/**
- * Create an instance of {@link ChildRelationship }
+ * Create an instance of {@link DescribeSoftphoneLayoutResponse }
*
*/
- public ChildRelationship createChildRelationship() {
- return new ChildRelationship();
+ public DescribeSoftphoneLayoutResponse createDescribeSoftphoneLayoutResponse() {
+ return new DescribeSoftphoneLayoutResponse();
}
/**
- * Create an instance of {@link Field }
+ * Create an instance of {@link QueryMoreResponse }
*
*/
- public Field createField() {
- return new Field();
+ public QueryMoreResponse createQueryMoreResponse() {
+ return new QueryMoreResponse();
}
/**
- * Create an instance of {@link Email }
+ * Create an instance of {@link DescribeTabs }
*
*/
- public Email createEmail() {
- return new Email();
+ public DescribeTabs createDescribeTabs() {
+ return new DescribeTabs();
}
/**
- * Create an instance of {@link SendEmailError }
+ * Create an instance of {@link DescribeSoftphoneScreenPopOption }
*
*/
- public SendEmailError createSendEmailError() {
- return new SendEmailError();
+ public DescribeSoftphoneScreenPopOption createDescribeSoftphoneScreenPopOption() {
+ return new DescribeSoftphoneScreenPopOption();
}
/**
- * Create an instance of {@link DescribeTabs }
+ * Create an instance of {@link DescribeLayout }
*
*/
- public DescribeTabs createDescribeTabs() {
- return new DescribeTabs();
+ public DescribeLayout createDescribeLayout() {
+ return new DescribeLayout();
}
/**
- * Create an instance of {@link GetUpdatedResult }
+ * Create an instance of {@link DescribeDataCategoryGroupsResponse }
*
*/
- public GetUpdatedResult createGetUpdatedResult() {
- return new GetUpdatedResult();
+ public DescribeDataCategoryGroupsResponse createDescribeDataCategoryGroupsResponse() {
+ return new DescribeDataCategoryGroupsResponse();
}
/**
- * Create an instance of {@link UndeleteResult }
+ * Create an instance of {@link ResetPasswordResponse }
*
*/
- public UndeleteResult createUndeleteResult() {
- return new UndeleteResult();
+ public ResetPasswordResponse createResetPasswordResponse() {
+ return new ResetPasswordResponse();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
- @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "orgWideEmailAddressId", scope = SingleEmailMessage.class)
- public JAXBElement<String> createSingleEmailMessageOrgWideEmailAddressId(String value) {
- return new JAXBElement<String>(_SingleEmailMessageOrgWideEmailAddressId_QNAME, String.class, SingleEmailMessage.class, value);
+ @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "contentType", scope = EmailFileAttachment.class)
+ public JAXBElement<String> createEmailFileAttachmentContentType(String value) {
+ return new JAXBElement<String>(_EmailFileAttachmentContentType_QNAME, String.class, EmailFileAttachment.class, value);
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}}
*
*/
- @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "inReplyTo", scope = SingleEmailMessage.class)
- public JAXBElement<String> createSingleEmailMessageInReplyTo(String value) {
- return new JAXBElement<String>(_SingleEmailMessageInReplyTo_QNAME, String.class, SingleEmailMessage.class, value);
+ @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "body", scope = EmailFileAttachment.class)
+ public JAXBElement<byte[]> createEmailFileAttachmentBody(byte[] value) {
+ return new JAXBElement<byte[]>(_EmailFileAttachmentBody_QNAME, byte[].class, EmailFileAttachment.class, ((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
- @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "references", scope = SingleEmailMessage.class)
- public JAXBElement<String> createSingleEmailMessageReferences(String value) {
- return new JAXBElement<String>(_SingleEmailMessageReferences_QNAME, String.class, SingleEmailMessage.class, value);
+ @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "orgWideEmailAddressId", scope = SingleEmailMessage.class)
+ public JAXBElement<String> createSingleEmailMessageOrgWideEmailAddressId(String value) {
+ return new JAXBElement<String>(_SingleEmailMessageOrgWideEmailAddressId_QNAME, String.class, SingleEmailMessage.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
- @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "contentType", scope = EmailFileAttachment.class)
- public JAXBElement<String> createEmailFileAttachmentContentType(String value) {
- return new JAXBElement<String>(_EmailFileAttachmentContentType_QNAME, String.class, EmailFileAttachment.class, value);
+ @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "inReplyTo", scope = SingleEmailMessage.class)
+ public JAXBElement<String> createSingleEmailMessageInReplyTo(String value) {
+ return new JAXBElement<String>(_SingleEmailMessageInReplyTo_QNAME, String.class, SingleEmailMessage.class, value);
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
- @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "body", scope = EmailFileAttachment.class)
- public JAXBElement<byte[]> createEmailFileAttachmentBody(byte[] value) {
- return new JAXBElement<byte[]>(_EmailFileAttachmentBody_QNAME, byte[].class, EmailFileAttachment.class, ((byte[]) value));
+ @XmlElementDecl(namespace = "urn:partner.soap.sforce.com", name = "references", scope = SingleEmailMessage.class)
+ public JAXBElement<String> createSingleEmailMessageReferences(String value) {
+ return new JAXBElement<String>(_SingleEmailMessageReferences_QNAME, String.class, SingleEmailMessage.class, value);
}
}
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,18 +5,18 @@
package com.sforce.soap.partner;
+import java.net.MalformedURLException;
import java.net.URL;
-
import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.Service;
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@@ -24,7 +24,7 @@
@WebServiceClient(name = "SforceService", wsdlLocation = SforceService.PARTNER_WSDL,targetNamespace = "urn:partner.soap.sforce.com")
public class SforceService extends Service {
- public static final String PARTNER_WSDL = "partner_v17.wsdl"; //$NON-NLS-1$
+ public static final String PARTNER_WSDL = "partner_v22.wsdl"; //$NON-NLS-1$
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("urn:partner.soap.sforce.com", "SforceService"); //$NON-NLS-1$ //$NON-NLS-2$
public final static QName Soap = new QName("urn:partner.soap.sforce.com", "Soap");//$NON-NLS-1$ //$NON-NLS-2$
@@ -47,6 +47,7 @@
public SforceService() {
super(WSDL_LOCATION, SERVICE);
}
+
/**
*
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -9,57 +9,50 @@
import javax.xml.ws.ResponseWrapper;
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebService(targetNamespace = "urn:partner.soap.sforce.com", name = "Soap")
-(a)XmlSeeAlso({ObjectFactory.class,com.sforce.soap.partner.fault.ObjectFactory.class,com.sforce.soap.partner.sobject.ObjectFactory.class})
+(a)XmlSeeAlso({ObjectFactory.class, com.sforce.soap.partner.fault.ObjectFactory.class, com.sforce.soap.partner.sobject.ObjectFactory.class})
public interface Soap {
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "merge", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Merge")
- @ResponseWrapper(localName = "mergeResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.MergeResponse")
@WebMethod
+ @ResponseWrapper(localName = "mergeResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.MergeResponse")
public java.util.List<com.sforce.soap.partner.MergeResult> merge(
@WebParam(name = "request", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<com.sforce.soap.partner.MergeRequest> request,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<com.sforce.soap.partner.MergeRequest> request
) throws InvalidFieldFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "getUserInfo", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetUserInfo")
- @ResponseWrapper(localName = "getUserInfoResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetUserInfoResponse")
@WebMethod
- public com.sforce.soap.partner.GetUserInfoResult getUserInfo(
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
- ) throws UnexpectedErrorFault;
+ @ResponseWrapper(localName = "getUserInfoResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetUserInfoResponse")
+ public com.sforce.soap.partner.GetUserInfoResult getUserInfo() throws UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "describeSoftphoneLayout", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSoftphoneLayout")
- @ResponseWrapper(localName = "describeSoftphoneLayoutResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSoftphoneLayoutResponse")
@WebMethod
+ @ResponseWrapper(localName = "describeSoftphoneLayoutResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSoftphoneLayoutResponse")
public com.sforce.soap.partner.DescribeSoftphoneLayoutResult describeSoftphoneLayout() throws UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "update", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Update")
- @ResponseWrapper(localName = "updateResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.UpdateResponse")
@WebMethod
+ @ResponseWrapper(localName = "updateResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.UpdateResponse")
public java.util.List<com.sforce.soap.partner.SaveResult> update(
@WebParam(name = "sObjects", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<com.sforce.soap.partner.sobject.SObject> sObjects,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<com.sforce.soap.partner.sobject.SObject> sObjects
) throws InvalidFieldFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "setPassword", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SetPassword")
- @ResponseWrapper(localName = "setPasswordResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SetPasswordResponse")
@WebMethod
+ @ResponseWrapper(localName = "setPasswordResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SetPasswordResponse")
public com.sforce.soap.partner.SetPasswordResult setPassword(
@WebParam(name = "userId", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String userId,
@@ -68,57 +61,49 @@
) throws InvalidNewPasswordFault, InvalidIdFault, UnexpectedErrorFault;
@RequestWrapper(localName = "logout", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Logout")
- @ResponseWrapper(localName = "logoutResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.LogoutResponse")
@WebMethod
- public void logout(
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader) throws UnexpectedErrorFault;
+ @ResponseWrapper(localName = "logoutResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.LogoutResponse")
+ public void logout() throws UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "retrieve", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Retrieve")
- @ResponseWrapper(localName = "retrieveResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.RetrieveResponse")
@WebMethod
+ @ResponseWrapper(localName = "retrieveResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.RetrieveResponse")
public java.util.List<com.sforce.soap.partner.sobject.SObject> retrieve(
@WebParam(name = "fieldList", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String fieldList,
@WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String sObjectType,
@WebParam(name = "ids", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<java.lang.String> ids,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<java.lang.String> ids
) throws InvalidFieldFault, MalformedQueryFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "queryAll", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryAll")
- @ResponseWrapper(localName = "queryAllResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryAllResponse")
@WebMethod
+ @ResponseWrapper(localName = "queryAllResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryAllResponse")
public com.sforce.soap.partner.QueryResult queryAll(
@WebParam(name = "queryString", targetNamespace = "urn:partner.soap.sforce.com")
- java.lang.String queryString,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.lang.String queryString
) throws InvalidFieldFault, MalformedQueryFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault, InvalidQueryLocatorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "getUpdated", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetUpdated")
- @ResponseWrapper(localName = "getUpdatedResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetUpdatedResponse")
@WebMethod
+ @ResponseWrapper(localName = "getUpdatedResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetUpdatedResponse")
public com.sforce.soap.partner.GetUpdatedResult getUpdated(
@WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String sObjectType,
@WebParam(name = "startDate", targetNamespace = "urn:partner.soap.sforce.com")
javax.xml.datatype.XMLGregorianCalendar startDate,
@WebParam(name = "endDate", targetNamespace = "urn:partner.soap.sforce.com")
- javax.xml.datatype.XMLGregorianCalendar endDate,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ javax.xml.datatype.XMLGregorianCalendar endDate
) throws InvalidSObjectFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "undelete", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Undelete")
- @ResponseWrapper(localName = "undeleteResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.UndeleteResponse")
@WebMethod
+ @ResponseWrapper(localName = "undeleteResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.UndeleteResponse")
public java.util.List<com.sforce.soap.partner.UndeleteResult> undelete(
@WebParam(name = "ids", targetNamespace = "urn:partner.soap.sforce.com")
java.util.List<java.lang.String> ids
@@ -126,19 +111,17 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "create", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Create")
- @ResponseWrapper(localName = "createResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.CreateResponse")
@WebMethod
+ @ResponseWrapper(localName = "createResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.CreateResponse")
public java.util.List<com.sforce.soap.partner.SaveResult> create(
@WebParam(name = "sObjects", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<com.sforce.soap.partner.sobject.SObject> sObjects,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<com.sforce.soap.partner.sobject.SObject> sObjects
) throws InvalidFieldFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "sendEmail", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SendEmail")
- @ResponseWrapper(localName = "sendEmailResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SendEmailResponse")
@WebMethod
+ @ResponseWrapper(localName = "sendEmailResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SendEmailResponse")
public java.util.List<com.sforce.soap.partner.SendEmailResult> sendEmail(
@WebParam(name = "messages", targetNamespace = "urn:partner.soap.sforce.com")
java.util.List<com.sforce.soap.partner.Email> messages
@@ -146,8 +129,8 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "search", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Search")
- @ResponseWrapper(localName = "searchResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SearchResponse")
@WebMethod
+ @ResponseWrapper(localName = "searchResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.SearchResponse")
public com.sforce.soap.partner.SearchResult search(
@WebParam(name = "searchString", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String searchString
@@ -155,43 +138,50 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "query", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Query")
- @ResponseWrapper(localName = "queryResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryResponse")
@WebMethod
+ @ResponseWrapper(localName = "queryResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryResponse")
public com.sforce.soap.partner.QueryResult query(
@WebParam(name = "queryString", targetNamespace = "urn:partner.soap.sforce.com")
- java.lang.String queryString,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.lang.String queryString
) throws InvalidFieldFault, MalformedQueryFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault, InvalidQueryLocatorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "getDeleted", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetDeleted")
- @ResponseWrapper(localName = "getDeletedResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetDeletedResponse")
@WebMethod
+ @ResponseWrapper(localName = "getDeletedResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetDeletedResponse")
public com.sforce.soap.partner.GetDeletedResult getDeleted(
@WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String sObjectType,
@WebParam(name = "startDate", targetNamespace = "urn:partner.soap.sforce.com")
javax.xml.datatype.XMLGregorianCalendar startDate,
@WebParam(name = "endDate", targetNamespace = "urn:partner.soap.sforce.com")
- javax.xml.datatype.XMLGregorianCalendar endDate,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ javax.xml.datatype.XMLGregorianCalendar endDate
) throws InvalidSObjectFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "process", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Process")
- @ResponseWrapper(localName = "processResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ProcessResponse")
@WebMethod
+ @ResponseWrapper(localName = "processResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ProcessResponse")
public java.util.List<com.sforce.soap.partner.ProcessResult> process(
@WebParam(name = "actions", targetNamespace = "urn:partner.soap.sforce.com")
java.util.List<com.sforce.soap.partner.ProcessRequest> actions
) throws InvalidIdFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
+ @RequestWrapper(localName = "describeDataCategoryGroupStructures", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeDataCategoryGroupStructures")
+ @WebMethod
+ @ResponseWrapper(localName = "describeDataCategoryGroupStructuresResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeDataCategoryGroupStructuresResponse")
+ public java.util.List<com.sforce.soap.partner.DescribeDataCategoryGroupStructureResult> describeDataCategoryGroupStructures(
+ @WebParam(name = "pairs", targetNamespace = "urn:partner.soap.sforce.com")
+ java.util.List<com.sforce.soap.partner.DataCategoryGroupSobjectTypePair> pairs,
+ @WebParam(name = "topCategoriesOnly", targetNamespace = "urn:partner.soap.sforce.com")
+ boolean topCategoriesOnly
+ ) throws InvalidSObjectFault, UnexpectedErrorFault;
+
+ @WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "resetPassword", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ResetPassword")
- @ResponseWrapper(localName = "resetPasswordResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ResetPasswordResponse")
@WebMethod
+ @ResponseWrapper(localName = "resetPasswordResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ResetPasswordResponse")
public com.sforce.soap.partner.ResetPasswordResult resetPassword(
@WebParam(name = "userId", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String userId
@@ -199,17 +189,14 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "describeGlobal", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeGlobal")
- @ResponseWrapper(localName = "describeGlobalResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeGlobalResponse")
@WebMethod
- public com.sforce.soap.partner.DescribeGlobalResult describeGlobal(
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
- ) throws UnexpectedErrorFault;
+ @ResponseWrapper(localName = "describeGlobalResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeGlobalResponse")
+ public com.sforce.soap.partner.DescribeGlobalResult describeGlobal() throws UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
- @RequestWrapper(localName = "describeLayout", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.MydescribeLayout")
- @ResponseWrapper(localName = "describeLayoutResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeLayoutResponse")
+ @RequestWrapper(localName = "describeLayout", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeLayout")
@WebMethod
+ @ResponseWrapper(localName = "describeLayoutResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeLayoutResponse")
public com.sforce.soap.partner.DescribeLayoutResult describeLayout(
@WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String sObjectType,
@@ -219,23 +206,29 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "describeTabs", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeTabs")
- @ResponseWrapper(localName = "describeTabsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeTabsResponse")
@WebMethod
+ @ResponseWrapper(localName = "describeTabsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeTabsResponse")
public java.util.List<com.sforce.soap.partner.DescribeTabSetResult> describeTabs() throws UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
+ @RequestWrapper(localName = "describeDataCategoryGroups", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeDataCategoryGroups")
+ @WebMethod
+ @ResponseWrapper(localName = "describeDataCategoryGroupsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeDataCategoryGroupsResponse")
+ public java.util.List<com.sforce.soap.partner.DescribeDataCategoryGroupResult> describeDataCategoryGroups(
+ @WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
+ java.util.List<java.lang.String> sObjectType
+ ) throws InvalidSObjectFault, UnexpectedErrorFault;
+
+ @WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "getServerTimestamp", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetServerTimestamp")
- @ResponseWrapper(localName = "getServerTimestampResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetServerTimestampResponse")
@WebMethod
- public com.sforce.soap.partner.GetServerTimestampResult getServerTimestamp(
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
- ) throws UnexpectedErrorFault;
+ @ResponseWrapper(localName = "getServerTimestampResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.GetServerTimestampResponse")
+ public com.sforce.soap.partner.GetServerTimestampResult getServerTimestamp() throws UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "invalidateSessions", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.InvalidateSessions")
- @ResponseWrapper(localName = "invalidateSessionsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.InvalidateSessionsResponse")
@WebMethod
+ @ResponseWrapper(localName = "invalidateSessionsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.InvalidateSessionsResponse")
public java.util.List<com.sforce.soap.partner.InvalidateSessionsResult> invalidateSessions(
@WebParam(name = "sessionIds", targetNamespace = "urn:partner.soap.sforce.com")
java.util.List<java.lang.String> sessionIds
@@ -243,19 +236,17 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "describeSObject", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSObject")
- @ResponseWrapper(localName = "describeSObjectResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSObjectResponse")
@WebMethod
+ @ResponseWrapper(localName = "describeSObjectResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSObjectResponse")
public com.sforce.soap.partner.DescribeSObjectResult describeSObject(
@WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
- java.lang.String sObjectType,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.lang.String sObjectType
) throws InvalidSObjectFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "login", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Login")
- @ResponseWrapper(localName = "loginResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.LoginResponse")
@WebMethod
+ @ResponseWrapper(localName = "loginResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.LoginResponse")
public com.sforce.soap.partner.LoginResult login(
@WebParam(name = "username", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String username,
@@ -265,30 +256,26 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "queryMore", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryMore")
- @ResponseWrapper(localName = "queryMoreResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryMoreResponse")
@WebMethod
+ @ResponseWrapper(localName = "queryMoreResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.QueryMoreResponse")
public com.sforce.soap.partner.QueryResult queryMore(
@WebParam(name = "queryLocator", targetNamespace = "urn:partner.soap.sforce.com")
- java.lang.String queryLocator,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.lang.String queryLocator
) throws InvalidFieldFault, UnexpectedErrorFault, InvalidQueryLocatorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "describeSObjects", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSObjects")
- @ResponseWrapper(localName = "describeSObjectsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSObjectsResponse")
@WebMethod
+ @ResponseWrapper(localName = "describeSObjectsResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DescribeSObjectsResponse")
public java.util.List<com.sforce.soap.partner.DescribeSObjectResult> describeSObjects(
@WebParam(name = "sObjectType", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<java.lang.String> sObjectType,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<java.lang.String> sObjectType
) throws InvalidSObjectFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "emptyRecycleBin", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.EmptyRecycleBin")
- @ResponseWrapper(localName = "emptyRecycleBinResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.EmptyRecycleBinResponse")
@WebMethod
+ @ResponseWrapper(localName = "emptyRecycleBinResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.EmptyRecycleBinResponse")
public java.util.List<com.sforce.soap.partner.EmptyRecycleBinResult> emptyRecycleBin(
@WebParam(name = "ids", targetNamespace = "urn:partner.soap.sforce.com")
java.util.List<java.lang.String> ids
@@ -296,21 +283,19 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "upsert", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Upsert")
- @ResponseWrapper(localName = "upsertResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.UpsertResponse")
@WebMethod
+ @ResponseWrapper(localName = "upsertResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.UpsertResponse")
public java.util.List<com.sforce.soap.partner.UpsertResult> upsert(
@WebParam(name = "externalIDFieldName", targetNamespace = "urn:partner.soap.sforce.com")
java.lang.String externalIDFieldName,
@WebParam(name = "sObjects", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<com.sforce.soap.partner.sobject.SObject> sObjects,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<com.sforce.soap.partner.sobject.SObject> sObjects
) throws InvalidFieldFault, InvalidSObjectFault, InvalidIdFault, UnexpectedErrorFault;
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "convertLead", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ConvertLead")
- @ResponseWrapper(localName = "convertLeadResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ConvertLeadResponse")
@WebMethod
+ @ResponseWrapper(localName = "convertLeadResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.ConvertLeadResponse")
public java.util.List<com.sforce.soap.partner.LeadConvertResult> convertLead(
@WebParam(name = "leadConverts", targetNamespace = "urn:partner.soap.sforce.com")
java.util.List<com.sforce.soap.partner.LeadConvert> leadConverts
@@ -318,12 +303,10 @@
@WebResult(name = "result", targetNamespace = "urn:partner.soap.sforce.com")
@RequestWrapper(localName = "delete", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.Delete")
- @ResponseWrapper(localName = "deleteResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DeleteResponse")
@WebMethod
+ @ResponseWrapper(localName = "deleteResponse", targetNamespace = "urn:partner.soap.sforce.com", className = "com.sforce.soap.partner.DeleteResponse")
public java.util.List<com.sforce.soap.partner.DeleteResult> delete(
@WebParam(name = "ids", targetNamespace = "urn:partner.soap.sforce.com")
- java.util.List<java.lang.String> ids,
- @WebParam(name = "SessionHeader", targetNamespace = "urn:partner.soap.sforce.com", header = true)
- SessionHeader sessionHeader
+ java.util.List<java.lang.String> ids
) throws UnexpectedErrorFault;
}
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -13,6 +13,7 @@
* <pre>
* <simpleType name="StatusCode">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="ALL_OR_NONE_OPERATION_ROLLED_BACK"/>
* <enumeration value="ALREADY_IN_PROCESS"/>
* <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
* <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
@@ -64,6 +65,7 @@
* <enumeration value="ERROR_IN_MAILER"/>
* <enumeration value="FAILED_ACTIVATION"/>
* <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
+ * <enumeration value="FIELD_FILTER_VALIDATION_EXCEPTION"/>
* <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
* <enumeration value="FILTERED_LOOKUP_LIMIT_EXCEEDED"/>
* <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
@@ -83,6 +85,8 @@
* <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
* <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
* <enumeration value="INVALID_CURRENCY_ISO"/>
+ * <enumeration value="INVALID_DATA_CATEGORY_GROUP_REFERENCE"/>
+ * <enumeration value="INVALID_DATA_URI"/>
* <enumeration value="INVALID_EMAIL_ADDRESS"/>
* <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
* <enumeration value="INVALID_FIELD"/>
@@ -100,6 +104,7 @@
* <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
* <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
* <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
+ * <enumeration value="INVALID_READ_ONLY_USER_DML"/>
* <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
* <enumeration value="INVALID_SESSION_ID"/>
* <enumeration value="INVALID_SETUP_OWNER"/>
@@ -140,14 +145,18 @@
* <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
* <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
* <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
+ * <enumeration value="OP_WITH_INVALID_USER_TYPE_EXCEPTION"/>
* <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
+ * <enumeration value="PORTAL_NO_ACCESS"/>
* <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
* <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
* <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
* <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+ * <enumeration value="REQUIRED_FEATURE_MISSING"/>
* <enumeration value="REQUIRED_FIELD_MISSING"/>
* <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
* <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
+ * <enumeration value="SINGLE_EMAIL_LIMIT_EXCEEDED"/>
* <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
* <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
* <enumeration value="STRING_TOO_LONG"/>
@@ -165,6 +174,8 @@
* <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
* <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
* <enumeration value="UNVERIFIED_SENDER_ADDRESS"/>
+ * <enumeration value="USER_OWNS_PORTAL_ACCOUNT_EXCEPTION"/>
+ * <enumeration value="USER_WITH_APEX_SHARES_EXCEPTION"/>
* <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
* <enumeration value="WRONG_CONTROLLER_TYPE"/>
* </restriction>
@@ -176,6 +187,7 @@
@XmlEnum
public enum StatusCode {
+ ALL_OR_NONE_OPERATION_ROLLED_BACK,
ALREADY_IN_PROCESS,
ASSIGNEE_TYPE_REQUIRED,
BAD_CUSTOM_ENTITY_PARENT_DOMAIN,
@@ -227,6 +239,7 @@
ERROR_IN_MAILER,
FAILED_ACTIVATION,
FIELD_CUSTOM_VALIDATION_EXCEPTION,
+ FIELD_FILTER_VALIDATION_EXCEPTION,
FIELD_INTEGRITY_EXCEPTION,
FILTERED_LOOKUP_LIMIT_EXCEEDED,
HTML_FILE_UPLOAD_NOT_ALLOWED,
@@ -246,6 +259,8 @@
INVALID_CURRENCY_CONV_RATE,
INVALID_CURRENCY_CORP_RATE,
INVALID_CURRENCY_ISO,
+ INVALID_DATA_CATEGORY_GROUP_REFERENCE,
+ INVALID_DATA_URI,
INVALID_EMAIL_ADDRESS,
INVALID_EMPTY_KEY_OWNER,
INVALID_FIELD,
@@ -263,6 +278,7 @@
INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST,
INVALID_PARTNER_NETWORK_STATUS,
INVALID_PERSON_ACCOUNT_OPERATION,
+ INVALID_READ_ONLY_USER_DML,
INVALID_SAVE_AS_ACTIVITY_FLAG,
INVALID_SESSION_ID,
INVALID_SETUP_OWNER,
@@ -303,14 +319,18 @@
NUMBER_OUTSIDE_VALID_RANGE,
NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED,
OPTED_OUT_OF_MASS_MAIL,
+ OP_WITH_INVALID_USER_TYPE_EXCEPTION,
PACKAGE_LICENSE_REQUIRED,
+ PORTAL_NO_ACCESS,
PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT,
PRIVATE_CONTACT_ON_ASSET,
RECORD_IN_USE_BY_WORKFLOW,
REQUEST_RUNNING_TOO_LONG,
+ REQUIRED_FEATURE_MISSING,
REQUIRED_FIELD_MISSING,
SELF_REFERENCE_FROM_TRIGGER,
SHARE_NEEDED_FOR_CHILD_OWNER,
+ SINGLE_EMAIL_LIMIT_EXCEEDED,
STANDARD_PRICE_NOT_DEFINED,
STORAGE_LIMIT_EXCEEDED,
STRING_TOO_LONG,
@@ -328,6 +348,8 @@
UNSPECIFIED_EMAIL_ADDRESS,
UNSUPPORTED_APEX_TRIGGER_OPERATON,
UNVERIFIED_SENDER_ADDRESS,
+ USER_OWNS_PORTAL_ACCOUNT_EXCEPTION,
+ USER_WITH_APEX_SHARES_EXCEPTION,
WEBLINK_SIZE_LIMIT_EXCEEDED,
WRONG_CONTROLLER_TYPE;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,15 +5,15 @@
/**
- * This class was generated by Apache CXF 2.2.5
- * Thu Apr 01 14:35:01 EDT 2010
- * Generated source version: 2.2.5
+ * This class was generated by Apache CXF 2.2.12
+ * Thu Sep 01 08:54:15 CDT 2011
+ * Generated source version: 2.2.12
*
*/
@WebFault(name = "UnexpectedErrorFault", targetNamespace = "urn:fault.partner.soap.sforce.com")
public class UnexpectedErrorFault extends Exception {
- public static final long serialVersionUID = 20100401143501L;
+ public static final long serialVersionUID = 20110901085415L;
private com.sforce.soap.partner.fault.UnexpectedErrorFault unexpectedErrorFault;
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -21,6 +21,9 @@
* <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
* <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
* <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+ * <enumeration value="DATACLOUD_API_CLIENT_EXCEPTION"/>
+ * <enumeration value="DATACLOUD_API_SERVER_EXCEPTION"/>
+ * <enumeration value="DATACLOUD_API_UNAVAILABLE"/>
* <enumeration value="DUPLICATE_VALUE"/>
* <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
* <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
@@ -32,6 +35,7 @@
* <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
* <enumeration value="EXCEEDED_QUOTA"/>
* <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
+ * <enumeration value="FUNCTIONALITY_TEMPORARILY_UNAVAILABLE"/>
* <enumeration value="INACTIVE_OWNER_OR_USER"/>
* <enumeration value="INACTIVE_PORTAL"/>
* <enumeration value="INSUFFICIENT_ACCESS"/>
@@ -60,6 +64,9 @@
* <enumeration value="INVALID_SSO_GATEWAY_URL"/>
* <enumeration value="INVALID_TYPE"/>
* <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+ * <enumeration value="JIGSAW_IMPORT_LIMIT_EXCEEDED"/>
+ * <enumeration value="JIGSAW_REQUEST_NOT_SUPPORTED"/>
+ * <enumeration value="JSON_PARSER_ERROR"/>
* <enumeration value="LIMIT_EXCEEDED"/>
* <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
* <enumeration value="LOGIN_CHALLENGE_PENDING"/>
@@ -74,6 +81,8 @@
* <enumeration value="NO_SOFTPHONE_LAYOUT"/>
* <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
* <enumeration value="OPERATION_TOO_LARGE"/>
+ * <enumeration value="ORG_IN_MAINTENANCE"/>
+ * <enumeration value="ORG_IS_DOT_ORG"/>
* <enumeration value="ORG_LOCKED"/>
* <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
* <enumeration value="PASSWORD_LOCKOUT"/>
@@ -83,12 +92,17 @@
* <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
* <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
* <enumeration value="SERVER_UNAVAILABLE"/>
+ * <enumeration value="SOCIALCRM_FEEDSERVICE_API_CLIENT_EXCEPTION"/>
+ * <enumeration value="SOCIALCRM_FEEDSERVICE_API_SERVER_EXCEPTION"/>
+ * <enumeration value="SOCIALCRM_FEEDSERVICE_API_UNAVAILABLE"/>
* <enumeration value="SSO_SERVICE_DOWN"/>
* <enumeration value="TOO_MANY_APEX_REQUESTS"/>
* <enumeration value="TRIAL_EXPIRED"/>
* <enumeration value="UNKNOWN_EXCEPTION"/>
* <enumeration value="UNSUPPORTED_API_VERSION"/>
* <enumeration value="UNSUPPORTED_CLIENT"/>
+ * <enumeration value="UNSUPPORTED_MEDIA_TYPE"/>
+ * <enumeration value="XML_PARSER_ERROR"/>
* </restriction>
* </simpleType>
* </pre>
@@ -106,6 +120,9 @@
CLIENT_NOT_ACCESSIBLE_FOR_USER,
CLIENT_REQUIRE_UPDATE_FOR_USER,
CUSTOM_METADATA_LIMIT_EXCEEDED,
+ DATACLOUD_API_CLIENT_EXCEPTION,
+ DATACLOUD_API_SERVER_EXCEPTION,
+ DATACLOUD_API_UNAVAILABLE,
DUPLICATE_VALUE,
EMAIL_BATCH_SIZE_LIMIT_EXCEEDED,
EMAIL_TO_CASE_INVALID_ROUTING,
@@ -117,6 +134,7 @@
EXCEEDED_MAX_TYPES_LIMIT,
EXCEEDED_QUOTA,
FUNCTIONALITY_NOT_ENABLED,
+ FUNCTIONALITY_TEMPORARILY_UNAVAILABLE,
INACTIVE_OWNER_OR_USER,
INACTIVE_PORTAL,
INSUFFICIENT_ACCESS,
@@ -145,6 +163,9 @@
INVALID_SSO_GATEWAY_URL,
INVALID_TYPE,
INVALID_TYPE_FOR_OPERATION,
+ JIGSAW_IMPORT_LIMIT_EXCEEDED,
+ JIGSAW_REQUEST_NOT_SUPPORTED,
+ JSON_PARSER_ERROR,
LIMIT_EXCEEDED,
LOGIN_CHALLENGE_ISSUED,
LOGIN_CHALLENGE_PENDING,
@@ -159,6 +180,8 @@
NO_SOFTPHONE_LAYOUT,
NUMBER_OUTSIDE_VALID_RANGE,
OPERATION_TOO_LARGE,
+ ORG_IN_MAINTENANCE,
+ ORG_IS_DOT_ORG,
ORG_LOCKED,
ORG_NOT_OWNED_BY_INSTANCE,
PASSWORD_LOCKOUT,
@@ -168,12 +191,17 @@
REQUEST_LIMIT_EXCEEDED,
REQUEST_RUNNING_TOO_LONG,
SERVER_UNAVAILABLE,
+ SOCIALCRM_FEEDSERVICE_API_CLIENT_EXCEPTION,
+ SOCIALCRM_FEEDSERVICE_API_SERVER_EXCEPTION,
+ SOCIALCRM_FEEDSERVICE_API_UNAVAILABLE,
SSO_SERVICE_DOWN,
TOO_MANY_APEX_REQUESTS,
TRIAL_EXPIRED,
UNKNOWN_EXCEPTION,
UNSUPPORTED_API_VERSION,
- UNSUPPORTED_CLIENT;
+ UNSUPPORTED_CLIENT,
+ UNSUPPORTED_MEDIA_TYPE,
+ XML_PARSER_ERROR;
public String value() {
return name();
Modified: branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -43,27 +43,27 @@
}
/**
- * Create an instance of {@link ApiFault }
+ * Create an instance of {@link InvalidFieldFault }
*
*/
- public ApiFault createApiFault() {
- return new ApiFault();
+ public InvalidFieldFault createInvalidFieldFault() {
+ return new InvalidFieldFault();
}
/**
- * Create an instance of {@link MalformedSearchFault }
+ * Create an instance of {@link InvalidIdFault }
*
*/
- public MalformedSearchFault createMalformedSearchFault() {
- return new MalformedSearchFault();
+ public InvalidIdFault createInvalidIdFault() {
+ return new InvalidIdFault();
}
/**
- * Create an instance of {@link InvalidIdFault }
+ * Create an instance of {@link InvalidSObjectFault }
*
*/
- public InvalidIdFault createInvalidIdFault() {
- return new InvalidIdFault();
+ public InvalidSObjectFault createInvalidSObjectFault() {
+ return new InvalidSObjectFault();
}
/**
@@ -75,59 +75,59 @@
}
/**
- * Create an instance of {@link InvalidSObjectFault }
+ * Create an instance of {@link InvalidNewPasswordFault }
*
*/
- public InvalidSObjectFault createInvalidSObjectFault() {
- return new InvalidSObjectFault();
+ public InvalidNewPasswordFault createInvalidNewPasswordFault() {
+ return new InvalidNewPasswordFault();
}
/**
- * Create an instance of {@link InvalidFieldFault }
+ * Create an instance of {@link LoginFault }
*
*/
- public InvalidFieldFault createInvalidFieldFault() {
- return new InvalidFieldFault();
+ public LoginFault createLoginFault() {
+ return new LoginFault();
}
/**
- * Create an instance of {@link UnexpectedErrorFault }
+ * Create an instance of {@link MalformedSearchFault }
*
*/
- public UnexpectedErrorFault createUnexpectedErrorFault() {
- return new UnexpectedErrorFault();
+ public MalformedSearchFault createMalformedSearchFault() {
+ return new MalformedSearchFault();
}
/**
- * Create an instance of {@link InvalidQueryLocatorFault }
+ * Create an instance of {@link ApiFault }
*
*/
- public InvalidQueryLocatorFault createInvalidQueryLocatorFault() {
- return new InvalidQueryLocatorFault();
+ public ApiFault createApiFault() {
+ return new ApiFault();
}
/**
- * Create an instance of {@link ApiQueryFault }
+ * Create an instance of {@link InvalidQueryLocatorFault }
*
*/
- public ApiQueryFault createApiQueryFault() {
- return new ApiQueryFault();
+ public InvalidQueryLocatorFault createInvalidQueryLocatorFault() {
+ return new InvalidQueryLocatorFault();
}
/**
- * Create an instance of {@link LoginFault }
+ * Create an instance of {@link UnexpectedErrorFault }
*
*/
- public LoginFault createLoginFault() {
- return new LoginFault();
+ public UnexpectedErrorFault createUnexpectedErrorFault() {
+ return new UnexpectedErrorFault();
}
/**
- * Create an instance of {@link InvalidNewPasswordFault }
+ * Create an instance of {@link ApiQueryFault }
*
*/
- public InvalidNewPasswordFault createInvalidNewPasswordFault() {
- return new InvalidNewPasswordFault();
+ public ApiQueryFault createApiQueryFault() {
+ return new ApiQueryFault();
}
/**
Deleted: branches/as7/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/resources/partner_v17.wsdl 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/salesforce-api/src/main/resources/partner_v17.wsdl 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,2930 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Salesforce.com Partner Web Services API Version 17.0
-Generated on 2010-02-11 17:24:10 +0000.
-
-Copyright 1999-2010 salesforce.com, inc.
-All Rights Reserved
--->
-<definitions targetNamespace="urn:partner.soap.sforce.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fns="urn:fault.partner.soap.sforce.com" xmlns:tns="urn:partner.soap.sforce.com" xmlns:ens="urn:sobject.partner.soap.sforce.com">
- <types>
-
- <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.partner.soap.sforce.com">
-
- <import namespace="urn:partner.soap.sforce.com"/>
-
-
- <!-- Dynamic sObject -->
- <complexType name="sObject">
- <sequence>
- <element name="type" type="xsd:string"/>
- <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="Id" type="tns:ID" nillable="true"/>
- <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
- </sequence>
- </complexType>
-
- </schema>
-
- <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:partner.soap.sforce.com">
-
- <import namespace="urn:sobject.partner.soap.sforce.com"/>
-
- <!-- Our simple ID Type -->
- <simpleType name="ID">
- <restriction base="xsd:string">
- <length value="18"/>
- <pattern value="[a-zA-Z0-9]{18}"/>
- </restriction>
- </simpleType>
-
- <simpleType name="QueryLocator">
- <restriction base="xsd:string"/>
- </simpleType>
-
- <!-- Shared Result Types -->
- <complexType name="QueryResult">
- <sequence>
- <element name="done" type="xsd:boolean"/>
- <element name="queryLocator" type="tns:QueryLocator" nillable="true"/>
- <element name="records" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="size" type="xsd:int"/>
- </sequence>
- </complexType>
-
-
-
- <!-- Search Result -->
- <complexType name="SearchResult">
- <sequence>
- <element name="searchRecords" minOccurs="0" maxOccurs="unbounded" type="tns:SearchRecord"/>
- <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="SearchRecord">
- <sequence>
- <element name="record" type="ens:sObject"/>
- </sequence>
- </complexType>
-
- <!-- GetUpdated Result -->
- <complexType name="GetUpdatedResult">
- <sequence>
- <element name="ids" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
- <element name="latestDateCovered" type="xsd:dateTime"/>
- <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <!-- GetDeleted Result -->
- <complexType name="GetDeletedResult">
- <sequence>
- <element name="deletedRecords" minOccurs="0" maxOccurs="unbounded" type="tns:DeletedRecord"/>
- <element name="earliestDateAvailable" type="xsd:dateTime"/>
- <element name="latestDateCovered" type="xsd:dateTime"/>
- <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DeletedRecord">
- <sequence>
- <element name="deletedDate" type="xsd:dateTime"/>
- <element name="id" type="tns:ID"/>
- </sequence>
- </complexType>
-
-
- <complexType name="GetServerTimestampResult">
- <sequence>
- <element name="timestamp" type="xsd:dateTime"/>
- </sequence>
- </complexType>
-
-
- <!-- InvalidateSessions Result -->
- <complexType name="InvalidateSessionsResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="SetPasswordResult">
- </complexType>
-
- <complexType name="ResetPasswordResult">
- <sequence>
- <element name="password" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="GetUserInfoResult">
- <sequence>
- <element name="accessibilityMode" type="xsd:boolean"/>
- <element name="currencySymbol" type="xsd:string" nillable="true"/>
- <element name="orgDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
- <element name="orgDisallowHtmlAttachments" type="xsd:boolean"/>
- <element name="orgHasPersonAccounts" type="xsd:boolean"/>
- <element name="organizationId" type="tns:ID"/>
- <element name="organizationMultiCurrency" type="xsd:boolean"/>
- <element name="organizationName" type="xsd:string"/>
- <element name="profileId" type="tns:ID"/>
- <element name="roleId" type="tns:ID" nillable="true"/>
- <element name="userDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
- <element name="userEmail" type="xsd:string"/>
- <element name="userFullName" type="xsd:string"/>
- <element name="userId" type="tns:ID"/>
- <element name="userLanguage" type="xsd:string"/>
- <element name="userLocale" type="xsd:string"/>
- <element name="userName" type="xsd:string"/>
- <element name="userTimeZone" type="xsd:string"/>
- <element name="userType" type="xsd:string"/>
- <element name="userUiSkin" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="LoginResult">
- <sequence>
- <element name="metadataServerUrl" type="xsd:string" nillable="true"/>
- <element name="passwordExpired" type="xsd:boolean"/>
- <element name="sandbox" type="xsd:boolean"/>
- <element name="serverUrl" type="xsd:string" nillable="true"/>
- <element name="sessionId" type="xsd:string" nillable="true"/>
-
- <element name="userId" type="tns:ID" nillable="true"/>
- <element name="userInfo" type="tns:GetUserInfoResult" minOccurs="0"/>
- </sequence>
- </complexType>
-
- <simpleType name="StatusCode">
- <restriction base="xsd:string">
- <enumeration value="ALREADY_IN_PROCESS"/>
- <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
- <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
- <enumeration value="BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED"/>
- <enumeration value="CANNOT_CASCADE_PRODUCT_ACTIVE"/>
- <enumeration value="CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD"/>
- <enumeration value="CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE"/>
- <enumeration value="CANNOT_DEACTIVATE_DIVISION"/>
- <enumeration value="CANNOT_DELETE_LAST_DATED_CONVERSION_RATE"/>
- <enumeration value="CANNOT_DELETE_MANAGED_OBJECT"/>
- <enumeration value="CANNOT_DISABLE_LAST_ADMIN"/>
- <enumeration value="CANNOT_ENABLE_IP_RESTRICT_REQUESTS"/>
- <enumeration value="CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"/>
- <enumeration value="CANNOT_MODIFY_MANAGED_OBJECT"/>
- <enumeration value="CANNOT_RENAME_APEX_REFERENCED_FIELD"/>
- <enumeration value="CANNOT_RENAME_APEX_REFERENCED_OBJECT"/>
- <enumeration value="CANNOT_REPARENT_RECORD"/>
- <enumeration value="CANNOT_UPDATE_CONVERTED_LEAD"/>
- <enumeration value="CANT_DISABLE_CORP_CURRENCY"/>
- <enumeration value="CANT_UNSET_CORP_CURRENCY"/>
- <enumeration value="CHILD_SHARE_FAILS_PARENT"/>
- <enumeration value="CIRCULAR_DEPENDENCY"/>
- <enumeration value="COMMUNITY_NOT_ACCESSIBLE"/>
- <enumeration value="CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED"/>
- <enumeration value="CUSTOM_ENTITY_OR_FIELD_LIMIT"/>
- <enumeration value="CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED"/>
- <enumeration value="CUSTOM_INDEX_EXISTS"/>
- <enumeration value="CUSTOM_LINK_LIMIT_EXCEEDED"/>
- <enumeration value="CUSTOM_TAB_LIMIT_EXCEEDED"/>
- <enumeration value="DELETE_FAILED"/>
- <enumeration value="DELETE_REQUIRED_ON_CASCADE"/>
- <enumeration value="DEPENDENCY_EXISTS"/>
- <enumeration value="DUPLICATE_CASE_SOLUTION"/>
- <enumeration value="DUPLICATE_COMM_NICKNAME"/>
- <enumeration value="DUPLICATE_CUSTOM_ENTITY_DEFINITION"/>
- <enumeration value="DUPLICATE_CUSTOM_TAB_MOTIF"/>
- <enumeration value="DUPLICATE_DEVELOPER_NAME"/>
- <enumeration value="DUPLICATE_EXTERNAL_ID"/>
- <enumeration value="DUPLICATE_MASTER_LABEL"/>
- <enumeration value="DUPLICATE_SENDER_DISPLAY_NAME"/>
- <enumeration value="DUPLICATE_USERNAME"/>
- <enumeration value="DUPLICATE_VALUE"/>
- <enumeration value="EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR"/>
- <enumeration value="EMPTY_SCONTROL_FILE_NAME"/>
- <enumeration value="ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE"/>
- <enumeration value="ENTITY_IS_ARCHIVED"/>
- <enumeration value="ENTITY_IS_DELETED"/>
- <enumeration value="ENTITY_IS_LOCKED"/>
- <enumeration value="ERROR_IN_MAILER"/>
- <enumeration value="FAILED_ACTIVATION"/>
- <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
- <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
- <enumeration value="FILTERED_LOOKUP_LIMIT_EXCEEDED"/>
- <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
- <enumeration value="IMAGE_TOO_LARGE"/>
- <enumeration value="INACTIVE_OWNER_OR_USER"/>
- <enumeration value="INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"/>
- <enumeration value="INSUFFICIENT_ACCESS_OR_READONLY"/>
- <enumeration value="INVALID_ACCESS_LEVEL"/>
- <enumeration value="INVALID_ARGUMENT_TYPE"/>
- <enumeration value="INVALID_ASSIGNEE_TYPE"/>
- <enumeration value="INVALID_ASSIGNMENT_RULE"/>
- <enumeration value="INVALID_BATCH_OPERATION"/>
- <enumeration value="INVALID_CONTENT_TYPE"/>
- <enumeration value="INVALID_CREDIT_CARD_INFO"/>
- <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
- <enumeration value="INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD"/>
- <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
- <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
- <enumeration value="INVALID_CURRENCY_ISO"/>
- <enumeration value="INVALID_EMAIL_ADDRESS"/>
- <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
- <enumeration value="INVALID_FIELD"/>
- <enumeration value="INVALID_FIELD_FOR_INSERT_UPDATE"/>
- <enumeration value="INVALID_FIELD_WHEN_USING_TEMPLATE"/>
- <enumeration value="INVALID_FILTER_ACTION"/>
- <enumeration value="INVALID_GOOGLE_DOCS_URL"/>
- <enumeration value="INVALID_ID_FIELD"/>
- <enumeration value="INVALID_INET_ADDRESS"/>
- <enumeration value="INVALID_LINEITEM_CLONE_STATE"/>
- <enumeration value="INVALID_MASTER_OR_TRANSLATED_SOLUTION"/>
- <enumeration value="INVALID_MESSAGE_ID_REFERENCE"/>
- <enumeration value="INVALID_OPERATION"/>
- <enumeration value="INVALID_OPERATOR"/>
- <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
- <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
- <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
- <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
- <enumeration value="INVALID_SESSION_ID"/>
- <enumeration value="INVALID_SETUP_OWNER"/>
- <enumeration value="INVALID_STATUS"/>
- <enumeration value="INVALID_TYPE"/>
- <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
- <enumeration value="INVALID_TYPE_ON_FIELD_IN_RECORD"/>
- <enumeration value="IP_RANGE_LIMIT_EXCEEDED"/>
- <enumeration value="LICENSE_LIMIT_EXCEEDED"/>
- <enumeration value="LIGHT_PORTAL_USER_EXCEPTION"/>
- <enumeration value="LIMIT_EXCEEDED"/>
- <enumeration value="MALFORMED_ID"/>
- <enumeration value="MANAGER_NOT_DEFINED"/>
- <enumeration value="MASSMAIL_RETRY_LIMIT_EXCEEDED"/>
- <enumeration value="MASS_MAIL_LIMIT_EXCEEDED"/>
- <enumeration value="MAXIMUM_CCEMAILS_EXCEEDED"/>
- <enumeration value="MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED"/>
- <enumeration value="MAXIMUM_HIERARCHY_LEVELS_REACHED"/>
- <enumeration value="MAXIMUM_SIZE_OF_ATTACHMENT"/>
- <enumeration value="MAXIMUM_SIZE_OF_DOCUMENT"/>
- <enumeration value="MAX_ACTIONS_PER_RULE_EXCEEDED"/>
- <enumeration value="MAX_ACTIVE_RULES_EXCEEDED"/>
- <enumeration value="MAX_APPROVAL_STEPS_EXCEEDED"/>
- <enumeration value="MAX_FORMULAS_PER_RULE_EXCEEDED"/>
- <enumeration value="MAX_RULES_EXCEEDED"/>
- <enumeration value="MAX_RULE_ENTRIES_EXCEEDED"/>
- <enumeration value="MAX_TASK_DESCRIPTION_EXCEEEDED"/>
- <enumeration value="MAX_TM_RULES_EXCEEDED"/>
- <enumeration value="MAX_TM_RULE_ITEMS_EXCEEDED"/>
- <enumeration value="MERGE_FAILED"/>
- <enumeration value="MISSING_ARGUMENT"/>
- <enumeration value="MIXED_DML_OPERATION"/>
- <enumeration value="NONUNIQUE_SHIPPING_ADDRESS"/>
- <enumeration value="NO_APPLICABLE_PROCESS"/>
- <enumeration value="NO_ATTACHMENT_PERMISSION"/>
- <enumeration value="NO_INACTIVE_DIVISION_MEMBERS"/>
- <enumeration value="NO_MASS_MAIL_PERMISSION"/>
- <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
- <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
- <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
- <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
- <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
- <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
- <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
- <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
- <enumeration value="REQUIRED_FIELD_MISSING"/>
- <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
- <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
- <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
- <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
- <enumeration value="STRING_TOO_LONG"/>
- <enumeration value="TABSET_LIMIT_EXCEEDED"/>
- <enumeration value="TEMPLATE_NOT_ACTIVE"/>
- <enumeration value="TERRITORY_REALIGN_IN_PROGRESS"/>
- <enumeration value="TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET"/>
- <enumeration value="TOO_MANY_APEX_REQUESTS"/>
- <enumeration value="TOO_MANY_ENUM_VALUE"/>
- <enumeration value="TRANSFER_REQUIRES_READ"/>
- <enumeration value="UNABLE_TO_LOCK_ROW"/>
- <enumeration value="UNAVAILABLE_RECORDTYPE_EXCEPTION"/>
- <enumeration value="UNDELETE_FAILED"/>
- <enumeration value="UNKNOWN_EXCEPTION"/>
- <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
- <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
- <enumeration value="UNVERIFIED_SENDER_ADDRESS"/>
- <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
- <enumeration value="WRONG_CONTROLLER_TYPE"/>
- </restriction>
- </simpleType>
-
-
- <complexType name="Error">
- <sequence>
- <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="message" type="xsd:string"/>
- <element name="statusCode" type="tns:StatusCode"/>
- </sequence>
- </complexType>
-
- <complexType name="SendEmailError">
- <sequence>
- <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="message" type="xsd:string"/>
- <element name="statusCode" type="tns:StatusCode"/>
- <element name="targetObjectId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="SaveResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="UpsertResult">
- <sequence>
- <element name="created" type="xsd:boolean"/>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="MergeRequest">
- <sequence>
- <element name="masterRecord" type="ens:sObject"/>
- <element name="recordToMergeIds" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="MergeResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="mergedRecordIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- <element name="success" type="xsd:boolean"/>
- <element name="updatedRelatedIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="ProcessRequest">
- <sequence>
- <element name="comments" type="xsd:string" nillable="true"/>
- <element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="ProcessSubmitRequest">
- <complexContent>
- <extension base="tns:ProcessRequest">
- <sequence>
- <element name="objectId" type="tns:ID"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="ProcessWorkitemRequest">
- <complexContent>
- <extension base="tns:ProcessRequest">
- <sequence>
- <element name="action" type="xsd:string"/>
- <element name="workitemId" type="tns:ID"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
-
-
- <complexType name="ProcessResult">
- <sequence>
- <element name="actorIds" type="tns:ID" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
- <element name="entityId" type="tns:ID" nillable="true"/>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="instanceId" type="tns:ID" nillable="true"/>
- <element name="instanceStatus" type="xsd:string" nillable="true"/>
- <element name="newWorkitemIds" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
-
-
-
-
- <complexType name="DeleteResult">
- <sequence>
- <element name="errors" type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="UndeleteResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="EmptyRecycleBinResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="LeadConvert">
- <sequence>
- <element name="accountId" type="tns:ID" nillable="true"/>
- <element name="contactId" type="tns:ID" nillable="true"/>
- <element name="convertedStatus" type="xsd:string"/>
- <element name="doNotCreateOpportunity" type="xsd:boolean"/>
- <element name="leadId" type="tns:ID"/>
- <element name="opportunityName" type="xsd:string" nillable="true"/>
- <element name="overwriteLeadSource" type="xsd:boolean"/>
- <element name="ownerId" type="tns:ID" nillable="true"/>
- <element name="sendNotificationEmail" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="LeadConvertResult">
- <sequence>
- <element name="accountId" type="tns:ID" nillable="true"/>
- <element name="contactId" type="tns:ID" nillable="true"/>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="leadId" type="tns:ID" nillable="true"/>
- <element name="opportunityId" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSObjectResult">
- <sequence>
- <element name="activateable" type="xsd:boolean"/>
- <element name="childRelationships" type="tns:ChildRelationship" minOccurs="0" maxOccurs="unbounded"/>
- <element name="createable" type="xsd:boolean"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="customSetting" type="xsd:boolean"/>
- <element name="deletable" type="xsd:boolean"/>
- <element name="deprecatedAndHidden" type="xsd:boolean"/>
- <element name="fields" type="tns:Field" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="keyPrefix" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="labelPlural" type="xsd:string"/>
- <element name="layoutable" type="xsd:boolean"/>
- <element name="mergeable" type="xsd:boolean"/>
- <element name="name" type="xsd:string"/>
- <element name="queryable" type="xsd:boolean"/>
- <element name="recordTypeInfos" type="tns:RecordTypeInfo" minOccurs="0" maxOccurs="unbounded"/>
- <element name="replicateable" type="xsd:boolean"/>
- <element name="retrieveable" type="xsd:boolean"/>
- <element name="searchable" type="xsd:boolean"/>
- <element name="triggerable" type="xsd:boolean" minOccurs="0"/>
- <element name="undeletable" type="xsd:boolean"/>
- <element name="updateable" type="xsd:boolean"/>
- <element name="urlDetail" type="xsd:string" nillable="true"/>
- <element name="urlEdit" type="xsd:string" nillable="true"/>
- <element name="urlNew" type="xsd:string" nillable="true"/>
- </sequence>
- </complexType>
-
- <!-- this is a subset of properties for each SObject that is returned by the describeGlobal call -->
- <complexType name="DescribeGlobalSObjectResult">
- <sequence>
- <element name="activateable" type="xsd:boolean"/>
- <element name="createable" type="xsd:boolean"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="customSetting" type="xsd:boolean"/>
- <element name="deletable" type="xsd:boolean"/>
- <element name="deprecatedAndHidden" type="xsd:boolean"/>
- <element name="keyPrefix" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="labelPlural" type="xsd:string"/>
- <element name="layoutable" type="xsd:boolean"/>
- <element name="mergeable" type="xsd:boolean"/>
- <element name="name" type="xsd:string"/>
- <element name="queryable" type="xsd:boolean"/>
- <element name="replicateable" type="xsd:boolean"/>
- <element name="retrieveable" type="xsd:boolean"/>
- <element name="searchable" type="xsd:boolean"/>
- <element name="triggerable" type="xsd:boolean"/>
- <element name="undeletable" type="xsd:boolean"/>
- <element name="updateable" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="ChildRelationship">
- <sequence>
- <element name="cascadeDelete" type="xsd:boolean"/>
- <element name="childSObject" type="xsd:string"/>
- <element name="deprecatedAndHidden" type="xsd:boolean"/>
- <element name="field" type="xsd:string"/>
- <element name="relationshipName" type="xsd:string" minOccurs="0"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeGlobalResult">
- <sequence>
- <element name="encoding" type="xsd:string" nillable="true"/>
- <element name="maxBatchSize" type="xsd:int"/>
- <element name="sobjects" type="tns:DescribeGlobalSObjectResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <simpleType name="fieldType">
- <restriction base="xsd:string">
- <enumeration value="string"/>
- <enumeration value="picklist"/>
- <enumeration value="multipicklist"/>
- <enumeration value="combobox"/>
- <enumeration value="reference"/>
- <enumeration value="base64"/>
- <enumeration value="boolean"/>
- <enumeration value="currency"/>
- <enumeration value="textarea"/>
- <enumeration value="int"/>
- <enumeration value="double"/>
- <enumeration value="percent"/>
- <enumeration value="phone"/>
- <enumeration value="id"/>
- <enumeration value="date"/>
- <enumeration value="datetime"/>
- <enumeration value="time"/>
- <enumeration value="url"/>
- <enumeration value="email"/>
- <enumeration value="encryptedstring"/>
- <enumeration value="anyType"/> <!-- can be string, picklist, reference, boolean, currency, int, double, percent, id, date, datetime, url, email -->
- </restriction>
- </simpleType>
-
- <simpleType name="soapType">
- <restriction base="xsd:string">
- <enumeration value="tns:ID"/>
- <enumeration value="xsd:base64Binary"/>
- <enumeration value="xsd:boolean"/>
- <enumeration value="xsd:double"/>
- <enumeration value="xsd:int"/>
- <enumeration value="xsd:string"/>
- <enumeration value="xsd:date"/>
- <enumeration value="xsd:dateTime"/>
- <enumeration value="xsd:time"/>
- <enumeration value="xsd:anyType"/> <!-- can be id, booolean, double, int, string, date, dateTime -->
- </restriction>
- </simpleType>
-
- <complexType name="Field">
- <sequence>
- <element name="autoNumber" type="xsd:boolean"/>
- <element name="byteLength" type="xsd:int"/>
- <element name="calculated" type="xsd:boolean"/>
- <element name="calculatedFormula" type="xsd:string" minOccurs="0"/>
- <element name="caseSensitive" type="xsd:boolean"/>
- <element name="controllerName" type="xsd:string" minOccurs="0"/>
- <element name="createable" type="xsd:boolean"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="defaultValueFormula" type="xsd:string" minOccurs="0"/>
- <element name="defaultedOnCreate" type="xsd:boolean"/>
- <element name="dependentPicklist" type="xsd:boolean" minOccurs="0"/>
- <element name="deprecatedAndHidden" type="xsd:boolean"/>
- <element name="digits" type="xsd:int"/>
- <element name="externalId" type="xsd:boolean" minOccurs="0"/>
- <element name="filterable" type="xsd:boolean"/>
- <element name="htmlFormatted" type="xsd:boolean" minOccurs="0"/>
- <element name="idLookup" type="xsd:boolean"/>
- <element name="inlineHelpText" type="xsd:string" minOccurs="0"/>
- <element name="label" type="xsd:string"/>
- <element name="length" type="xsd:int"/>
- <element name="name" type="xsd:string"/>
- <element name="nameField" type="xsd:boolean"/>
- <element name="namePointing" type="xsd:boolean" minOccurs="0"/>
- <element name="nillable" type="xsd:boolean"/>
- <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="precision" type="xsd:int"/>
- <element name="referenceTo" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="relationshipName" type="xsd:string" minOccurs="0"/>
- <element name="relationshipOrder" type="xsd:int" minOccurs="0"/>
- <element name="restrictedPicklist" type="xsd:boolean"/>
- <element name="scale" type="xsd:int"/>
- <element name="soapType" type="tns:soapType"/>
- <element name="sortable" type="xsd:boolean" minOccurs="0"/>
- <element name="type" type="tns:fieldType"/>
- <element name="unique" type="xsd:boolean"/>
- <element name="updateable" type="xsd:boolean"/>
- <element name="writeRequiresMasterRead" type="xsd:boolean" minOccurs="0"/>
- </sequence>
- </complexType>
-
- <complexType name="PicklistEntry">
- <sequence>
- <element name="active" type="xsd:boolean"/>
- <element name="defaultValue" type="xsd:boolean"/>
- <element name="label" type="xsd:string" nillable="true"/>
- <element name="validFor" type="xsd:base64Binary" minOccurs="0"/>
- <element name="value" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutResult">
- <sequence>
- <element name="callTypes" type="tns:DescribeSoftphoneLayoutCallType" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID"/>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutCallType">
- <sequence>
- <element name="infoFields" type="tns:DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
- <element name="name" type="xsd:string"/>
- <element name="sections" type="tns:DescribeSoftphoneLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutInfoField">
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutSection">
- <sequence>
- <element name="entityApiName" type="xsd:string"/>
- <element name="items" type="tns:DescribeSoftphoneLayoutItem" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutItem">
- <sequence>
- <element name="itemApiName" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutResult">
- <sequence>
- <element name="layouts" type="tns:DescribeLayout" maxOccurs="unbounded"/>
- <element name="recordTypeMappings" type="tns:RecordTypeMapping" minOccurs="0" maxOccurs="unbounded"/>
- <element name="recordTypeSelectorRequired" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayout">
- <sequence>
- <element name="buttonLayoutSection" type="tns:DescribeLayoutButtonSection" minOccurs="0"/>
- <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
- <element name="editLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID"/>
-
-
- <element name="relatedLists" type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutSection">
- <sequence>
- <element name="columns" type="xsd:int"/>
- <element name="heading" type="xsd:string"/>
- <element name="layoutRows" type="tns:DescribeLayoutRow" maxOccurs="unbounded"/>
- <element name="rows" type="xsd:int"/>
- <element name="useCollapsibleSection" type="xsd:boolean"/>
- <element name="useHeading" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutButtonSection">
- <sequence>
- <element name="detailButtons" type="tns:DescribeLayoutButton" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutRow">
- <sequence>
- <element name="layoutItems" type="tns:DescribeLayoutItem" maxOccurs="unbounded"/>
- <element name="numItems" type="xsd:int"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutItem">
- <sequence>
- <element name="editable" type="xsd:boolean"/>
- <element name="label" type="xsd:string" nillable="true"/>
- <element name="layoutComponents" type="tns:DescribeLayoutComponent" minOccurs="0" maxOccurs="unbounded"/>
- <element name="placeholder" type="xsd:boolean"/>
- <element name="required" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutButton">
- <sequence>
- <element name="custom" type="xsd:boolean"/>
- <element name="label" type="xsd:string" nillable="true"/>
- <element name="name" type="xsd:string" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutComponent">
- <sequence>
- <element name="displayLines" type="xsd:int"/>
- <element name="tabOrder" type="xsd:int"/>
- <element name="type" type="tns:layoutComponentType"/>
- <element name="value" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <simpleType name="layoutComponentType">
- <restriction base="xsd:string">
- <enumeration value="Field"/>
- <enumeration value="Separator"/>
- <enumeration value="SControl"/>
- <enumeration value="EmptySpace"/>
- </restriction>
- </simpleType>
-
- <complexType name="RecordTypeInfo">
- <sequence>
- <element name="available" type="xsd:boolean"/>
- <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
- <element name="name" type="xsd:string"/>
- <element name="recordTypeId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="RecordTypeMapping">
- <sequence>
- <element name="available" type="xsd:boolean"/>
- <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
- <element name="layoutId" type="tns:ID"/>
- <element name="name" type="xsd:string"/>
- <element name="picklistsForRecordType" type="tns:PicklistForRecordType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="recordTypeId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="PicklistForRecordType">
- <sequence>
- <element name="picklistName" type="xsd:string"/>
- <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="RelatedList">
- <sequence>
- <element name="columns" type="tns:RelatedListColumn" maxOccurs="unbounded"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="field" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="limitRows" type="xsd:int"/>
- <element name="name" type="xsd:string"/>
- <element name="sobject" type="xsd:string" nillable="true"/>
- <element name="sort" type="tns:RelatedListSort" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="RelatedListColumn">
- <sequence>
- <element name="field" type="xsd:string" nillable="true"/>
- <element name="format" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="RelatedListSort">
- <sequence>
- <element name="ascending" type="xsd:boolean"/>
- <element name="column" type="xsd:string"/>
- </sequence>
- </complexType>
-
-
-
- <complexType name="EmailFileAttachment">
- <sequence>
- <element name="body" nillable="true" minOccurs="0" type="xsd:base64Binary"/>
- <element name="contentType" nillable="true" minOccurs="0" type="xsd:string"/>
- <element name="fileName" type="xsd:string"/>
- <element name="inline" type="xsd:boolean" minOccurs="0"/>
- </sequence>
- </complexType>
- <simpleType name="EmailPriority">
- <restriction base="xsd:string">
- <enumeration value="Highest"/>
- <enumeration value="High"/>
- <enumeration value="Normal"/>
- <enumeration value="Low"/>
- <enumeration value="Lowest"/>
- </restriction>
- </simpleType>
-
- <complexType name="Email">
- <sequence>
- <element name="bccSender" type="xsd:boolean" nillable="true"/>
- <element name="emailPriority" type="tns:EmailPriority" nillable="true"/>
- <element name="replyTo" type="xsd:string" nillable="true"/>
- <element name="saveAsActivity" type="xsd:boolean" nillable="true"/>
- <element name="senderDisplayName" type="xsd:string" nillable="true"/>
- <element name="subject" type="xsd:string" nillable="true"/>
- <element name="useSignature" type="xsd:boolean" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="MassEmailMessage">
- <complexContent>
- <extension base="tns:Email">
- <sequence>
- <element name="description" type="xsd:string" nillable="true"/>
- <element name="targetObjectIds" minOccurs="0" maxOccurs="250" type="tns:ID"/>
- <element name="templateId" type="tns:ID"/>
- <element name="whatIds" minOccurs="0" maxOccurs="250" type="tns:ID"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="SingleEmailMessage">
- <complexContent>
- <extension base="tns:Email">
- <sequence>
- <element name="bccAddresses" minOccurs="0" maxOccurs="25" type="xsd:string" nillable="true"/>
- <element name="ccAddresses" minOccurs="0" maxOccurs="25" type="xsd:string" nillable="true"/>
- <element name="charset" type="xsd:string" nillable="true"/>
- <element name="documentAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
- <element name="htmlBody" type="xsd:string" nillable="true"/>
- <element name="inReplyTo" minOccurs="0" type="xsd:string" nillable="true"/>
- <element name="fileAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:EmailFileAttachment"/>
- <element name="orgWideEmailAddressId" minOccurs="0" maxOccurs="1" type="tns:ID" nillable="true"/>
- <element name="plainTextBody" type="xsd:string" nillable="true"/>
- <element name="references" minOccurs="0" type="xsd:string" nillable="true"/>
- <element name="targetObjectId" type="tns:ID" nillable="true"/>
- <element name="templateId" type="tns:ID" nillable="true"/>
- <element name="toAddresses" minOccurs="0" maxOccurs="100" type="xsd:string" nillable="true"/>
- <element name="whatId" type="tns:ID" nillable="true"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="SendEmailResult">
- <sequence>
- <element name="errors" minOccurs="0" maxOccurs="unbounded" type="tns:SendEmailError"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
-
-
- <complexType name="DescribeTabSetResult">
- <sequence>
- <element name="label" type="xsd:string"/>
- <element name="logoUrl" type="xsd:string"/>
- <element name="namespace" type="xsd:string" minOccurs="0"/>
- <element name="selected" type="xsd:boolean"/>
- <element name="tabs" type="tns:DescribeTab" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeTab">
- <sequence>
- <element name="custom" type="xsd:boolean"/>
- <element name="iconUrl" type="xsd:string"/>
- <element name="label" type="xsd:string"/>
- <element name="miniIconUrl" type="xsd:string"/>
- <element name="sobjectName" type="xsd:string" nillable="true"/>
- <element name="url" type="xsd:string"/>
- </sequence>
- </complexType>
-
-
-
-
-
- <!-- Login Message Types -->
- <element name="login">
- <complexType>
- <sequence>
- <element name="username" type="xsd:string"/>
- <element name="password" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="loginResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:LoginResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Describe Message Types -->
- <element name="describeSObject">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="describeSObjectResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeSObjectResult" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- DescibeSObjects Message Types -->
- <element name="describeSObjects">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string" minOccurs="0" maxOccurs="100"/>
- </sequence>
- </complexType>
- </element>
- <element name="describeSObjectsResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeSObjectResult" nillable="true" minOccurs="0" maxOccurs="100"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Describe Global Message Types -->
- <element name="describeGlobal">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="describeGlobalResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeGlobalResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="describeLayout">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="describeLayoutResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeLayoutResult" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="describeSoftphoneLayout">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="describeSoftphoneLayoutResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeSoftphoneLayoutResult" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
-
- <element name="describeTabs">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="describeTabsResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeTabSetResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Create Message Types -->
- <element name="create">
- <complexType>
- <sequence>
- <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="createResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- Send Email Types -->
- <element name="sendEmail">
- <complexType>
- <sequence>
- <element name="messages" type="tns:Email" minOccurs="0" maxOccurs="10"/>
- </sequence>
- </complexType>
- </element>
- <element name="sendEmailResponse">
- <complexType>
- <sequence>
- <element name="result" minOccurs="0" maxOccurs="10" type="tns:SendEmailResult"/>
- </sequence>
- </complexType>
- </element>
-
-
- <!-- Update Message Types -->
- <element name="update">
- <complexType>
- <sequence>
- <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="updateResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Upsert Message Types -->
- <element name="upsert">
- <complexType>
- <sequence>
- <element name="externalIDFieldName" type="xsd:string"/>
- <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="upsertResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:UpsertResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Merge Message Types -->
- <element name="merge">
- <complexType>
- <sequence>
- <element name="request" type="tns:MergeRequest" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="mergeResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:MergeResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Delete Message Types -->
- <element name="delete">
- <complexType>
- <sequence>
- <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="deleteResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DeleteResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Undelete Message Types -->
- <element name="undelete">
- <complexType>
- <sequence>
- <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="undeleteResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:UndeleteResult" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- EmptyRecycleBin Message Types -->
- <element name="emptyRecycleBin">
- <complexType>
- <sequence>
- <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="emptyRecycleBinResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:EmptyRecycleBinResult" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Process Message Types -->
- <element name="process">
- <complexType>
- <sequence>
- <element name="actions" type="tns:ProcessRequest" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="processResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:ProcessResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
-
-
-
- <!-- Retrieve (ID List) Message Types -->
- <element name="retrieve">
- <complexType>
- <sequence>
- <element name="fieldList" type="xsd:string"/>
- <element name="sObjectType" type="xsd:string"/>
- <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="retrieveResponse">
- <complexType>
- <sequence>
- <element name="result" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Convert Lead Message Types -->
- <element name="convertLead">
- <complexType>
- <sequence>
- <element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="convertLeadResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:LeadConvertResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Get Updated Message Types -->
- <element name="getUpdated">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- <element name="startDate" type="xsd:dateTime"/>
- <element name="endDate" type="xsd:dateTime"/>
- </sequence>
- </complexType>
- </element>
- <element name="getUpdatedResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetUpdatedResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Get Deleted Message Types -->
- <element name="getDeleted">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- <element name="startDate" type="xsd:dateTime"/>
- <element name="endDate" type="xsd:dateTime"/>
- </sequence>
- </complexType>
- </element>
- <element name="getDeletedResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetDeletedResult"/>
- </sequence>
- </complexType>
- </element>
-
-
- <!-- Logout current session -->
- <element name="logout">
- <complexType>
- </complexType>
- </element>
-
- <element name="logoutResponse">
- <complexType>
- </complexType>
- </element>
-
- <!-- Invalidate a list of session ids -->
- <element name="invalidateSessions">
- <complexType>
- <sequence>
- <element name="sessionIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="invalidateSessionsResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:InvalidateSessionsResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Create Query -->
- <element name="query">
- <complexType>
- <sequence>
- <element name="queryString" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="queryResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:QueryResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Create Query All -->
- <element name="queryAll">
- <complexType>
- <sequence>
- <element name="queryString" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="queryAllResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:QueryResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Next Batch of sObjects from a query -->
- <element name="queryMore">
- <complexType>
- <sequence>
- <element name="queryLocator" type="tns:QueryLocator"/>
- </sequence>
- </complexType>
- </element>
- <element name="queryMoreResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:QueryResult"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- Create Search -->
- <element name="search">
- <complexType>
- <sequence>
- <element name="searchString" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="searchResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SearchResult"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <element name="getServerTimestamp">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="getServerTimestampResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetServerTimestampResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="setPassword">
- <complexType>
- <sequence>
- <element name="userId" type="tns:ID"/>
- <element name="password" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="setPasswordResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SetPasswordResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="resetPassword">
- <complexType>
- <sequence>
- <element name="userId" type="tns:ID"/>
- </sequence>
- </complexType>
- </element>
- <element name="resetPasswordResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:ResetPasswordResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getUserInfo">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="getUserInfoResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetUserInfoResult"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- Header Elements -->
- <element name="SessionHeader">
- <complexType>
- <sequence>
- <element name="sessionId" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="LoginScopeHeader">
- <complexType>
- <sequence>
- <element name="organizationId" type="tns:ID"/>
- <element name="portalId" type="tns:ID" minOccurs="0"/>
- </sequence>
- </complexType>
- </element>
-
-
- <element name="CallOptions">
- <complexType>
- <sequence>
- <element name="client" type="xsd:string" nillable="true"/>
- <element name="defaultNamespace" type="xsd:string" nillable="true"/>
-
- </sequence>
- </complexType>
- </element>
-
-
- <element name="QueryOptions">
- <complexType>
- <sequence>
- <element name="batchSize" type="xsd:int" minOccurs="0"/>
-
- </sequence>
- </complexType>
- </element>
-
-
- <simpleType name="DebugLevel">
- <restriction base="xsd:string">
- <enumeration value="None"/>
- <enumeration value="DebugOnly"/>
- <enumeration value="Db"/>
- </restriction>
- </simpleType>
- <element name="DebuggingHeader">
- <complexType>
- <sequence>
- <element name="debugLevel" type="tns:DebugLevel"/>
- </sequence>
- </complexType>
- </element>
- <element name="DebuggingInfo">
- <complexType>
- <sequence>
- <element name="debugLog" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <xsd:complexType name="PackageVersion">
- <xsd:sequence>
- <xsd:element name="majorNumber" type="xsd:int"/>
- <xsd:element name="minorNumber" type="xsd:int"/>
- <xsd:element name="namespace" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="PackageVersionHeader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="packageVersions" minOccurs="0" maxOccurs="unbounded" type="tns:PackageVersion"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- <element name="AllowFieldTruncationHeader">
- <complexType>
- <sequence>
- <element name="allowFieldTruncation" type="xsd:boolean"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- ideally this could of just been elem name="..." type="xsd:boolean"
- but is required to be nested within a complexType for .NET 1.1 compatibility -->
- <element name="MruHeader">
- <complexType>
- <sequence>
- <element name="updateMru" type="xsd:boolean"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="EmailHeader">
- <complexType>
- <sequence>
- <element name="triggerAutoResponseEmail" type="xsd:boolean"/>
- <element name="triggerOtherEmail" type="xsd:boolean"/>
- <element name="triggerUserEmail" type="xsd:boolean"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="AssignmentRuleHeader">
- <complexType>
- <sequence>
- <element name="assignmentRuleId" type="tns:ID" nillable="true"/>
- <element name="useDefaultRule" type="xsd:boolean" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="UserTerritoryDeleteHeader">
- <complexType>
- <sequence>
- <element name="transferToUserId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <element name="LocaleOptions">
- <complexType>
- <sequence>
- <element name="language" type="xsd:string" minOccurs="0"/>
- </sequence>
- </complexType>
- </element>
- </schema>
-
- <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:fault.partner.soap.sforce.com" xmlns:fns="urn:fault.partner.soap.sforce.com">
-
- <simpleType name="ExceptionCode">
- <restriction base="xsd:string">
- <enumeration value="API_CURRENTLY_DISABLED"/>
- <enumeration value="API_DISABLED_FOR_ORG"/>
- <enumeration value="CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="CIRCULAR_OBJECT_GRAPH"/>
- <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
- <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
- <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
- <enumeration value="DUPLICATE_VALUE"/>
- <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
- <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
- <enumeration value="EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
- <enumeration value="EMAIL_TO_CASE_NOT_ENABLED"/>
- <enumeration value="EXCEEDED_ID_LIMIT"/>
- <enumeration value="EXCEEDED_LEAD_CONVERT_LIMIT"/>
- <enumeration value="EXCEEDED_MAX_SIZE_REQUEST"/>
- <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
- <enumeration value="EXCEEDED_QUOTA"/>
- <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
- <enumeration value="INACTIVE_OWNER_OR_USER"/>
- <enumeration value="INACTIVE_PORTAL"/>
- <enumeration value="INSUFFICIENT_ACCESS"/>
- <enumeration value="INVALID_ASSIGNMENT_RULE"/>
- <enumeration value="INVALID_BATCH_SIZE"/>
- <enumeration value="INVALID_CLIENT"/>
- <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
- <enumeration value="INVALID_FIELD"/>
- <enumeration value="INVALID_FILTER_LANGUAGE"/>
- <enumeration value="INVALID_FILTER_VALUE"/>
- <enumeration value="INVALID_ID_FIELD"/>
- <enumeration value="INVALID_LOCALE_LANGUAGE"/>
- <enumeration value="INVALID_LOCATOR"/>
- <enumeration value="INVALID_LOGIN"/>
- <enumeration value="INVALID_NEW_PASSWORD"/>
- <enumeration value="INVALID_OPERATION"/>
- <enumeration value="INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
- <enumeration value="INVALID_QUERY_FILTER_OPERATOR"/>
- <enumeration value="INVALID_QUERY_LOCATOR"/>
- <enumeration value="INVALID_QUERY_SCOPE"/>
- <enumeration value="INVALID_REPLICATION_DATE"/>
- <enumeration value="INVALID_SEARCH"/>
- <enumeration value="INVALID_SEARCH_SCOPE"/>
- <enumeration value="INVALID_SESSION_ID"/>
- <enumeration value="INVALID_SOAP_HEADER"/>
- <enumeration value="INVALID_SSO_GATEWAY_URL"/>
- <enumeration value="INVALID_TYPE"/>
- <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
- <enumeration value="LIMIT_EXCEEDED"/>
- <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
- <enumeration value="LOGIN_CHALLENGE_PENDING"/>
- <enumeration value="LOGIN_DURING_RESTRICTED_DOMAIN"/>
- <enumeration value="LOGIN_DURING_RESTRICTED_TIME"/>
- <enumeration value="LOGIN_MUST_USE_SECURITY_TOKEN"/>
- <enumeration value="MALFORMED_ID"/>
- <enumeration value="MALFORMED_QUERY"/>
- <enumeration value="MALFORMED_SEARCH"/>
- <enumeration value="MISSING_ARGUMENT"/>
- <enumeration value="NOT_MODIFIED"/>
- <enumeration value="NO_SOFTPHONE_LAYOUT"/>
- <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
- <enumeration value="OPERATION_TOO_LARGE"/>
- <enumeration value="ORG_LOCKED"/>
- <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
- <enumeration value="PASSWORD_LOCKOUT"/>
- <enumeration value="PORTAL_NO_ACCESS"/>
- <enumeration value="QUERY_TIMEOUT"/>
- <enumeration value="QUERY_TOO_COMPLICATED"/>
- <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
- <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
- <enumeration value="SERVER_UNAVAILABLE"/>
- <enumeration value="SSO_SERVICE_DOWN"/>
- <enumeration value="TOO_MANY_APEX_REQUESTS"/>
- <enumeration value="TRIAL_EXPIRED"/>
- <enumeration value="UNKNOWN_EXCEPTION"/>
- <enumeration value="UNSUPPORTED_API_VERSION"/>
- <enumeration value="UNSUPPORTED_CLIENT"/>
- </restriction>
- </simpleType>
- <!-- For convenience these QNames are returned in the standard soap faultcode element -->
- <simpleType name="FaultCode">
- <restriction base="xsd:QName">
- <enumeration value="fns:API_CURRENTLY_DISABLED"/>
- <enumeration value="fns:API_DISABLED_FOR_ORG"/>
- <enumeration value="fns:CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="fns:CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="fns:CIRCULAR_OBJECT_GRAPH"/>
- <enumeration value="fns:CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
- <enumeration value="fns:CLIENT_REQUIRE_UPDATE_FOR_USER"/>
- <enumeration value="fns:CUSTOM_METADATA_LIMIT_EXCEEDED"/>
- <enumeration value="fns:DUPLICATE_VALUE"/>
- <enumeration value="fns:EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
- <enumeration value="fns:EMAIL_TO_CASE_INVALID_ROUTING"/>
- <enumeration value="fns:EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
- <enumeration value="fns:EMAIL_TO_CASE_NOT_ENABLED"/>
- <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
- <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
- <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
- <enumeration value="fns:EXCEEDED_MAX_TYPES_LIMIT"/>
- <enumeration value="fns:EXCEEDED_QUOTA"/>
- <enumeration value="fns:FUNCTIONALITY_NOT_ENABLED"/>
- <enumeration value="fns:INACTIVE_OWNER_OR_USER"/>
- <enumeration value="fns:INACTIVE_PORTAL"/>
- <enumeration value="fns:INSUFFICIENT_ACCESS"/>
- <enumeration value="fns:INVALID_ASSIGNMENT_RULE"/>
- <enumeration value="fns:INVALID_BATCH_SIZE"/>
- <enumeration value="fns:INVALID_CLIENT"/>
- <enumeration value="fns:INVALID_CROSS_REFERENCE_KEY"/>
- <enumeration value="fns:INVALID_FIELD"/>
- <enumeration value="fns:INVALID_FILTER_LANGUAGE"/>
- <enumeration value="fns:INVALID_FILTER_VALUE"/>
- <enumeration value="fns:INVALID_ID_FIELD"/>
- <enumeration value="fns:INVALID_LOCALE_LANGUAGE"/>
- <enumeration value="fns:INVALID_LOCATOR"/>
- <enumeration value="fns:INVALID_LOGIN"/>
- <enumeration value="fns:INVALID_NEW_PASSWORD"/>
- <enumeration value="fns:INVALID_OPERATION"/>
- <enumeration value="fns:INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
- <enumeration value="fns:INVALID_QUERY_FILTER_OPERATOR"/>
- <enumeration value="fns:INVALID_QUERY_LOCATOR"/>
- <enumeration value="fns:INVALID_QUERY_SCOPE"/>
- <enumeration value="fns:INVALID_REPLICATION_DATE"/>
- <enumeration value="fns:INVALID_SEARCH"/>
- <enumeration value="fns:INVALID_SEARCH_SCOPE"/>
- <enumeration value="fns:INVALID_SESSION_ID"/>
- <enumeration value="fns:INVALID_SOAP_HEADER"/>
- <enumeration value="fns:INVALID_SSO_GATEWAY_URL"/>
- <enumeration value="fns:INVALID_TYPE"/>
- <enumeration value="fns:INVALID_TYPE_FOR_OPERATION"/>
- <enumeration value="fns:LIMIT_EXCEEDED"/>
- <enumeration value="fns:LOGIN_CHALLENGE_ISSUED"/>
- <enumeration value="fns:LOGIN_CHALLENGE_PENDING"/>
- <enumeration value="fns:LOGIN_DURING_RESTRICTED_DOMAIN"/>
- <enumeration value="fns:LOGIN_DURING_RESTRICTED_TIME"/>
- <enumeration value="fns:LOGIN_MUST_USE_SECURITY_TOKEN"/>
- <enumeration value="fns:MALFORMED_ID"/>
- <enumeration value="fns:MALFORMED_QUERY"/>
- <enumeration value="fns:MALFORMED_SEARCH"/>
- <enumeration value="fns:MISSING_ARGUMENT"/>
- <enumeration value="fns:NOT_MODIFIED"/>
- <enumeration value="fns:NO_SOFTPHONE_LAYOUT"/>
- <enumeration value="fns:NUMBER_OUTSIDE_VALID_RANGE"/>
- <enumeration value="fns:OPERATION_TOO_LARGE"/>
- <enumeration value="fns:ORG_LOCKED"/>
- <enumeration value="fns:ORG_NOT_OWNED_BY_INSTANCE"/>
- <enumeration value="fns:PASSWORD_LOCKOUT"/>
- <enumeration value="fns:PORTAL_NO_ACCESS"/>
- <enumeration value="fns:QUERY_TIMEOUT"/>
- <enumeration value="fns:QUERY_TOO_COMPLICATED"/>
- <enumeration value="fns:REQUEST_LIMIT_EXCEEDED"/>
- <enumeration value="fns:REQUEST_RUNNING_TOO_LONG"/>
- <enumeration value="fns:SERVER_UNAVAILABLE"/>
- <enumeration value="fns:SSO_SERVICE_DOWN"/>
- <enumeration value="fns:TOO_MANY_APEX_REQUESTS"/>
- <enumeration value="fns:TRIAL_EXPIRED"/>
- <enumeration value="fns:UNKNOWN_EXCEPTION"/>
- <enumeration value="fns:UNSUPPORTED_API_VERSION"/>
- <enumeration value="fns:UNSUPPORTED_CLIENT"/>
- </restriction>
- </simpleType>
-
-
- <!-- Fault -->
- <complexType name="ApiFault">
- <sequence>
- <element name="exceptionCode" type="fns:ExceptionCode"/>
- <element name="exceptionMessage" type="xsd:string"/>
-
- </sequence>
- </complexType>
-
- <element name="fault" type="fns:ApiFault"/>
-
- <complexType name="ApiQueryFault">
- <complexContent>
- <extension base="fns:ApiFault">
- <sequence>
- <element name="row" type="xsd:int"/>
- <element name="column" type="xsd:int"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="LoginFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="LoginFault" type="fns:LoginFault"/>
-
- <complexType name="InvalidQueryLocatorFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidQueryLocatorFault" type="fns:InvalidQueryLocatorFault"/>
-
- <complexType name="InvalidNewPasswordFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidNewPasswordFault" type="fns:InvalidNewPasswordFault"/>
-
- <complexType name="InvalidIdFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidIdFault" type="fns:InvalidIdFault"/>
-
- <complexType name="UnexpectedErrorFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="UnexpectedErrorFault" type="fns:UnexpectedErrorFault"/>
-
- <complexType name="InvalidFieldFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidFieldFault" type="fns:InvalidFieldFault"/>
-
- <complexType name="InvalidSObjectFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidSObjectFault" type="fns:InvalidSObjectFault"/>
-
- <complexType name="MalformedQueryFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="MalformedQueryFault" type="fns:MalformedQueryFault"/>
-
- <complexType name="MalformedSearchFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="MalformedSearchFault" type="fns:MalformedSearchFault"/>
-
-
- </schema>
- </types>
-
- <!-- Header Message -->
- <message name="Header">
- <part element="tns:LoginScopeHeader" name="LoginScopeHeader"/>
- <part element="tns:SessionHeader" name="SessionHeader"/>
-
- <part element="tns:CallOptions" name="CallOptions"/>
-
- <part element="tns:QueryOptions" name="QueryOptions"/>
- <part element="tns:AssignmentRuleHeader" name="AssignmentRuleHeader"/>
- <part element="tns:AllowFieldTruncationHeader" name="AllowFieldTruncationHeader"/>
-
- <part element="tns:MruHeader" name="MruHeader"/>
- <part element="tns:EmailHeader" name="EmailHeader"/>
-
- <part element="tns:UserTerritoryDeleteHeader" name="UserTerritoryDeleteHeader"/>
-
- <part element="tns:DebuggingHeader" name="DebuggingHeader"/>
- <part element="tns:PackageVersionHeader" name="PackageVersionHeader"/>
- <part element="tns:DebuggingInfo" name="DebuggingInfo"/>
- <part element="tns:LocaleOptions" name="LocaleOptions"/>
- </message>
-
- <!-- Fault Messages -->
-
- <message name="ApiFault">
- <part name="fault" element="fns:fault"/>
- </message>
-
- <message name="LoginFault">
- <part name="fault" element="fns:LoginFault"/>
- </message>
- <message name="InvalidQueryLocatorFault">
- <part name="fault" element="fns:InvalidQueryLocatorFault"/>
- </message>
- <message name="InvalidNewPasswordFault">
- <part name="fault" element="fns:InvalidNewPasswordFault"/>
- </message>
- <message name="InvalidIdFault">
- <part name="fault" element="fns:InvalidIdFault"/>
- </message>
- <message name="UnexpectedErrorFault">
- <part name="fault" element="fns:UnexpectedErrorFault"/>
- </message>
- <message name="InvalidFieldFault">
- <part name="fault" element="fns:InvalidFieldFault"/>
- </message>
- <message name="InvalidSObjectFault">
- <part name="fault" element="fns:InvalidSObjectFault"/>
- </message>
- <message name="MalformedQueryFault">
- <part name="fault" element="fns:MalformedQueryFault"/>
- </message>
- <message name="MalformedSearchFault">
- <part name="fault" element="fns:MalformedSearchFault"/>
- </message>
-
-
- <!-- Method Messages -->
- <message name="loginRequest">
- <part element="tns:login" name="parameters"/>
- </message>
- <message name="loginResponse">
- <part element="tns:loginResponse" name="parameters"/>
- </message>
-
- <message name="describeSObjectRequest">
- <part element="tns:describeSObject" name="parameters"/>
- </message>
- <message name="describeSObjectResponse">
- <part element="tns:describeSObjectResponse" name="parameters"/>
- </message>
-
- <message name="describeSObjectsRequest">
- <part element="tns:describeSObjects" name="parameters"/>
- </message>
- <message name="describeSObjectsResponse">
- <part element="tns:describeSObjectsResponse" name="parameters"/>
- </message>
-
- <message name="describeGlobalRequest">
- <part element="tns:describeGlobal" name="parameters"/>
- </message>
- <message name="describeGlobalResponse">
- <part element="tns:describeGlobalResponse" name="parameters"/>
- </message>
-
- <message name="describeLayoutRequest">
- <part element="tns:describeLayout" name="parameters"/>
- </message>
- <message name="describeLayoutResponse">
- <part element="tns:describeLayoutResponse" name="parameters"/>
- </message>
-
- <message name="describeSoftphoneLayoutRequest">
- <part element="tns:describeSoftphoneLayout" name="parameters"/>
- </message>
- <message name="describeSoftphoneLayoutResponse">
- <part element="tns:describeSoftphoneLayoutResponse" name="parameters"/>
- </message>
-
- <message name="describeTabsRequest">
- <part element="tns:describeTabs" name="parameters"/>
- </message>
- <message name="describeTabsResponse">
- <part element="tns:describeTabsResponse" name="parameters"/>
- </message>
-
- <message name="createRequest">
- <part element="tns:create" name="parameters"/>
- </message>
- <message name="createResponse">
- <part element="tns:createResponse" name="parameters"/>
- </message>
-
- <message name="updateRequest">
- <part element="tns:update" name="parameters"/>
- </message>
- <message name="updateResponse">
- <part element="tns:updateResponse" name="parameters"/>
- </message>
-
- <message name="upsertRequest">
- <part element="tns:upsert" name="parameters"/>
- </message>
- <message name="upsertResponse">
- <part element="tns:upsertResponse" name="parameters"/>
- </message>
-
- <message name="mergeRequest">
- <part element="tns:merge" name="parameters"/>
- </message>
- <message name="mergeResponse">
- <part element="tns:mergeResponse" name="parameters"/>
- </message>
-
- <message name="deleteRequest">
- <part element="tns:delete" name="parameters"/>
- </message>
- <message name="deleteResponse">
- <part element="tns:deleteResponse" name="parameters"/>
- </message>
-
- <message name="undeleteRequest">
- <part element="tns:undelete" name="parameters"/>
- </message>
- <message name="undeleteResponse">
- <part element="tns:undeleteResponse" name="parameters"/>
- </message>
-
- <message name="emptyRecycleBinRequest">
- <part element="tns:emptyRecycleBin" name="parameters"/>
- </message>
- <message name="emptyRecycleBinResponse">
- <part element="tns:emptyRecycleBinResponse" name="parameters"/>
- </message>
-
- <message name="retrieveRequest">
- <part element="tns:retrieve" name="parameters"/>
- </message>
- <message name="retrieveResponse">
- <part element="tns:retrieveResponse" name="parameters"/>
- </message>
-
- <message name="processRequest">
- <part element="tns:process" name="parameters"/>
- </message>
- <message name="processResponse">
- <part element="tns:processResponse" name="parameters"/>
- </message>
-
- <message name="convertLeadRequest">
- <part element="tns:convertLead" name="parameters"/>
- </message>
- <message name="convertLeadResponse">
- <part element="tns:convertLeadResponse" name="parameters"/>
- </message>
-
- <message name="logoutRequest">
- <part element="tns:logout" name="parameters"/>
- </message>
- <message name="logoutResponse">
- <part element="tns:logoutResponse" name="parameters"/>
- </message>
-
- <message name="invalidateSessionsRequest">
- <part element="tns:invalidateSessions" name="parameters"/>
- </message>
- <message name="invalidateSessionsResponse">
- <part element="tns:invalidateSessionsResponse" name="parameters"/>
- </message>
-
- <message name="getDeletedRequest">
- <part element="tns:getDeleted" name="parameters"/>
- </message>
- <message name="getDeletedResponse">
- <part element="tns:getDeletedResponse" name="parameters"/>
- </message>
-
- <message name="getUpdatedRequest">
- <part element="tns:getUpdated" name="parameters"/>
- </message>
- <message name="getUpdatedResponse">
- <part element="tns:getUpdatedResponse" name="parameters"/>
- </message>
-
- <message name="queryRequest">
- <part element="tns:query" name="parameters"/>
- </message>
- <message name="queryResponse">
- <part element="tns:queryResponse" name="parameters"/>
- </message>
-
- <message name="queryAllRequest">
- <part element="tns:queryAll" name="parameters"/>
- </message>
- <message name="queryAllResponse">
- <part element="tns:queryAllResponse" name="parameters"/>
- </message>
-
- <message name="queryMoreRequest">
- <part element="tns:queryMore" name="parameters"/>
- </message>
- <message name="queryMoreResponse">
- <part element="tns:queryMoreResponse" name="parameters"/>
- </message>
-
- <message name="searchRequest">
- <part element="tns:search" name="parameters"/>
- </message>
- <message name="searchResponse">
- <part element="tns:searchResponse" name="parameters"/>
- </message>
-
- <message name="getServerTimestampRequest">
- <part element="tns:getServerTimestamp" name="parameters"/>
- </message>
- <message name="getServerTimestampResponse">
- <part element="tns:getServerTimestampResponse" name="parameters"/>
- </message>
-
- <message name="setPasswordRequest">
- <part element="tns:setPassword" name="parameters"/>
- </message>
- <message name="setPasswordResponse">
- <part element="tns:setPasswordResponse" name="parameters"/>
- </message>
-
- <message name="resetPasswordRequest">
- <part element="tns:resetPassword" name="parameters"/>
- </message>
- <message name="resetPasswordResponse">
- <part element="tns:resetPasswordResponse" name="parameters"/>
- </message>
-
- <message name="getUserInfoRequest">
- <part element="tns:getUserInfo" name="parameters"/>
- </message>
- <message name="getUserInfoResponse">
- <part element="tns:getUserInfoResponse" name="parameters"/>
- </message>
-
- <message name="sendEmailRequest">
- <part element="tns:sendEmail" name="parameters"/>
- </message>
- <message name="sendEmailResponse">
- <part element="tns:sendEmailResponse" name="parameters"/>
- </message>
-
-
-
- <!-- Soap PortType -->
- <portType name="Soap">
- <operation name="login">
- <documentation>Login to the Salesforce.com SOAP Api</documentation>
- <input message="tns:loginRequest"/>
- <output message="tns:loginResponse"/>
- <fault message="tns:LoginFault" name="LoginFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="describeSObject">
- <documentation>Describe an sObject</documentation>
- <input message="tns:describeSObjectRequest"/>
- <output message="tns:describeSObjectResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeSObjects">
- <documentation>Describe a number sObjects</documentation>
- <input message="tns:describeSObjectsRequest"/>
- <output message="tns:describeSObjectsResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeGlobal">
- <documentation>Describe the Global state</documentation>
- <input message="tns:describeGlobalRequest"/>
- <output message="tns:describeGlobalResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeLayout">
- <documentation>Describe the layout of an sObject</documentation>
- <input message="tns:describeLayoutRequest"/>
- <output message="tns:describeLayoutResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="describeSoftphoneLayout">
- <documentation>Describe the layout of the SoftPhone</documentation>
- <input message="tns:describeSoftphoneLayoutRequest"/>
- <output message="tns:describeSoftphoneLayoutResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeTabs">
- <documentation>Describe the tabs that appear on a users page</documentation>
- <input message="tns:describeTabsRequest"/>
- <output message="tns:describeTabsResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="create">
- <documentation>Create a set of new sObjects</documentation>
- <input message="tns:createRequest"/>
- <output message="tns:createResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="update">
- <documentation>Update a set of sObjects</documentation>
- <input message="tns:updateRequest"/>
- <output message="tns:updateResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="upsert">
- <documentation>Update or insert a set of sObjects based on object id</documentation>
- <input message="tns:upsertRequest"/>
- <output message="tns:upsertResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="merge">
- <documentation>Merge and update a set of sObjects based on object id</documentation>
- <input message="tns:mergeRequest"/>
- <output message="tns:mergeResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="delete">
- <documentation>Delete a set of sObjects</documentation>
- <input message="tns:deleteRequest"/>
- <output message="tns:deleteResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="undelete">
- <documentation>Undelete a set of sObjects</documentation>
- <input message="tns:undeleteRequest"/>
- <output message="tns:undeleteResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="emptyRecycleBin">
- <documentation>Empty a set of sObjects from the recycle bin</documentation>
- <input message="tns:emptyRecycleBinRequest"/>
- <output message="tns:emptyRecycleBinResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="retrieve">
- <documentation>Get a set of sObjects</documentation>
- <input message="tns:retrieveRequest"/>
- <output message="tns:retrieveResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="process">
- <documentation>Submit an entity to a workflow process or process a workitem</documentation>
- <input message="tns:processRequest"/>
- <output message="tns:processResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="convertLead">
- <documentation>convert a set of leads</documentation>
- <input message="tns:convertLeadRequest"/>
- <output message="tns:convertLeadResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="logout">
- <documentation>Logout the current user, invalidating the current session.</documentation>
- <input message="tns:logoutRequest"/>
- <output message="tns:logoutResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="invalidateSessions">
- <documentation>Logs out and invalidates session ids</documentation>
- <input message="tns:invalidateSessionsRequest"/>
- <output message="tns:invalidateSessionsResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getDeleted">
- <documentation>Get the IDs for deleted sObjects</documentation>
- <input message="tns:getDeletedRequest"/>
- <output message="tns:getDeletedResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getUpdated">
- <documentation>Get the IDs for updated sObjects</documentation>
- <input message="tns:getUpdatedRequest"/>
- <output message="tns:getUpdatedResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="query">
- <documentation>Create a Query Cursor</documentation>
- <input message="tns:queryRequest"/>
- <output message="tns:queryResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
- </operation>
-
- <operation name="queryAll">
- <documentation>Create a Query Cursor, including deleted sObjects</documentation>
- <input message="tns:queryAllRequest"/>
- <output message="tns:queryAllResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
- </operation>
-
- <operation name="queryMore">
- <documentation>Gets the next batch of sObjects from a query</documentation>
- <input message="tns:queryMoreRequest"/>
- <output message="tns:queryMoreResponse"/>
- <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="search">
- <documentation>Search for sObjects</documentation>
- <input message="tns:searchRequest"/>
- <output message="tns:searchResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedSearchFault" name="MalformedSearchFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getServerTimestamp">
- <documentation>Gets server timestamp</documentation>
- <input message="tns:getServerTimestampRequest"/>
- <output message="tns:getServerTimestampResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="setPassword">
- <documentation>Set a user's password</documentation>
- <input message="tns:setPasswordRequest"/>
- <output message="tns:setPasswordResponse"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidNewPasswordFault" name="InvalidNewPasswordFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="resetPassword">
- <documentation>Reset a user's password</documentation>
- <input message="tns:resetPasswordRequest"/>
- <output message="tns:resetPasswordResponse"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getUserInfo">
- <documentation>Returns standard information relevant to the current user</documentation>
- <input message="tns:getUserInfoRequest"/>
- <output message="tns:getUserInfoResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="sendEmail">
- <documentation>Send outbound email</documentation>
- <input message="tns:sendEmailRequest"/>
- <output message="tns:sendEmailResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- </portType>
-
- <!-- Soap Binding -->
- <binding name="SoapBinding" type="tns:Soap">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="login">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="LoginFault">
- <soap:fault name="LoginFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeSObject">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeSObjects">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeGlobal">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeLayout">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeSoftphoneLayout">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeTabs">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="create">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="update">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="upsert">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="merge">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="delete">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:header use="literal" message="tns:Header" part="UserTerritoryDeleteHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="undelete">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="emptyRecycleBin">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="retrieve">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedQueryFault">
- <soap:fault name="MalformedQueryFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="process">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="convertLead">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="logout">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="invalidateSessions">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getDeleted">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getUpdated">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="query">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedQueryFault">
- <soap:fault name="MalformedQueryFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidQueryLocatorFault">
- <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="queryAll">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedQueryFault">
- <soap:fault name="MalformedQueryFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidQueryLocatorFault">
- <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="queryMore">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidQueryLocatorFault">
- <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="search">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedSearchFault">
- <soap:fault name="MalformedSearchFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getServerTimestamp">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="setPassword">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidNewPasswordFault">
- <soap:fault name="InvalidNewPasswordFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="resetPassword">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getUserInfo">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="sendEmail">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
-
- </binding>
-
- <!-- Soap Service Endpoint -->
- <service name="SforceService">
- <documentation>Sforce SOAP API</documentation>
- <port binding="tns:SoapBinding" name="Soap">
- <soap:address location="https://www.salesforce.com/services/Soap/u/17.0"/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: branches/as7/connectors/salesforce-api/src/main/resources/partner_v22.wsdl (from rev 3597, trunk/connectors/salesforce-api/src/main/resources/partner_v22.wsdl)
===================================================================
--- branches/as7/connectors/salesforce-api/src/main/resources/partner_v22.wsdl (rev 0)
+++ branches/as7/connectors/salesforce-api/src/main/resources/partner_v22.wsdl 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,3164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--
+Salesforce.com Partner Web Services API Version 22.0
+Generated on 2011-08-31 16:53:00 +0000.
+
+Copyright 1999-2011 salesforce.com, inc.
+All Rights Reserved
+-->
+
+<definitions targetNamespace="urn:partner.soap.sforce.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:fns="urn:fault.partner.soap.sforce.com"
+ xmlns:tns="urn:partner.soap.sforce.com"
+ xmlns:ens="urn:sobject.partner.soap.sforce.com">
+ <types>
+
+ <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.partner.soap.sforce.com">
+
+ <import namespace="urn:partner.soap.sforce.com"/>
+
+
+ <!-- Dynamic sObject -->
+ <complexType name="sObject">
+ <sequence>
+ <element name="type" type="xsd:string"/>
+ <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="Id" type="tns:ID" nillable="true" />
+ <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:partner.soap.sforce.com">
+
+ <import namespace="urn:sobject.partner.soap.sforce.com"/>
+
+ <!-- Our simple ID Type -->
+ <simpleType name="ID">
+ <restriction base="xsd:string">
+ <length value="18"/>
+ <pattern value='[a-zA-Z0-9]{18}'/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="QueryLocator">
+ <restriction base="xsd:string"/>
+ </simpleType>
+
+ <!-- Shared Result Types -->
+ <complexType name="QueryResult">
+ <sequence>
+ <element name="done" type="xsd:boolean"/>
+ <element name="queryLocator" type="tns:QueryLocator" nillable="true"/>
+ <element name="records" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="size" type="xsd:int"/>
+ </sequence>
+ </complexType>
+
+
+
+ <!-- Search Result -->
+ <complexType name="SearchResult">
+ <sequence>
+ <element name="searchRecords" minOccurs="0" maxOccurs="unbounded" type="tns:SearchRecord"/>
+ <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SearchRecord">
+ <sequence>
+ <element name="record" type="ens:sObject"/>
+ </sequence>
+ </complexType>
+
+ <!-- GetUpdated Result -->
+ <complexType name="GetUpdatedResult">
+ <sequence>
+ <element name="ids" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
+ <element name="latestDateCovered" type="xsd:dateTime"/>
+ <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <!-- GetDeleted Result -->
+ <complexType name="GetDeletedResult">
+ <sequence>
+ <element name="deletedRecords" minOccurs="0" maxOccurs="unbounded" type="tns:DeletedRecord"/>
+ <element name="earliestDateAvailable" type="xsd:dateTime"/>
+ <element name="latestDateCovered" type="xsd:dateTime"/>
+ <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DeletedRecord">
+ <sequence>
+ <element name="deletedDate" type="xsd:dateTime"/>
+ <element name="id" type="tns:ID"/>
+ </sequence>
+ </complexType>
+
+
+ <complexType name="GetServerTimestampResult">
+ <sequence>
+ <element name="timestamp" type="xsd:dateTime"/>
+ </sequence>
+ </complexType>
+
+
+ <!-- InvalidateSessions Result -->
+ <complexType name="InvalidateSessionsResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SetPasswordResult">
+ </complexType>
+
+ <complexType name="ResetPasswordResult">
+ <sequence>
+ <element name="password" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="GetUserInfoResult">
+ <sequence>
+ <element name="accessibilityMode" type="xsd:boolean"/>
+ <element name="currencySymbol" type="xsd:string" nillable="true"/>
+ <element name="orgAttachmentFileSizeLimit" type="xsd:int"/>
+ <element name="orgDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
+ <element name="orgDisallowHtmlAttachments" type="xsd:boolean"/>
+ <element name="orgHasPersonAccounts" type="xsd:boolean"/>
+ <element name="organizationId" type="tns:ID"/>
+ <element name="organizationMultiCurrency" type="xsd:boolean"/>
+ <element name="organizationName" type="xsd:string"/>
+ <element name="profileId" type="tns:ID"/>
+ <element name="roleId" type="tns:ID" nillable="true"/>
+ <element name="sessionSecondsValid" type="xsd:int"/>
+ <element name="userDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
+ <element name="userEmail" type="xsd:string"/>
+ <element name="userFullName" type="xsd:string"/>
+ <element name="userId" type="tns:ID"/>
+ <element name="userLanguage" type="xsd:string"/>
+ <element name="userLocale" type="xsd:string"/>
+ <element name="userName" type="xsd:string"/>
+ <element name="userTimeZone" type="xsd:string"/>
+ <element name="userType" type="xsd:string"/>
+ <element name="userUiSkin" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LoginResult">
+ <sequence>
+ <element name="metadataServerUrl" type="xsd:string" nillable="true"/>
+ <element name="passwordExpired" type="xsd:boolean" />
+ <element name="sandbox" type="xsd:boolean"/>
+ <element name="serverUrl" type="xsd:string" nillable="true"/>
+ <element name="sessionId" type="xsd:string" nillable="true"/>
+
+ <element name="userId" type="tns:ID" nillable="true"/>
+ <element name="userInfo" type="tns:GetUserInfoResult" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="StatusCode">
+ <restriction base="xsd:string">
+ <enumeration value="ALL_OR_NONE_OPERATION_ROLLED_BACK"/>
+ <enumeration value="ALREADY_IN_PROCESS"/>
+ <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
+ <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
+ <enumeration value="BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED"/>
+ <enumeration value="CANNOT_CASCADE_PRODUCT_ACTIVE"/>
+ <enumeration value="CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD"/>
+ <enumeration value="CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE"/>
+ <enumeration value="CANNOT_DEACTIVATE_DIVISION"/>
+ <enumeration value="CANNOT_DELETE_LAST_DATED_CONVERSION_RATE"/>
+ <enumeration value="CANNOT_DELETE_MANAGED_OBJECT"/>
+ <enumeration value="CANNOT_DISABLE_LAST_ADMIN"/>
+ <enumeration value="CANNOT_ENABLE_IP_RESTRICT_REQUESTS"/>
+ <enumeration value="CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"/>
+ <enumeration value="CANNOT_MODIFY_MANAGED_OBJECT"/>
+ <enumeration value="CANNOT_RENAME_APEX_REFERENCED_FIELD"/>
+ <enumeration value="CANNOT_RENAME_APEX_REFERENCED_OBJECT"/>
+ <enumeration value="CANNOT_REPARENT_RECORD"/>
+ <enumeration value="CANNOT_UPDATE_CONVERTED_LEAD"/>
+ <enumeration value="CANT_DISABLE_CORP_CURRENCY"/>
+ <enumeration value="CANT_UNSET_CORP_CURRENCY"/>
+ <enumeration value="CHILD_SHARE_FAILS_PARENT"/>
+ <enumeration value="CIRCULAR_DEPENDENCY"/>
+ <enumeration value="COMMUNITY_NOT_ACCESSIBLE"/>
+ <enumeration value="CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED"/>
+ <enumeration value="CUSTOM_ENTITY_OR_FIELD_LIMIT"/>
+ <enumeration value="CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED"/>
+ <enumeration value="CUSTOM_INDEX_EXISTS"/>
+ <enumeration value="CUSTOM_LINK_LIMIT_EXCEEDED"/>
+ <enumeration value="CUSTOM_TAB_LIMIT_EXCEEDED"/>
+ <enumeration value="DELETE_FAILED"/>
+ <enumeration value="DELETE_REQUIRED_ON_CASCADE"/>
+ <enumeration value="DEPENDENCY_EXISTS"/>
+ <enumeration value="DUPLICATE_CASE_SOLUTION"/>
+ <enumeration value="DUPLICATE_COMM_NICKNAME"/>
+ <enumeration value="DUPLICATE_CUSTOM_ENTITY_DEFINITION"/>
+ <enumeration value="DUPLICATE_CUSTOM_TAB_MOTIF"/>
+ <enumeration value="DUPLICATE_DEVELOPER_NAME"/>
+ <enumeration value="DUPLICATE_EXTERNAL_ID"/>
+ <enumeration value="DUPLICATE_MASTER_LABEL"/>
+ <enumeration value="DUPLICATE_SENDER_DISPLAY_NAME"/>
+ <enumeration value="DUPLICATE_USERNAME"/>
+ <enumeration value="DUPLICATE_VALUE"/>
+ <enumeration value="EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR"/>
+ <enumeration value="EMPTY_SCONTROL_FILE_NAME"/>
+ <enumeration value="ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE"/>
+ <enumeration value="ENTITY_IS_ARCHIVED"/>
+ <enumeration value="ENTITY_IS_DELETED"/>
+ <enumeration value="ENTITY_IS_LOCKED"/>
+ <enumeration value="ERROR_IN_MAILER"/>
+ <enumeration value="FAILED_ACTIVATION"/>
+ <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
+ <enumeration value="FIELD_FILTER_VALIDATION_EXCEPTION"/>
+ <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
+ <enumeration value="FILTERED_LOOKUP_LIMIT_EXCEEDED"/>
+ <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
+ <enumeration value="IMAGE_TOO_LARGE"/>
+ <enumeration value="INACTIVE_OWNER_OR_USER"/>
+ <enumeration value="INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"/>
+ <enumeration value="INSUFFICIENT_ACCESS_OR_READONLY"/>
+ <enumeration value="INVALID_ACCESS_LEVEL"/>
+ <enumeration value="INVALID_ARGUMENT_TYPE"/>
+ <enumeration value="INVALID_ASSIGNEE_TYPE"/>
+ <enumeration value="INVALID_ASSIGNMENT_RULE"/>
+ <enumeration value="INVALID_BATCH_OPERATION"/>
+ <enumeration value="INVALID_CONTENT_TYPE"/>
+ <enumeration value="INVALID_CREDIT_CARD_INFO"/>
+ <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
+ <enumeration value="INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD"/>
+ <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
+ <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
+ <enumeration value="INVALID_CURRENCY_ISO"/>
+ <enumeration value="INVALID_DATA_CATEGORY_GROUP_REFERENCE"/>
+ <enumeration value="INVALID_DATA_URI"/>
+ <enumeration value="INVALID_EMAIL_ADDRESS"/>
+ <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
+ <enumeration value="INVALID_FIELD"/>
+ <enumeration value="INVALID_FIELD_FOR_INSERT_UPDATE"/>
+ <enumeration value="INVALID_FIELD_WHEN_USING_TEMPLATE"/>
+ <enumeration value="INVALID_FILTER_ACTION"/>
+ <enumeration value="INVALID_GOOGLE_DOCS_URL"/>
+ <enumeration value="INVALID_ID_FIELD"/>
+ <enumeration value="INVALID_INET_ADDRESS"/>
+ <enumeration value="INVALID_LINEITEM_CLONE_STATE"/>
+ <enumeration value="INVALID_MASTER_OR_TRANSLATED_SOLUTION"/>
+ <enumeration value="INVALID_MESSAGE_ID_REFERENCE"/>
+ <enumeration value="INVALID_OPERATION"/>
+ <enumeration value="INVALID_OPERATOR"/>
+ <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
+ <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
+ <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
+ <enumeration value="INVALID_READ_ONLY_USER_DML"/>
+ <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
+ <enumeration value="INVALID_SESSION_ID"/>
+ <enumeration value="INVALID_SETUP_OWNER"/>
+ <enumeration value="INVALID_STATUS"/>
+ <enumeration value="INVALID_TYPE"/>
+ <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+ <enumeration value="INVALID_TYPE_ON_FIELD_IN_RECORD"/>
+ <enumeration value="IP_RANGE_LIMIT_EXCEEDED"/>
+ <enumeration value="LICENSE_LIMIT_EXCEEDED"/>
+ <enumeration value="LIGHT_PORTAL_USER_EXCEPTION"/>
+ <enumeration value="LIMIT_EXCEEDED"/>
+ <enumeration value="MALFORMED_ID"/>
+ <enumeration value="MANAGER_NOT_DEFINED"/>
+ <enumeration value="MASSMAIL_RETRY_LIMIT_EXCEEDED"/>
+ <enumeration value="MASS_MAIL_LIMIT_EXCEEDED"/>
+ <enumeration value="MAXIMUM_CCEMAILS_EXCEEDED"/>
+ <enumeration value="MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED"/>
+ <enumeration value="MAXIMUM_HIERARCHY_LEVELS_REACHED"/>
+ <enumeration value="MAXIMUM_SIZE_OF_ATTACHMENT"/>
+ <enumeration value="MAXIMUM_SIZE_OF_DOCUMENT"/>
+ <enumeration value="MAX_ACTIONS_PER_RULE_EXCEEDED"/>
+ <enumeration value="MAX_ACTIVE_RULES_EXCEEDED"/>
+ <enumeration value="MAX_APPROVAL_STEPS_EXCEEDED"/>
+ <enumeration value="MAX_FORMULAS_PER_RULE_EXCEEDED"/>
+ <enumeration value="MAX_RULES_EXCEEDED"/>
+ <enumeration value="MAX_RULE_ENTRIES_EXCEEDED"/>
+ <enumeration value="MAX_TASK_DESCRIPTION_EXCEEEDED"/>
+ <enumeration value="MAX_TM_RULES_EXCEEDED"/>
+ <enumeration value="MAX_TM_RULE_ITEMS_EXCEEDED"/>
+ <enumeration value="MERGE_FAILED"/>
+ <enumeration value="MISSING_ARGUMENT"/>
+ <enumeration value="MIXED_DML_OPERATION"/>
+ <enumeration value="NONUNIQUE_SHIPPING_ADDRESS"/>
+ <enumeration value="NO_APPLICABLE_PROCESS"/>
+ <enumeration value="NO_ATTACHMENT_PERMISSION"/>
+ <enumeration value="NO_INACTIVE_DIVISION_MEMBERS"/>
+ <enumeration value="NO_MASS_MAIL_PERMISSION"/>
+ <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
+ <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
+ <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
+ <enumeration value="OP_WITH_INVALID_USER_TYPE_EXCEPTION"/>
+ <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
+ <enumeration value="PORTAL_NO_ACCESS"/>
+ <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
+ <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
+ <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
+ <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+ <enumeration value="REQUIRED_FEATURE_MISSING"/>
+ <enumeration value="REQUIRED_FIELD_MISSING"/>
+ <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
+ <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
+ <enumeration value="SINGLE_EMAIL_LIMIT_EXCEEDED"/>
+ <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
+ <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
+ <enumeration value="STRING_TOO_LONG"/>
+ <enumeration value="TABSET_LIMIT_EXCEEDED"/>
+ <enumeration value="TEMPLATE_NOT_ACTIVE"/>
+ <enumeration value="TERRITORY_REALIGN_IN_PROGRESS"/>
+ <enumeration value="TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET"/>
+ <enumeration value="TOO_MANY_APEX_REQUESTS"/>
+ <enumeration value="TOO_MANY_ENUM_VALUE"/>
+ <enumeration value="TRANSFER_REQUIRES_READ"/>
+ <enumeration value="UNABLE_TO_LOCK_ROW"/>
+ <enumeration value="UNAVAILABLE_RECORDTYPE_EXCEPTION"/>
+ <enumeration value="UNDELETE_FAILED"/>
+ <enumeration value="UNKNOWN_EXCEPTION"/>
+ <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
+ <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
+ <enumeration value="UNVERIFIED_SENDER_ADDRESS"/>
+ <enumeration value="USER_OWNS_PORTAL_ACCOUNT_EXCEPTION"/>
+ <enumeration value="USER_WITH_APEX_SHARES_EXCEPTION"/>
+ <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
+ <enumeration value="WRONG_CONTROLLER_TYPE"/>
+ </restriction>
+ </simpleType>
+
+
+ <complexType name="Error">
+ <sequence>
+ <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="message" type="xsd:string"/>
+ <element name="statusCode" type="tns:StatusCode"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SendEmailError">
+ <sequence>
+ <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="message" type="xsd:string"/>
+ <element name="statusCode" type="tns:StatusCode"/>
+ <element name="targetObjectId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SaveResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UpsertResult">
+ <sequence>
+ <element name="created" type="xsd:boolean"/>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MergeRequest">
+ <sequence>
+ <element name="masterRecord" type="ens:sObject"/>
+ <element name="recordToMergeIds" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MergeResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="mergedRecordIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="success" type="xsd:boolean"/>
+ <element name="updatedRelatedIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ProcessRequest">
+ <sequence>
+ <element name="comments" type="xsd:string" nillable="true"/>
+ <element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ProcessSubmitRequest">
+ <complexContent>
+ <extension base="tns:ProcessRequest">
+ <sequence>
+ <element name="objectId" type="tns:ID"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ProcessWorkitemRequest">
+ <complexContent>
+ <extension base="tns:ProcessRequest">
+ <sequence>
+ <element name="action" type="xsd:string"/>
+ <element name="workitemId" type="tns:ID"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+
+
+ <complexType name="ProcessResult">
+ <sequence>
+ <element name="actorIds" type="tns:ID" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="entityId" type="tns:ID" nillable="true"/>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="instanceId" type="tns:ID" nillable="true"/>
+ <element name="instanceStatus" type="xsd:string" nillable="true"/>
+ <element name="newWorkitemIds" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+
+
+
+
+ <complexType name="DeleteResult">
+ <sequence>
+ <element name="errors" type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UndeleteResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="EmptyRecycleBinResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LeadConvert">
+ <sequence>
+ <element name="accountId" type="tns:ID" nillable="true"/>
+ <element name="contactId" type="tns:ID" nillable="true"/>
+ <element name="convertedStatus" type="xsd:string"/>
+ <element name="doNotCreateOpportunity" type="xsd:boolean"/>
+ <element name="leadId" type="tns:ID"/>
+ <element name="opportunityName" type="xsd:string" nillable="true"/>
+ <element name="overwriteLeadSource" type="xsd:boolean"/>
+ <element name="ownerId" type="tns:ID" nillable="true"/>
+ <element name="sendNotificationEmail" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LeadConvertResult">
+ <sequence>
+ <element name="accountId" type="tns:ID" nillable="true"/>
+ <element name="contactId" type="tns:ID" nillable="true"/>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="leadId" type="tns:ID" nillable="true"/>
+ <element name="opportunityId" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSObjectResult">
+ <sequence>
+ <element name="activateable" type="xsd:boolean"/>
+ <element name="childRelationships" type="tns:ChildRelationship" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="createable" type="xsd:boolean"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="customSetting" type="xsd:boolean"/>
+ <element name="deletable" type="xsd:boolean"/>
+ <element name="deprecatedAndHidden" type="xsd:boolean"/>
+ <element name="feedEnabled" type="xsd:boolean"/>
+ <element name="fields" type="tns:Field" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="keyPrefix" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="labelPlural" type="xsd:string"/>
+ <element name="layoutable" type="xsd:boolean"/>
+ <element name="mergeable" type="xsd:boolean"/>
+ <element name="name" type="xsd:string"/>
+ <element name="queryable" type="xsd:boolean"/>
+ <element name="recordTypeInfos" type="tns:RecordTypeInfo" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="replicateable" type="xsd:boolean"/>
+ <element name="retrieveable" type="xsd:boolean"/>
+ <element name="searchable" type="xsd:boolean" />
+ <element name="triggerable" type="xsd:boolean" minOccurs="0"/>
+ <element name="undeletable" type="xsd:boolean"/>
+ <element name="updateable" type="xsd:boolean"/>
+ <element name="urlDetail" type="xsd:string" nillable="true"/>
+ <element name="urlEdit" type="xsd:string" nillable="true"/>
+ <element name="urlNew" type="xsd:string" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <!-- this is a subset of properties for each SObject that is returned by the describeGlobal call -->
+ <complexType name="DescribeGlobalSObjectResult">
+ <sequence>
+ <element name="activateable" type="xsd:boolean"/>
+ <element name="createable" type="xsd:boolean"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="customSetting" type="xsd:boolean"/>
+ <element name="deletable" type="xsd:boolean"/>
+ <element name="deprecatedAndHidden" type="xsd:boolean"/>
+ <element name="feedEnabled" type="xsd:boolean"/>
+ <element name="keyPrefix" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="labelPlural" type="xsd:string"/>
+ <element name="layoutable" type="xsd:boolean"/>
+ <element name="mergeable" type="xsd:boolean"/>
+ <element name="name" type="xsd:string"/>
+ <element name="queryable" type="xsd:boolean"/>
+ <element name="replicateable" type="xsd:boolean"/>
+ <element name="retrieveable" type="xsd:boolean"/>
+ <element name="searchable" type="xsd:boolean"/>
+ <element name="triggerable" type="xsd:boolean"/>
+ <element name="undeletable" type="xsd:boolean"/>
+ <element name="updateable" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ChildRelationship">
+ <sequence>
+ <element name="cascadeDelete" type="xsd:boolean"/>
+ <element name="childSObject" type="xsd:string"/>
+ <element name="deprecatedAndHidden" type="xsd:boolean"/>
+ <element name="field" type="xsd:string"/>
+ <element name="relationshipName" type="xsd:string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeGlobalResult">
+ <sequence>
+ <element name="encoding" type="xsd:string" nillable="true"/>
+ <element name="maxBatchSize" type="xsd:int"/>
+ <element name="sobjects" type="tns:DescribeGlobalSObjectResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="fieldType">
+ <restriction base="xsd:string">
+ <enumeration value="string"/>
+ <enumeration value="picklist"/>
+ <enumeration value="multipicklist"/>
+ <enumeration value="combobox"/>
+ <enumeration value="reference"/>
+ <enumeration value="base64"/>
+ <enumeration value="boolean"/>
+ <enumeration value="currency"/>
+ <enumeration value="textarea"/>
+ <enumeration value="int"/>
+ <enumeration value="double"/>
+ <enumeration value="percent"/>
+ <enumeration value="phone"/>
+ <enumeration value="id"/>
+ <enumeration value="date"/>
+ <enumeration value="datetime"/>
+ <enumeration value="time"/>
+ <enumeration value="url"/>
+ <enumeration value="email"/>
+ <enumeration value="encryptedstring"/>
+ <enumeration value="datacategorygroupreference"/>
+ <enumeration value="anyType"/> <!-- can be string, picklist, reference, boolean, currency, int, double, percent, id, date, datetime, url, email -->
+ </restriction>
+ </simpleType>
+
+ <simpleType name="soapType">
+ <restriction base="xsd:string">
+ <enumeration value="tns:ID"/>
+ <enumeration value="xsd:base64Binary"/>
+ <enumeration value="xsd:boolean"/>
+ <enumeration value="xsd:double"/>
+ <enumeration value="xsd:int"/>
+ <enumeration value="xsd:string"/>
+ <enumeration value="xsd:date"/>
+ <enumeration value="xsd:dateTime"/>
+ <enumeration value="xsd:time"/>
+ <enumeration value="xsd:anyType"/> <!-- can be id, booolean, double, int, string, date, dateTime -->
+ </restriction>
+ </simpleType>
+
+ <complexType name="Field">
+ <sequence>
+ <element name="autoNumber" type="xsd:boolean"/>
+ <element name="byteLength" type="xsd:int"/>
+ <element name="calculated" type="xsd:boolean"/>
+ <element name="calculatedFormula" type="xsd:string" minOccurs="0"/>
+ <element name="caseSensitive" type="xsd:boolean"/>
+ <element name="controllerName" type="xsd:string" minOccurs="0"/>
+ <element name="createable" type="xsd:boolean"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="defaultValueFormula" type="xsd:string" minOccurs="0"/>
+ <element name="defaultedOnCreate" type="xsd:boolean"/>
+ <element name="dependentPicklist" type="xsd:boolean" minOccurs="0"/>
+ <element name="deprecatedAndHidden" type="xsd:boolean"/>
+ <element name="digits" type="xsd:int"/>
+ <element name="externalId" type="xsd:boolean" minOccurs="0"/>
+ <element name="filterable" type="xsd:boolean"/>
+ <element name="groupable" type="xsd:boolean"/>
+ <element name="htmlFormatted" type="xsd:boolean" minOccurs="0"/>
+ <element name="idLookup" type="xsd:boolean"/>
+ <element name="inlineHelpText" type="xsd:string" minOccurs="0"/>
+ <element name="label" type="xsd:string"/>
+ <element name="length" type="xsd:int"/>
+ <element name="name" type="xsd:string"/>
+ <element name="nameField" type="xsd:boolean"/>
+ <element name="namePointing" type="xsd:boolean" minOccurs="0"/>
+ <element name="nillable" type="xsd:boolean"/>
+ <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="precision" type="xsd:int"/>
+ <element name="referenceTo" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="relationshipName" type="xsd:string" minOccurs="0"/>
+ <element name="relationshipOrder" type="xsd:int" minOccurs="0"/>
+ <element name="restrictedPicklist" type="xsd:boolean"/>
+ <element name="scale" type="xsd:int"/>
+ <element name="soapType" type="tns:soapType"/>
+ <element name="sortable" type="xsd:boolean" minOccurs="0"/>
+ <element name="type" type="tns:fieldType"/>
+ <element name="unique" type="xsd:boolean"/>
+ <element name="updateable" type="xsd:boolean"/>
+ <element name="writeRequiresMasterRead" type="xsd:boolean" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PicklistEntry">
+ <sequence>
+ <element name="active" type="xsd:boolean"/>
+ <element name="defaultValue" type="xsd:boolean"/>
+ <element name="label" type="xsd:string" nillable="true"/>
+ <element name="validFor" type="xsd:base64Binary" minOccurs="0"/>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeDataCategoryGroupResult">
+ <sequence>
+ <element name="categoryCount" type="xsd:int"/>
+ <element name="description" type="xsd:string"/>
+ <element name="label" type="xsd:string"/>
+ <element name="name" type="xsd:string"/>
+ <element name="sobject" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeDataCategoryGroupStructureResult">
+ <sequence>
+ <element name="description" type="xsd:string"/>
+ <element name="label" type="xsd:string"/>
+ <element name="name" type="xsd:string"/>
+ <element name="sobject" type="xsd:string"/>
+ <element name="topCategories" type="tns:DataCategory" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DataCategoryGroupSobjectTypePair">
+ <sequence>
+ <element name="dataCategoryGroupName" type="xsd:string"/>
+ <element name="sobject" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DataCategory">
+ <sequence>
+ <element name="childCategories" type="tns:DataCategory" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="label" type="xsd:string"/>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutResult">
+ <sequence>
+ <element name="callTypes" type="tns:DescribeSoftphoneLayoutCallType" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID"/>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutCallType">
+ <sequence>
+ <element name="infoFields" type="tns:DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
+ <element name="name" type="xsd:string"/>
+ <element name="screenPopOptions" type="tns:DescribeSoftphoneScreenPopOption" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="screenPopsOpenWithin" type="xsd:string" minOccurs="0"/>
+ <element name="sections" type="tns:DescribeSoftphoneLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneScreenPopOption">
+ <sequence>
+ <element name="matchType" type="xsd:string"/>
+ <element name="screenPopData" type="xsd:string"/>
+ <element name="screenPopType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutInfoField">
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutSection">
+ <sequence>
+ <element name="entityApiName" type="xsd:string"/>
+ <element name="items" type="tns:DescribeSoftphoneLayoutItem" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutItem">
+ <sequence>
+ <element name="itemApiName" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutResult">
+ <sequence>
+ <element name="layouts" type="tns:DescribeLayout" maxOccurs="unbounded"/>
+ <element name="recordTypeMappings" type="tns:RecordTypeMapping" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="recordTypeSelectorRequired" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayout">
+ <sequence>
+ <element name="buttonLayoutSection" type="tns:DescribeLayoutButtonSection" minOccurs="0"/>
+ <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="editLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID"/>
+
+
+ <element name="relatedLists" type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutSection">
+ <sequence>
+ <element name="columns" type="xsd:int"/>
+ <element name="heading" type="xsd:string"/>
+ <element name="layoutRows" type="tns:DescribeLayoutRow" maxOccurs="unbounded"/>
+ <element name="rows" type="xsd:int"/>
+ <element name="useCollapsibleSection" type="xsd:boolean"/>
+ <element name="useHeading" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutButtonSection">
+ <sequence>
+ <element name="detailButtons" type="tns:DescribeLayoutButton" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutRow">
+ <sequence>
+ <element name="layoutItems" type="tns:DescribeLayoutItem" maxOccurs="unbounded"/>
+ <element name="numItems" type="xsd:int"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutItem">
+ <sequence>
+ <element name="editable" type="xsd:boolean"/>
+ <element name="label" type="xsd:string" nillable="true"/>
+ <element name="layoutComponents" type="tns:DescribeLayoutComponent" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="placeholder" type="xsd:boolean"/>
+ <element name="required" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutButton">
+ <sequence>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="label" type="xsd:string" nillable="true"/>
+ <element name="name" type="xsd:string" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutComponent">
+ <sequence>
+ <element name="displayLines" type="xsd:int"/>
+ <element name="tabOrder" type="xsd:int"/>
+ <element name="type" type="tns:layoutComponentType"/>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="layoutComponentType">
+ <restriction base="xsd:string">
+ <enumeration value="Field"/>
+ <enumeration value="Separator"/>
+ <enumeration value="SControl"/>
+ <enumeration value="EmptySpace"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="RecordTypeInfo">
+ <sequence>
+ <element name="available" type="xsd:boolean"/>
+ <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
+ <element name="name" type="xsd:string"/>
+ <element name="recordTypeId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RecordTypeMapping">
+ <sequence>
+ <element name="available" type="xsd:boolean"/>
+ <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
+ <element name="layoutId" type="tns:ID"/>
+ <element name="name" type="xsd:string"/>
+ <element name="picklistsForRecordType" type="tns:PicklistForRecordType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="recordTypeId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PicklistForRecordType">
+ <sequence>
+ <element name="picklistName" type="xsd:string"/>
+ <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RelatedList">
+ <sequence>
+ <element name="columns" type="tns:RelatedListColumn" maxOccurs="unbounded"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="field" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="limitRows" type="xsd:int"/>
+ <element name="name" type="xsd:string"/>
+ <element name="sobject" type="xsd:string" nillable="true"/>
+ <element name="sort" type="tns:RelatedListSort" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RelatedListColumn">
+ <sequence>
+ <element name="field" type="xsd:string" nillable="true"/>
+ <element name="format" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RelatedListSort">
+ <sequence>
+ <element name="ascending" type="xsd:boolean"/>
+ <element name="column" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+
+
+ <complexType name="EmailFileAttachment">
+ <sequence>
+ <element name="body" nillable="true" minOccurs="0" type="xsd:base64Binary"/>
+ <element name="contentType" nillable="true" minOccurs="0" type="xsd:string" />
+ <element name="fileName" type="xsd:string" />
+ <element name="inline" type="xsd:boolean" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <simpleType name="EmailPriority">
+ <restriction base="xsd:string">
+ <enumeration value="Highest"/>
+ <enumeration value="High"/>
+ <enumeration value="Normal"/>
+ <enumeration value="Low"/>
+ <enumeration value="Lowest"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="Email">
+ <sequence>
+ <element name="bccSender" type="xsd:boolean" nillable="true"/>
+ <element name="emailPriority" type="tns:EmailPriority" nillable="true"/>
+ <element name="replyTo" type="xsd:string" nillable="true"/>
+ <element name="saveAsActivity" type="xsd:boolean" nillable="true"/>
+ <element name="senderDisplayName" type="xsd:string" nillable="true"/>
+ <element name="subject" type="xsd:string" nillable="true"/>
+ <element name="useSignature" type="xsd:boolean" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MassEmailMessage">
+ <complexContent>
+ <extension base="tns:Email">
+ <sequence>
+ <element name="description" type="xsd:string" nillable="true"/>
+ <element name="targetObjectIds" minOccurs="0" maxOccurs="250" type="tns:ID" />
+ <element name="templateId" type="tns:ID"/>
+ <element name="whatIds" minOccurs="0" maxOccurs="250" type="tns:ID" />
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="SingleEmailMessage">
+ <complexContent>
+ <extension base="tns:Email">
+ <sequence>
+ <element name="bccAddresses" minOccurs="0" maxOccurs="25" type="xsd:string" nillable="true"/>
+ <element name="ccAddresses" minOccurs="0" maxOccurs="25" type="xsd:string" nillable="true"/>
+ <element name="charset" type="xsd:string" nillable="true"/>
+ <element name="documentAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:ID" />
+ <element name="htmlBody" type="xsd:string" nillable="true"/>
+ <element name="inReplyTo" minOccurs="0" type="xsd:string" nillable="true"/>
+ <element name="fileAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:EmailFileAttachment"/>
+ <element name="orgWideEmailAddressId" minOccurs="0" maxOccurs="1" type="tns:ID" nillable="true"/>
+ <element name="plainTextBody" type="xsd:string" nillable="true"/>
+ <element name="references" minOccurs="0" type="xsd:string" nillable="true"/>
+ <element name="targetObjectId" type="tns:ID" nillable="true"/>
+ <element name="templateId" type="tns:ID" nillable="true"/>
+ <element name="toAddresses" minOccurs="0" maxOccurs="100" type="xsd:string" nillable="true"/>
+ <element name="whatId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="SendEmailResult">
+ <sequence>
+ <element name="errors" minOccurs="0" maxOccurs="unbounded" type="tns:SendEmailError" />
+ <element name="success" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+
+
+
+ <complexType name="DescribeTabSetResult">
+ <sequence>
+ <element name="label" type="xsd:string" />
+ <element name="logoUrl" type="xsd:string" />
+ <element name="namespace" type="xsd:string" minOccurs="0"/>
+ <element name="selected" type="xsd:boolean" />
+ <element name="tabs" type="tns:DescribeTab" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeTab">
+ <sequence>
+ <element name="custom" type="xsd:boolean" />
+ <element name="iconUrl" type="xsd:string" />
+ <element name="label" type="xsd:string" />
+ <element name="miniIconUrl" type="xsd:string" />
+ <element name="sobjectName" type="xsd:string" nillable="true" />
+ <element name="url" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+
+
+
+
+ <!-- Login Message Types -->
+ <element name="login">
+ <complexType>
+ <sequence>
+ <element name="username" type="xsd:string"/>
+ <element name="password" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="loginResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:LoginResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Describe Message Types -->
+ <element name="describeSObject">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeSObjectResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeSObjectResult" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- DescibeSObjects Message Types -->
+ <element name="describeSObjects">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='100' />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeSObjectsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeSObjectResult" nillable="true" minOccurs='0' maxOccurs='100'/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Describe Global Message Types -->
+ <element name="describeGlobal">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="describeGlobalResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeGlobalResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Describe Data Category Groups Message Types -->
+ <element name="describeDataCategoryGroups">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='10' />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeDataCategoryGroupsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeDataCategoryGroupResult" minOccurs='0' maxOccurs='100'/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeDataCategoryGroupStructures">
+ <complexType>
+ <sequence>
+ <element name="pairs" type="tns:DataCategoryGroupSobjectTypePair" minOccurs='0' maxOccurs='100' />
+ <element name="topCategoriesOnly" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeDataCategoryGroupStructuresResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeDataCategoryGroupStructureResult" minOccurs='0' maxOccurs='100'/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeLayout">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeLayoutResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeLayoutResult" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="describeSoftphoneLayout">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="describeSoftphoneLayoutResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeSoftphoneLayoutResult" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="describeTabs">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="describeTabsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeTabSetResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Create Message Types -->
+ <element name="create">
+ <complexType>
+ <sequence>
+ <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="createResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Send Email Types -->
+ <element name="sendEmail">
+ <complexType>
+ <sequence>
+ <element name="messages" type="tns:Email" minOccurs="0" maxOccurs="10"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="sendEmailResponse">
+ <complexType>
+ <sequence>
+ <element name="result" minOccurs="0" maxOccurs="10" type="tns:SendEmailResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <!-- Update Message Types -->
+ <element name="update">
+ <complexType>
+ <sequence>
+ <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="updateResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Upsert Message Types -->
+ <element name="upsert">
+ <complexType>
+ <sequence>
+ <element name="externalIDFieldName" type="xsd:string"/>
+ <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="upsertResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:UpsertResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Merge Message Types -->
+ <element name="merge">
+ <complexType>
+ <sequence>
+ <element name="request" type="tns:MergeRequest" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="mergeResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:MergeResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Delete Message Types -->
+ <element name="delete">
+ <complexType>
+ <sequence>
+ <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="deleteResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DeleteResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Undelete Message Types -->
+ <element name="undelete">
+ <complexType>
+ <sequence>
+ <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="undeleteResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:UndeleteResult" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- EmptyRecycleBin Message Types -->
+ <element name="emptyRecycleBin">
+ <complexType>
+ <sequence>
+ <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="emptyRecycleBinResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:EmptyRecycleBinResult" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Process Message Types -->
+ <element name="process">
+ <complexType>
+ <sequence>
+ <element name="actions" type="tns:ProcessRequest" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="processResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:ProcessResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Retrieve (ID List) Message Types -->
+ <element name="retrieve">
+ <complexType>
+ <sequence>
+ <element name="fieldList" type="xsd:string"/>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="retrieveResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Convert Lead Message Types -->
+ <element name="convertLead">
+ <complexType>
+ <sequence>
+ <element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="convertLeadResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:LeadConvertResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Get Updated Message Types -->
+ <element name="getUpdated">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="startDate" type="xsd:dateTime"/>
+ <element name="endDate" type="xsd:dateTime"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getUpdatedResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetUpdatedResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Get Deleted Message Types -->
+ <element name="getDeleted">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="startDate" type="xsd:dateTime"/>
+ <element name="endDate" type="xsd:dateTime"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getDeletedResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetDeletedResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <!-- Logout current session -->
+ <element name="logout">
+ <complexType>
+ </complexType>
+ </element>
+
+ <element name="logoutResponse">
+ <complexType>
+ </complexType>
+ </element>
+
+ <!-- Invalidate a list of session ids -->
+ <element name="invalidateSessions">
+ <complexType>
+ <sequence>
+ <element name="sessionIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="invalidateSessionsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:InvalidateSessionsResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Create Query -->
+ <element name="query">
+ <complexType>
+ <sequence>
+ <element name="queryString" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="queryResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:QueryResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Create Query All -->
+ <element name="queryAll">
+ <complexType>
+ <sequence>
+ <element name="queryString" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="queryAllResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:QueryResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Next Batch of sObjects from a query -->
+ <element name="queryMore">
+ <complexType>
+ <sequence>
+ <element name="queryLocator" type="tns:QueryLocator"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="queryMoreResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:QueryResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Create Search -->
+ <element name="search">
+ <complexType>
+ <sequence>
+ <element name="searchString" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="searchResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SearchResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <element name="getServerTimestamp">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="getServerTimestampResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetServerTimestampResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="setPassword">
+ <complexType>
+ <sequence>
+ <element name="userId" type="tns:ID"/>
+ <element name="password" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="setPasswordResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SetPasswordResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="resetPassword">
+ <complexType>
+ <sequence>
+ <element name="userId" type="tns:ID"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="resetPasswordResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:ResetPasswordResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getUserInfo">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="getUserInfoResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetUserInfoResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Header Elements -->
+ <element name="SessionHeader">
+ <complexType>
+ <sequence>
+ <element name="sessionId" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="LoginScopeHeader">
+ <complexType>
+ <sequence>
+ <element name="organizationId" type="tns:ID"/>
+ <element name="portalId" type="tns:ID" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="CallOptions">
+ <complexType>
+ <sequence>
+ <element name="client" type="xsd:string" nillable="true"/>
+ <element name="defaultNamespace" type="xsd:string" nillable="true"/>
+
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="QueryOptions">
+ <complexType>
+ <sequence>
+ <element name="batchSize" type="xsd:int" minOccurs="0"/>
+
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <simpleType name="DebugLevel">
+ <restriction base="xsd:string">
+ <enumeration value="None"/>
+ <enumeration value="DebugOnly"/>
+ <enumeration value="Db"/>
+ </restriction>
+ </simpleType>
+ <element name="DebuggingHeader">
+ <complexType>
+ <sequence>
+ <element name="debugLevel" type="tns:DebugLevel"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="DebuggingInfo">
+ <complexType>
+ <sequence>
+ <element name="debugLog" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <xsd:complexType name="PackageVersion">
+ <xsd:sequence>
+ <xsd:element name="majorNumber" type="xsd:int"/>
+ <xsd:element name="minorNumber" type="xsd:int"/>
+ <xsd:element name="namespace" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="PackageVersionHeader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="packageVersions" minOccurs="0" maxOccurs="unbounded" type="tns:PackageVersion"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <element name="AllowFieldTruncationHeader">
+ <complexType>
+ <sequence>
+ <element name="allowFieldTruncation" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="DisableFeedTrackingHeader">
+ <complexType>
+ <sequence>
+ <element name="disableFeedTracking" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+
+
+ <element name="AllOrNoneHeader">
+ <complexType>
+ <sequence>
+ <element name="allOrNone" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <!-- ideally this could of just been elem name="..." type="xsd:boolean"
+ but is required to be nested within a complexType for .NET 1.1 compatibility -->
+ <element name="MruHeader">
+ <complexType>
+ <sequence>
+ <element name="updateMru" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="EmailHeader">
+ <complexType>
+ <sequence>
+ <element name="triggerAutoResponseEmail" type="xsd:boolean"/>
+ <element name="triggerOtherEmail" type="xsd:boolean"/>
+ <element name="triggerUserEmail" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="AssignmentRuleHeader">
+ <complexType>
+ <sequence>
+ <element name="assignmentRuleId" type="tns:ID" nillable="true" />
+ <element name="useDefaultRule" type="xsd:boolean" nillable="true" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="UserTerritoryDeleteHeader">
+ <complexType>
+ <sequence>
+ <element name="transferToUserId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <element name="LocaleOptions">
+ <complexType>
+ <sequence>
+ <element name="language" type="xsd:string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+
+ <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:fault.partner.soap.sforce.com" xmlns:fns="urn:fault.partner.soap.sforce.com">
+
+ <simpleType name="ExceptionCode">
+ <restriction base="xsd:string">
+ <enumeration value="API_CURRENTLY_DISABLED"/>
+ <enumeration value="API_DISABLED_FOR_ORG"/>
+ <enumeration value="CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="CIRCULAR_OBJECT_GRAPH"/>
+ <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
+ <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
+ <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+ <enumeration value="DATACLOUD_API_CLIENT_EXCEPTION"/>
+ <enumeration value="DATACLOUD_API_SERVER_EXCEPTION"/>
+ <enumeration value="DATACLOUD_API_UNAVAILABLE"/>
+ <enumeration value="DUPLICATE_VALUE"/>
+ <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
+ <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
+ <enumeration value="EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
+ <enumeration value="EMAIL_TO_CASE_NOT_ENABLED"/>
+ <enumeration value="EXCEEDED_ID_LIMIT"/>
+ <enumeration value="EXCEEDED_LEAD_CONVERT_LIMIT"/>
+ <enumeration value="EXCEEDED_MAX_SIZE_REQUEST"/>
+ <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
+ <enumeration value="EXCEEDED_QUOTA"/>
+ <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
+ <enumeration value="FUNCTIONALITY_TEMPORARILY_UNAVAILABLE"/>
+ <enumeration value="INACTIVE_OWNER_OR_USER"/>
+ <enumeration value="INACTIVE_PORTAL"/>
+ <enumeration value="INSUFFICIENT_ACCESS"/>
+ <enumeration value="INVALID_ASSIGNMENT_RULE"/>
+ <enumeration value="INVALID_BATCH_SIZE"/>
+ <enumeration value="INVALID_CLIENT"/>
+ <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
+ <enumeration value="INVALID_FIELD"/>
+ <enumeration value="INVALID_FILTER_LANGUAGE"/>
+ <enumeration value="INVALID_FILTER_VALUE"/>
+ <enumeration value="INVALID_ID_FIELD"/>
+ <enumeration value="INVALID_LOCALE_LANGUAGE"/>
+ <enumeration value="INVALID_LOCATOR"/>
+ <enumeration value="INVALID_LOGIN"/>
+ <enumeration value="INVALID_NEW_PASSWORD"/>
+ <enumeration value="INVALID_OPERATION"/>
+ <enumeration value="INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
+ <enumeration value="INVALID_QUERY_FILTER_OPERATOR"/>
+ <enumeration value="INVALID_QUERY_LOCATOR"/>
+ <enumeration value="INVALID_QUERY_SCOPE"/>
+ <enumeration value="INVALID_REPLICATION_DATE"/>
+ <enumeration value="INVALID_SEARCH"/>
+ <enumeration value="INVALID_SEARCH_SCOPE"/>
+ <enumeration value="INVALID_SESSION_ID"/>
+ <enumeration value="INVALID_SOAP_HEADER"/>
+ <enumeration value="INVALID_SSO_GATEWAY_URL"/>
+ <enumeration value="INVALID_TYPE"/>
+ <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+ <enumeration value="JIGSAW_IMPORT_LIMIT_EXCEEDED"/>
+ <enumeration value="JIGSAW_REQUEST_NOT_SUPPORTED"/>
+ <enumeration value="JSON_PARSER_ERROR"/>
+ <enumeration value="LIMIT_EXCEEDED"/>
+ <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
+ <enumeration value="LOGIN_CHALLENGE_PENDING"/>
+ <enumeration value="LOGIN_DURING_RESTRICTED_DOMAIN"/>
+ <enumeration value="LOGIN_DURING_RESTRICTED_TIME"/>
+ <enumeration value="LOGIN_MUST_USE_SECURITY_TOKEN"/>
+ <enumeration value="MALFORMED_ID"/>
+ <enumeration value="MALFORMED_QUERY"/>
+ <enumeration value="MALFORMED_SEARCH"/>
+ <enumeration value="MISSING_ARGUMENT"/>
+ <enumeration value="NOT_MODIFIED"/>
+ <enumeration value="NO_SOFTPHONE_LAYOUT"/>
+ <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
+ <enumeration value="OPERATION_TOO_LARGE"/>
+ <enumeration value="ORG_IN_MAINTENANCE"/>
+ <enumeration value="ORG_IS_DOT_ORG"/>
+ <enumeration value="ORG_LOCKED"/>
+ <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
+ <enumeration value="PASSWORD_LOCKOUT"/>
+ <enumeration value="PORTAL_NO_ACCESS"/>
+ <enumeration value="QUERY_TIMEOUT"/>
+ <enumeration value="QUERY_TOO_COMPLICATED"/>
+ <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
+ <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+ <enumeration value="SERVER_UNAVAILABLE"/>
+ <enumeration value="SOCIALCRM_FEEDSERVICE_API_CLIENT_EXCEPTION"/>
+ <enumeration value="SOCIALCRM_FEEDSERVICE_API_SERVER_EXCEPTION"/>
+ <enumeration value="SOCIALCRM_FEEDSERVICE_API_UNAVAILABLE"/>
+ <enumeration value="SSO_SERVICE_DOWN"/>
+ <enumeration value="TOO_MANY_APEX_REQUESTS"/>
+ <enumeration value="TRIAL_EXPIRED"/>
+ <enumeration value="UNKNOWN_EXCEPTION"/>
+ <enumeration value="UNSUPPORTED_API_VERSION"/>
+ <enumeration value="UNSUPPORTED_CLIENT"/>
+ <enumeration value="UNSUPPORTED_MEDIA_TYPE"/>
+ <enumeration value="XML_PARSER_ERROR"/>
+ </restriction>
+ </simpleType>
+ <!-- For convenience these QNames are returned in the standard soap faultcode element -->
+ <simpleType name="FaultCode">
+ <restriction base="xsd:QName">
+ <enumeration value="fns:API_CURRENTLY_DISABLED"/>
+ <enumeration value="fns:API_DISABLED_FOR_ORG"/>
+ <enumeration value="fns:CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="fns:CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="fns:CIRCULAR_OBJECT_GRAPH"/>
+ <enumeration value="fns:CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
+ <enumeration value="fns:CLIENT_REQUIRE_UPDATE_FOR_USER"/>
+ <enumeration value="fns:CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:DATACLOUD_API_CLIENT_EXCEPTION"/>
+ <enumeration value="fns:DATACLOUD_API_SERVER_EXCEPTION"/>
+ <enumeration value="fns:DATACLOUD_API_UNAVAILABLE"/>
+ <enumeration value="fns:DUPLICATE_VALUE"/>
+ <enumeration value="fns:EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:EMAIL_TO_CASE_INVALID_ROUTING"/>
+ <enumeration value="fns:EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:EMAIL_TO_CASE_NOT_ENABLED"/>
+ <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
+ <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
+ <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
+ <enumeration value="fns:EXCEEDED_MAX_TYPES_LIMIT"/>
+ <enumeration value="fns:EXCEEDED_QUOTA"/>
+ <enumeration value="fns:FUNCTIONALITY_NOT_ENABLED"/>
+ <enumeration value="fns:FUNCTIONALITY_TEMPORARILY_UNAVAILABLE"/>
+ <enumeration value="fns:INACTIVE_OWNER_OR_USER"/>
+ <enumeration value="fns:INACTIVE_PORTAL"/>
+ <enumeration value="fns:INSUFFICIENT_ACCESS"/>
+ <enumeration value="fns:INVALID_ASSIGNMENT_RULE"/>
+ <enumeration value="fns:INVALID_BATCH_SIZE"/>
+ <enumeration value="fns:INVALID_CLIENT"/>
+ <enumeration value="fns:INVALID_CROSS_REFERENCE_KEY"/>
+ <enumeration value="fns:INVALID_FIELD"/>
+ <enumeration value="fns:INVALID_FILTER_LANGUAGE"/>
+ <enumeration value="fns:INVALID_FILTER_VALUE"/>
+ <enumeration value="fns:INVALID_ID_FIELD"/>
+ <enumeration value="fns:INVALID_LOCALE_LANGUAGE"/>
+ <enumeration value="fns:INVALID_LOCATOR"/>
+ <enumeration value="fns:INVALID_LOGIN"/>
+ <enumeration value="fns:INVALID_NEW_PASSWORD"/>
+ <enumeration value="fns:INVALID_OPERATION"/>
+ <enumeration value="fns:INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
+ <enumeration value="fns:INVALID_QUERY_FILTER_OPERATOR"/>
+ <enumeration value="fns:INVALID_QUERY_LOCATOR"/>
+ <enumeration value="fns:INVALID_QUERY_SCOPE"/>
+ <enumeration value="fns:INVALID_REPLICATION_DATE"/>
+ <enumeration value="fns:INVALID_SEARCH"/>
+ <enumeration value="fns:INVALID_SEARCH_SCOPE"/>
+ <enumeration value="fns:INVALID_SESSION_ID"/>
+ <enumeration value="fns:INVALID_SOAP_HEADER"/>
+ <enumeration value="fns:INVALID_SSO_GATEWAY_URL"/>
+ <enumeration value="fns:INVALID_TYPE"/>
+ <enumeration value="fns:INVALID_TYPE_FOR_OPERATION"/>
+ <enumeration value="fns:JIGSAW_IMPORT_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:JIGSAW_REQUEST_NOT_SUPPORTED"/>
+ <enumeration value="fns:JSON_PARSER_ERROR"/>
+ <enumeration value="fns:LIMIT_EXCEEDED"/>
+ <enumeration value="fns:LOGIN_CHALLENGE_ISSUED"/>
+ <enumeration value="fns:LOGIN_CHALLENGE_PENDING"/>
+ <enumeration value="fns:LOGIN_DURING_RESTRICTED_DOMAIN"/>
+ <enumeration value="fns:LOGIN_DURING_RESTRICTED_TIME"/>
+ <enumeration value="fns:LOGIN_MUST_USE_SECURITY_TOKEN"/>
+ <enumeration value="fns:MALFORMED_ID"/>
+ <enumeration value="fns:MALFORMED_QUERY"/>
+ <enumeration value="fns:MALFORMED_SEARCH"/>
+ <enumeration value="fns:MISSING_ARGUMENT"/>
+ <enumeration value="fns:NOT_MODIFIED"/>
+ <enumeration value="fns:NO_SOFTPHONE_LAYOUT"/>
+ <enumeration value="fns:NUMBER_OUTSIDE_VALID_RANGE"/>
+ <enumeration value="fns:OPERATION_TOO_LARGE"/>
+ <enumeration value="fns:ORG_IN_MAINTENANCE"/>
+ <enumeration value="fns:ORG_IS_DOT_ORG"/>
+ <enumeration value="fns:ORG_LOCKED"/>
+ <enumeration value="fns:ORG_NOT_OWNED_BY_INSTANCE"/>
+ <enumeration value="fns:PASSWORD_LOCKOUT"/>
+ <enumeration value="fns:PORTAL_NO_ACCESS"/>
+ <enumeration value="fns:QUERY_TIMEOUT"/>
+ <enumeration value="fns:QUERY_TOO_COMPLICATED"/>
+ <enumeration value="fns:REQUEST_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:REQUEST_RUNNING_TOO_LONG"/>
+ <enumeration value="fns:SERVER_UNAVAILABLE"/>
+ <enumeration value="fns:SOCIALCRM_FEEDSERVICE_API_CLIENT_EXCEPTION"/>
+ <enumeration value="fns:SOCIALCRM_FEEDSERVICE_API_SERVER_EXCEPTION"/>
+ <enumeration value="fns:SOCIALCRM_FEEDSERVICE_API_UNAVAILABLE"/>
+ <enumeration value="fns:SSO_SERVICE_DOWN"/>
+ <enumeration value="fns:TOO_MANY_APEX_REQUESTS"/>
+ <enumeration value="fns:TRIAL_EXPIRED"/>
+ <enumeration value="fns:UNKNOWN_EXCEPTION"/>
+ <enumeration value="fns:UNSUPPORTED_API_VERSION"/>
+ <enumeration value="fns:UNSUPPORTED_CLIENT"/>
+ <enumeration value="fns:UNSUPPORTED_MEDIA_TYPE"/>
+ <enumeration value="fns:XML_PARSER_ERROR"/>
+ </restriction>
+ </simpleType>
+
+
+ <!-- Fault -->
+ <complexType name="ApiFault">
+ <sequence>
+ <element name="exceptionCode" type="fns:ExceptionCode"/>
+ <element name="exceptionMessage" type="xsd:string"/>
+
+ </sequence>
+ </complexType>
+
+ <element name="fault" type="fns:ApiFault" />
+
+ <complexType name="ApiQueryFault">
+ <complexContent>
+ <extension base="fns:ApiFault">
+ <sequence>
+ <element name="row" type="xsd:int"/>
+ <element name="column" type="xsd:int"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="LoginFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="LoginFault" type="fns:LoginFault"/>
+
+ <complexType name="InvalidQueryLocatorFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidQueryLocatorFault" type="fns:InvalidQueryLocatorFault"/>
+
+ <complexType name="InvalidNewPasswordFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidNewPasswordFault" type="fns:InvalidNewPasswordFault"/>
+
+ <complexType name="InvalidIdFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidIdFault" type="fns:InvalidIdFault"/>
+
+ <complexType name="UnexpectedErrorFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="UnexpectedErrorFault" type="fns:UnexpectedErrorFault"/>
+
+ <complexType name="InvalidFieldFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidFieldFault" type="fns:InvalidFieldFault"/>
+
+ <complexType name="InvalidSObjectFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidSObjectFault" type="fns:InvalidSObjectFault"/>
+
+ <complexType name="MalformedQueryFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="MalformedQueryFault" type="fns:MalformedQueryFault"/>
+
+ <complexType name="MalformedSearchFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="MalformedSearchFault" type="fns:MalformedSearchFault"/>
+
+
+ </schema>
+ </types>
+
+ <!-- Header Message -->
+ <message name="Header">
+ <part element="tns:LoginScopeHeader" name="LoginScopeHeader"/>
+ <part element="tns:SessionHeader" name="SessionHeader"/>
+
+ <part element="tns:CallOptions" name="CallOptions"/>
+
+ <part element="tns:QueryOptions" name="QueryOptions"/>
+ <part element="tns:AssignmentRuleHeader" name="AssignmentRuleHeader"/>
+ <part element="tns:AllowFieldTruncationHeader" name="AllowFieldTruncationHeader"/>
+
+ <part element="tns:AllOrNoneHeader" name="AllOrNoneHeader"/>
+
+
+ <part element="tns:DisableFeedTrackingHeader" name="DisableFeedTrackingHeader"/>
+
+
+ <part element="tns:MruHeader" name="MruHeader"/>
+ <part element="tns:EmailHeader" name="EmailHeader"/>
+
+ <part element="tns:UserTerritoryDeleteHeader" name="UserTerritoryDeleteHeader"/>
+
+ <part element="tns:DebuggingHeader" name="DebuggingHeader"/>
+ <part element="tns:PackageVersionHeader" name="PackageVersionHeader"/>
+ <part element="tns:DebuggingInfo" name="DebuggingInfo"/>
+ <part element="tns:LocaleOptions" name="LocaleOptions"/>
+ </message>
+
+ <!-- Fault Messages -->
+
+ <message name="ApiFault">
+ <part name="fault" element="fns:fault"/>
+ </message>
+
+ <message name="LoginFault">
+ <part name="fault" element="fns:LoginFault"/>
+ </message>
+ <message name="InvalidQueryLocatorFault">
+ <part name="fault" element="fns:InvalidQueryLocatorFault"/>
+ </message>
+ <message name="InvalidNewPasswordFault">
+ <part name="fault" element="fns:InvalidNewPasswordFault"/>
+ </message>
+ <message name="InvalidIdFault">
+ <part name="fault" element="fns:InvalidIdFault"/>
+ </message>
+ <message name="UnexpectedErrorFault">
+ <part name="fault" element="fns:UnexpectedErrorFault"/>
+ </message>
+ <message name="InvalidFieldFault">
+ <part name="fault" element="fns:InvalidFieldFault"/>
+ </message>
+ <message name="InvalidSObjectFault">
+ <part name="fault" element="fns:InvalidSObjectFault"/>
+ </message>
+ <message name="MalformedQueryFault">
+ <part name="fault" element="fns:MalformedQueryFault"/>
+ </message>
+ <message name="MalformedSearchFault">
+ <part name="fault" element="fns:MalformedSearchFault"/>
+ </message>
+
+
+ <!-- Method Messages -->
+ <message name="loginRequest">
+ <part element="tns:login" name="parameters"/>
+ </message>
+ <message name="loginResponse">
+ <part element="tns:loginResponse" name="parameters"/>
+ </message>
+
+ <message name="describeSObjectRequest">
+ <part element="tns:describeSObject" name="parameters"/>
+ </message>
+ <message name="describeSObjectResponse">
+ <part element="tns:describeSObjectResponse" name="parameters"/>
+ </message>
+
+ <message name="describeSObjectsRequest">
+ <part element="tns:describeSObjects" name="parameters"/>
+ </message>
+ <message name="describeSObjectsResponse">
+ <part element="tns:describeSObjectsResponse" name="parameters"/>
+ </message>
+
+ <message name="describeGlobalRequest">
+ <part element="tns:describeGlobal" name="parameters"/>
+ </message>
+ <message name="describeGlobalResponse">
+ <part element="tns:describeGlobalResponse" name="parameters"/>
+ </message>
+
+ <message name="describeDataCategoryGroupsRequest">
+ <part element="tns:describeDataCategoryGroups" name="parameters"/>
+ </message>
+ <message name="describeDataCategoryGroupsResponse">
+ <part element="tns:describeDataCategoryGroupsResponse" name="parameters"/>
+ </message>
+
+ <message name="describeDataCategoryGroupStructuresRequest">
+ <part element="tns:describeDataCategoryGroupStructures" name="parameters"/>
+ </message>
+ <message name="describeDataCategoryGroupStructuresResponse">
+ <part element="tns:describeDataCategoryGroupStructuresResponse" name="parameters"/>
+ </message>
+
+ <message name="describeLayoutRequest">
+ <part element="tns:describeLayout" name="parameters"/>
+ </message>
+ <message name="describeLayoutResponse">
+ <part element="tns:describeLayoutResponse" name="parameters"/>
+ </message>
+
+ <message name="describeSoftphoneLayoutRequest">
+ <part element="tns:describeSoftphoneLayout" name="parameters"/>
+ </message>
+ <message name="describeSoftphoneLayoutResponse">
+ <part element="tns:describeSoftphoneLayoutResponse" name="parameters"/>
+ </message>
+
+ <message name="describeTabsRequest">
+ <part element="tns:describeTabs" name="parameters"/>
+ </message>
+ <message name="describeTabsResponse">
+ <part element="tns:describeTabsResponse" name="parameters"/>
+ </message>
+
+ <message name="createRequest">
+ <part element="tns:create" name="parameters"/>
+ </message>
+ <message name="createResponse">
+ <part element="tns:createResponse" name="parameters"/>
+ </message>
+
+ <message name="updateRequest">
+ <part element="tns:update" name="parameters"/>
+ </message>
+ <message name="updateResponse">
+ <part element="tns:updateResponse" name="parameters"/>
+ </message>
+
+ <message name="upsertRequest">
+ <part element="tns:upsert" name="parameters"/>
+ </message>
+ <message name="upsertResponse">
+ <part element="tns:upsertResponse" name="parameters"/>
+ </message>
+
+ <message name="mergeRequest">
+ <part element="tns:merge" name="parameters"/>
+ </message>
+ <message name="mergeResponse">
+ <part element="tns:mergeResponse" name="parameters"/>
+ </message>
+
+ <message name="deleteRequest">
+ <part element="tns:delete" name="parameters"/>
+ </message>
+ <message name="deleteResponse">
+ <part element="tns:deleteResponse" name="parameters"/>
+ </message>
+
+ <message name="undeleteRequest">
+ <part element="tns:undelete" name="parameters"/>
+ </message>
+ <message name="undeleteResponse">
+ <part element="tns:undeleteResponse" name="parameters"/>
+ </message>
+
+ <message name="emptyRecycleBinRequest">
+ <part element="tns:emptyRecycleBin" name="parameters"/>
+ </message>
+ <message name="emptyRecycleBinResponse">
+ <part element="tns:emptyRecycleBinResponse" name="parameters"/>
+ </message>
+
+ <message name="retrieveRequest">
+ <part element="tns:retrieve" name="parameters"/>
+ </message>
+ <message name="retrieveResponse">
+ <part element="tns:retrieveResponse" name="parameters"/>
+ </message>
+
+ <message name="processRequest">
+ <part element="tns:process" name="parameters"/>
+ </message>
+ <message name="processResponse">
+ <part element="tns:processResponse" name="parameters"/>
+ </message>
+
+ <message name="convertLeadRequest">
+ <part element="tns:convertLead" name="parameters"/>
+ </message>
+ <message name="convertLeadResponse">
+ <part element="tns:convertLeadResponse" name="parameters"/>
+ </message>
+
+ <message name="logoutRequest">
+ <part element="tns:logout" name="parameters"/>
+ </message>
+ <message name="logoutResponse">
+ <part element="tns:logoutResponse" name="parameters"/>
+ </message>
+
+ <message name="invalidateSessionsRequest">
+ <part element="tns:invalidateSessions" name="parameters"/>
+ </message>
+ <message name="invalidateSessionsResponse">
+ <part element="tns:invalidateSessionsResponse" name="parameters"/>
+ </message>
+
+ <message name="getDeletedRequest">
+ <part element="tns:getDeleted" name="parameters"/>
+ </message>
+ <message name="getDeletedResponse">
+ <part element="tns:getDeletedResponse" name="parameters"/>
+ </message>
+
+ <message name="getUpdatedRequest">
+ <part element="tns:getUpdated" name="parameters"/>
+ </message>
+ <message name="getUpdatedResponse">
+ <part element="tns:getUpdatedResponse" name="parameters"/>
+ </message>
+
+ <message name="queryRequest">
+ <part element="tns:query" name="parameters"/>
+ </message>
+ <message name="queryResponse">
+ <part element="tns:queryResponse" name="parameters"/>
+ </message>
+
+ <message name="queryAllRequest">
+ <part element="tns:queryAll" name="parameters"/>
+ </message>
+ <message name="queryAllResponse">
+ <part element="tns:queryAllResponse" name="parameters"/>
+ </message>
+
+ <message name="queryMoreRequest">
+ <part element="tns:queryMore" name="parameters"/>
+ </message>
+ <message name="queryMoreResponse">
+ <part element="tns:queryMoreResponse" name="parameters"/>
+ </message>
+
+ <message name="searchRequest">
+ <part element="tns:search" name="parameters"/>
+ </message>
+ <message name="searchResponse">
+ <part element="tns:searchResponse" name="parameters"/>
+ </message>
+
+ <message name="getServerTimestampRequest">
+ <part element="tns:getServerTimestamp" name="parameters"/>
+ </message>
+ <message name="getServerTimestampResponse">
+ <part element="tns:getServerTimestampResponse" name="parameters"/>
+ </message>
+
+ <message name="setPasswordRequest">
+ <part element="tns:setPassword" name="parameters"/>
+ </message>
+ <message name="setPasswordResponse">
+ <part element="tns:setPasswordResponse" name="parameters"/>
+ </message>
+
+ <message name="resetPasswordRequest">
+ <part element="tns:resetPassword" name="parameters"/>
+ </message>
+ <message name="resetPasswordResponse">
+ <part element="tns:resetPasswordResponse" name="parameters"/>
+ </message>
+
+ <message name="getUserInfoRequest">
+ <part element="tns:getUserInfo" name="parameters"/>
+ </message>
+ <message name="getUserInfoResponse">
+ <part element="tns:getUserInfoResponse" name="parameters"/>
+ </message>
+
+ <message name="sendEmailRequest">
+ <part element="tns:sendEmail" name="parameters"/>
+ </message>
+ <message name="sendEmailResponse">
+ <part element="tns:sendEmailResponse" name="parameters"/>
+ </message>
+
+
+
+ <!-- Soap PortType -->
+ <portType name="Soap">
+ <operation name="login">
+ <documentation>Login to the Salesforce.com SOAP Api</documentation>
+ <input message="tns:loginRequest"/>
+ <output message="tns:loginResponse"/>
+ <fault message="tns:LoginFault" name="LoginFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="describeSObject">
+ <documentation>Describe an sObject</documentation>
+ <input message="tns:describeSObjectRequest"/>
+ <output message="tns:describeSObjectResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeSObjects">
+ <documentation>Describe a number sObjects</documentation>
+ <input message="tns:describeSObjectsRequest"/>
+ <output message="tns:describeSObjectsResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeGlobal">
+ <documentation>Describe the Global state</documentation>
+ <input message="tns:describeGlobalRequest"/>
+ <output message="tns:describeGlobalResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeDataCategoryGroups">
+ <documentation>Describe all the data category groups available for a given set of types</documentation>
+ <input message="tns:describeDataCategoryGroupsRequest"/>
+ <output message="tns:describeDataCategoryGroupsResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeDataCategoryGroupStructures">
+ <documentation>Describe the data category group structures for a given set of pair of types and data category group name</documentation>
+ <input message="tns:describeDataCategoryGroupStructuresRequest"/>
+ <output message="tns:describeDataCategoryGroupStructuresResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeLayout">
+ <documentation>Describe the layout of an sObject</documentation>
+ <input message="tns:describeLayoutRequest"/>
+ <output message="tns:describeLayoutResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="describeSoftphoneLayout">
+ <documentation>Describe the layout of the SoftPhone</documentation>
+ <input message="tns:describeSoftphoneLayoutRequest"/>
+ <output message="tns:describeSoftphoneLayoutResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeTabs">
+ <documentation>Describe the tabs that appear on a users page</documentation>
+ <input message="tns:describeTabsRequest"/>
+ <output message="tns:describeTabsResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="create">
+ <documentation>Create a set of new sObjects</documentation>
+ <input message="tns:createRequest"/>
+ <output message="tns:createResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="update">
+ <documentation>Update a set of sObjects</documentation>
+ <input message="tns:updateRequest"/>
+ <output message="tns:updateResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="upsert">
+ <documentation>Update or insert a set of sObjects based on object id</documentation>
+ <input message="tns:upsertRequest"/>
+ <output message="tns:upsertResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="merge">
+ <documentation>Merge and update a set of sObjects based on object id</documentation>
+ <input message="tns:mergeRequest"/>
+ <output message="tns:mergeResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="delete">
+ <documentation>Delete a set of sObjects</documentation>
+ <input message="tns:deleteRequest"/>
+ <output message="tns:deleteResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="undelete">
+ <documentation>Undelete a set of sObjects</documentation>
+ <input message="tns:undeleteRequest"/>
+ <output message="tns:undeleteResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="emptyRecycleBin">
+ <documentation>Empty a set of sObjects from the recycle bin</documentation>
+ <input message="tns:emptyRecycleBinRequest"/>
+ <output message="tns:emptyRecycleBinResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="retrieve">
+ <documentation>Get a set of sObjects</documentation>
+ <input message="tns:retrieveRequest"/>
+ <output message="tns:retrieveResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="process">
+ <documentation>Submit an entity to a workflow process or process a workitem</documentation>
+ <input message="tns:processRequest"/>
+ <output message="tns:processResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="convertLead">
+ <documentation>convert a set of leads</documentation>
+ <input message="tns:convertLeadRequest"/>
+ <output message="tns:convertLeadResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="logout">
+ <documentation>Logout the current user, invalidating the current session.</documentation>
+ <input message="tns:logoutRequest"/>
+ <output message="tns:logoutResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="invalidateSessions">
+ <documentation>Logs out and invalidates session ids</documentation>
+ <input message="tns:invalidateSessionsRequest"/>
+ <output message="tns:invalidateSessionsResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getDeleted">
+ <documentation>Get the IDs for deleted sObjects</documentation>
+ <input message="tns:getDeletedRequest"/>
+ <output message="tns:getDeletedResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getUpdated">
+ <documentation>Get the IDs for updated sObjects</documentation>
+ <input message="tns:getUpdatedRequest"/>
+ <output message="tns:getUpdatedResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="query">
+ <documentation>Create a Query Cursor</documentation>
+ <input message="tns:queryRequest"/>
+ <output message="tns:queryResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+ </operation>
+
+ <operation name="queryAll">
+ <documentation>Create a Query Cursor, including deleted sObjects</documentation>
+ <input message="tns:queryAllRequest"/>
+ <output message="tns:queryAllResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+ </operation>
+
+ <operation name="queryMore">
+ <documentation>Gets the next batch of sObjects from a query</documentation>
+ <input message="tns:queryMoreRequest"/>
+ <output message="tns:queryMoreResponse"/>
+ <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="search">
+ <documentation>Search for sObjects</documentation>
+ <input message="tns:searchRequest"/>
+ <output message="tns:searchResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedSearchFault" name="MalformedSearchFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getServerTimestamp">
+ <documentation>Gets server timestamp</documentation>
+ <input message="tns:getServerTimestampRequest"/>
+ <output message="tns:getServerTimestampResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="setPassword">
+ <documentation>Set a user's password</documentation>
+ <input message="tns:setPasswordRequest"/>
+ <output message="tns:setPasswordResponse"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidNewPasswordFault" name="InvalidNewPasswordFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="resetPassword">
+ <documentation>Reset a user's password</documentation>
+ <input message="tns:resetPasswordRequest"/>
+ <output message="tns:resetPasswordResponse"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getUserInfo">
+ <documentation>Returns standard information relevant to the current user</documentation>
+ <input message="tns:getUserInfoRequest"/>
+ <output message="tns:getUserInfoResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="sendEmail">
+ <documentation>Send outbound email</documentation>
+ <input message="tns:sendEmailRequest"/>
+ <output message="tns:sendEmailResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ </portType>
+
+ <!-- Soap Binding -->
+ <binding name="SoapBinding" type="tns:Soap">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="login">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="LoginFault">
+ <soap:fault name="LoginFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeSObject">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeSObjects">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeGlobal">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeDataCategoryGroups">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeDataCategoryGroupStructures">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeLayout">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeSoftphoneLayout">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeTabs">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="create">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllOrNoneHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="update">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllOrNoneHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="upsert">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllOrNoneHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="merge">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="delete">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="UserTerritoryDeleteHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllOrNoneHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="undelete">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllOrNoneHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="emptyRecycleBin">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="retrieve">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedQueryFault">
+ <soap:fault name="MalformedQueryFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="process">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="convertLead">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DisableFeedTrackingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="logout">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="invalidateSessions">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getDeleted">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getUpdated">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="query">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedQueryFault">
+ <soap:fault name="MalformedQueryFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidQueryLocatorFault">
+ <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="queryAll">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedQueryFault">
+ <soap:fault name="MalformedQueryFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidQueryLocatorFault">
+ <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="queryMore">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidQueryLocatorFault">
+ <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="search">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedSearchFault">
+ <soap:fault name="MalformedSearchFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getServerTimestamp">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="setPassword">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidNewPasswordFault">
+ <soap:fault name="InvalidNewPasswordFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="resetPassword">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getUserInfo">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="sendEmail">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+
+ </binding>
+
+ <!-- Soap Service Endpoint -->
+ <service name="SforceService">
+ <documentation>Sforce SOAP API</documentation>
+ <port binding="tns:SoapBinding" name="Soap">
+ <soap:address location="https://login.salesforce.com/services/Soap/u/22.0"/>
+ </port>
+ </service>
+</definitions>
+
Modified: branches/as7/connectors/sandbox/pom.xml
===================================================================
--- branches/as7/connectors/sandbox/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/sandbox/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid.connectors</groupId>
Modified: branches/as7/connectors/sandbox/translator-yahoo/pom.xml
===================================================================
--- branches/as7/connectors/sandbox/translator-yahoo/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/sandbox/translator-yahoo/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-yahoo</artifactId>
Modified: branches/as7/connectors/translator-file/pom.xml
===================================================================
--- branches/as7/connectors/translator-file/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-file/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-file</artifactId>
Modified: branches/as7/connectors/translator-jdbc/pom.xml
===================================================================
--- branches/as7/connectors/translator-jdbc/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-jdbc</artifactId>
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/FunctionModifier.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/FunctionModifier.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/FunctionModifier.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,13 +24,11 @@
*/
package org.teiid.translator.jdbc;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
+import org.teiid.core.types.DataTypeManager;
import org.teiid.language.Function;
import org.teiid.language.LanguageObject;
-import org.teiid.translator.TypeFacility;
/**
@@ -43,52 +41,28 @@
/*
* Public sharing part for the mapping between class and type in format of Map<class->Integer>.
*/
- public static final int STRING = 0;
- public static final int CHAR = 1;
- public static final int BOOLEAN = 2;
- public static final int BYTE = 3;
- public static final int SHORT = 4;
- public static final int INTEGER = 5;
- public static final int LONG = 6;
- public static final int BIGINTEGER = 7;
- public static final int FLOAT = 8;
- public static final int DOUBLE = 9;
- public static final int BIGDECIMAL = 10;
- public static final int DATE = 11;
- public static final int TIME = 12;
- public static final int TIMESTAMP = 13;
- public static final int OBJECT = 14;
- public static final int BLOB = 15;
- public static final int CLOB = 16;
- public static final int XML = 17;
- public static final int NULL = 18;
+ public static final int STRING = DataTypeManager.DefaultTypeCodes.STRING;
+ public static final int CHAR = DataTypeManager.DefaultTypeCodes.CHAR;
+ public static final int BOOLEAN = DataTypeManager.DefaultTypeCodes.BOOLEAN;
+ public static final int BYTE = DataTypeManager.DefaultTypeCodes.BYTE;
+ public static final int SHORT = DataTypeManager.DefaultTypeCodes.SHORT;
+ public static final int INTEGER = DataTypeManager.DefaultTypeCodes.INTEGER;
+ public static final int LONG = DataTypeManager.DefaultTypeCodes.LONG;
+ public static final int BIGINTEGER = DataTypeManager.DefaultTypeCodes.BIGINTEGER;
+ public static final int FLOAT = DataTypeManager.DefaultTypeCodes.FLOAT;
+ public static final int DOUBLE = DataTypeManager.DefaultTypeCodes.DOUBLE;
+ public static final int BIGDECIMAL = DataTypeManager.DefaultTypeCodes.BIGDECIMAL;
+ public static final int DATE = DataTypeManager.DefaultTypeCodes.DATE;
+ public static final int TIME = DataTypeManager.DefaultTypeCodes.TIME;
+ public static final int TIMESTAMP = DataTypeManager.DefaultTypeCodes.TIMESTAMP;
+ public static final int OBJECT = DataTypeManager.DefaultTypeCodes.OBJECT;
+ public static final int BLOB = DataTypeManager.DefaultTypeCodes.BLOB;
+ public static final int CLOB = DataTypeManager.DefaultTypeCodes.CLOB;
+ public static final int XML = DataTypeManager.DefaultTypeCodes.XML;
+ public static final int NULL = DataTypeManager.DefaultTypeCodes.NULL;
- private static final Map<Class<?>, Integer> typeMap = new HashMap<Class<?>, Integer>();
-
- static {
- typeMap.put(TypeFacility.RUNTIME_TYPES.STRING, STRING);
- typeMap.put(TypeFacility.RUNTIME_TYPES.CHAR, CHAR);
- typeMap.put(TypeFacility.RUNTIME_TYPES.BOOLEAN, BOOLEAN);
- typeMap.put(TypeFacility.RUNTIME_TYPES.BYTE, BYTE);
- typeMap.put(TypeFacility.RUNTIME_TYPES.SHORT, SHORT);
- typeMap.put(TypeFacility.RUNTIME_TYPES.INTEGER, INTEGER);
- typeMap.put(TypeFacility.RUNTIME_TYPES.LONG, LONG);
- typeMap.put(TypeFacility.RUNTIME_TYPES.BIG_INTEGER, BIGINTEGER);
- typeMap.put(TypeFacility.RUNTIME_TYPES.FLOAT, FLOAT);
- typeMap.put(TypeFacility.RUNTIME_TYPES.DOUBLE, DOUBLE);
- typeMap.put(TypeFacility.RUNTIME_TYPES.BIG_DECIMAL, BIGDECIMAL);
- typeMap.put(TypeFacility.RUNTIME_TYPES.DATE, DATE);
- typeMap.put(TypeFacility.RUNTIME_TYPES.TIME, TIME);
- typeMap.put(TypeFacility.RUNTIME_TYPES.TIMESTAMP, TIMESTAMP);
- typeMap.put(TypeFacility.RUNTIME_TYPES.OBJECT, OBJECT);
- typeMap.put(TypeFacility.RUNTIME_TYPES.BLOB, BLOB);
- typeMap.put(TypeFacility.RUNTIME_TYPES.CLOB, CLOB);
- typeMap.put(TypeFacility.RUNTIME_TYPES.XML, XML);
- typeMap.put(TypeFacility.RUNTIME_TYPES.NULL, NULL);
- }
-
public static int getCode(Class<?> source) {
- return typeMap.get(source).intValue();
+ return DataTypeManager.getTypeCode(source);
}
/**
Property changes on: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/FunctionModifier.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/FunctionModifier.java:3535-3555
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -31,10 +31,10 @@
import org.teiid.language.Argument;
import org.teiid.language.Call;
import org.teiid.language.Command;
-import org.teiid.translator.TranslatorException;
import org.teiid.translator.DataNotAvailableException;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.ProcedureExecution;
+import org.teiid.translator.TranslatorException;
/**
*/
@@ -87,7 +87,10 @@
List<Object> result = new ArrayList<Object>();
int paramIndex = 1;
if (proc.getReturnType() != null) {
- addParameterValue(result, paramIndex++, proc.getReturnType());
+ if (proc.getReturnParameter() != null) {
+ addParameterValue(result, paramIndex, proc.getReturnType());
+ }
+ paramIndex++;
}
for (Argument parameter : proc.getArguments()) {
switch (parameter.getDirection()) {
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,15 +24,20 @@
*/
package org.teiid.translator.jdbc;
+import static org.teiid.language.SQLConstants.Reserved.*;
+
import java.sql.Time;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.IdentityHashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.teiid.language.Argument;
import org.teiid.language.Call;
@@ -45,6 +50,7 @@
import org.teiid.language.LanguageObject;
import org.teiid.language.Like;
import org.teiid.language.Literal;
+import org.teiid.language.NamedTable;
import org.teiid.language.SearchedCase;
import org.teiid.language.SetClause;
import org.teiid.language.Argument.Direction;
@@ -52,6 +58,7 @@
import org.teiid.language.SQLConstants.Tokens;
import org.teiid.language.SetQuery.Operation;
import org.teiid.language.visitor.SQLStringVisitor;
+import org.teiid.metadata.Procedure;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TypeFacility;
@@ -61,6 +68,9 @@
* to produce a SQL String. This class is expected to be subclassed.
*/
public class SQLConversionVisitor extends SQLStringVisitor{
+
+ public static final String TEIID_NATIVE_QUERY = "teiid:native-query"; //$NON-NLS-1$
+ public static final String TEIID_NON_PREPARED = "teiid:non-prepared"; //$NON-NLS-1$
private static DecimalFormat DECIMAL_FORMAT =
new DecimalFormat("#############################0.0#############################"); //$NON-NLS-1$
@@ -181,14 +191,71 @@
* @see org.teiid.language.visitor.SQLStringVisitor#visit(org.teiid.language.Call)
*/
public void visit(Call obj) {
- this.prepared = true;
- /*
+ Procedure p = obj.getMetadataObject();
+ if (p != null) {
+ String nativeQuery = p.getProperties().get(TEIID_NATIVE_QUERY);
+ if (nativeQuery != null) {
+ List<Object> parts = parseNativeQueryParts(nativeQuery);
+ this.prepared = !Boolean.valueOf(p.getProperties().get(TEIID_NON_PREPARED));
+ if (this.prepared) {
+ this.preparedValues = new ArrayList<Object>();
+ }
+ for (Object o : parts) {
+ if (o instanceof String) {
+ buffer.append(o);
+ } else {
+ Integer i = (Integer)o;
+ if (obj.getArguments().size() <= i) {
+ throw new IllegalArgumentException("Invalid parameter {0}. Must be less than or equal to {1}.");
+ }
+ if (obj.getArguments().get(i).getDirection() != Direction.IN) {
+ throw new IllegalArgumentException("Native query procedures cannot use non IN parameters.");
+ }
+ visit(obj.getArguments().get(i));
+ if (this.prepared) {
+ this.preparedValues.add(obj.getArguments());
+ }
+ }
+ }
+ return;
+ }
+ }
+ this.prepared = true;
+ /*
* preparedValues is now a list of procedure params instead of just values
*/
this.preparedValues = obj.getArguments();
buffer.append(generateSqlForStoredProcedure(obj));
}
+ private List<Object> parseNativeQueryParts(String nativeQuery) {
+ Pattern pattern = Pattern.compile("\\$(\\$\\$)*\\d+"); //$NON-NLS-1$
+ List<Object> parts = new LinkedList<Object>();
+ Matcher m = pattern.matcher(nativeQuery);
+ for (int i = 0; i < nativeQuery.length(); i++) {
+ if (!m.find(i)) {
+ parts.add(nativeQuery.substring(i).replaceAll("\\$\\$", "\\$")); //$NON-NLS-1$ //$NON-NLS-2$
+ break;
+ }
+ if (m.start() != i) {
+ parts.add(nativeQuery.substring(i, m.start()).replaceAll("\\$\\$", "\\$")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String match = m.group();
+ int end = match.lastIndexOf('$');
+ if ((end&0x1) == 1) {
+ //escaped
+ parts.add(match.replaceAll("\\$\\$", "\\$")); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ if (end != 0) {
+ parts.add(match.substring(0, end/2));
+ }
+ parts.add(Integer.parseInt(match.substring(end + 1))-1);
+ }
+ i = m.end();
+ }
+ return parts;
+ }
+
/**
* @see org.teiid.language.visitor.SQLStringVisitor#visit(org.teiid.language.Literal)
*/
@@ -355,4 +422,22 @@
return executionFactory.getLikeRegexString();
}
+ @Override
+ protected void appendBaseName(NamedTable obj) {
+ if (obj.getMetadataObject() != null) {
+ String nativeQuery = obj.getMetadataObject().getProperties().get(TEIID_NATIVE_QUERY);
+ if (nativeQuery != null) {
+ buffer.append(Tokens.LPAREN).append(nativeQuery).append(Tokens.RPAREN);
+ if (obj.getCorrelationName() == null) {
+ buffer.append(Tokens.SPACE);
+ if (useAsInGroupAlias()){
+ buffer.append(AS).append(Tokens.SPACE);
+ }
+ }
+ }
+ }
+ super.appendBaseName(obj);
+ }
+
+
}
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/IngresExecutionFactory.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/IngresExecutionFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/IngresExecutionFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -57,13 +57,14 @@
convert.addTypeMapping("decimal(38,19)", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
convert.addTypeMapping("decimal(15,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
convert.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
- convert.addTypeMapping("time with time zone", FunctionModifier.TIME); //$NON-NLS-1$
- convert.addTypeMapping("timestamp with time zone", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+ convert.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
+ convert.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
convert.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
convert.addTypeMapping("varchar(4000)", FunctionModifier.STRING); //$NON-NLS-1$
convert.addTypeMapping("blob", FunctionModifier.BLOB); //$NON-NLS-1$
convert.addTypeMapping("clob", FunctionModifier.CLOB); //$NON-NLS-1$
convert.addNumericBooleanConversions();
+ convert.setWideningNumericImplicit(true);
registerFunctionModifier(SourceSystemFunctions.CONVERT, convert);
registerFunctionModifier(SourceSystemFunctions.BITAND, new AliasModifier("bit_and")); //$NON-NLS-1$
@@ -76,7 +77,7 @@
registerFunctionModifier(SourceSystemFunctions.RAND, new AliasModifier("random")); //$NON-NLS-1$
registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("uppercase")); //$NON-NLS-1$
registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new AliasModifier("day")); //$NON-NLS-1$
- registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
+ registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier());
addPushDownFunction(INGRES, "bit_add", INTEGER, INTEGER, INTEGER); //$NON-NLS-1$
addPushDownFunction(INGRES, "bit_length", INTEGER, INTEGER); //$NON-NLS-1$
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/LocateFunctionModifier.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/LocateFunctionModifier.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/ingres/LocateFunctionModifier.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -21,28 +21,24 @@
*/
package org.teiid.translator.jdbc.ingres;
-import java.util.Arrays;
import java.util.List;
import org.teiid.language.Expression;
import org.teiid.language.Function;
-import org.teiid.language.LanguageFactory;
-import org.teiid.translator.TypeFacility;
import org.teiid.translator.jdbc.FunctionModifier;
public class LocateFunctionModifier extends FunctionModifier {
- private LanguageFactory languageFactory;
-
- public LocateFunctionModifier(LanguageFactory languageFactory) {
- this.languageFactory = languageFactory;
+ public LocateFunctionModifier() {
}
+
@Override
public List<?> translate(Function function) {
Expression a = function.getParameters().get(0);
Expression b = function.getParameters().get(1);
-
- return Arrays.asList(languageFactory.createFunction("locate", new Expression[] {b, a}, TypeFacility.RUNTIME_TYPES.INTEGER)); //$NON-NLS-1$
+ function.getParameters().set(0, b);
+ function.getParameters().set(1, a);
+ return null;
}
}
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -26,7 +26,9 @@
import static org.teiid.translator.TypeFacility.RUNTIME_NAMES.*;
+import java.sql.CallableStatement;
import java.sql.PreparedStatement;
+import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.sql.Types;
@@ -35,6 +37,7 @@
import java.util.Collection;
import java.util.List;
+import org.teiid.language.Call;
import org.teiid.language.ColumnReference;
import org.teiid.language.Command;
import org.teiid.language.DerivedColumn;
@@ -42,6 +45,7 @@
import org.teiid.language.ExpressionValueSource;
import org.teiid.language.Function;
import org.teiid.language.Insert;
+import org.teiid.language.LanguageObject;
import org.teiid.language.Limit;
import org.teiid.language.Literal;
import org.teiid.language.NamedTable;
@@ -55,6 +59,7 @@
import org.teiid.translator.SourceSystemFunctions;
import org.teiid.translator.Translator;
import org.teiid.translator.TranslatorException;
+import org.teiid.translator.TranslatorProperty;
import org.teiid.translator.TypeFacility;
import org.teiid.translator.jdbc.AliasModifier;
import org.teiid.translator.jdbc.ConvertModifier;
@@ -62,6 +67,7 @@
import org.teiid.translator.jdbc.FunctionModifier;
import org.teiid.translator.jdbc.JDBCExecutionFactory;
import org.teiid.translator.jdbc.LocateFunctionModifier;
+import org.teiid.translator.jdbc.TranslatedCommand;
@Translator(name="oracle", description="A translator for Oracle 9i Database or later")
@@ -85,6 +91,14 @@
public static final String WITHIN_DISTANCE = "sdo_within_distance"; //$NON-NLS-1$
public static final String NEAREST_NEIGHBOR_DISTANCE = "sdo_nn_distance"; //$NON-NLS-1$
public static final String ORACLE_SDO = "Oracle-SDO"; //$NON-NLS-1$
+
+ /*
+ * Handling for cursor return values
+ */
+ static final class RefCursorType {}
+ static int CURSOR_TYPE = -10;
+
+ private boolean oracleSuppliedDriver = true;
public void start() throws TranslatorException {
super.start();
@@ -548,4 +562,46 @@
return "REGEXP_LIKE"; //$NON-NLS-1$
}
+ public void setOracleSuppliedDriver(boolean oracleNative) {
+ this.oracleSuppliedDriver = oracleNative;
+ }
+
+ @TranslatorProperty(display="Oracle Native Driver", description="True if the driver is an Oracle supplied driver",advanced=true)
+ public boolean isOracleSuppliedDriver() {
+ return oracleSuppliedDriver;
+ }
+
+ @Override
+ 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) {
+ call.setReturnType(RefCursorType.class);
+ }
+ }
+ return super.translate(obj, context);
+ }
+
+ @Override
+ protected void registerSpecificTypeOfOutParameter(
+ CallableStatement statement, Class<?> runtimeType, int index)
+ throws SQLException {
+ if (oracleSuppliedDriver && index == 1 && runtimeType == RefCursorType.class) {
+ statement.registerOutParameter(1, CURSOR_TYPE);
+ } else {
+ super.registerSpecificTypeOfOutParameter(statement, runtimeType, index);
+ }
+ }
+
+ @Override
+ public ResultSet executeStoredProcedure(CallableStatement statement,
+ TranslatedCommand command, Class<?> returnType) throws SQLException {
+ ResultSet rs = super.executeStoredProcedure(statement, command, returnType);
+ if (!oracleSuppliedDriver || returnType != RefCursorType.class) {
+ return rs;
+ }
+ return (ResultSet)statement.getObject(1);
+ }
+
}
Property changes on: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres:3535-3555*
/trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres:3507-3597
Modified: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -68,7 +68,7 @@
}
@Test public void testBooleanToBigDecimal() throws Exception {
- helpTest(LANG_FACTORY.createLiteral(Boolean.TRUE, Boolean.class), "bigdecimal", "cast(1 AS decimal(38,19))"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest(LANG_FACTORY.createLiteral(Boolean.TRUE, Boolean.class), "bigdecimal", "1"); //$NON-NLS-1$ //$NON-NLS-2$
}
// Source = BYTE
@@ -82,7 +82,7 @@
}
@Test public void testBigIntegerToDouble() throws Exception {
- helpTest(LANG_FACTORY.createLiteral(new BigInteger("1"), BigInteger.class), "double", "cast(1 AS float)"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ helpTest(LANG_FACTORY.createLiteral(new BigInteger("1"), BigInteger.class), "double", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Source = FLOAT
@@ -106,7 +106,7 @@
// Source = DATE
@Test public void testDateToTimestamp() throws Exception {
- helpTest(LANG_FACTORY.createLiteral(TimestampUtil.createDate(103, 10, 1), java.sql.Date.class), "timestamp", "cast(DATE '2003-11-01' AS timestamp with time zone)"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest(LANG_FACTORY.createLiteral(TimestampUtil.createDate(103, 10, 1), java.sql.Date.class), "timestamp", "cast(DATE '2003-11-01' AS timestamp)"); //$NON-NLS-1$ //$NON-NLS-2$
}
// Source = TIME
Property changes on: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java:3535-3555
/trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresConvertModifier.java:3507-3597
Copied: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java (from rev 3597, trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java)
===================================================================
--- branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java (rev 0)
+++ branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.ingres;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.teiid.translator.TranslatorException;
+import org.teiid.translator.jdbc.TranslationHelper;
+
+public class TestIngresExecutionFactory {
+
+ private static IngresExecutionFactory TRANSLATOR;
+
+ @BeforeClass
+ public static void setUp() throws TranslatorException {
+ TRANSLATOR = new IngresExecutionFactory();
+ TRANSLATOR.start();
+ }
+
+ @Test public void testLocate() throws Exception {
+ String input = "SELECT INTKEY FROM BQT1.SmallA WHERE LOCATE(1, INTKEY) = 1 ORDER BY INTKEY"; //$NON-NLS-1$
+ String output = "SELECT SmallA.IntKey FROM SmallA WHERE locate(cast(SmallA.IntKey AS varchar(4000)), '1') = 1 ORDER BY SmallA.IntKey"; //$NON-NLS-1$
+
+ TranslationHelper.helpTestVisitor(TranslationHelper.BQT_VDB, input, output, TRANSLATOR);
+ }
+
+}
Property changes on: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java:3535-3555
/trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/ingres/TestIngresExecutionFactory.java:3507-3597
Modified: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,10 +24,15 @@
import static org.junit.Assert.*;
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
+import org.mockito.Mockito;
import org.teiid.cdk.CommandBuilder;
import org.teiid.cdk.api.TranslationUtility;
import org.teiid.core.types.DataTypeManager;
@@ -36,19 +41,25 @@
import org.teiid.dqp.internal.datamgr.FakeExecutionContextImpl;
import org.teiid.language.Command;
import org.teiid.metadata.Column;
+import org.teiid.metadata.ColumnSet;
import org.teiid.metadata.MetadataStore;
+import org.teiid.metadata.Procedure;
+import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
import org.teiid.query.metadata.CompositeMetadataStore;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TransformationMetadata;
+import org.teiid.query.sql.lang.SPParameter;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TranslatorException;
+import org.teiid.translator.jdbc.JDBCProcedureExecution;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
import org.teiid.translator.jdbc.TranslatedCommand;
import org.teiid.translator.jdbc.TranslationHelper;
-
+@SuppressWarnings("nls")
public class TestOracleTranslator {
private OracleExecutionFactory TRANSLATOR;
@@ -710,6 +721,8 @@
MetadataStore metadataStore = new MetadataStore();
Schema foo = RealMetadataFactory.createPhysicalModel("BQT1", metadataStore); //$NON-NLS-1$
Table table = RealMetadataFactory.createPhysicalGroup("SmallA", foo); //$NON-NLS-1$
+ Table x = RealMetadataFactory.createPhysicalGroup("x", foo); //$NON-NLS-1$
+ x.setProperty(SQLConversionVisitor.TEIID_NATIVE_QUERY, "select c from d");
Table dual = RealMetadataFactory.createPhysicalGroup("DUAL", foo); //$NON-NLS-1$
table.setNameInSource("SmallishA");//$NON-NLS-1$
String[] elemNames = new String[] {
@@ -722,12 +735,19 @@
DataTypeManager.DefaultDataTypes.INTEGER,
DataTypeManager.DefaultDataTypes.TIMESTAMP,
};
+ RealMetadataFactory.createElements(x, elemNames, elemTypes);
List<Column> cols = RealMetadataFactory.createElements(table, elemNames, elemTypes);
cols.get(1).setAutoIncremented(true);
cols.get(1).setNameInSource("ID:SEQUENCE=MYSEQUENCE.nextVal"); //$NON-NLS-1$
cols.get(2).setNativeType("date"); //$NON-NLS-1$
RealMetadataFactory.createElements(dual, new String[] {"something"}, new String[] {DataTypeManager.DefaultDataTypes.STRING}); //$NON-NLS-1$
+ ProcedureParameter in1 = RealMetadataFactory.createParameter("in1", SPParameter.IN, DataTypeManager.DefaultDataTypes.INTEGER); //$NON-NLS-1$
+ ColumnSet<Procedure> rs3 = RealMetadataFactory.createResultSet("proc.rs1", new String[] { "e1" }, new String[] { DataTypeManager.DefaultDataTypes.INTEGER }); //$NON-NLS-1$ //$NON-NLS-2$
+ Procedure p = RealMetadataFactory.createStoredProcedure("proc", foo, Arrays.asList(in1));
+ p.setResultSet(rs3);
+ p.setProperty(SQLConversionVisitor.TEIID_NATIVE_QUERY, "select x from y where z = $1");
+
CompositeMetadataStore store = new CompositeMetadataStore(metadataStore);
return new TransformationMetadata(null, store, null, RealMetadataFactory.SFM.getSystemFunctions(), null);
}
@@ -789,5 +809,50 @@
input, output,
TRANSLATOR);
}
+
+ @Test public void testCallWithResultSet() throws Exception {
+ String input = "call spTest5(1)"; //$NON-NLS-1$
+ String output = "{ ?= call spTest5(?)}"; //$NON-NLS-1$
+ TranslationHelper.helpTestVisitor(TranslationHelper.BQT_VDB,
+ input, output,
+ TRANSLATOR);
+ }
+
+ @Test public void testProcedureExecution() throws Exception {
+ Command command = TranslationHelper.helpTranslate(TranslationHelper.BQT_VDB, "call spTest8(1)"); //$NON-NLS-1$
+ 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("{ ?= call spTest8(?,?)}")).toReturn(cs); //$NON-NLS-1$
+ OracleExecutionFactory ef = new OracleExecutionFactory();
+
+ JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class), ef);
+ procedureExecution.execute();
+ assertEquals(Arrays.asList(4), procedureExecution.getOutputParameterValues());
+ Mockito.verify(cs, Mockito.times(1)).registerOutParameter(1, OracleExecutionFactory.CURSOR_TYPE);
+ Mockito.verify(cs, Mockito.times(1)).getObject(1);
+ }
+
+ @Test public void testNativeQuery() throws Exception {
+ String input = "SELECT (DoubleNum * 1.0) FROM x"; //$NON-NLS-1$
+ String output = "SELECT (x.DoubleNum * 1.0) FROM (select c from d) x"; //$NON-NLS-1$
+
+ QueryMetadataInterface metadata = getOracleSpecificMetadata();
+
+ helpTestVisitor(metadata, input, EMPTY_CONTEXT, null, output);
+ }
+
+ @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$
+
+ QueryMetadataInterface metadata = getOracleSpecificMetadata();
+
+ helpTestVisitor(metadata, input, EMPTY_CONTEXT, null, output);
+ }
+
}
Modified: branches/as7/connectors/translator-ldap/pom.xml
===================================================================
--- branches/as7/connectors/translator-ldap/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-ldap/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ldap</artifactId>
Property changes on: branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/translator-ldap/src/main/java/org/teiid/translator:3535-3555*
/trunk/connectors/translator-ldap/src/main/java/org/teiid/translator:3507-3597
Property changes on: branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap:3535-3555
/trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap:3507-3597
Modified: branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
===================================================================
--- branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -54,6 +54,7 @@
private boolean restrictToObjectClass;
private SearchDefaultScope searchDefaultScope = SearchDefaultScope.ONELEVEL_SCOPE;
private boolean usePagination;
+ private boolean exceptionOnSizeLimitExceeded;
public LDAPExecutionFactory() {
this.setMaxInCriteriaSize(1000);
@@ -154,4 +155,14 @@
this.usePagination = usePagination;
}
+ @TranslatorProperty(display="Exception on Size Limit Exceeded", description="Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.")
+ public boolean isExceptionOnSizeLimitExceeded() {
+ return exceptionOnSizeLimitExceeded;
+ }
+
+ public void setExceptionOnSizeLimitExceeded(
+ boolean exceptionOnSizeLimitExceeded) {
+ this.exceptionOnSizeLimitExceeded = exceptionOnSizeLimitExceeded;
+ }
+
}
Modified: branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
===================================================================
--- branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -124,6 +124,7 @@
private LDAPExecutionFactory executionFactory;
private ExecutionContext executionContext;
private SearchControls ctrls;
+ private int resultCount;
/**
* Constructor
@@ -323,16 +324,21 @@
return next();
}
+ if (result != null) {
+ resultCount++;
+ }
return result;
} catch (SizeLimitExceededException e) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, "Search results exceeded size limit. Results may be incomplete."); //$NON-NLS-1$
- searchEnumeration = null; // GHH 20080326 - NamingEnumartion's are no longer good after an exception so toss it
+ if (resultCount != searchDetails.getCountLimit()) {
+ String msg = "LDAP Search results exceeded size limit. Results may be incomplete."; //$NON-NLS-1$
+ if (executionFactory.isExceptionOnSizeLimitExceeded()) {
+ throw new TranslatorException(e, msg);
+ }
+ LogManager.logWarning(LogConstants.CTX_CONNECTOR, e, msg);
+ }
return null; // GHH 20080326 - if size limit exceeded don't try to read more results
} catch (NamingException ne) {
- final String msg = "Ldap error while processing next batch of results: " + ne.getExplanation(); //$NON-NLS-1$
- LogManager.logError(LogConstants.CTX_CONNECTOR, msg); // GHH 20080326 - changed to output explanation from LDAP server
- searchEnumeration = null; // GHH 20080326 - NamingEnumertion's are no longer good after an exception so toss it
- throw new TranslatorException(msg);
+ throw new TranslatorException(ne, "Ldap error while processing next batch of results"); //$NON-NLS-1$
}
}
Modified: branches/as7/connectors/translator-loopback/pom.xml
===================================================================
--- branches/as7/connectors/translator-loopback/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-loopback/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-loopback</artifactId>
Modified: branches/as7/connectors/translator-olap/pom.xml
===================================================================
--- branches/as7/connectors/translator-olap/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-olap/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-olap</artifactId>
Modified: branches/as7/connectors/translator-salesforce/pom.xml
===================================================================
--- branches/as7/connectors/translator-salesforce/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-salesforce/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-salesforce</artifactId>
Modified: branches/as7/connectors/translator-ws/pom.xml
===================================================================
--- branches/as7/connectors/translator-ws/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/connectors/translator-ws/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ws</artifactId>
Modified: branches/as7/console/pom.xml
===================================================================
--- branches/as7/console/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/console/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/as7/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
===================================================================
--- branches/as7/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -211,8 +211,8 @@
getTransactionCollectionValue(transactionMetaValue,transactionsCollection);
operationResult.setContent(createReportResultList(fieldNameList, resultObject.iterator()));
} else if (operationName.equals(Platform.Operations.KILL_TRANSACTION)) {
- String sessionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
- MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(sessionID) };
+ String transactionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
+ MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(transactionID) };
try {
executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_TRANSACTION, args);
} catch (Exception e) {
@@ -232,8 +232,8 @@
Long requestID = (Long) valueMap.get(Operation.Value.REQUEST_ID);
String sessionID = (String) valueMap.get(Operation.Value.SESSION_ID);
MetaValue[] args = new MetaValue[] {
- SimpleValueSupport.wrap(requestID),
- SimpleValueSupport.wrap(sessionID) };
+ SimpleValueSupport.wrap(sessionID),
+ SimpleValueSupport.wrap(requestID) };
try {
executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_REQUEST, args);
} catch (Exception e) {
@@ -876,7 +876,7 @@
request.setSourceRequest((Boolean) ProfileServiceUtil.booleanValue(compositeValue.get(SOURCE_REQUEST)));
request.setNodeId((Integer) ProfileServiceUtil.integerValue(compositeValue.get(NODE_ID)));
request.setTransactionId((String) ProfileServiceUtil.stringValue(compositeValue.get(TRANSACTION_ID)));
- request.setState((ProcessingState) ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), ProcessingState.class));
+ request.setState((ProcessingState.valueOf(ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), String.class))));
return request;
}
throw new IllegalStateException("Unable to unwrap RequestMetadata " + metaValue); //$NON-NLS-1$
Modified: branches/as7/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/as7/console/src/main/resources/META-INF/rhq-plugin.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/console/src/main/resources/META-INF/rhq-plugin.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -73,7 +73,7 @@
<plugin name="TeiidPlugin" displayName="Teiid Plugin" package="org.teiid.rhq.plugin"
- version="2.0.0" description="Supports management and monitoring of JBoss Teiid"
+ version="2.0.1" description="Supports management and monitoring of JBoss Teiid"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
@@ -93,23 +93,18 @@
<results>
<c:list-property name="list">
<c:map-property name="map">
+ <c:simple-property displayName="Request ID"
+ name="getExecutionId" type="string" description="The id for the request" />
<c:simple-property displayName="Session ID"
name="getSessionId" type="string"
- description="The name of the resource whose availability is being reported" />
- <c:simple-property displayName="Request ID"
- name="getRequestId" type="string" description="The id for the request" />
+ description="The session id the request is using" />
<c:simple-property displayName="SQL String"
name="getCommand" type="string" description="The SQL string for this query" />
<c:simple-property displayName="Source Request"
name="sourceRequest" type="string"
description="If false,this is the top level query. If true, this a physical source query." />
- <c:simple-property displayName="Execution ID"
- name="getExecutionId" type="string"
- description="The execution id for this request (if this is a physical source query)" />
<c:simple-property displayName="Start Time"
- name="getCreatedTime" type="string" description="The time this query began" />
- <c:simple-property displayName="Start Time"
- name="getProcessingTime" type="string" description="Processing time for this request" />
+ name="getStartTime" type="string" description="The time this query began" />
<c:simple-property displayName="Transaction ID"
name="getTransactionId" type="string"
description="The transaction XID if there is a transaction involved" />
@@ -187,15 +182,11 @@
required="false">
<c:map-property name="map">
<c:simple-property displayName="Request ID"
- name="getRequestId" type="string" description="The request identifier" />
+ name="getExecutionId" type="string" description="The request identifier" />
<c:simple-property displayName="Session ID"
name="getSessionId" type="string" description="Session identifier" />
- <c:simple-property displayName="Execution ID"
- name="getExecutionId" type="string" description="Unique Identifier for Request" />
- <c:simple-property displayName="Created Time"
- name="getCreatedTime" type="string" description="Time when request submitted" />
- <c:simple-property displayName="Processing Time"
- name="getProcessingTime" type="string" description="Processing time for the request" />
+ <c:simple-property displayName="Start Time"
+ name="getStartTime" type="string" description="Time when request submitted" />
<c:simple-property displayName="Last ping time"
name="getCommand" type="string" description="SQL Command" />
<c:simple-property displayName="Connector level request?"
@@ -203,7 +194,7 @@
description="True if this is a connector level request" />
<c:simple-property displayName="Node ID" name="getNodeId"
type="string" description="The node identifier" />
- <c:simple-property displayName="Tansaction identifier"
+ <c:simple-property displayName="Transaction identifier"
name="getTransactionId" type="string"
description="Transaction XID if a transaction is involved" />
</c:map-property>
@@ -484,8 +475,8 @@
name="getSessionId" type="string" description="Session identifier" />
<c:simple-property displayName="Execution ID"
name="getExecutionId" type="string" description="Unique Identifier for Request" />
- <c:simple-property displayName="Created Time"
- name="getCreatedTime" type="string" description="Time when request submitted" />
+ <c:simple-property displayName="Start Time"
+ name="getStartTime" type="string" description="Time when request submitted" />
<c:simple-property displayName="Processing Time"
name="getProcessingTime" type="string" description="Processing time for the request" />
<c:simple-property displayName="Last ping time"
@@ -495,7 +486,7 @@
description="True if this is a connector level request" />
<c:simple-property displayName="Node ID" name="getNodeId"
type="string" description="The node identifier" />
- <c:simple-property displayName="Tansaction identifier"
+ <c:simple-property displayName="Transaction identifier"
name="getTransactionId" type="string"
description="Transaction XID if a transaction is involved" />
</c:map-property>
Modified: branches/as7/documentation/admin-guide/pom.xml
===================================================================
--- branches/as7/documentation/admin-guide/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/admin-guide/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>admin-guide</artifactId>
Modified: branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml
===================================================================
--- branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/installation.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -98,7 +98,8 @@
/deployers
/teiid.deployer
/lib
- /teiid-examples]]></programlisting>
+ /teiid-examples
+ /tmp/teiid]]></programlisting>
</example>
<section>
<title>/deploy/teiid/teiid-jboss-beans.xml</title>
@@ -163,6 +164,14 @@
<title>teiid-docs</title>
<para>This directory contains the PDF documents related Teiid and Teiid development. </para>
</section>
+
+ <section>
+ <title>tmp/teiid</title>
+ <para>This directory contains temporary files created by Teiid. These are mostly created by the buffer manager.
+ These files are not needed across a VM restart. Creation of Teiid lob values (for example through SQL/XML) will typically create one file per lob once it exceeds the allowable
+ in memory size of 8KB. In heavy usage scenarios, consider pointing the buffer directory at a partition that is routinely defragmented.
+ </para>
+ </section>
</section>
Modified: branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml
===================================================================
--- branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -63,6 +63,38 @@
if your installation makes use of internal materialization, makes
heavy use of SQL/XML, or processes large row counts.
</para>
+ <section>
+ <title>Big Data/Memory</title>
+ <para>Usage of extremely large VM sizes and or datasets requires additional considerations.
+ Teiid has a non-negligible amount of overhead per batch/table page on the order of 100-200 bytes. Depending on the data types involved each
+ full batch/table page will represent a variable number of rows (a power of two multiple above or below the processor batch size). If you are dealing with datasets with billions of rows and you run into OutOfMemory issues, consider increasing the processor
+ batch size in the &jboss-beans; file to force the allocation of larger batches and table pages. If the processor batch size is increased and/or you are dealing with extremely wide result sets (several hundred columns),
+ then the default setting of 8MB for the maxStorageObjectSize in the &jboss-beans; file may be too low. The sizing for maxStorageObjectSize is terms of serialized size, which will be much
+ closer to the raw data size then the Java memory footprint estimation used for maxReservedKB.
+ maxStorageObjectSize should not be set too large relative to memoryBufferSpace since it will reduce the performance of the memory buffer. The memory buffer supports only 1 concurrent writer for each maxStorageObjectSize of the memoryBufferSpace.
+ </para>
+ <note><para>Teiid temporary tables (also used for internal materialization) can only support 2^31-1 rows per table.</para></note>
+ <para>
+ The memoryBufferSpace setting controls the amount of on or off heap memory allocated as byte buffers for use by the Teiid buffer manager. This setting defaults to -1, which automatically determines a setting based upon whether it is on or off heap and the value for maxReserveKB.
+ </para>
+ <para>You can take advantage of the buffer manager memory buffer to access system memory without allocating it to the heap. Setting memoryBufferOffHeap to true in &jboss-beans; will allocate the
+ Teiid memory buffer off heap. Depending on whether your installation is dedicated to Teiid and the amount of system memory available, this may be perferable to on-heap allocation. The primary
+ benefit is additional memory usage for Teiid without additional garbage collection tuning. This becomes especially important in situations where more than 32GB of memory is desired for the VM.
+ Note that when using off-heap allocation, the memory must still be available to the java process and that setting the value of memoryBufferSpace too high may cause the VM to swap rather than reside in memory.
+ With large off-heap buffer sizes (greater than several gigabytes) you may also need to adjust VM settings. For Sun VMs the relevant VM settings are MaxDirectMemorySize and UseLargePages. For example adding:
+ <programlisting>-XX:MaxDirectMemorySize=12g -XX:+UseLargePages</programlisting>
+ to the VM process arguments would allow for an effective allocation of approximately an 11GB Teiid memory buffer (the memoryBufferSpace setting) accounting for any additional direct memory that may be needed
+ by the AS or applications running in the AS.</para>
+ </section>
+ <section>
+ <title>Disk Usage</title>
+ <para>For table page and result batches the buffer manager will we a limited number of files that are dedicated to a particular storage size.
+ However, as mentioned in the installation, creation of Teiid lob values (for example through SQL/XML) will typically create one file per lob once the lob exceeds the allowable
+ in memory size of 8KB. In heavy usage scenarios, consider pointing the buffer directory on a partition that is routinely defragmented.
+ By default Teiid will use up to 50GB of disk space. This is tracked in terms of the number of bytes written by Teiid. For large data sets, you may need to increase the
+ maxBufferSpace setting in the &jboss-beans; file.
+ </para>
+ </section>
</section>
<section>
<title>Threading</title>
Modified: branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/security.xml
===================================================================
--- branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/security.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/security.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -87,24 +87,80 @@
The default name of JDBC connection's security-domain is "teiid-security". The default name for Admin connection
is "jmx-console". For the Admin connection's security domain, the user is allowed
to change which LoginModule that "jmx-console" pointing to, however should not change the name of the domain, as this name is
- shared between the "admin-console" application.</para>
+ shared between the "admin-console" application. In existing installations an appropriate security domain may already be configured for use by administrative clients (typically "jmx-console").
+ In this case it may be perfectly valid to reuse this existing security domain instead of creating a new teiid-security security domain.</para>
</note>
<section>
<title>Built-in LoginModules</title>
- <para>JBossAS provides several LoginModules for common authentication needs, such as authenticating from text files or LDAP.</para>
- <para>The UsersRolesLoginModule, which utilizes simple text files
- to authenticate users and to define
- their groups. The teiid-jboss-beans.xml configuration file contains an example of how to use UsersRolesLoginModule.
- Note that this is typically not for production use and is strongly recommended that you replace this login module. Please
- also note that, you can install multiple login modules as part of single security domain configuration and configure them
+ <para>JBossAS provides several LoginModules for common authentication needs, such as authenticating from a <xref linkend="text-login"/> or a <xref linkend="ldap-login"/>.</para>
+ <para>You can install multiple login modules as part of single security domain configuration and configure them
to part of login process. For example, for "teiid-security" domain, you can configure a file based and also LDAP based login modules,
- and have your user authenticated with either both or single login module.
+ and have your user authenticated with either or both login modules. If you want to write your own custom login module, check out the Developer's Guide for instructions.
</para>
- <para>See <ulink url="http://community.jboss.org/docs/DOC-11253">LDAP LoginModule configuration</ulink> for utilizing LDAP based authentication.
- If you want write your own Custom Login module, check out the Developer's Guide for instructions.
- </para>
+
+ <section id="text-login">
+ <title>Text Based LoginModule</title>
+ <para>The UsersRolesLoginModule utilizes simple text files to authenticate users and to define their groups.
+The teiid-jboss-beans.xml configuration file contains an example of how to use UsersRolesLoginModule.
+<note><para>The UsersRolesLoginModule is not recommended for production use and is strongly recommended that you replace this login module.</para></note>
+ </para>
+ <para>User names and passwords are stored in the <profile>conf/props/teiid-security-users.properties file.
+<example><title>Example user.properties file</title>
+<programlisting><![CDATA[# A users.properties file for use with the UsersRolesLoginModule
+# username=password
+
+fred=password
+george=password
+...]]></programlisting></example>
+
+JAAS role assignments are stored in the <profile>conf/props/teiid-security-roles.properties file.
+<example><title>Example user.properties file</title>
+<programlisting><![CDATA[# A roles.properties file for use with the UsersRolesLoginModule
+# username=role1,role2,...
+
+data_role_1=fred,sally
+data_role_2=george
+]]></programlisting></example>
+
+User and role names are entirely up to the needs of the given deployment. For example each application team can set their own security constraints for their VDBs, by mapping their VDB data roles to application specific JAAS roles, e.g. app_role_1=user1,user2,user3.
+<note><para>Teiid data roles names are independent of JAAS roles. VDB creators can choose whatever name they want for their data roles, which are then mapped at deployment time to JAAS roles.</para></note>
+</para>
</section>
+
+ <section id="ldap-login">
+ <title>LDAP Based LoginModule</title>
+ <para>See <ulink url="http://community.jboss.org/docs/DOC-11253">LDAP LoginModule configuration</ulink> for the AS community guide. The following are streamlined installation instruction.
+ <orderedlist>
+ <listitem><para>If using SSL to the LDAP server, ensure that the Corporate CA Certificate is added to the JRE trust store.</para>
+ </listitem>
+
+ <listitem><para>Include LDAP LoginModule in the JAAS Configuration</para>
+ <para>Configure LDAP authentication by editing <profile>conf/login-config.xml. If you wish to configure specifically for teiid, then the security domain teiid-security will need to be created/altered.
+ In new installations the more likely option is that you want to configure LDAP based authentication for the AS itself by modifying the "jmx-console" security domain.
+ You could do one of the following for Teiid:
+ <itemizedlist>
+ <listitem>
+ <para>Reuse the jmx-console (or whatever name you choose) security domain for Teiid by changing the teiid configuration &jboss-beans; to point to jmx-console, rather than teiid-security.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Follow the same steps to configure an LDAP security domain named teiid-security.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Leave Teiid to use the default file based LoginModule secuirty domain or create an entirely custom security domain configuration.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>Obscure the LDAP Password</para><para>Finally, protect the password following <ulink url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5...">these instructions.</ulink>
+ Note that the salt must be 8 chars andd see also http://community.jboss.org/message/137756#137756 for more on securing passwords.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+ </section>
<section>
<title>Kerberos support through GSSAPI</title>
@@ -124,53 +180,47 @@
<section>
<title>Remote Connections</title>
<para>On the server, edit the &jboss-beans; under the "SessionService" bean definition, as follows:
- <programlisting><![CDATA[
- <!-- Sets the authentication Type -->
- <property name="authenticationType">KRB5</property>
- <!-- Security domain used for kerberos authentication -->
- <property name="krb5SecurityDomain">teiid-krb5</property>
- ]]></programlisting>
+ <programlisting><![CDATA[<!-- Sets the authentication Type -->
+<property name="authenticationType">KRB5</property>
+<!-- Security domain used for kerberos authentication -->
+<property name="krb5SecurityDomain">teiid-krb5</property>]]></programlisting>
Now we need to define a security domain context for kerberos with the name mentioned in above.
Since kerberos authorization cannot define authorization roles, we'll define them using another login context.
Given below is a sample configuration to define roles using a UserRolesLoginModule.
<note><para>This configuration replaces the default Teiid login configuration, and you should change the principal
and key tab locations accordingly.</para></note>
- <programlisting><![CDATA[
- <!--login module that negotiates the login conext for kerberos -->
- <application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-krb5">
- <authentication>
- <login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
- <module-option name="storeKey">true</module-option>
- <module-option name="useKeyTab">true</module-option>
- <module-option name="principal">demo(a)EXAMPLE.COM</module-option>
- <module-option name="keyTab">path/to/krb5.keytab</module-option>
- <module-option name="doNotPrompt">true</module-option>
- <module-option name="debug">false</module-option>
- </login-module>
- </authentication>
- </application-policy>
-
- <!-- teiid's default security domain, replace this with your own if needs to be any other JAAS domain -->
- <application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-security">
- <authentication>
- <!-- This module assosiates kerberos user with this login set of login modules -->
- <login-module code="org.teiid.jboss.AssosiateCallerIdentityLoginModule" flag="required"/>
- <!-- Login module used for defining roles for user authencated using kerberos, keep the users file empty
- but provide roles in the roles file for users -->
- <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
- <module-option name="password-stacking">useFirstPass</module-option>
- <module-option name="usersProperties">props/teiid-security-users.properties</module-option>
- <module-option name="rolesProperties">props/teiid-security-roles.properties</module-option>
- </login-module>
- </authentication>
- </application-policy>
- ]]></programlisting>
+ <programlisting><![CDATA[<!--login module that negotiates the login conext for kerberos -->
+<application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-krb5">
+ <authentication>
+ <login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
+ <module-option name="storeKey">true</module-option>
+ <module-option name="useKeyTab">true</module-option>
+ <module-option name="principal">demo(a)EXAMPLE.COM</module-option>
+ <module-option name="keyTab">path/to/krb5.keytab</module-option>
+ <module-option name="doNotPrompt">true</module-option>
+ <module-option name="debug">false</module-option>
+ </login-module>
+ </authentication>
+</application-policy>
+
+<!-- teiid's default security domain, replace this with your own if needs to be any other JAAS domain -->
+<application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-security">
+ <authentication>
+ <!-- This module assosiates kerberos user with this login set of login modules -->
+ <login-module code="org.teiid.jboss.AssosiateCallerIdentityLoginModule" flag="required"/>
+ <!-- Login module used for defining roles for user authencated using kerberos, keep the users file empty
+ but provide roles in the roles file for users -->
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
+ <module-option name="password-stacking">useFirstPass</module-option>
+ <module-option name="usersProperties">props/teiid-security-users.properties</module-option>
+ <module-option name="rolesProperties">props/teiid-security-roles.properties</module-option>
+ </login-module>
+ </authentication>
+</application-policy>]]></programlisting>
Edit the "run.conf" or "run.conf.bat" file depending upon the environment in the "${jboss-as}/bin" directory
and add the following JVM options (changing the realm and KDC settings according to your environment)
- <programlisting><![CDATA[
- JAVA_OPTS = "$JAVA_OPTS -Djava.security.krb5.realm=EXAMPLE.COM -Djava.security.krb5.kdc=kerberos.example.com -Djavax.security.auth.useSubjectCredsOnly=false"
- ]]></programlisting>
+ <programlisting><![CDATA[JAVA_OPTS = "$JAVA_OPTS -Djava.security.krb5.realm=EXAMPLE.COM -Djava.security.krb5.kdc=kerberos.example.com -Djavax.security.auth.useSubjectCredsOnly=false"]]></programlisting>
This finishes the configuration on the server side, restart the server and make sure that there were no errors during startup.
</para>
@@ -179,33 +229,27 @@
<para>In you client VM the JAAS
configuration for kerberos authentication needs to be written. A sample configuration file (client.conf) is show below
- <programlisting><![CDATA[
- Client {
- com.sun.security.auth.module.Krb5LoginModule required
- useTicketCache=true
- storeKey=true
- useKeyTab=true
- keyTab="/path/to/krb5.keytab"
- doNotPrompt=false
- debug=false
- principal="demo(a)EXAMPLE.COM";
- };
- ]]></programlisting>
+ <programlisting><![CDATA[Client {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useTicketCache=true
+ storeKey=true
+ useKeyTab=true
+ keyTab="/path/to/krb5.keytab"
+ doNotPrompt=false
+ debug=false
+ principal="demo(a)EXAMPLE.COM";
+};]]></programlisting>
Add the following JVM options to your client's startup script - change Realm and KDC settings according to
your environment
- <programlisting><![CDATA[
- -Djava.security.krb5.realm=EXAMPLE.COM
- -Djava.security.krb5.kdc=kerberos.example.com
- -Djavax.security.auth.useSubjectCredsOnly=false
- -Dsun.security.krb5.debug=false
- -Djava.security.auth.login.config=/path/to/client.conf
- ]]></programlisting>
+ <programlisting><![CDATA[-Djava.security.krb5.realm=EXAMPLE.COM
+-Djava.security.krb5.kdc=kerberos.example.com
+-Djavax.security.auth.useSubjectCredsOnly=false
+-Dsun.security.krb5.debug=false
+-Djava.security.auth.login.config=/path/to/client.conf]]></programlisting>
Add the following URL connection properties to Teiid JDBC connection string
- <programlisting><![CDATA[
- authenticationType=KRB5;jaasName=Client;kerberosServicePrincipleName=demo(a)EXAMPLE.COM
- ]]></programlisting>
+ <programlisting><![CDATA[authenticationType=KRB5;jaasName=Client;kerberosServicePrincipleName=demo(a)EXAMPLE.COM]]></programlisting>
There is no need to provide the user name and password, when the application is trying to make JDBC connection it
will authenticate locally and use the same user credetinals to neogitiate service token with server and grant the
connection. See Client Developer's guide for information on connection properties and how to configure data sources.
@@ -236,31 +280,27 @@
data source. Here is a sample configuration, this needs to be configured in "teiid-jboss-beans.xml" file.
</para>
- <programlisting><![CDATA[
- <application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-security">
- <authentication>
+ <programlisting><![CDATA[<application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-security">
+ <authentication>
+
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
+ <module-option name = "password-stacking">useFirstPass</module-option>
+ <module-option name="usersProperties">props/teiid-security-users.properties</module-option>
+ <module-option name="rolesProperties">props/teiid-security-roles.properties</module-option>
+ </login-module>
+
+ <login-module code="org.jboss.resource.security.CallerIdentityLoginModule" flag="required">
+ <module-option name = "password-stacking">useFirstPass</module-option>
+ <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+ </login-module>
+
+ </authentication>
+</application-policy>]]></programlisting>
- <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
- <module-option name = "password-stacking">useFirstPass</module-option>
- <module-option name="usersProperties">props/teiid-security-users.properties</module-option>
- <module-option name="rolesProperties">props/teiid-security-roles.properties</module-option>
- </login-module>
-
- <login-module code="org.jboss.resource.security.CallerIdentityLoginModule" flag="required">
- <module-option name = "password-stacking">useFirstPass</module-option>
- <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
- </login-module>
-
- </authentication>
- </application-policy>
- ]]></programlisting>
-
<para>In the -ds.xml file that is defined as the "managedConnectionFactoryName" in the above configuration,
you need to add the following element</para>
- <programlisting><![CDATA[
- <security-domain>teiid-security</security-domain>
- ]]></programlisting>
+ <programlisting><![CDATA[<security-domain>teiid-security</security-domain>]]></programlisting>
<para>In the above configuration example, in the primary login module "UsersRolesLoginModule" is setup to hold the
passwords in the file, and when user logs in with password, the same password will be also set on the logged in Subject after
@@ -285,31 +325,27 @@
map to different roles. If a user has multiple roles, the first role that has the credential will be chosen.
Below find the sample configuration.</para>
- <programlisting><![CDATA[
- <application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-security">
- <authentication>
-
- <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
- <module-option name = "password-stacking">useFirstPass</module-option>
- <module-option name="usersProperties">props/teiid-security-users.properties</module-option>
- <module-option name="rolesProperties">props/teiid-security-roles.properties</module-option>
- </login-module>
-
- <login-module code="org.teiid.jboss.RoleBasedCredentialMapIdentityLoginModule" flag="required">
- <module-option name = "password-stacking">useFirstPass</module-option>
- <module-option name="credentialMap">props/teiid-credentialmap.properties</module-option>
- <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
- </login-module>
-
- </authentication>
- </application-policy>
- ]]></programlisting>
+ <programlisting><![CDATA[<application-policy xmlns="urn:jboss:security-beans:1.0" name="teiid-security">
+ <authentication>
+
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
+ <module-option name = "password-stacking">useFirstPass</module-option>
+ <module-option name="usersProperties">props/teiid-security-users.properties</module-option>
+ <module-option name="rolesProperties">props/teiid-security-roles.properties</module-option>
+ </login-module>
+
+ <login-module code="org.teiid.jboss.RoleBasedCredentialMapIdentityLoginModule" flag="required">
+ <module-option name = "password-stacking">useFirstPass</module-option>
+ <module-option name="credentialMap">props/teiid-credentialmap.properties</module-option>
+ <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+ </login-module>
+
+ </authentication>
+</application-policy>]]></programlisting>
<para>In the -ds.xml file that is defined as the "managedConnectionFactoryName" in the above configuration,
you need to add the following element</para>
- <programlisting><![CDATA[
- <security-domain>teiid-security</security-domain>
- ]]></programlisting>
+ <programlisting><![CDATA[<security-domain>teiid-security</security-domain>]]></programlisting>
<para>In the above configuration example, in the primary login module "UsersRolesLoginModule" is setup for logging in
the primary user and assign some roles. The "RoleBasedCredentialMap" login module is configured to hold
@@ -322,19 +358,17 @@
password in the file defined by the "credentialMap" property, and define following properties in
the "RoleBasedCredentialMap" login module.</para>
- <programlisting><![CDATA[
- <login-module code="org.teiid.jboss.RoleBasedCredentialMapIdentityLoginModule" flag="required">
- <module-option name = "password-stacking">useFirstPass</module-option>
- <module-option name="credentialMap">props/teiid-credentialmap.properties</module-option>
- <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
-
- <!-- below properties are only required when passwords are encrypted -->
- <module-option name = "pbealgo">PBEWithMD5AndDES</module-option>
- <module-option name = "pbepass">testPBEIdentityLoginModule</module-option>
- <module-option name = "salt">abcdefgh</module-option>
- <module-option name = "iterationCount">19</module-option>
- </login-module>
- ]]></programlisting>
+ <programlisting><![CDATA[<login-module code="org.teiid.jboss.RoleBasedCredentialMapIdentityLoginModule" flag="required">
+ <module-option name = "password-stacking">useFirstPass</module-option>
+ <module-option name="credentialMap">props/teiid-credentialmap.properties</module-option>
+ <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+
+ <!-- below properties are only required when passwords are encrypted -->
+ <module-option name = "pbealgo">PBEWithMD5AndDES</module-option>
+ <module-option name = "pbepass">testPBEIdentityLoginModule</module-option>
+ <module-option name = "salt">abcdefgh</module-option>
+ <module-option name = "iterationCount">19</module-option>
+</login-module>]]></programlisting>
<para>For full details about encryption of the password, please follow this
<ulink url="http://community.jboss.org/docs/DOC-9703">document</ulink>'s
@@ -367,6 +401,8 @@
<property name="truststorePassword">passwd</property>
<!-- 1-way, 2-way, anonymous -->
<property name="authenticationMode">1-way</property>
+ <!-- an optional property to constrain the cipher suites to be negotiated between server and client -->
+ <property name="enabledCipherSuites">SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA</property>
</bean>]]></programlisting>
</example>
<itemizedlist>
@@ -387,6 +423,7 @@
public key for the client. Depending upon how you created the keystore and truststores,
this may be same file as defined under "keystoreFilename" property.</para></listitem>
<listitem><para>truststorePassword - password for the truststore. </para></listitem>
+ <listitem><para>enabledCipherSuites - A comma separated list of cipher suites allowed for encryption between server and client. The values must be valid supported cipher suites otherwise SSL connections will fail.</para></listitem>
</itemizedlist>
<section id="ssl_auth">
<title>SSL Authentication Modes</title>
@@ -408,8 +445,9 @@
</section>
<section id="encryption_strength">
<title>Encryption Strength</title>
- <para>Both anonymous SSL and login only encryption are configured to use 128 bit AES encryption.
- 1-way and 2-way SSL allow for cipher suite negotiation based upon the default cipher suites supported by the respective Java platforms of the client and server.
+ <para>Both anonymous SSL and login only encryption are configured to use 128 bit AES encryption by default. By default,
+ 1-way and 2-way SSL allow for cipher suite negotiation based upon the default cipher suites supported by the respective Java platforms of the client and server.
+ User can restrict the cipher suites used for encryption by specifying the <emphasis>enabledCipherSuites</emphasis> property above in ssl configuration.
</para>
</section>
</section>
Modified: branches/as7/documentation/caching-guide/pom.xml
===================================================================
--- branches/as7/documentation/caching-guide/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/caching-guide/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>caching-guide</artifactId>
Modified: branches/as7/documentation/client-developers-guide/pom.xml
===================================================================
--- branches/as7/documentation/client-developers-guide/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/client-developers-guide/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>client-developers-guide</artifactId>
Modified: branches/as7/documentation/developer-guide/pom.xml
===================================================================
--- branches/as7/documentation/developer-guide/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/developer-guide/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>developer-guide</artifactId>
Modified: branches/as7/documentation/pom.xml
===================================================================
--- branches/as7/documentation/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: branches/as7/documentation/quick-start-example/pom.xml
===================================================================
--- branches/as7/documentation/quick-start-example/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/quick-start-example/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quick-start-example</artifactId>
Modified: branches/as7/documentation/reference/pom.xml
===================================================================
--- branches/as7/documentation/reference/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/reference/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>reference</artifactId>
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/Reference.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/Reference.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/Reference.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -58,7 +58,7 @@
<xi:include href="content/transaction_support.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/dataroles.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/system_schema.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/multisource.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/vdbs.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/translators.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/federated_planning.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/architecture.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/content/architecture.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/architecture.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/architecture.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -123,17 +123,25 @@
actually support this method.</para>
</section>
<section>
- <title>Timeouts</title>
- <para>Timeouts in Teiid are managed on the client-side,
- in the JDBC API (which underlies both SOAP and ODBC access).
- Timeouts are only relevant for the first record returned. If the
+ <title>User Query Timeouts</title>
+ <para>User query timeouts in Teiid can be managed on the client-side or the server-side.
+ Timeouts are only relevant for the first record returned. If the
first record has not been received by the client within the
- specified timeout period, a ‘cancel’ command is issued to the
+ specified timeout period, a 'cancel' command is issued to the
server for the request and no results are returned to the
- client. The cancel command is issued by the JDBC API without the
- client’s intervention. See the Client Developers Guide for more on setting
- statement timeouts via the connection property "QUERYTIMEOUT" and see the Java JDBC API for setting
- the query timeout via <code>java.sql.Statement.setQueryTimeout</code> method.</para>
+ client. The cancel command is issued asynchronously without the
+ client’s intervention.
+ </para><para>
+ The JDBC API uses the query timeout set by the <code>java.sql.Statement.setQueryTimeout</code> method.
+ You may also set a default statement timeout via the connection property "QUERYTIMEOUT".
+ ODBC clients may also utilize QUERYTIMEOUT as an execution property via a set statement to control the default timeout setting.
+ See the Client Developers Guide for more on connection/execution properties and set statements.</para>
+ <para>Server-side timeouts start when the query is received by the engine. There may be a skew from the when the
+ client issued the query due to network latency or server load that may slow the processing of IO work.
+ The timeout will be cancelled if the first result is sent back before the timeout has ended.
+ See the <xref linkend="vdbs"/> section for more on setting the query-timeout VDB property.
+ See the Admin Guide for more on modifying the &jboss-beans; file to set default query timeout for all queries.
+ </para>
</section>
</section>
<section>
Deleted: branches/as7/documentation/reference/src/main/docbook/en-US/content/multisource.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/multisource.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/multisource.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % CustomDTD SYSTEM "../../../../../../docbook/custom.dtd">
-%CustomDTD;
-]>
-<chapter id="multisource">
- <title>Multi-source models</title>
- <para>Multi-source models can be used to quickly access data in multiple sources with homogeneous metadata.
- Since all sources utilize the same physical metadata, this feature is most appropriate for accessing the same source type with multiple instances.
- <para>A model is marked as supporting multi-source by setting the property supports-multi-source-bindings to true.
- With supports-multi-source-bindings set to true, 1 or more uniquely named source elements can be added to the model.
- See <xref linkend="dynamic_vdbs"/> for a full template of the vdb.xml.</para>
- A physical table in a multi-source model is effectively treated as a view that is a
- union all of the actual physical table from each of the configured sources. These tables tables are implicitly partitioned on a string pseudo-column "source_name".
- The "source_name" column will be available to your use queries for a multi-source model regardless of whether it is explicitly part of the metadata.
- The source_name column value for a particular row is the source name used to obtain that row.
- More complex partitioning scenarios, such as heterogeneous sources or list partitioning will require the use of a <xref linkend="partitioned_union"/></para>
- <para>In some scenarios, the source_name column can be manually added to the physical metadata in the Designer tool so that virtual layer logic can be multi-source aware.
- It is important to understand that a column or IN procedure parameter named source_name will always be treated as the explicit form of the multi-source source_name column
- and will no longer be treated as an actual physical column or procedure parameter.</para>
- <section>
- <title>Multi-source SELECTs</title>
- <para>A multi-source SELECT may use the source_name column anywhere a column reference is allowed. As a final stage of planning, a source query will be generated against each source and each instance of the source_name column replaced by the appropriate value.
- If the resulting query still needs executed, it is sent to the source. If the WHERE clause evaluates to always false, then the query is pruned from the result. All results are then unioned together and returned as the full result.
- </para>
- </section>
- <section>
- <title>Multi-source INSERTs</title>
- <para>A multi-source INSERT may use the source_name column as an insert target column to specify which source should be targeted by the INSERT. Only a INSERT using the VALUES clause is supported and the source_name column value must be a literal.
- If the source_name column is not part of the INSERT column, then the INSERT will be issued against every source. The sum of the update counts will be returned as the resultant update count.</para>
- </section>
- <section>
- <title>Multi-source UPDATEs</title>
- <para>A multi-source delete functions just like SELECT, however it is not possible to use the source_name column as a target column in the change set. Any other usage of the source_name column will be the appropriate value for each source.
- If the WHERE clause evaluates to always false, then no update will be issued to the source. The sum of the update counts will be returned as the resultant update count.</para>
- </section>
- <section>
- <title>Multi-source DELETEs</title>
- <para>A multi-source delete functions just like SELECT. Any usage of the source_name column will be the appropriate value for each source.
- If the WHERE clause evaluates to always false, then no delete will be issued to the source. The sum of the update counts will be returned as the resultant update count.</para>
- </section>
- <section>
- <title>Multi-source Stored Procedures</title>
- <para>A physical stored procedures requires the manual addition of a string source_name parameter to allow for specifying which source the procedure is executed on.
- If the source_name parameter is not added or if named parameters are used and the source_name parameter is allowed to default to a null value, then the procedure will be executed on
- each source and the results unioned together.</para>
- <para>It is not possible to execute procedures that required to return IN/OUT, OUT, or RETURN parameters values on more than 1 source at a time.</para>
- </section>
- <section>
- <title>Additional Concerns</title>
- <para>When running under a transaction of in a mode that detects the need for a transation and multiple updates are performed, an attempt will be made to enlist each source in the same XA transaction.</para>
- </section>
-</chapter>
\ No newline at end of file
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1864,7 +1864,7 @@
<title>COMMANDPAYLOAD</title>
<para>Retrieve a string from the command payload
or null if no command payload was specified. The command
- payload is set by a method on the Teiid JDBC API
+ payload is set by the <code>TeiidStatement.setPayload</code> method on the Teiid JDBC API
extensions on a per-query basis.</para>
<para><synopsis>COMMANDPAYLOAD([key])</synopsis></para>
<para>If the key parameter is provided, the command payload object is cast to a
@@ -1877,7 +1877,7 @@
<para><synopsis>ENV(key)</synopsis></para>
<para>The only key specific to the current session is 'sessionid'.
However the preferred mechanism for getting the session id is with the session_id() function.
- To prevent untrusted access to system properties, the use of this function must be specifically enabled in the &jboss-beans; file.</para>
+ To prevent untrusted access to system properties, this function is not enabled by default. The ENV function may be enabled via the allowEnvFunction property in the &teiid-deployer-beans; file.</para>
<para>key, return value are strings</para>
</section>
<section>
@@ -1967,10 +1967,13 @@
<para id="xmlnamespaces">XMLNAMESPACES is used provide namespace information. NO DEFAULT is equivalent to defining the default namespace to the null uri - xmlns="".
Only one DEFAULT or NO DEFAULT namespace item may be specified. The namespace prefixes xmlns and xml are reserved.</para>
<para>If a attribute name is not supplied, the expression must be a column reference, in which case the attribute name will be the column name. Null attribute values are ignored.</para>
- <para>Name, prefix are identifiers. uri is a string literal. content can be any type. Return value is xml. The return value is valid for use in places where a document is expected.</para>
- <para><emphasis>Example</emphasis>: with an xml_value of <doc/>, <programlisting>xmlelement('elem', 1, '<2/>', xml_value)</programlisting>
+ <para>Name, prefix are identifiers. uri is a string literal. content can be any type. Return value is xml. The return value is valid for use in places where a document is expected.</para>
+ <example>
+ <title>XMLELEMENT of mixed values</title>
+ <para>with an xml_value of <doc/>, <programlisting>XMLELEMENT(NAME "elem", 1, '<2/>', xml_value)</programlisting>
Returns: <code><elem>1&lt;2/&gt;<doc/><elem/></code>
</para>
+ </example>
</section>
<section>
<title>XMLFOREST</title>
@@ -2053,10 +2056,12 @@
with the security system.</para>
<section>
<title>HASROLE</title>
- <para>Whether the current caller has the role roleName.</para>
+ <para>Whether the current caller has the Teiid data role roleName.</para>
<para><synopsis>hasRole([roleType,] roleName)</synopsis></para>
<para>roleName must be a string, the return type is boolean.</para>
- <para>The two argument form is provided for backwards compatibility. roleType is a string and must be 'data'</para>
+ <para>The two argument form is provided for backwards compatibility. roleType is a string and must be 'data'.</para>
+ <para>Role names are case-sensitive and only match Teiid <xref linkend="dataroles"/>.
+ JAAS roles/groups names are not valid for this function - unless there is corresponding data role with the same name.</para>
</section>
</section>
<section>
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/content/translators.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/translators.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -239,6 +239,11 @@
</listitem>
<listitem>
<para>
+ <emphasis>access</emphasis> - for use with Microsoft Access 2003 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<emphasis>db2</emphasis> - for use with DB2 8 or later.
</para>
</listitem>
@@ -317,6 +322,12 @@
A rownum colum should have a name in source of <code>rownum</code>. These rownum columns do not
have the same semantics as the Oracle rownum construct so care must be taken in their usage.
</para>
+ <para>Oracle specific execution properties:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>OracleSuppliedDriver</emphasis> - indicates that the Oracle supplied driver (typically prefixed by ojdbc) is being used. Defaults to true. Set to false when using DataDirect or other Oracle JDBC drivers.</para>
+ </listitem>
+ </itemizedlist>
</listitem>
<listitem>
<para>
@@ -509,6 +520,22 @@
</section>
<section>
+ <title>Native Queries</title>
+ <para>Both physical tables and procedures may optionally have native queries associated with them. No validation of the native query is performed, it is simply used in a straight-forward manner to generate the source SQL.
+ For a physical table setting the teiid:native-query extension metadata to the desired query string will have Teiid execute the native query as an inline view in the source query.
+ This feature should only be used against sources that support inline views. For example on a physical table y with nameInSource=x and teiid:native-query=select c from g, the Teiid source query
+ "SELECT c FROM y" would generate the SQL query "SELECT c FROM (select c from g) as x". Note that the column names in the native query must match the nameInSource of the physical table columns for the resulting SQL
+ to be valid.</para>
+ <para>For physical procedures you may also set the teiid:native-query extension metadata to a desired query string with the added ability to positionally reference IN parameters. A parameter reference has the form
+ $integer, e.g. $1. Note that 1 based indexing is used and that only IN parameters may be referenced. Dollar-sign ($) is reserved in physical procedure native queries. To use a $ directly, it must be escaped with another $, e.g. $$.
+ By default bind values will be used for parameter values. In some situations you may wish to bind values directly into the resulting SQL. The teiid:non-prepared extension metadata property may be set to false to turn off
+ parameter binding. Note this option should be used with caution as inbound may allow for SQL injection attacks if not properly validated. The native query does not need to call a stored procedure. Any SQL that returns
+ a result set positionally matching the result set expected by the physical stored procedure metadata will work. For example on a stored procedure x with teiid:native-query=select c from g where c1 = $1 and c2 = '$$', the Teiid source query
+ "CALL x(?)" would generate the SQL query "select c from g where c1 = ? and c2 = '$'". Note that ? in this example will be replaced with the actual value bound to parameter 1.
+ </para>
+ </section>
+
+ <section>
<title>JCA Resource Adapter</title>
<para>The resource adapter for this translator provided through data source in JBoss AS,
Refer to Admin Guide for "JDBC Data Sources" configuration section.</para>
@@ -555,6 +582,11 @@
<entry>Use a PagedResultsControl to page through large results. This is not supported by all directory servers.</entry>
<entry>false</entry>
</row>
+ <row>
+ <entry>ExceptionOnSizeLimitExceeded</entry>
+ <entry>Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.</entry>
+ <entry>false</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -1196,293 +1228,5 @@
</table>
</section>
</section>
-
- <section id="dynamic_vdbs">
- <title>Dynamic VDBs</title>
- <para>
- Teiid integration is available via a "Dynamic VDB" without the need for Teiid Designer
- tooling. While this mode of operation does not yet allow for the creation of view
- layers, the underlying sources can still be queried as if they are a single source. See
- the kit's "teiid-example/dynamicvdb-*" for working examples.
- </para>
- <para>
- To build a dynamic VDB, you'll need to create a
- <filename><replaceable>SOME-NAME</replaceable>-vdb.xml</filename> file. The XML file captures
- information about the VDB, the sources it integrate, and preferences for importing metadata.
- </para>
-
- <note>
- <para>
- VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to
- recognize this file as a dynamic VDB.
- </para>
- </note>
-
- <para>
- my-vdb.xml: (The vdb-deployer.xml schema for this file is available in the schema
- folder under the docs with the Teiid distribution.)
- </para>
-
- <programlisting role="XML" language="XML"><![CDATA[<vdb name="${vdb-name}" version="${vdb-version}">
-
- <property name="UseConnectorMetadata" value="..." />
-
- <!-- define a model fragment for each data source -->
- <model name="${model-name}">
-
- <property name="..." value="..." />
- ...
-
- <source name="${source-name}" translator-name="${translator-name}"
-
- connection-jndi-name="${deployed-jndi-name}">
- ...
- </model>
-
- <!-- create translator instances that override default properties -->
-
- <translator name="${translator-name}" type="${translator-type}" />
-
- <property name="..." value="..." />
- ...
-
- </translator>
-</vdb>]]></programlisting>
-
- <section>
- <title>VDB Element</title>
- <itemizedlist>
- <title>Attributes</title>
- <listitem>
- <para>
- <emphasis>name</emphasis>
- </para>
- <para>
- The name of the VDB. The VDB name
- referenced through the driver or datasource during the connection time.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>version</emphasis>
- </para>
- <para>
- The version of the VDB (should be an
- positive integer). This determines the deployed directory location
- (see Name), and provides an explicit versioning mechanism to the VDB
- name.
- </para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <title>Property Elements</title>
- <listitem>
- <para>
- <emphasis>UseConnectorMetadata</emphasis>
- </para>
- <para>
- Setting to use connector
- supplied metadata. Can be "true" or "cached". "true" will obtain
- metadata once for every launch of Teiid. "cached" will save a file
- containing the metadata into the
- <filename><replaceable>PROFILE</replaceable>/data/teiid</filename> directory
- </para>
- </listitem>
- </itemizedlist>
-
- </section>
-
- <section>
- <title>Model Element</title>
- <itemizedlist>
- <title>Attributes</title>
- <listitem>
- <para>
- <emphasis>name</emphasis>
- </para>
- <para>
- The name of the model is used as a
- top level schema name for all of the metadata imported from the
- connector. The name should be unique among all Models in the VDB and
- should not contain the '.' character.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>version</emphasis>
- </para>
- <para>
- The version of the VDB (should be an
- positive integer). This determines the deployed directory location
- (see Name), and provides an explicit versioning mechanism to the VDB
- name.
- </para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <title>Source Element</title>
- <listitem>
- <para>
- <emphasis>name</emphasis>
- </para>
- <para>
- The name of the source to use for this
- model. This can be any name you like, but will typically be the same
- as the model name. Having a name different than the model name is
- only useful in multi-source scenarios.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>translator-name</emphasis>
- </para>
- <para>
- The name or type of the Teiid Translator to use. Possible values include
- the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.)
- and translators defined in the translators section.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>connection-jndi-name</emphasis>
- </para>
- <para>
- The JNDI name of this source's connection factory. There should be a
- corresponding "-ds.xml" file that defines the connection factory in
- the JBoss AS. Check out the deploying VDB dependencies section for
- info. You also need to deploy these connection factories before you
- can deploy the VDB.
- </para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <title>Property Elements</title>
- <listitem>
- <para>
- <emphasis>importer.<propertyname></emphasis>
- </para>
- <para>
- Property to be used by the connector importer for the model for purposes
- importing metadata. See possible property name/values in the
- Translator specific section. Note that using these properties you
- can narrow or widen the data elements available for integration.
- </para>
- </listitem>
- </itemizedlist>
-
- </section>
- <section>
- <title>Translator Element</title>
- <itemizedlist>
- <title>Attributes</title>
- <listitem>
- <para>
- <emphasis>name</emphasis>
- </para>
- <para>
- The name of the the Translator. Referenced by the source element.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>type</emphasis>
- </para>
- <para>
- The base type of the Translator. Can be one of the built-in types (ws,
- file, ldap, oracle, sqlserver, db2, derby, etc.).
- </para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <title>Property Elements</title>
- <listitem>
- <para>
- Set a value that overrides a translator default property. See
- possible property name/values in the Translator specific section.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- </section>
- <section>
- <title>Multi-Source Models and VDB</title>
- <para>
- When you have multiple instances of data that are using identical schema
- (horizontal sharding), Teiid can help you aggregate data across all the
- instances, using "multi-source" models. In this scenario, instead of
- creating/importing a model for every data source, user needs to define one
- source model that represents the schema and configure multiple data "sources"
- underneath it. During runtime, when a query issued against this model, the query
- engine analyzes the information and gathers the required data from all the
- sources configured and aggregates the results and provides in a single result set.
- </para>
-
- <para>
- To mark a model as multi-source, the user needs to supply property called
- <property>supports-multi-source-bindings</property>, in the "vdb.xml" file.
- Also, the user needs to define multiple sources. Here is code example showing dynamic vdb with single model with
- multiple sources defined.
- </para>
-
- <programlisting role="XML" language="XML"><![CDATA[<vdb name="vdbname" version="1">
- <model visible="true" type="PHYSICAL" name="Customers" path="/Test/Customers.xmi">
- <property name="supports-multi-source-bindings" value="true"/>
- <source name="chicago"
- translator-name="oracle" connection-jndi-name="chicago-customers"/>
- <source name="newyork"
- translator-name="oracle" connection-jndi-name="newyork-customers"/>
- <source name="la"
- translator-name="oracle" connection-jndi-name="la-customers"/>
- </model>
-</vdb>]]></programlisting>
-
- <para>
- In the above example, the VDB defined has single model called <literal>Customers</literal>,
- that has multiple sources (<literal>chicago</literal>, <literal>newyork</literal>,
- and <literal>la</literal>) that define different instances of data. Every
- time a model is marked as "multi-source", the
- runtime engine adds a additional column called "SOURCE_NAME" to every table in
- that model. This column maps to the source's name from the XML. In
- the above XML code that would be <literal>chicago</literal>, <literal>la</literal>,
- <literal>newyork</literal>. This allows queries like the following:
- </para>
-
- <programlisting language="SQL"><![CDATA[select * from table where SOURCE_NAME = 'newyork'
-update table column=value where SOURCE_NAME='chicago'
-delete from table where column = x and SOURCE_NAME='la'
-insert into table (column, SOURCE_NAME) VALUES ('value', 'newyork')]]></programlisting>
-
- <para>
- Note that when user do not supply the "SOURCE_NAME" in the criteria, the command applies
- to all the sources. If SOURCE_NAME supplied, the query is executed only aginst the source specified.
- Another useful feature along with this feature is
- "partial results" to skip unavailable sources if they are down.
- </para>
-
- <note>
- <para>
- Currently the tooling support for managing the multi-source feature is
- limited, so if you need to use this feature build the VDB as usual in
- the Teiid Designer and then edit the "vdb.xml" file in the VDB archive
- using a Text editor to add the additional sources as defined above.
- You must deploy a separate data source for each source defined in the xml file.
- </para>
- </note>
-
- <note>
- <para>
- If you would like to use "SOURCE_NAME" in your transformations to control which sources are accessed or updated,
- you would manually need to add this extra column on your view table in
- the Designer. This column will not be automatically added on the source table, when you import
- the medata from source.
- </para>
- </note>
- </section>
-
</chapter>
\ No newline at end of file
Copied: branches/as7/documentation/reference/src/main/docbook/en-US/content/vdbs.xml (from rev 3597, trunk/documentation/reference/src/main/docbook/en-US/content/vdbs.xml)
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/vdbs.xml (rev 0)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/vdbs.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % CustomDTD SYSTEM "../../../../../../docbook/custom.dtd">
+%CustomDTD;
+]>
+<chapter id="vdbs">
+ <title>VDBs</title>
+ <section>
+ <title>VDB Definition</title>
+ <para>A VDB or virtual database definition is contained in an XML file.
+ For .vdb archive files created in the design tool, this file is embedded in the archive and most field can be updated through tooling.
+ The XML schema for this file can be found in the teiid-docs/schema directory.</para>
+ <example>
+ <title>Example VDB XML</title>
+ <programlisting role="XML" language="XML"><![CDATA[<vdb name="${vdb-name}" version="${vdb-version}">
+
+ <!-- VDB properties -->
+ <property name="UseConnectorMetadata" value="..." />
+ ...
+
+ <!-- define a model fragment for each data source -->
+ <model name="${model-name}">
+
+ <property name="..." value="..." />
+ ...
+
+ <source name="${source-name}" translator-name="${translator-name}"
+
+ connection-jndi-name="${deployed-jndi-name}">
+ ...
+ </model>
+
+ <!-- create translator instances that override default properties -->
+
+ <translator name="${translator-name}" type="${translator-type}" />
+
+ <property name="..." value="..." />
+ ...
+
+ </translator>
+</vdb>]]></programlisting>
+</example>
+
+ <section>
+ <title>VDB Element</title>
+ <itemizedlist>
+ <title>Attributes</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the VDB. The VDB name
+ referenced through the driver or datasource during the connection time.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>version</emphasis>
+ </para>
+ <para>
+ The version of the VDB (should be an
+ positive integer). This determines the deployed directory location
+ (see Name), and provides an explicit versioning mechanism to the VDB
+ name.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Property Elements</title>
+ <listitem>
+ <para>
+ <emphasis>UseConnectorMetadata</emphasis>
+ </para>
+ <para>
+ Setting to use connector
+ supplied metadata. Can be "true" or "cached". "true" will obtain
+ metadata once for every launch of Teiid. "cached" will save a file
+ containing the metadata into the
+ <filename><replaceable>PROFILE</replaceable>/data/teiid</filename> directory
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>query-timeout</emphasis>
+ </para>
+ <para>
+ Sets the default query timeout in milliseconds for queries executed against this VDB. 0 indicates that the server default query timeout should be used. Defaults to 0. Will have no effect if the server default query timeout is set to a lesser value. Note that clients can still set their own timeouts that will be managed on the client side.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+
+ <section>
+ <title>Model Element</title>
+ <itemizedlist>
+ <title>Attributes</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the model is used as a
+ top level schema name for all of the metadata imported from the
+ connector. The name should be unique among all Models in the VDB and
+ should not contain the '.' character.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>version</emphasis>
+ </para>
+ <para>
+ The version of the VDB (should be an
+ positive integer). This determines the deployed directory location
+ (see Name), and provides an explicit versioning mechanism to the VDB
+ name.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Source Element</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the source to use for this
+ model. This can be any name you like, but will typically be the same
+ as the model name. Having a name different than the model name is
+ only useful in multi-source scenarios.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>translator-name</emphasis>
+ </para>
+ <para>
+ The name or type of the Teiid Translator to use. Possible values include
+ the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.)
+ and translators defined in the translators section.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>connection-jndi-name</emphasis>
+ </para>
+ <para>
+ The JNDI name of this source's connection factory. There should be a
+ corresponding "-ds.xml" file that defines the connection factory in
+ the JBoss AS. Check out the deploying VDB dependencies section for
+ info. You also need to deploy these connection factories before you
+ can deploy the VDB.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Property Elements</title>
+ <listitem>
+ <para>
+ <emphasis>importer.<propertyname></emphasis>
+ </para>
+ <para>
+ Property to be used by the connector importer for the model for purposes
+ importing metadata. See possible property name/values in the
+ Translator specific section. Note that using these properties you
+ can narrow or widen the data elements available for integration.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section>
+ <title>Translator Element</title>
+ <itemizedlist>
+ <title>Attributes</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the the Translator. Referenced by the source element.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>type</emphasis>
+ </para>
+ <para>
+ The base type of the Translator. Can be one of the built-in types (ws,
+ file, ldap, oracle, sqlserver, db2, derby, etc.).
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Property Elements</title>
+ <listitem>
+ <para>
+ Set a value that overrides a translator default property. See
+ possible property name/values in the Translator specific section.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section id="dynamic_vdbs">
+ <title>Dynamic VDBs</title>
+ <para>
+ Teiid integration is available via a "Dynamic VDB" without the need for Teiid Designer
+ tooling. While this mode of operation does not yet allow for the creation of view
+ layers, the underlying sources can still be queried as if they are a single source. See
+ the kit's "teiid-example/dynamicvdb-*" for working examples.
+ </para>
+
+ <para>
+ To build a dynamic VDB, you'll need to create a
+ <filename><replaceable>SOME-NAME</replaceable>-vdb.xml</filename> file. The XML file captures
+ information about the VDB, the sources it integrate, and preferences for importing metadata.
+ </para>
+
+ <note>
+ <para>
+ VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to
+ recognize this file as a dynamic VDB.
+ </para>
+ </note>
+
+ <para>
+ my-vdb.xml: (The vdb-deployer.xml schema for this file is available in the schema
+ folder under the docs with the Teiid distribution.)
+ </para>
+
+ </section>
+ <section>
+ <title>Multi-Source Models and VDB</title>
+ <para>
+ Multi-source models can be used to quickly access data in multiple sources with homogeneous metadata.
+ When you have multiple instances of data that are using identical schema
+ (horizontal sharding), Teiid can help you aggregate data across all the
+ instances, using "multi-source" models. In this scenario, instead of
+ creating/importing a model for every data source, user needs to define one
+ source model that represents the schema and configure multiple data "sources"
+ underneath it. During runtime, when a query issued against this model, the query
+ engine analyzes the information and gathers the required data from all the
+ sources configured and aggregates the results and provides in a single result set.
+ Since all sources utilize the same physical metadata, this feature is most appropriate for accessing the same source type with multiple instances.
+ </para>
+
+ <para>
+ To mark a model as multi-source, the user needs to supply property called
+ <property>supports-multi-source-bindings</property>, in the "vdb.xml" file.
+ Also, the user needs to define multiple sources. Here is code example showing dynamic vdb with single model with
+ multiple sources defined.
+ </para>
+
+ <programlisting role="XML" language="XML"><![CDATA[<vdb name="vdbname" version="1">
+ <model visible="true" type="PHYSICAL" name="Customers" path="/Test/Customers.xmi">
+ <property name="supports-multi-source-bindings" value="true"/>
+ <source name="chicago"
+ translator-name="oracle" connection-jndi-name="chicago-customers"/>
+ <source name="newyork"
+ translator-name="oracle" connection-jndi-name="newyork-customers"/>
+ <source name="la"
+ translator-name="oracle" connection-jndi-name="la-customers"/>
+ </model>
+</vdb>]]></programlisting>
+
+ <para>
+ In the above example, the VDB defined has single model called <literal>Customers</literal>,
+ that has multiple sources (<literal>chicago</literal>, <literal>newyork</literal>,
+ and <literal>la</literal>) that define different instances of data. Every
+ time a model is marked as "multi-source", the
+ runtime engine adds a additional column called "SOURCE_NAME" to every table in
+ that model. This column maps to the source's name from the XML. In
+ the above XML code that would be <literal>chicago</literal>, <literal>la</literal>,
+ <literal>newyork</literal>. This allows queries like the following:
+ </para>
+
+ <programlisting language="SQL"><![CDATA[select * from table where SOURCE_NAME = 'newyork'
+update table column=value where SOURCE_NAME='chicago'
+delete from table where column = x and SOURCE_NAME='la'
+insert into table (column, SOURCE_NAME) VALUES ('value', 'newyork')]]></programlisting>
+
+ <para>
+ Note that when user do not supply the "SOURCE_NAME" in the criteria, the command applies
+ to all the sources. If SOURCE_NAME supplied, the query is executed only aginst the source specified.
+ Another useful feature along with this feature is
+ "partial results" to skip unavailable sources if they are down.
+ </para>
+
+ <para>More complex partitioning scenarios, such as heterogeneous sources or list partitioning will require the use of a <xref linkend="partitioned_union"/>.</para>
+
+ <note>
+ <para>
+ Currently the tooling support for managing the multi-source feature is
+ limited, so if you need to use this feature build the VDB as usual in
+ the Teiid Designer and then edit the "vdb.xml" file in the VDB archive
+ using a Text editor to add the additional sources as defined above.
+ You must deploy a separate data source for each source defined in the xml file.
+ </para>
+ </note>
+
+ <note>
+ <para>
+ If you would like to use "SOURCE_NAME" in your transformations to control which sources are accessed or updated,
+ you would manually need to add this extra column on your view table in
+ the Designer. This column will not be automatically added on the source table, when you import
+ the medata from source.
+
+ It is important to understand that a column or IN procedure parameter named source_name in multi-source mode will always be treated as the explicit form of the multi-source source_name column
+ and will no longer be treated as an actual physical column or procedure parameter.</para>
+ </note>
+
+ <section>
+ <title>Multi-source SELECTs</title>
+ <para>A multi-source SELECT may use the source_name column anywhere a column reference is allowed. As a final stage of planning, a source query will be generated against each source and each instance of the source_name column replaced by the appropriate value.
+ If the resulting query still needs executed, it is sent to the source. If the WHERE clause evaluates to always false, then the query is pruned from the result. All results are then unioned together and returned as the full result.
+ </para>
+ </section>
+ <section>
+ <title>Multi-source INSERTs</title>
+ <para>A multi-source INSERT may use the source_name column as an insert target column to specify which source should be targeted by the INSERT. Only a INSERT using the VALUES clause is supported and the source_name column value must be a literal.
+ If the source_name column is not part of the INSERT column, then the INSERT will be issued against every source. The sum of the update counts will be returned as the resultant update count.</para>
+ </section>
+ <section>
+ <title>Multi-source UPDATEs</title>
+ <para>A multi-source delete functions just like SELECT, however it is not possible to use the source_name column as a target column in the change set. Any other usage of the source_name column will be the appropriate value for each source.
+ If the WHERE clause evaluates to always false, then no update will be issued to the source. The sum of the update counts will be returned as the resultant update count.</para>
+ </section>
+ <section>
+ <title>Multi-source DELETEs</title>
+ <para>A multi-source delete functions just like SELECT. Any usage of the source_name column will be the appropriate value for each source.
+ If the WHERE clause evaluates to always false, then no delete will be issued to the source. The sum of the update counts will be returned as the resultant update count.</para>
+ </section>
+ <section>
+ <title>Multi-source Stored Procedures</title>
+ <para>A physical stored procedures requires the manual addition of a string source_name parameter to allow for specifying which source the procedure is executed on.
+ If the source_name parameter is not added or if named parameters are used and the source_name parameter is allowed to default to a null value, then the procedure will be executed on
+ each source and the results unioned together.</para>
+ <para>It is not possible to execute procedures that required to return IN/OUT, OUT, or RETURN parameters values on more than 1 source at a time.</para>
+ </section>
+ <section>
+ <title>Additional Concerns</title>
+ <para>When running under a transaction of in a mode that detects the need for a transaction and multiple updates are performed, an attempt will be made to enlist each source in the same XA transaction.</para>
+ </section>
+ </section>
+
+</chapter>
\ No newline at end of file
Modified: branches/as7/engine/pom.xml
===================================================================
--- branches/as7/engine/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-engine</artifactId>
Property changes on: branches/as7/engine/src/main/java/org/teiid/api
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api:3535-3555*
/trunk/engine/src/main/java/org/teiid/api:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception:3535-3555*
/trunk/engine/src/main/java/org/teiid/api/exception:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query:3535-3555*
/trunk/engine/src/main/java/org/teiid/api/exception/query:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/api/exception/query/UnresolvedSymbolDescription.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/api/exception/query/UnresolvedSymbolDescription.java:3535-3555
/trunk/engine/src/main/java/org/teiid/api/exception/query/UnresolvedSymbolDescription.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common:3535-3555*
/trunk/engine/src/main/java/org/teiid/common:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer:3535-3555*
/trunk/engine/src/main/java/org/teiid/common/buffer:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/AbstractTupleSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/AbstractTupleSource.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/AbstractTupleSource.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/AutoCleanupUtil.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/AutoCleanupUtil.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/AutoCleanupUtil.java:3507-3597
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer;
+
+public class BaseCacheEntry {
+
+ private CacheKey key;
+
+ public BaseCacheEntry(CacheKey key) {
+ this.key = key;
+ }
+
+ public Long getId() {
+ return key.getId();
+ }
+
+ @Override
+ public int hashCode() {
+ return key.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return key.toString();
+ }
+
+ public void setKey(CacheKey key) {
+ this.key = key;
+ }
+
+ public CacheKey getKey() {
+ return key;
+ }
+
+}
\ No newline at end of file
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/BaseCacheEntry.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/BatchManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/BatchManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/BatchManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -40,7 +40,7 @@
boolean prefersMemory();
- Long createManagedBatch(List<? extends List<?>> batch) throws TeiidComponentException;
+ Long createManagedBatch(List<? extends List<?>> batch, Long previous, boolean removeOld) throws TeiidComponentException;
void remove();
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/BatchManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/BatchManager.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/BatchManager.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/BlockedException.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/BlockedException.java:3149-3217
/trunk/engine/src/main/java/org/teiid/common/buffer/BlockedException.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/BlockedException.java:3149-3217,3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/BlockedException.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/BufferManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/BufferManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -53,21 +53,17 @@
public enum BufferReserveMode {
/**
- * Claim unused buffers up to the amount requested, using a progressive decaying algorithm
- */
- WAIT,
- /**
* Claim all of the buffers requested, even if they are not available, without waiting
*/
FORCE,
/**
- * Claim unused buffers up to the amount requested witout waiting
+ * Claim unused buffers up to the amount requested without waiting
*/
NO_WAIT
}
- public static int DEFAULT_CONNECTOR_BATCH_SIZE = 1024;
- public static int DEFAULT_PROCESSOR_BATCH_SIZE = 512;
+ public static int DEFAULT_CONNECTOR_BATCH_SIZE = 512;
+ public static int DEFAULT_PROCESSOR_BATCH_SIZE = 256;
public static int DEFAULT_MAX_PROCESSING_KB = -1;
public static int DEFAULT_RESERVE_BUFFER_KB = -1;
@@ -93,11 +89,11 @@
throws TeiidComponentException;
/**
- * Return the maximum KB that can be temporarily held potentially
+ * Return the max that can be temporarily held potentially
* across even a blocked exception.
* @return
*/
- int getMaxProcessingKB();
+ int getMaxProcessingSize();
/**
* Creates a new {@link FileStore}. See {@link FileStore#setCleanupReference(Object)} to
@@ -122,7 +118,7 @@
void releaseBuffers(int count);
/**
- * Get the size estimate in KB for the given schema.
+ * Get the size estimate for the given schema.
*/
int getSchemaSize(List<? extends Expression> elements);
@@ -133,10 +129,17 @@
TupleBuffer getTupleBuffer(String id);
/**
- * Set the maxActivePlans as a hint at determining the maxProcessingKB
+ * Set the maxActivePlans as a hint at determining the maxProcessing
* @param maxActivePlans
*/
- void setMaxActivePlans(int maxActivePlans);
+ void setMaxActivePlans(int maxActivePlans);
+
+ /**
+ * Wait for additional buffers to become available.
+ * @param additional
+ * @return
+ */
+ int reserveAdditionalBuffers(int additional);
@Replicated(replicateState=true)
void distributeTupleBuffer(String uuid, TupleBuffer tb);
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/BufferManager.java:3220-3275
/trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/BufferManager.java:3220-3275,3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/Cache.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/Cache.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/Cache.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,6 +22,7 @@
package org.teiid.common.buffer;
+import java.lang.ref.WeakReference;
import java.util.Collection;
import org.teiid.core.TeiidComponentException;
@@ -29,11 +30,66 @@
/**
* Represents the storage strategy for the {@link BufferManager}
*/
-public interface Cache extends StorageManager {
- void createCacheGroup(Long gid); //called prior to adding an entry
+public interface Cache<T> extends StorageManager {
+ /**
+ * Must be called prior to adding any group entries
+ * @param gid
+ */
+ void createCacheGroup(Long gid);
+
+ /**
+ * Remove an entire cache group
+ *
+ * TODO: this should use a callback on the buffermangaer to remove memory entries
+ * without materializing all group keys
+ * @param gid
+ * @return
+ */
Collection<Long> removeCacheGroup(Long gid);
+
+ /**
+ * Must be called prior to adding an entry
+ * @param gid
+ * @param oid
+ */
void addToCacheGroup(Long gid, Long oid);
- CacheEntry get(Long id, Serializer<?> serializer) throws TeiidComponentException;
- void add(CacheEntry entry, Serializer<?> s);
- void remove(Long gid, Long id);
+
+ /**
+ * Lock the object for load and return an identifier/lock
+ * that can be used to retrieve the object.
+ * @param oid
+ * @param serializer
+ * @return the identifier, may be null
+ */
+ T lockForLoad(Long oid, Serializer<?> serializer);
+
+ /**
+ * Must be called after lockForLoad
+ * @param o
+ */
+ void unlockForLoad(T lock);
+
+ /**
+ * Get method, must be called using the object obtained in the
+ * lockForLoad method
+ * @return
+ * @throws TeiidComponentException
+ */
+ CacheEntry get(T lock, Long oid, WeakReference<? extends Serializer<?>> ref) throws TeiidComponentException;
+
+ /**
+ * Adds an entry to the cache.
+ * @param entry
+ * @param s
+ * @throws Exception
+ */
+ boolean add(CacheEntry entry, Serializer<?> s) throws Exception;
+
+ /**
+ * Remove an entry from the cache
+ * @param gid
+ * @param id
+ */
+ boolean remove(Long gid, Long id);
+
}
\ No newline at end of file
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/Cache.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/Cache.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/Cache.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,60 +24,39 @@
import java.lang.ref.WeakReference;
-public class CacheEntry {
+public class CacheEntry extends BaseCacheEntry {
private boolean persistent;
private Object object;
- private int sizeEstimate;
+ private final int sizeEstimate;
private WeakReference<? extends Serializer<?>> serializer;
- private Long id;
- public CacheEntry(Long id) {
- this.id = id;
+ public CacheEntry(Long oid) {
+ this(new CacheKey(oid, 0, 0), 0, null, null, false);
}
- public Long getId() {
- return id;
+ public CacheEntry(CacheKey key, int sizeEstimate, Object object, WeakReference<? extends Serializer<?>> serializer, boolean persistent) {
+ super(key);
+ this.sizeEstimate = sizeEstimate;
+ this.object = object;
+ this.serializer = serializer;
+ this.persistent = persistent;
}
-
- @Override
- public int hashCode() {
- return getId().hashCode();
+
+ public void setObject(Object object) {
+ this.object = object;
}
public int getSizeEstimate() {
return sizeEstimate;
}
- public void setSizeEstimate(int sizeEstimate) {
- this.sizeEstimate = sizeEstimate;
- }
-
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof CacheEntry)) {
- return false;
- }
- return getId().equals(((CacheEntry)obj).getId());
- }
-
- @Override
- public String toString() {
- return getId().toString();
- }
-
public Object nullOut() {
Object result = getObject();
- setObject(null);
- setSerializer(null);
+ this.object = null;
+ this.serializer = null;
return result;
}
- public void setObject(Object object) {
- this.object = object;
- }
-
public Object getObject() {
return object;
}
@@ -94,8 +73,12 @@
this.serializer = serializer;
}
- public WeakReference<? extends Serializer<?>> getSerializer() {
- return serializer;
+ public Serializer<?> getSerializer() {
+ WeakReference<? extends Serializer<?>> ref = this.serializer;
+ if (ref == null) {
+ return null;
+ }
+ return ref.get();
}
}
\ No newline at end of file
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/CacheEntry.java:3507-3597
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheKey.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheKey.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheKey.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer;
+
+public class CacheKey implements Comparable<CacheKey> {
+
+ private Long id;
+ protected long lastAccess;
+ protected long orderingValue;
+
+ public CacheKey(Long id, long lastAccess, long orderingValue) {
+ this.id = id;
+ this.lastAccess = lastAccess;
+ this.orderingValue = orderingValue;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ @Override
+ public int hashCode() {
+ return id.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return id.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof CacheKey)) {
+ return false;
+ }
+ return this.id.equals(((CacheKey)obj).getId());
+ }
+
+ public long getLastAccess() {
+ return lastAccess;
+ }
+
+ public long getOrderingValue() {
+ return orderingValue;
+ }
+
+ @Override
+ public int compareTo(CacheKey o) {
+ int result = (int) Math.signum(orderingValue - o.orderingValue);
+ if (result == 0) {
+ result = (int)Math.signum(lastAccess - o.lastAccess);
+ if (result == 0) {
+ return Long.signum(id - o.id);
+ }
+ }
+ return result;
+ }
+
+}
\ No newline at end of file
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/CacheKey.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/CacheKey.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java:3507-3597
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+
+public abstract class ExtensibleBufferedInputStream extends InputStream {
+ ByteBuffer buf;
+
+ @Override
+ public int read() throws IOException {
+ if (!ensureBytes()) {
+ return -1;
+ }
+ return buf.get() & 0xff;
+ }
+
+ private boolean ensureBytes() throws IOException {
+ if (buf == null || buf.remaining() == 0) {
+ buf = nextBuffer();
+ if (buf == null) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ protected abstract ByteBuffer nextBuffer() throws IOException;
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
+ if (!ensureBytes()) {
+ return -1;
+ }
+ len = Math.min(len, buf.remaining());
+ buf.get(b, off, len);
+ return len;
+ }
+
+ @Override
+ public void reset() throws IOException {
+ if (buf != null) {
+ buf.rewind();
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /trunk/engine/src/main/java/org/teiid/common/buffer/ExtensibleBufferedInputStream.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStore.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStore.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStore.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -190,62 +190,35 @@
protected abstract void removeDirect();
public InputStream createInputStream(final long start, final long length) {
- return new InputStream() {
+ return new ExtensibleBufferedInputStream() {
private long offset = start;
private long streamLength = length;
+ private ByteBuffer bb = ByteBuffer.allocate(1<<13);
@Override
- public int read() throws IOException {
- byte[] buffer = new byte[1];
- int read = read(buffer, 0, 1);
- if (read == -1) {
- return -1;
- }
- return buffer[0];
- }
-
- @Override
- public int read(byte[] b, int off, int len) throws IOException {
+ protected ByteBuffer nextBuffer() throws IOException {
+ int len = bb.capacity();
if (this.streamLength != -1 && len > this.streamLength) {
len = (int)this.streamLength;
}
if (this.streamLength == -1 || this.streamLength > 0) {
- int bytes = FileStore.this.read(offset, b, off, len);
- if (bytes != -1) {
- this.offset += bytes;
- if (this.streamLength != -1) {
- this.streamLength -= bytes;
- }
+ int bytes = FileStore.this.read(offset, bb.array(), 0, len);
+ if (bytes == -1) {
+ return null;
}
- return bytes;
+ bb.rewind();
+ bb.limit(bytes);
+ this.offset += bytes;
+ if (this.streamLength != -1) {
+ this.streamLength -= bytes;
+ }
+ return bb;
}
- return -1;
+ return null;
}
};
}
- public ByteBuffer getBuffer(long start, int length, boolean allocate) throws IOException {
- byte[] b = new byte[length];
- if (!allocate) {
- readFully(start, b, 0, length);
- }
- return ByteBuffer.wrap(b);
- }
-
- public void updateFromBuffer(ByteBuffer bb, long start) throws IOException {
- byte[] b = null;
- int offset = 0;
- bb.rewind();
- if (bb.hasArray()) {
- b = bb.array();
- offset = bb.arrayOffset();
- } else {
- b = new byte[bb.limit()];
- bb.get(b);
- }
- write(start, b, offset, bb.limit());
- }
-
public InputStream createInputStream(final long start) {
return createInputStream(start, -1);
}
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStore.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/FileStore.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/FileStore.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,7 +22,6 @@
package org.teiid.common.buffer;
-import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -50,8 +49,7 @@
if (fsos != null && !fsos.bytesWritten()) {
return new ByteArrayInputStream(fsos.getBuffer(), 0, fsos.getCount());
}
- //TODO: adjust the buffer size, and/or develop a shared buffer strategy
- return new BufferedInputStream(lobBuffer.createInputStream(0));
+ return lobBuffer.createInputStream(0);
}
@Override
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/FileStoreInputStreamFactory.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/IndexedTupleSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/IndexedTupleSource.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/IndexedTupleSource.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -28,6 +28,8 @@
import java.util.List;
import java.util.RandomAccess;
+import org.teiid.client.ResizingArrayList;
+
/**
* Creates a copy of a reference list when modified.
*
@@ -101,7 +103,7 @@
@Override
public void clear() {
if (!modified) {
- list = new ArrayList<T>();
+ list = new ResizingArrayList<T>();
modified = true;
} else {
list.clear();
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/LightWeightCopyOnWriteList.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/LobManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/LobManager.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/SPage.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -25,7 +25,6 @@
import java.lang.ref.PhantomReference;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Iterator;
@@ -34,6 +33,7 @@
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
+import org.teiid.client.ResizingArrayList;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
@@ -49,8 +49,6 @@
@SuppressWarnings("unchecked")
class SPage implements Cloneable {
- static final int MIN_PERSISTENT_SIZE = 16;
-
static class SearchResult {
int index;
SPage page;
@@ -103,9 +101,9 @@
this.stree = stree;
this.id = counter.getAndIncrement();
stree.pages.put(this.id, this);
- this.values = new ArrayList<List<?>>();
+ this.values = new ResizingArrayList<List<?>>();
if (!leaf) {
- children = new ArrayList<SPage>();
+ children = new ResizingArrayList<SPage>();
}
}
@@ -119,10 +117,10 @@
SPage clone = (SPage) super.clone();
clone.stree = tree;
if (children != null) {
- clone.children = new ArrayList<SPage>(children);
+ clone.children = new ResizingArrayList<SPage>(children);
}
if (values != null) {
- clone.values = new ArrayList<List<?>>(values);
+ clone.values = new ResizingArrayList<List<?>>(values);
}
return clone;
} catch (CloneNotSupportedException e) {
@@ -186,23 +184,27 @@
if (values instanceof LightWeightCopyOnWriteList<?>) {
values = ((LightWeightCopyOnWriteList<List<?>>)values).getList();
}
- if (managedBatch != null && trackingObject == null) {
- stree.getBatchManager(children == null).remove(managedBatch);
- managedBatch = null;
- trackingObject = null;
- }
- if (values.size() < MIN_PERSISTENT_SIZE) {
- this.values = values;
+ if (values.size() < stree.minPageSize) {
+ setDirectValues(values);
return;
} else if (stree.batchInsert && children == null && values.size() < stree.leafSize) {
- this.values = values;
+ setDirectValues(values);
stree.incompleteInsert = this;
return;
}
this.values = null;
+ managedBatch = stree.getBatchManager(children == null).createManagedBatch(values, managedBatch, trackingObject == null);
this.trackingObject = null;
- managedBatch = stree.getBatchManager(children == null).createManagedBatch(values);
}
+
+ private void setDirectValues(List<List<?>> values) {
+ if (managedBatch != null && trackingObject == null) {
+ stree.getBatchManager(children == null).remove(managedBatch);
+ managedBatch = null;
+ trackingObject = null;
+ }
+ this.values = values;
+ }
protected void remove(boolean force) {
if (managedBatch != null) {
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/SPage.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/SPage.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -65,6 +65,7 @@
protected ListNestedSortComparator comparator;
private int pageSize;
protected int leafSize;
+ protected int minPageSize;
protected int keyLength;
protected boolean batchInsert;
protected SPage incompleteInsert;
@@ -86,7 +87,7 @@
manager.setPrefersMemory(true);
this.leafManager = leafManager;
this.comparator = comparator;
- this.pageSize = Math.max(pageSize, SPage.MIN_PERSISTENT_SIZE);
+ this.pageSize = pageSize;
pageSize >>>= 3;
while (pageSize > 0) {
pageSize >>>= 1;
@@ -97,6 +98,7 @@
this.leafSize = leafSize;
this.keyLength = keyLength;
this.lobManager = lobManager;
+ this.minPageSize = this.pageSize>>5;
}
public STree clone() {
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/STree.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/STree.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/Serializer.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/Serializer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/Serializer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -23,16 +23,16 @@
package org.teiid.common.buffer;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
/**
* Responsible for serializing {@link CacheEntry}s
* @param <T>
*/
public interface Serializer<T> {
- void serialize(T obj, ObjectOutputStream oos) throws IOException;
- T deserialize(ObjectInputStream ois) throws IOException, ClassNotFoundException;
+ void serialize(T obj, ObjectOutput oos) throws IOException;
+ T deserialize(ObjectInput ois) throws IOException, ClassNotFoundException;
boolean useSoftCache();
Long getId();
}
\ No newline at end of file
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/Serializer.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/Serializer.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/Serializer.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/StorageManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/StorageManager.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/StorageManager.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java:3220-3275
/trunk/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java:3220-3275,3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,12 +22,12 @@
package org.teiid.common.buffer;
-import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.TreeMap;
+import org.teiid.client.ResizingArrayList;
import org.teiid.common.buffer.LobManager.ReferenceMode;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
@@ -69,7 +69,7 @@
private int rowCount;
private boolean isFinal;
private TreeMap<Integer, Long> batches = new TreeMap<Integer, Long>();
- private ArrayList<List<?>> batchBuffer;
+ private List<List<?>> batchBuffer;
private boolean removed;
private boolean forwardOnly;
@@ -111,7 +111,7 @@
}
this.rowCount++;
if (batchBuffer == null) {
- batchBuffer = new ArrayList<List<?>>(batchSize/4);
+ batchBuffer = new ResizingArrayList<List<?>>(batchSize/4);
}
batchBuffer.add(tuple);
if (batchBuffer.size() == batchSize) {
@@ -178,7 +178,7 @@
if (batchBuffer == null || batchBuffer.isEmpty() || (!force && batchBuffer.size() < Math.max(1, batchSize / 32))) {
return;
}
- Long mbatch = manager.createManagedBatch(batchBuffer);
+ Long mbatch = manager.createManagedBatch(batchBuffer, null, false);
this.batches.put(rowCount - batchBuffer.size() + 1, mbatch);
batchBuffer = null;
}
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java:3149-3217,3220-3275,3340-3349
/trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java:3149-3217,3220-3275,3340-3349,3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/TupleSource.java:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/TupleSource.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/impl:3535-3555
/trunk/engine/src/main/java/org/teiid/common/buffer/impl:3507-3597
Deleted: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockBitSetTree.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockBitSetTree.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockBitSetTree.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,191 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
- package org.teiid.common.buffer.impl;
-
-import java.util.BitSet;
-
-import org.teiid.common.buffer.impl.FileStoreCache.BlockInfo;
-
-/**
- * Extends a {@link BitSet} by adding a cumulative total and a
- * first level index to speed queries against large bitsets.
- */
-public class BlockBitSetTree {
-
- private static final int LOG_BITS_PER_BLOCK = FileStoreCache.LOG_BLOCK_SIZE + 3;
- private static final int MAX_TOP_VALUE = 1 << LOG_BITS_PER_BLOCK;
- private int maxIndex;
- private int bitsSet;
- private int[] topVals;
- private BlockManager blockManager;
- private int blockCount = 0;
-
- public BlockBitSetTree(int maxIndex, BlockManager blockManager) {
- this.maxIndex = maxIndex;
- this.blockManager = blockManager;
- this.topVals = new int[(maxIndex >> (FileStoreCache.LOG_BLOCK_SIZE + 3)) + 1];
- }
-
- public int getMaxIndex() {
- return maxIndex;
- }
-
- /**
- * Set the given bit at the index.
- * @param bitIndex
- * @param value
- */
- public synchronized void set(int bitIndex, boolean value) {
- getOrSet(bitIndex, value, true);
- }
-
- public synchronized boolean get(int bitIndex) {
- return getOrSet(bitIndex, false, false);
- }
-
- private boolean getOrSet(int bitIndex, boolean value, boolean update) {
- if (bitIndex > maxIndex) {
- throw new ArrayIndexOutOfBoundsException(bitIndex);
- }
- int blockIndex = bitIndex>>LOG_BITS_PER_BLOCK;
- BlockInfo bb = null;
- if (blockIndex >= blockCount) {
- if (!update) {
- return false;
- }
- for (; blockCount < blockIndex+1; blockCount++) {
- bb = blockManager.allocateBlock(blockCount);
- bb.buf.position(0);
- int longsPerBlock = FileStoreCache.BLOCK_SIZE >> 6;
- for (int j = 0; j < longsPerBlock; j++) {
- bb.buf.putLong(0);
- }
- }
- } else {
- bb = blockManager.getBlock(blockIndex);
- }
- int relativeIndex = bitIndex&(MAX_TOP_VALUE-1);
- int longByteIndex = (relativeIndex>>6)<<3;
- long word = bb.buf.getLong(longByteIndex);
- long mask = 1L << bitIndex;
- boolean currentValue = ((word & mask) != 0);
- if (!update) {
- return currentValue;
- }
- if (currentValue == value) {
- return currentValue;
- }
- if (value) {
- word |= mask;
- } else {
- word &= ~mask;
- }
- bb.buf.putLong(longByteIndex, word);
- blockManager.updateBlock(bb);
- int topIndex = bitIndex >> LOG_BITS_PER_BLOCK;
- int increment = value?1:-1;
- bitsSet+=increment;
- topVals[topIndex]+=increment;
- return currentValue;
- }
-
- public synchronized int getBitsSet() {
- return bitsSet;
- }
-
- public synchronized int nextClearBit(int fromIndex) {
- int start = fromIndex >> LOG_BITS_PER_BLOCK;
- for (int i = start; i < topVals.length; i++) {
- if (topVals[i] == MAX_TOP_VALUE) {
- continue;
- }
- if (topVals[i] == 0) {
- if (i == start) {
- return fromIndex;
- }
- return i * MAX_TOP_VALUE;
- }
- int relativeIndex = 0;
- if (i == start) {
- relativeIndex = fromIndex&(MAX_TOP_VALUE-1);
- }
- BlockInfo bb = blockManager.getBlock(i);
-
- int longByteIndex = (relativeIndex>>6)<<3;
-
- long word = ~bb.buf.getLong(longByteIndex) & (-1l << relativeIndex);
-
- while (true) {
- if (word != 0) {
- return longByteIndex*8 + (i * MAX_TOP_VALUE) + Long.numberOfTrailingZeros(word);
- }
- longByteIndex+=8;
- if (longByteIndex > FileStoreCache.BLOCK_MASK) {
- break;
- }
- word = ~bb.buf.getLong(longByteIndex);
- }
- }
- return -1;
- }
-
- public synchronized int nextSetBit(int fromIndex) {
- if (bitsSet == 0) {
- return -1;
- }
- int start = fromIndex >> LOG_BITS_PER_BLOCK;
- for (int i = start; i < topVals.length; i++) {
- if (topVals[i] == 0) {
- continue;
- }
- if (topVals[i] == MAX_TOP_VALUE) {
- if (i == start) {
- return fromIndex;
- }
- return i * MAX_TOP_VALUE;
- }
- int relativeIndex = 0;
- if (i == start) {
- relativeIndex = fromIndex&(MAX_TOP_VALUE-1);
- }
- BlockInfo bb = blockManager.getBlock(i);
-
- int longByteIndex = (relativeIndex>>6)<<3;
-
- long word = bb.buf.getLong(longByteIndex) & (-1l << relativeIndex);
-
- while (true) {
- if (word != 0) {
- return longByteIndex*8 + (i * MAX_TOP_VALUE) + Long.numberOfTrailingZeros(word);
- }
- longByteIndex+=8;
- if (longByteIndex > FileStoreCache.BLOCK_MASK) {
- break;
- }
- word = bb.buf.getLong(longByteIndex);
- }
- }
- return -1;
- }
-
-}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockByteBuffer.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockByteBuffer.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockByteBuffer.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockByteBuffer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Provides buffer slices or blocks off of a central
+ * set of buffers.
+ */
+public class BlockByteBuffer {
+
+ private final static class ThreadLocalByteBuffer extends ThreadLocal<ByteBuffer> {
+ private final ByteBuffer byteBuffer;
+
+ public ThreadLocalByteBuffer(ByteBuffer byteBuffer) {
+ this.byteBuffer = byteBuffer;
+ }
+
+ protected ByteBuffer initialValue() {
+ return byteBuffer.duplicate();
+ }
+ }
+
+ private int blockAddressBits;
+ private int segmentAddressBits;
+ private int segmentSize;
+ private int blockSize;
+ private int blockCount;
+ private ThreadLocal<ByteBuffer>[] buffers;
+
+ /**
+ * Creates a new {@link BlockByteBuffer} where each buffer segment will be
+ * 1 << segmentAddressBits (max of 30), and a total size of (1 << blockAddressBits)*blockCount.
+ * @param segmentAddressBits
+ * @param blockCount
+ * @param blockAddressBits
+ * @param direct
+ */
+ @SuppressWarnings("unchecked")
+ public BlockByteBuffer(int segmentAddressBits, int blockCount, int blockAddressBits, boolean direct) {
+ this.segmentAddressBits = segmentAddressBits;
+ this.blockAddressBits = blockAddressBits;
+ this.blockSize = 1 << blockAddressBits;
+ this.segmentSize = 1 << this.segmentAddressBits;
+ this.blockCount = blockCount;
+ long size = ((long)blockCount)<<blockAddressBits;
+ int fullSegments = (int)size>>segmentAddressBits;
+ int lastSegmentSize = (int) (size&(segmentSize-1));
+ int segments = fullSegments;
+ if (lastSegmentSize > 0) {
+ segments++;
+ }
+ buffers = new ThreadLocal[segments];
+ for (int i = 0; i < fullSegments; i++) {
+ buffers[i] = new ThreadLocalByteBuffer(allocate(lastSegmentSize, direct));
+ }
+ if (lastSegmentSize > 0) {
+ buffers[fullSegments] = new ThreadLocalByteBuffer(allocate(lastSegmentSize, direct));
+ }
+ }
+
+ public static ByteBuffer allocate(int size, boolean direct) {
+ if (direct) {
+ ByteBuffer newBuffer = ByteBuffer.allocateDirect(size);
+ int longsPerSegment = size>>3;
+ //manually initialize until java 7 when it's mandated (although this may already have been performed)
+ for (int j = 0; j < longsPerSegment; j++) {
+ newBuffer.putLong(0);
+ }
+ return newBuffer;
+ }
+ return ByteBuffer.allocate(size);
+ }
+
+ /**
+ * Return a buffer positioned at the given start byte.
+ * It is assumed that the caller will handle blocks in
+ * a thread safe manner.
+ * @param startIndex
+ * @return
+ */
+ public ByteBuffer getByteBuffer(int block) {
+ if (block < 0 || block >= blockCount) {
+ throw new IndexOutOfBoundsException("Invalid block " + block); //$NON-NLS-1$
+ }
+ int segment = block>>(segmentAddressBits-blockAddressBits);
+ ByteBuffer bb = buffers[segment].get();
+ bb.rewind();
+ int position = (block<<blockAddressBits)&(segmentSize-1);
+ bb.limit(position + blockSize);
+ bb.position(position);
+ return bb;
+ }
+
+}
Deleted: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockClosedLongIntHashTable.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockClosedLongIntHashTable.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockClosedLongIntHashTable.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,238 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.common.buffer.impl;
-
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.teiid.common.buffer.impl.FileStoreCache.BlockInfo;
-
-/**
- * Represents the logical structure of a cache group / directory
- *
- * Implemented by a closed hash table using a single step linear probe with delayed removal.
- * Uses power of 2 hashing.
- *
- * Provides an extremely simple hash structure that rivals {@link HashMap} performance and
- * is directly mapped to {@link ByteBuffer}s to avoid serialization overhead.
- *
- * Does not expect keys or values to be negative.
- */
-public class BlockClosedLongIntHashTable {
-
- private enum Mode {
- GET,
- UPDATE,
- REMOVE
- }
-
- private static final int BYTES_PER_ROW = 12; //8+4
- private static final int BLOCK_SIZE = FileStoreCache.BLOCK_DATA_BYTES/BYTES_PER_ROW;
- private static final float LOAD_FACTOR = .7f;
- private static final int MIN_SIZE = 1 << (31 - Integer.numberOfLeadingZeros(BLOCK_SIZE)); //should fit in a single block
-
- static final int EMPTY = -1;
- private static final int REMOVED = -2;
-
- protected int size;
- protected int capacityMask = EMPTY;
- protected BlockManager blockManager;
-
- public BlockClosedLongIntHashTable(BlockManager blockManager) {
- this.blockManager = blockManager;
- }
-
- private void init(int capacity) {
- int currentBlockCount = blockCount(capacityMask + 1);
- int desiredBlockCount = blockCount(capacity);
- if (capacity > capacityMask) {
- for (int i = currentBlockCount; i < desiredBlockCount; i++) {
- BlockInfo bb = blockManager.allocateBlock(i);
- empty(bb.buf, BLOCK_SIZE);
- blockManager.updateBlock(bb);
- }
- }
- capacityMask = capacity - 1;
- }
-
- private void empty(ByteBuffer bb, int toIndex) {
- bb.position(0);
- for (int j = 0; j < toIndex; j++) {
- bb.putLong(j * BYTES_PER_ROW, EMPTY);
- }
- }
-
- private static int blockCount(int size) {
- int currentBlockCount = (size) / BLOCK_SIZE;
- if (size%BLOCK_SIZE > 0) {
- currentBlockCount++;
- }
- return currentBlockCount;
- }
-
- public synchronized int put(long key, int value) {
- int result = getOrUpdate(key, value, Mode.UPDATE);
- if ((result == EMPTY || result == REMOVED) && ++size > LOAD_FACTOR*capacityMask) {
- int newCapacity = (capacityMask+1)<<1;
- int oldLength = capacityMask + 1;
- init(newCapacity);
- rehash(oldLength, newCapacity);
- }
- return result;
- }
-
- public synchronized int get(long key) {
- return getOrUpdate(key, EMPTY, Mode.GET);
- }
-
- public synchronized int remove(long key) {
- int result = getOrUpdate(key, EMPTY, Mode.REMOVE);
- if (result != EMPTY && --size*LOAD_FACTOR < capacityMask>>3 && (capacityMask+1)>>1 >= MIN_SIZE) {
- //reduce the size of the table by half
- int oldLength = capacityMask + 1;
- capacityMask >>= 1;
- rehash(oldLength, oldLength>>1);
- int oldBlocks = blockCount(oldLength);
- int newBlocks = blockCount(capacityMask +1);
- for (int i = oldBlocks-1; i >= newBlocks; i--) {
- blockManager.freeBlock(i);
- }
- }
- return result;
- }
-
- private void rehash(int oldLength, int newLength) {
- BlockInfo lastBlockInfo = null;
- ByteBuffer lastBlock = null;
- for (int i = 0; i < oldLength; i++) {
- int relativeIndex = i%BLOCK_SIZE;
- if (lastBlock == null || relativeIndex == 0) {
- int lastIndex = i/BLOCK_SIZE;
- lastBlockInfo = blockManager.getBlock(lastIndex);
- lastBlock = lastBlockInfo.buf;
- if (i < newLength) {
- byte[] buf = new byte[FileStoreCache.BLOCK_DATA_BYTES];
- lastBlock.position(0);
- lastBlock.get(buf);
- ByteBuffer copyBlock = ByteBuffer.wrap(buf);
- empty(lastBlock, Math.min(BLOCK_SIZE, oldLength - lastIndex*BLOCK_SIZE));
- blockManager.updateBlock(lastBlockInfo);
- lastBlock = copyBlock;
- }
- }
- lastBlock.position(relativeIndex*BYTES_PER_ROW);
- long oldKey = lastBlock.getLong();
- int oldValue = lastBlock.getInt();
- if (oldKey != REMOVED && oldKey != EMPTY) {
- getOrUpdate(oldKey, oldValue, Mode.UPDATE);
- }
- }
- }
-
- @SuppressWarnings("null")
- protected int getOrUpdate(long key, int value, Mode mode) {
- if (capacityMask == EMPTY) {
- if (mode == Mode.GET || mode == Mode.REMOVE) {
- return EMPTY;
- }
- init(MIN_SIZE);
- }
- int i = hashIndex(key);
- BlockInfo lastBlockInfo = null;
- long old = EMPTY;
- int position = 0;
- while (true) {
- int relativeIndex = i%BLOCK_SIZE;
- if (lastBlockInfo == null || relativeIndex == 0) {
- int index = i/BLOCK_SIZE;
- lastBlockInfo = blockManager.getBlock(index);
- }
- position = relativeIndex*BYTES_PER_ROW;
- old = lastBlockInfo.buf.getLong(position);
- if (old == EMPTY || old == key || (mode == Mode.UPDATE && old == REMOVED)) {
- break;
- }
- i = (i + 1) & capacityMask;
- }
- int result = EMPTY;
- if (old != EMPTY && old != REMOVED) {
- result = lastBlockInfo.buf.getInt(position + 8);
- }
- switch (mode) {
- case GET:
- return result;
- case UPDATE:
- lastBlockInfo.buf.putLong(position, key);
- lastBlockInfo.buf.putInt(position + 8, value);
- blockManager.updateBlock(lastBlockInfo);
- return result;
- case REMOVE:
- if (old == EMPTY || old == REMOVED) {
- return EMPTY;
- }
- lastBlockInfo.buf.putLong(position, REMOVED);
- blockManager.updateBlock(lastBlockInfo);
- return result;
- default:
- throw new AssertionError();
- }
- }
-
- private int hashIndex(long key) {
- //start with the usual long hash
- int primaryHash = (int)(key ^ (key >>> 32));
- //allow the lower bits to spread the entries
- primaryHash += primaryHash <<= 2;
- primaryHash += primaryHash <<= 3;
- return primaryHash & capacityMask;
- }
-
- public synchronized int size() {
- return size;
- }
-
- public synchronized Map<Long, Integer> remove() {
- Map<Long, Integer> result = new HashMap<Long, Integer>();
- BlockInfo lastBlockInfo = null;
- int blockIndex = 0;
- for (int i = capacityMask; i >= 0; i--) {
- int relativeIndex = i%BLOCK_SIZE;
- if (lastBlockInfo == null || relativeIndex == BLOCK_SIZE - 1) {
- if (lastBlockInfo != null) {
- blockManager.freeBlock(blockIndex);
- }
- blockIndex = i/BLOCK_SIZE;
- lastBlockInfo = blockManager.getBlock(blockIndex);
- }
- lastBlockInfo.buf.position(relativeIndex*BYTES_PER_ROW);
- long key = lastBlockInfo.buf.getLong();
- if (key != EMPTY && key != REMOVED) {
- result.put(key, lastBlockInfo.buf.getInt());
- }
- }
- blockManager.free();
- return result;
- }
-
-}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockInputStream.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockInputStream.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockInputStream.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockInputStream.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.nio.ByteBuffer;
+
+import org.teiid.common.buffer.ExtensibleBufferedInputStream;
+
+/**
+ * TODO: support freeing of datablocks as we go
+ */
+final class BlockInputStream extends ExtensibleBufferedInputStream {
+ private final BlockManager manager;
+ private final int maxBlock;
+ int blockIndex;
+
+ BlockInputStream(BlockManager manager, int blockCount) {
+ this.manager = manager;
+ this.maxBlock = blockCount;
+ }
+
+ @Override
+ protected ByteBuffer nextBuffer() {
+ if (maxBlock == blockIndex) {
+ return null;
+ }
+ return manager.getBlock(blockIndex++);
+ }
+
+}
\ No newline at end of file
Deleted: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.common.buffer.impl;
-
-import org.teiid.common.buffer.impl.FileStoreCache.BlockInfo;
-
-/**
- * Represents an INode
- *
- * Returned BlockInfo may be shared. If shared there and no guarantees about position and mark.
- * in particular system/index blocks can be used by multiple threads relative methods should be
- * avoided, but may be used for exclusive write operations.
- * Otherwise the position will be 0.
- *
- * Due to buffermanager locking, non-index data blocks can be assumed to be thread-safe.
- */
-public interface BlockManager {
-
- int getInode();
-
- BlockInfo allocateBlock(int index);
-
- BlockInfo getBlock(int index);
-
- void updateBlock(BlockInfo block);
-
- void freeBlock(int index);
-
- void free();
-
-}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.nio.ByteBuffer;
+
+
+/**
+ * Represents an INode
+ */
+public interface BlockManager {
+
+ int getInode();
+
+ ByteBuffer allocateBlock(int index);
+
+ /**
+ * Get the block for a given index. Returns null if the block does not exist.
+ * @param index
+ * @return
+ */
+ ByteBuffer getBlock(int index);
+
+ void freeBlock(int index);
+
+ int free(boolean acquireDataBlock);
+
+}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockOutputStream.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockOutputStream.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockOutputStream.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockOutputStream.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+final class BlockOutputStream extends
+ ExtensibleBufferedOutputStream {
+ private final BlockManager blockManager;
+ int blockNum = -1;
+ private final int maxBlocks;
+ private final boolean allocate;
+
+ static final IOException exceededMax = new IOException();
+
+ /**
+ * @param blockManager
+ * @param maxBlocks a max of -1 indicates use existing blocks
+ */
+ BlockOutputStream(BlockManager blockManager, int maxBlocks) {
+ this.blockManager = blockManager;
+ this.allocate = maxBlocks != -1;
+ this.maxBlocks = maxBlocks - 2; //convert to an index
+ }
+
+ @Override
+ protected ByteBuffer newBuffer() throws IOException {
+ if (!allocate) {
+ return blockManager.getBlock(++blockNum);
+ }
+ if (blockNum > maxBlocks) {
+ throw exceededMax;
+ }
+ return blockManager.allocateBlock(++blockNum);
+ }
+
+ @Override
+ protected int flushDirect(int i) throws IOException {
+ return i;
+ }
+}
\ No newline at end of file
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.teiid.common.buffer.FileStore;
+import org.teiid.common.buffer.StorageManager;
+import org.teiid.core.TeiidRuntimeException;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.logging.MessageLevel;
+
+/**
+ * Represents a FileStore that holds blocks of a fixed size.
+ */
+class BlockStore {
+ final long blockSize;
+ final ConcurrentBitSet blocksInUse;
+ final FileStore[] stores;
+ final ReentrantReadWriteLock[] locks;
+
+ public BlockStore(StorageManager storageManager, int blockSize, int blockCountLog, int concurrencyLevel) {
+ this.blockSize = blockSize;
+ int blockCount = 1 << blockCountLog;
+ this.blocksInUse = new ConcurrentBitSet(blockCount, concurrencyLevel);
+ this.blocksInUse.setCompact(true);
+ this.stores = new FileStore[concurrencyLevel];
+ this.locks = new ReentrantReadWriteLock[concurrencyLevel];
+ for (int i = 0; i < stores.length; i++) {
+ this.stores[i] = storageManager.createFileStore(String.valueOf(blockSize) + '_' + i);
+ this.locks[i] = new ReentrantReadWriteLock();
+ }
+
+ }
+
+ int getAndSetNextClearBit(PhysicalInfo info) {
+ int result = blocksInUse.getAndSetNextClearBit();
+ if (result == -1) {
+ throw new TeiidRuntimeException("Out of blocks of size " + blockSize); //$NON-NLS-1$
+ }
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Allocating storage data block", result, "of size", blockSize, "to", info); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ return result;
+ }
+
+ int writeToStorageBlock(PhysicalInfo info,
+ InputStream is) throws IOException {
+ int block = getAndSetNextClearBit(info);
+ int segment = block/blocksInUse.getBitsPerSegment();
+ boolean success = false;
+ this.locks[segment].writeLock().lock();
+ try {
+ FileStore fs = stores[segment];
+ long blockOffset = (block%blocksInUse.getBitsPerSegment())*blockSize;
+ //TODO: there is still an extra buffer being created here, we could FileChannels to do better
+ byte[] b = new byte[BufferFrontedFileStoreCache.BLOCK_SIZE];
+ int read = 0;
+ while ((read = is.read(b, 0, b.length)) != -1) {
+ fs.write(blockOffset, b, 0, read);
+ blockOffset+=read;
+ }
+ success = true;
+ } finally {
+ locks[segment].writeLock().unlock();
+ if (!success) {
+ blocksInUse.clear(block);
+ block = BufferFrontedFileStoreCache.EMPTY_ADDRESS;
+ }
+ }
+ return block;
+ }
+
+}
\ No newline at end of file
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,1046 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.lang.ref.WeakReference;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.teiid.common.buffer.AutoCleanupUtil;
+import org.teiid.common.buffer.Cache;
+import org.teiid.common.buffer.CacheEntry;
+import org.teiid.common.buffer.CacheKey;
+import org.teiid.common.buffer.FileStore;
+import org.teiid.common.buffer.Serializer;
+import org.teiid.common.buffer.StorageManager;
+import org.teiid.core.TeiidComponentException;
+import org.teiid.core.TeiidRuntimeException;
+import org.teiid.core.util.ExecutorUtils;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.logging.MessageLevel;
+import org.teiid.query.QueryPlugin;
+
+/**
+ * Implements storage against a {@link FileStore} abstraction using a fronting
+ * memory buffer with a filesystem paradigm. All objects must go through the
+ * memory (typically off-heap) buffer so that they can be put into their appropriately
+ * sized storage bucket.
+ *
+ * The memory uses a 31bit address space on top of 2^13 byte blocks.
+ *
+ * Therefore there is 2^31*2^13 = 2^44 or 16 terabytes max of addressable space.
+ * This is well beyond any current needs.
+ *
+ * The 64 byte inode format is:
+ * 14 32 bit direct block pointers
+ * 1 32 bit block indirect pointer
+ * 1 32 bit block doubly indirect pointer (should be rarely used)
+ *
+ * This means that the maximum number of blocks available to an object is
+ * 14 + (2^13)/4 + ((2^13)/4)^2 ~= 2^22
+ *
+ * Thus the max serialized object size is: 2^22*(2^13) ~= 32GB.
+ *
+ * Typically the max object size will be much smaller, such as 8MB.
+ *
+ * Inodes are held separately from the data/index blocks, and introduce an overhead
+ * that is ~ 1/128th the size of memory buffer.
+ *
+ * The filesystem stores are broken up into block specific sizes starting with 8KB.
+ *
+ * The root directory "physicalMapping" is held in memory for performance. It will grow in
+ * proportion to the number of tables/tuplebuffers in use.
+ *
+ * The locking is as fine grained as possible to prevent contention. See {@link PhysicalInfo} for
+ * flags that are used when it is used as a lock. It is important to not access the
+ * group maps when a {@link PhysicalInfo} lock is held.
+ */
+public class BufferFrontedFileStoreCache implements Cache<PhysicalInfo>, StorageManager {
+
+ private static final int DEFAULT_MIN_DEFRAG = 1 << 26;
+ private static final byte[] HEADER_SKIP_BUFFER = new byte[16];
+ private static final int EVICTION_SCANS = 5;
+
+ public static final int DEFAuLT_MAX_OBJECT_SIZE = 1 << 23;
+
+ static final int ADDRESS_BITS = 31;
+ static final int SYSTEM_MASK = 1<<ADDRESS_BITS;
+ static final int BYTES_PER_BLOCK_ADDRESS = 4;
+ static final int INODE_BYTES = 16*BYTES_PER_BLOCK_ADDRESS;
+ static final int LOG_INODE_SIZE = 6;
+ static final int DIRECT_POINTERS = 14;
+ static final int EMPTY_ADDRESS = -1;
+ static final int FREED = -2;
+
+ //TODO allow the block size to be configurable. 8k is a reasonable default up to a gig, but we could be more efficient with larger blocks from there.
+ //the rationale for a smaller block size is to reduce internal fragmentation, which is critical when maintaining a relatively small buffer < 256MB
+ static final int LOG_BLOCK_SIZE = 13;
+
+ public static final long MAX_ADDRESSABLE_MEMORY = 1l<<(ADDRESS_BITS+LOG_BLOCK_SIZE);
+
+ static final int BLOCK_SIZE = 1 << LOG_BLOCK_SIZE;
+ static final int BLOCK_MASK = BLOCK_SIZE - 1;
+ static final int ADDRESSES_PER_BLOCK = BLOCK_SIZE/BYTES_PER_BLOCK_ADDRESS;
+ static final int MAX_INDIRECT = DIRECT_POINTERS + ADDRESSES_PER_BLOCK;
+ static final int MAX_DOUBLE_INDIRECT = MAX_INDIRECT + ADDRESSES_PER_BLOCK * ADDRESSES_PER_BLOCK;
+
+ private enum Mode {
+ GET,
+ UPDATE,
+ ALLOCATE
+ }
+
+ private final class InodeBlockManager implements BlockManager {
+ private int inode;
+ private ByteBuffer inodeBuffer;
+ private final long gid;
+ private final long oid;
+ private int blockSegment;
+
+ InodeBlockManager(long gid, long oid, int inode) {
+ this.inode = inode;
+ this.gid = gid;
+ this.oid = oid;
+ this.blockSegment = blocksInuse.getNextSegment();
+ }
+
+ @Override
+ public int getInode() {
+ return inode;
+ }
+
+ @Override
+ public ByteBuffer getBlock(int index) {
+ int dataBlock = getOrUpdateDataBlockIndex(index, EMPTY_ADDRESS, Mode.GET);
+ return blockByteBuffer.getByteBuffer(dataBlock);
+ }
+
+ private int getOrUpdateDataBlockIndex(int index, int value, Mode mode) {
+ if (index >= MAX_DOUBLE_INDIRECT) {
+ throw new TeiidRuntimeException("Max block number exceeded. You could try making the processor batch size smaller."); //$NON-NLS-1$
+ }
+ int dataBlock = 0;
+ int position = 0;
+ ByteBuffer info = getInodeBlock();
+ if (index >= MAX_INDIRECT) {
+ position = BYTES_PER_BLOCK_ADDRESS*(DIRECT_POINTERS+1);
+ ByteBuffer next = updateIndirectBlockInfo(info, index, position, MAX_INDIRECT, value, mode);
+ if (next != null) {
+ info = next;
+ //should have traversed to the secondary
+ int indirectAddressBlock = (index - MAX_INDIRECT) / ADDRESSES_PER_BLOCK;
+ position = info.position() + indirectAddressBlock * BYTES_PER_BLOCK_ADDRESS;
+ if (mode == Mode.ALLOCATE && position + BYTES_PER_BLOCK_ADDRESS < info.limit()) {
+ info.putInt(position + BYTES_PER_BLOCK_ADDRESS, EMPTY_ADDRESS);
+ }
+ next = updateIndirectBlockInfo(info, index, position, MAX_INDIRECT + indirectAddressBlock * ADDRESSES_PER_BLOCK, value, mode);
+ if (next != null) {
+ info = next;
+ position = info.position() + ((index - MAX_INDIRECT)%ADDRESSES_PER_BLOCK) * BYTES_PER_BLOCK_ADDRESS;
+ }
+ }
+ } else if (index >= DIRECT_POINTERS) {
+ //indirect
+ position = BYTES_PER_BLOCK_ADDRESS*DIRECT_POINTERS;
+ ByteBuffer next = updateIndirectBlockInfo(info, index, position, DIRECT_POINTERS, value, mode);
+ if (next != null) {
+ info = next;
+ position = next.position() + (index - DIRECT_POINTERS) * BYTES_PER_BLOCK_ADDRESS;
+ }
+ } else {
+ position = BYTES_PER_BLOCK_ADDRESS*index;
+ }
+ if (mode == Mode.ALLOCATE) {
+ dataBlock = nextBlock(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
+ info.putInt(position + BYTES_PER_BLOCK_ADDRESS, EMPTY_ADDRESS);
+ }
+ } else {
+ dataBlock = info.getInt(position);
+ if (mode == Mode.UPDATE) {
+ info.putInt(position, value);
+ }
+ }
+ return dataBlock;
+ }
+
+ private ByteBuffer updateIndirectBlockInfo(ByteBuffer buf, int index, int position, int cutOff, int value, Mode mode) {
+ int sib_index = buf.getInt(position);
+ if (index == cutOff) {
+ if (mode == Mode.ALLOCATE) {
+ sib_index = nextBlock(false);
+ buf.putInt(position, sib_index);
+ } else if (mode == Mode.UPDATE && value == EMPTY_ADDRESS) {
+ freeDataBlock(sib_index);
+ return null;
+ }
+ }
+ return blockByteBuffer.getByteBuffer(sib_index);
+ }
+
+ /**
+ * Get the next dataBlock. When the memory buffer is full we have some
+ * book keeping to do.
+ * @return
+ */
+ private int nextBlock(boolean data) {
+ int next = EMPTY_ADDRESS;
+ memoryEvictionLock.readLock().lock();
+ boolean readLocked = true;
+ try {
+ if ((next = blocksInuse.getAndSetNextClearBit(blockSegment)) == EMPTY_ADDRESS) {
+ memoryEvictionLock.readLock().unlock();
+ readLocked = false;
+ next = evictFromMemoryBuffer(true);
+ }
+ } finally {
+ if (readLocked) {
+ memoryEvictionLock.readLock().unlock();
+ }
+ }
+ 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$
+ }
+ return next;
+ }
+
+ @Override
+ public void freeBlock(int index) {
+ int dataBlock = getOrUpdateDataBlockIndex(index, EMPTY_ADDRESS, Mode.UPDATE);
+ freeDataBlock(dataBlock);
+ }
+
+ private void freeDataBlock(int dataBlock) {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "freeing data block", dataBlock, "for", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ blocksInuse.clear(dataBlock);
+ }
+
+ private ByteBuffer getInodeBlock() {
+ if (inodeBuffer == null) {
+ if (inode == EMPTY_ADDRESS) {
+ this.inode = inodesInuse.getAndSetNextClearBit();
+ if (this.inode == -1) {
+ throw new AssertionError("Out of inodes"); //$NON-NLS-1$
+ }
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Allocating inode", this.inode, "to", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ ByteBuffer bb = getInodeBlock();
+ bb.putInt(EMPTY_ADDRESS);
+ }
+ inodeBuffer = inodeByteBuffer.getByteBuffer(inode).slice();
+ }
+ return inodeBuffer;
+ }
+
+ @Override
+ public int free(boolean acquire) {
+ if (this.inode == EMPTY_ADDRESS) {
+ return EMPTY_ADDRESS;
+ }
+ ByteBuffer bb = getInodeBlock();
+ int dataBlockToAcquire = bb.getInt(0);
+ int indirectIndexBlock = bb.getInt(BYTES_PER_BLOCK_ADDRESS*DIRECT_POINTERS);
+ int doublyIndirectIndexBlock = bb.getInt(BYTES_PER_BLOCK_ADDRESS*(DIRECT_POINTERS+1));
+ boolean freedAll = freeBlock(acquire?BYTES_PER_BLOCK_ADDRESS:0, bb, DIRECT_POINTERS-(acquire?1:0), true);
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "freeing inode", inode, "for", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ inodesInuse.clear(inode);
+ if (!freedAll || indirectIndexBlock == EMPTY_ADDRESS) {
+ return acquire?dataBlockToAcquire:FREED;
+ }
+ freedAll = freeIndirectBlock(indirectIndexBlock);
+ if (!freedAll || doublyIndirectIndexBlock == EMPTY_ADDRESS) {
+ return acquire?dataBlockToAcquire:FREED;
+ }
+ bb = blockByteBuffer.getByteBuffer(doublyIndirectIndexBlock).slice();
+ freeBlock(0, bb, ADDRESSES_PER_BLOCK, false);
+ freeDataBlock(doublyIndirectIndexBlock);
+ return acquire?dataBlockToAcquire:FREED;
+ }
+
+ private boolean freeIndirectBlock(int indirectIndexBlock) {
+ ByteBuffer bb = blockByteBuffer.getByteBuffer(indirectIndexBlock);
+ boolean freedAll = freeBlock(bb.position(), bb, ADDRESSES_PER_BLOCK, true);
+ freeDataBlock(indirectIndexBlock);
+ return freedAll;
+ }
+
+ private boolean freeBlock(int startPosition, ByteBuffer ib, int numPointers, boolean primary) {
+ ib.position(startPosition);
+ for (int i = 0; i < numPointers; i++) {
+ int dataBlock = ib.getInt();
+ if (dataBlock == EMPTY_ADDRESS) {
+ return false;
+ }
+ if (primary) {
+ freeDataBlock(dataBlock);
+ } else {
+ freeIndirectBlock(dataBlock);
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public ByteBuffer allocateBlock(int blockNum) {
+ int dataBlock = getOrUpdateDataBlockIndex(blockNum, EMPTY_ADDRESS, Mode.ALLOCATE);
+ return blockByteBuffer.getByteBuffer(dataBlock);
+ }
+ }
+
+ private StorageManager storageManager;
+ private int maxStorageObjectSize = DEFAuLT_MAX_OBJECT_SIZE;
+ private long memoryBufferSpace = 1 << 26; //64MB
+ private boolean direct;
+
+ private int maxMemoryBlocks;
+ private AtomicLong readAttempts = new AtomicLong();
+ LrfuEvictionQueue<PhysicalInfo> memoryBufferEntries = new LrfuEvictionQueue<PhysicalInfo>(readAttempts);
+ private Semaphore memoryWritePermits; //prevents deadlock waiting for free blocks
+ private ReentrantReadWriteLock memoryEvictionLock = new ReentrantReadWriteLock(true);
+
+ private int blocks;
+ private ConcurrentBitSet blocksInuse;
+ private BlockByteBuffer blockByteBuffer;
+
+ private ConcurrentBitSet inodesInuse;
+ private BlockByteBuffer inodeByteBuffer;
+
+ //root directory
+ private ConcurrentHashMap<Long, Map<Long, PhysicalInfo>> physicalMapping = new ConcurrentHashMap<Long, Map<Long, PhysicalInfo>>(16, .75f, BufferManagerImpl.CONCURRENCY_LEVEL);
+ private BlockStore[] sizeBasedStores;
+
+ private ExecutorService asynchPool = ExecutorUtils.newFixedThreadPool(2, "FileStore Worker"); //$NON-NLS-1$
+ private AtomicBoolean defragRunning = new AtomicBoolean();
+ //defrag to release freespace held by storage files
+ private final Runnable defragTask = new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Running defrag"); //$NON-NLS-1$
+ }
+ for (int i = 0; i < sizeBasedStores.length; i++) {
+ BlockStore blockStore = sizeBasedStores[i];
+ for (int segment = 0; segment < blockStore.stores.length; segment++) {
+ if (!shouldDefrag(blockStore, segment)) {
+ continue;
+ }
+ try {
+ boolean sleep = false;
+ do {
+ if (sleep) {
+ Thread.sleep(100); //let the file activity quite down
+ }
+ sleep = true;
+ int relativeBlockToMove = blockStore.blocksInUse.compactHighestBitSet(segment);
+ if (!shouldDefrag(blockStore, segment)) {
+ truncate(blockStore, segment);
+ break;
+ }
+ //move the block if possible
+ InputStream is = blockStore.stores[segment].createInputStream(relativeBlockToMove * blockStore.blockSize, blockStore.blockSize);
+ DataInputStream dis = new DataInputStream(is);
+ Long gid = null;
+ Long oid = null;
+ try {
+ gid = dis.readLong();
+ oid = dis.readLong();
+ } catch (IOException e) {
+ continue; //can happen the bit was set and no data exists
+ }
+ dis.reset(); //move back to the beginning
+ Map<Long, PhysicalInfo> map = physicalMapping.get(gid);
+ if (map == null) {
+ continue;
+ }
+ PhysicalInfo info = map.get(oid);
+ if (info == null) {
+ continue;
+ }
+ int bitIndex = relativeBlockToMove + (segment * blockStore.blocksInUse.getBitsPerSegment());
+ synchronized (info) {
+ info.await(true, false);
+ if (info.block == EMPTY_ADDRESS) {
+ continue;
+ }
+ if (info.block != bitIndex) {
+ //we've marked a bit in use, but haven't yet written new data
+ continue;
+ }
+ }
+ int newBlock = blockStore.writeToStorageBlock(info, dis);
+ synchronized (info) {
+ info.await(true, true);
+ if (info.block == EMPTY_ADDRESS) {
+ //already removed;
+ if (newBlock != EMPTY_ADDRESS) {
+ blockStore.blocksInUse.clear(newBlock);
+ }
+ continue;
+ }
+ info.block = newBlock;
+ blockStore.blocksInUse.clear(bitIndex);
+ }
+ sleep = false;
+ } while (shouldDefrag(blockStore, segment));
+ } catch (IOException e) {
+ LogManager.logWarning(LogConstants.CTX_BUFFER_MGR, e, "Error performing defrag"); //$NON-NLS-1$
+ } catch (InterruptedException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+ }
+ } finally {
+ defragRunning.set(false);
+ }
+ }
+
+ private void truncate(BlockStore blockStore, int segment) {
+ //truncate the file
+ blockStore.locks[segment].writeLock().lock();
+ try {
+ int endBlock = blockStore.blocksInUse.getHighestBitSet(segment);
+ long newLength = (endBlock + 1) * blockStore.blockSize;
+ blockStore.stores[segment].setLength(newLength);
+ } catch (IOException e) {
+ LogManager.logWarning(LogConstants.CTX_BUFFER_MGR, e, "Error performing defrag truncate"); //$NON-NLS-1$
+ } finally {
+ blockStore.locks[segment].writeLock().unlock();
+ }
+ }
+ };
+ private AtomicBoolean cleanerRunning = new AtomicBoolean();
+ private final Runnable cleaningTask = new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ while (lowBlocks(false)) {
+ if (evictFromMemoryBuffer(false) == EMPTY_ADDRESS) {
+ break;
+ }
+ }
+ } finally {
+ cleanerRunning.set(false);
+ }
+ }
+ };
+ private int cleaningThreshold;
+ private int criticalCleaningThreshold;
+
+ private AtomicLong storageWrites = new AtomicLong();
+ private AtomicLong storageReads = new AtomicLong();
+
+ private long minDefrag = DEFAULT_MIN_DEFRAG;
+
+ @Override
+ public void initialize() throws TeiidComponentException {
+ storageManager.initialize();
+ memoryBufferSpace = Math.max(memoryBufferSpace, maxStorageObjectSize);
+ blocks = (int) Math.min(Integer.MAX_VALUE, (memoryBufferSpace>>LOG_BLOCK_SIZE)*ADDRESSES_PER_BLOCK/(ADDRESSES_PER_BLOCK+1));
+ inodesInuse = new ConcurrentBitSet(blocks+1, BufferManagerImpl.CONCURRENCY_LEVEL);
+ blocksInuse = new ConcurrentBitSet(blocks, BufferManagerImpl.CONCURRENCY_LEVEL);
+ this.blockByteBuffer = new BlockByteBuffer(30, blocks, LOG_BLOCK_SIZE, direct);
+ //ensure that we'll run out of blocks first
+ this.inodeByteBuffer = new BlockByteBuffer(30, blocks+1, LOG_INODE_SIZE, direct);
+ memoryWritePermits = new Semaphore(blocks);
+ maxMemoryBlocks = Math.min(MAX_DOUBLE_INDIRECT, blocks);
+ //try to maintain enough freespace so that writers don't block in cleaning
+ cleaningThreshold = Math.min(maxMemoryBlocks<<4, blocks>>1);
+ criticalCleaningThreshold = Math.min(maxMemoryBlocks<<2, blocks>>2);
+ //account for index pointer block overhead
+ if (maxMemoryBlocks > DIRECT_POINTERS) {
+ maxMemoryBlocks--;
+ }
+ if (maxMemoryBlocks > MAX_INDIRECT) {
+ int indirect = maxMemoryBlocks-MAX_INDIRECT;
+ maxMemoryBlocks -= (indirect/ADDRESSES_PER_BLOCK + (indirect%ADDRESSES_PER_BLOCK>0?1:0) + 1);
+ }
+ List<BlockStore> stores = new ArrayList<BlockStore>();
+ int size = BLOCK_SIZE;
+ int files = 32; //this allows us to have 64 terabytes of smaller block sizes
+ do {
+ stores.add(new BlockStore(this.storageManager, size, 30, files));
+ size <<=1;
+ if (files > 1) {
+ files >>= 1;
+ }
+ } while ((size>>1) < maxStorageObjectSize);
+ this.sizeBasedStores = stores.toArray(new BlockStore[stores.size()]);
+ }
+
+ boolean lowBlocks(boolean critical) {
+ int bitsSet = blocksInuse.getBitsSet();
+ return bitsSet > 0 && (blocks - bitsSet < (critical?criticalCleaningThreshold:cleaningThreshold)) && memoryBufferEntries.firstEntry(false) != null;
+ }
+
+ InodeBlockManager getBlockManager(long gid, long oid, int inode) {
+ return new InodeBlockManager(gid, oid, inode);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public boolean add(CacheEntry entry, Serializer s) {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "adding object", s.getId(), entry.getId()); //$NON-NLS-1$
+ }
+ boolean newEntry = false;
+ InodeBlockManager blockManager = null;
+ boolean hasPermit = false;
+ PhysicalInfo info = null;
+ boolean success = false;
+ int memoryBlocks = this.maxMemoryBlocks;
+ try {
+ Map<Long, PhysicalInfo> map = physicalMapping.get(s.getId());
+ if (map == null) {
+ return true; //already removed
+ }
+ info = map.get(entry.getId());
+ if (info == null) {
+ synchronized (map) {
+ info = map.get(entry.getId());
+ if (info == null) {
+ newEntry = true;
+ if (!map.containsKey(entry.getId())) {
+ return true; //already removed
+ }
+ info = new PhysicalInfo(s.getId(), entry.getId(), EMPTY_ADDRESS, (int)readAttempts.get());
+ info.adding = true;
+ map.put(entry.getId(), info);
+ }
+ }
+ }
+ if (!newEntry) {
+ synchronized (info) {
+ if (info.adding) {
+ return false; //someone else is responsible for adding this cache entry
+ }
+ if (info.evicting || info.inode != EMPTY_ADDRESS
+ || !shouldPlaceInMemoryBuffer(0, info)) {
+ return true; //safe to remove from tier 1
+ }
+ info.adding = true;
+ //second chance re-add to the cache, we assume that serialization would be faster than a disk read
+ memoryBlocks = info.memoryBlockCount;
+ }
+ }
+ checkForLowMemory();
+ memoryWritePermits.acquire(memoryBlocks);
+ hasPermit = true;
+ blockManager = getBlockManager(s.getId(), entry.getId(), EMPTY_ADDRESS);
+ BlockOutputStream bos = new BlockOutputStream(blockManager, memoryBlocks);
+ ObjectOutput dos = new DataObjectOutputStream(bos);
+ dos.writeLong(s.getId());
+ dos.writeLong(entry.getId());
+ dos.writeInt(entry.getSizeEstimate());
+ s.serialize(entry.getObject(), dos);
+ dos.close();
+ //synchronized to ensure proper cleanup from a concurrent removal
+ synchronized (map) {
+ if (physicalMapping.containsKey(s.getId()) && map.containsKey(entry.getId())) {
+ synchronized (info) {
+ //set the size first, since it may raise an exceptional condition
+ info.setSize(bos.getBytesWritten());
+ info.inode = blockManager.getInode();
+ memoryBufferEntries.add(info);
+ }
+ success = true;
+ }
+ }
+ } catch (Throwable e) {
+ if ((e == BlockOutputStream.exceededMax && newEntry) || e == PhysicalInfo.sizeChanged) {
+ //entries are mutable after adding, the original should be removed shortly so just ignore
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Object "+ entry.getId() +" changed size since first persistence, keeping the original."); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (e == BlockOutputStream.exceededMax){
+ LogManager.logError(LogConstants.CTX_BUFFER_MGR, "Max block number exceeded. Increase the maxStorageObjectSize to support larger storage objects. Alternatively you could make the processor batch size smaller."); //$NON-NLS-1$
+ } else {
+ LogManager.logError(LogConstants.CTX_BUFFER_MGR, e, "Error persisting, attempts to read "+ entry.getId() +" later will result in an exception."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } finally {
+ if (hasPermit) {
+ memoryWritePermits.release(memoryBlocks);
+ }
+ if (info != null) {
+ synchronized (info) {
+ info.adding = false;
+ if (!success && blockManager != null) {
+ //invalidate for safety
+ info.inode = EMPTY_ADDRESS;
+ }
+ }
+ }
+ if (!success && blockManager != null) {
+ blockManager.free(false);
+ }
+ }
+ return true;
+ }
+
+ private void checkForLowMemory() {
+ //proactively create freespace
+ if (!cleanerRunning.get()) {
+ if (lowBlocks(false) && cleanerRunning.compareAndSet(false, true)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Starting memory buffer cleaner"); //$NON-NLS-1$
+ asynchPool.execute(cleaningTask);
+ if (lowBlocks(true)) {
+ //do a non-blocking removal before we're forced to block
+ evictFromMemoryBuffer(false);
+ }
+ }
+ } else if (lowBlocks(true)) {
+ //do a non-blocking removal before we're forced to block
+ evictFromMemoryBuffer(false);
+ }
+ }
+
+ @Override
+ public PhysicalInfo lockForLoad(Long oid, Serializer<?> serializer) {
+ Map<Long, PhysicalInfo> map = physicalMapping.get(serializer.getId());
+ if (map == null) {
+ return null;
+ }
+ PhysicalInfo info = map.get(oid);
+ if (info == null) {
+ return null;
+ }
+ info.lockForLoad();
+ return info;
+ }
+
+ @Override
+ public void unlockForLoad(PhysicalInfo info) {
+ if (info == null) {
+ return;
+ }
+ info.unlockForLoad();
+ }
+
+ @Override
+ public CacheEntry get(PhysicalInfo info, Long oid,
+ WeakReference<? extends Serializer<?>> ref)
+ throws TeiidComponentException {
+ if (info == null) {
+ return null;
+ }
+ Serializer<?> serializer = ref.get();
+ if (serializer == null) {
+ return null;
+ }
+ InputStream is = null;
+ Lock lock = null;
+ int memoryBlocks = 0;
+ try {
+ synchronized (info) {
+ assert !info.pinned && info.loading; //load should be locked
+ info.await(true, false); //not necessary, but should make things safer
+ if (info.inode != EMPTY_ADDRESS) {
+ info.pinned = true;
+ memoryBufferEntries.touch(info);
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Getting object at inode", info.inode, serializer.getId(), oid); //$NON-NLS-1$
+ }
+ BlockManager manager = getBlockManager(serializer.getId(), oid, info.inode);
+ is = new BlockInputStream(manager, info.memoryBlockCount);
+ } else if (info.block != EMPTY_ADDRESS) {
+ info.pinned = true;
+ memoryBufferEntries.recordAccess(info);
+ storageReads.incrementAndGet();
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Getting object at block", info.block, info.sizeIndex, serializer.getId(), oid); //$NON-NLS-1$
+ }
+ BlockStore blockStore = sizeBasedStores[info.sizeIndex];
+ int segment = info.block/blockStore.blocksInUse.getBitsPerSegment();
+ FileStore fs = blockStore.stores[segment];
+ long blockOffset = (info.block%blockStore.blocksInUse.getBitsPerSegment())*blockStore.blockSize;
+ is = fs.createInputStream(blockOffset, info.memoryBlockCount<<LOG_BLOCK_SIZE);
+ lock = blockStore.locks[segment].writeLock();
+ memoryBlocks = info.memoryBlockCount;
+ } else {
+ return null;
+ }
+ }
+ if (lock != null) {
+ is = readIntoMemory(info, is, lock, memoryBlocks);
+ }
+ ObjectInput dis = new DataObjectInputStream(is);
+ dis.readFully(HEADER_SKIP_BUFFER);
+ int sizeEstimate = dis.readInt();
+ CacheEntry ce = new CacheEntry(new CacheKey(oid, 1, 1), sizeEstimate, serializer.deserialize(dis), ref, true);
+ return ce;
+ } catch(IOException e) {
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", oid)); //$NON-NLS-1$
+ } catch (ClassNotFoundException e) {
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", oid)); //$NON-NLS-1$
+ } catch (InterruptedException e) {
+ throw new TeiidRuntimeException(e);
+ } finally {
+ synchronized (info) {
+ info.pinned = false;
+ info.notifyAll();
+ }
+ }
+ }
+
+ /**
+ * Transfer into memory to release memory/file locks
+ */
+ private InputStream readIntoMemory(PhysicalInfo info, InputStream is,
+ Lock fileLock, int memoryBlocks) throws InterruptedException,
+ IOException {
+ checkForLowMemory();
+ this.memoryWritePermits.acquire(memoryBlocks);
+ BlockManager manager = null;
+ boolean success = false;
+ boolean locked = false;
+ try {
+ manager = getBlockManager(info.gid, info.getId(), EMPTY_ADDRESS);
+ //preallocate the memory area, to ensure we won't exhaust memory while holding
+ //the file lock
+ for (int i = 0; i < memoryBlocks; i++) {
+ manager.allocateBlock(i);
+ }
+
+ fileLock.lock();
+ locked = true;
+ ExtensibleBufferedOutputStream os = new BlockOutputStream(manager, -1);
+ //TODO: there is still an extra buffer being created here, we could FileChannels to do better
+ int b = -1;
+ while ((b = is.read()) != -1) {
+ os.write(b);
+ }
+ fileLock.unlock();
+ locked = false;
+ synchronized (info) {
+ info.inode = manager.getInode();
+ memoryBufferEntries.add(info);
+ is = new BlockInputStream(manager, info.memoryBlockCount);
+ }
+ success = true;
+ } finally {
+ try {
+ if (locked) {
+ fileLock.unlock();
+ }
+ if (!success && manager != null) {
+ manager.free(false);
+ }
+ } finally {
+ this.memoryWritePermits.release(memoryBlocks);
+ }
+ }
+ return is;
+ }
+
+ /**
+ * Determine if an object should be in the memory buffer.
+ * Adds are indicated by a current time of 0.
+ * @param currentTime
+ * @param info
+ * @return
+ */
+ private boolean shouldPlaceInMemoryBuffer(long currentTime, PhysicalInfo info) {
+ PhysicalInfo lowest = memoryBufferEntries.firstEntry(false);
+ CacheKey key = info.getKey();
+ return (blocksInuse.getTotalBits() - blocksInuse.getBitsSet()) > (cleaningThreshold + info.memoryBlockCount)
+ || (lowest != null && lowest.block != EMPTY_ADDRESS
+ && lowest.getKey().getOrderingValue() < (currentTime>0?memoryBufferEntries.computeNextOrderingValue(currentTime, key.getLastAccess(), key.getOrderingValue()):key.getOrderingValue()));
+ }
+
+ @Override
+ public FileStore createFileStore(String name) {
+ return storageManager.createFileStore(name);
+ }
+
+ public void setDirect(boolean direct) {
+ this.direct = direct;
+ }
+
+ @Override
+ public void addToCacheGroup(Long gid, Long oid) {
+ Map<Long, PhysicalInfo> map = physicalMapping.get(gid);
+ if (map == null) {
+ return;
+ }
+ map.put(oid, null);
+ }
+
+ @Override
+ public void createCacheGroup(Long gid) {
+ physicalMapping.put(gid, Collections.synchronizedMap(new HashMap<Long, PhysicalInfo>()));
+ }
+
+ @Override
+ public boolean remove(Long gid, Long id) {
+ Map<Long, PhysicalInfo> map = physicalMapping.get(gid);
+ if (map == null) {
+ return false;
+ }
+ PhysicalInfo info = null;
+ boolean result = false;
+ synchronized (map) {
+ int size = map.size();
+ info = map.remove(id);
+ result = size != map.size();
+ }
+ free(info, false, false);
+ return result;
+ }
+
+ @Override
+ public Collection<Long> removeCacheGroup(Long gid) {
+ Map<Long, PhysicalInfo> map = physicalMapping.remove(gid);
+ if (map == null) {
+ return Collections.emptySet();
+ }
+ synchronized (map) {
+ for (Map.Entry<Long, PhysicalInfo> entry : map.entrySet()) {
+ free(entry.getValue(), false, false);
+ }
+ return map.keySet();
+ }
+ }
+
+ /**
+ * Multi-purpose method to free memory. Modes are:
+ * demote && !acquireDataBlock -> push out of memory buffer onto disk
+ * demote && acquireDataBlock -> push out of memory and reuse a datablock
+ * !demote -> full removal from memory and disk
+ */
+ int free(PhysicalInfo info, boolean demote, boolean acquireDataBlock) {
+ if (info == null) {
+ return EMPTY_ADDRESS;
+ }
+ Long oid = info.getId();
+ int result = FREED;
+ BlockManager bm = null;
+ int block = EMPTY_ADDRESS;
+ int memoryBlockCount;
+ int sizeIndex;
+ synchronized (info) {
+ //if we're a demotion then the free flag was already checked and set
+ if (!demote) {
+ //let any pending finish - it would be nice if we could pre-empt
+ //since we can save some work, but this should be rare enough
+ //to just block
+ info.await(true, true);
+ info.evicting = true;
+ } else {
+ assert info.evicting;
+ }
+ block = info.block;
+ memoryBlockCount = info.memoryBlockCount;
+ sizeIndex = info.sizeIndex;
+ if (info.inode != EMPTY_ADDRESS) {
+ bm = getBlockManager(info.gid, oid, info.inode);
+ } else if (demote) {
+ return EMPTY_ADDRESS;
+ }
+ //release the lock to perform the transfer
+ //for straight removals this is a little wasteful
+ }
+ try {
+ if (demote && block == EMPTY_ADDRESS) {
+ storageWrites.getAndIncrement();
+ BlockInputStream is = new BlockInputStream(bm, memoryBlockCount);
+ BlockStore blockStore = sizeBasedStores[sizeIndex];
+ block = blockStore.writeToStorageBlock(info, is);
+ }
+ } catch (IOException e) {
+ LogManager.logError(LogConstants.CTX_BUFFER_MGR, e, "Error transferring block to storage " + oid); //$NON-NLS-1$
+ } finally {
+ //ensure post conditions
+ synchronized (info) {
+ //it is possible for a read to happen while evicting.
+ //that's ok, we'll just wait for it to finish
+ assert info.evicting;
+ info.await(true, false);
+ info.evicting = false;
+ info.notifyAll();
+ assert bm == null || info.inode != EMPTY_ADDRESS;
+ if (info.inode != EMPTY_ADDRESS) {
+ info.inode = EMPTY_ADDRESS;
+ memoryBufferEntries.remove(info);
+ }
+ if (block != EMPTY_ADDRESS) {
+ if (demote) {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Assigning storage data block", block, "of size", sizeBasedStores[info.sizeIndex].blockSize); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ info.block = block;
+ } else {
+ BlockStore blockStore = sizeBasedStores[info.sizeIndex];
+ blockStore.blocksInUse.clear(info.block);
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Freed storage data block", info.block, "of size", blockStore.blockSize); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ int segment = info.block/blockStore.blocksInUse.getBitsPerSegment();
+ if (!defragRunning.get()
+ && shouldDefrag(blockStore, segment)
+ && defragRunning.compareAndSet(false, true)) {
+ this.asynchPool.execute(defragTask);
+ }
+ info.block = EMPTY_ADDRESS;
+ }
+ }
+ if (bm != null) {
+ result = bm.free(acquireDataBlock);
+ }
+ }
+ }
+ return result;
+ }
+
+ boolean shouldDefrag(BlockStore blockStore, int segment) {
+ int highestBitSet = blockStore.blocksInUse.getHighestBitSet(segment);
+ int bitsSet = blockStore.blocksInUse.getBitsSet(segment);
+ highestBitSet = Math.max(bitsSet, Math.max(0, highestBitSet));
+ if (highestBitSet == 0) {
+ return false;
+ }
+ int freeBlocks = highestBitSet-bitsSet;
+ return freeBlocks > (highestBitSet>>2) && freeBlocks*blockStore.blockSize > minDefrag;
+ }
+
+ /**
+ * Eviction routine. When space is exhausted data blocks are acquired from
+ * memory entries.
+ * @param acquire
+ * @return
+ */
+ int evictFromMemoryBuffer(boolean acquire) {
+ boolean writeLocked = false;
+ int next = EMPTY_ADDRESS;
+ try {
+ for (int i = 0; i < EVICTION_SCANS && next == EMPTY_ADDRESS; i++) {
+ //doing a cleanup may trigger the purging of resources
+ AutoCleanupUtil.doCleanup();
+ //scan the eviction queue looking for a victim
+ Iterator<PhysicalInfo> iter = memoryBufferEntries.getEvictionQueue().iterator();
+ while (((!acquire && lowBlocks(false)) || (acquire && (next = blocksInuse.getAndSetNextClearBit()) == EMPTY_ADDRESS)) && iter.hasNext()) {
+ PhysicalInfo info = iter.next();
+ synchronized (info) {
+ if (info.inode == EMPTY_ADDRESS) {
+ continue;
+ }
+ if (info.pinned || info.evicting) {
+ if (!acquire || i != EVICTION_SCANS - 1) {
+ continue;
+ }
+ if (acquire && !writeLocked) {
+ //stop the world - prevent any other thread from taking a free block
+ //until this one is satisfied
+ memoryEvictionLock.writeLock().lock();
+ writeLocked = true;
+ }
+ //wait for the read/eviction to be over
+ info.await(true, true);
+ if (info.inode == EMPTY_ADDRESS) {
+ continue;
+ }
+ }
+ //mark as evicting early so that other evictFromMemoryCalls don't select this same entry
+ info.evicting = true;
+ }
+ next = free(info, true, acquire);
+ break;
+ }
+ }
+ if (acquire && next == EMPTY_ADDRESS) {
+ throw new AssertionError("Could not free space for pending write"); //$NON-NLS-1$
+ }
+ } finally {
+ if (writeLocked) {
+ memoryEvictionLock.writeLock().unlock();
+ }
+ }
+ return next;
+ }
+
+ public void setStorageManager(StorageManager storageManager) {
+ this.storageManager = storageManager;
+ }
+
+ public StorageManager getStorageManager() {
+ return storageManager;
+ }
+
+ public void setMemoryBufferSpace(long maxBufferSpace) {
+ this.memoryBufferSpace = Math.min(maxBufferSpace, MAX_ADDRESSABLE_MEMORY);
+ }
+
+ public int getInodesInUse() {
+ return this.inodesInuse.getBitsSet();
+ }
+
+ public int getDataBlocksInUse() {
+ return this.blocksInuse.getBitsSet();
+ }
+
+ public void setMaxStorageObjectSize(int maxStorageBlockSize) {
+ this.maxStorageObjectSize = maxStorageBlockSize;
+ }
+
+ public long getStorageReads() {
+ return storageReads.get();
+ }
+
+ public long getStorageWrites() {
+ return storageWrites.get();
+ }
+
+ public long getMemoryBufferSpace() {
+ return memoryBufferSpace;
+ }
+
+ public void setMinDefrag(long minDefrag) {
+ this.minDefrag = minDefrag;
+ }
+
+}
\ No newline at end of file
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -24,7 +24,9 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.ObjectInput;
import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
@@ -32,14 +34,7 @@
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -49,6 +44,7 @@
import java.util.concurrent.locks.ReentrantLock;
import org.teiid.client.BatchSerializer;
+import org.teiid.client.ResizingArrayList;
import org.teiid.common.buffer.*;
import org.teiid.common.buffer.AutoCleanupUtil.Removable;
import org.teiid.common.buffer.LobManager.ReferenceMode;
@@ -75,10 +71,67 @@
*
* TODO: add detection of pinned batches to prevent unnecessary purging of non-persistent batches
* - this is not necessary for already persistent batches, since we hold a weak reference
+ *
+ * TODO: add a pre-fetch for tuplebuffers or some built-in correlation logic with the queue.
*/
public class BufferManagerImpl implements BufferManager, StorageManager, ReplicatedObject {
+
+ /**
+ * Asynch cleaner attempts to age out old entries and to reduce the memory size when
+ * little is reserved.
+ */
+ private static final class Cleaner extends TimerTask {
+ private static final int MAX_READ_AGE = 1<<28;
+ WeakReference<BufferManagerImpl> bufferRef;
+
+ public Cleaner(BufferManagerImpl bufferManagerImpl) {
+ this.bufferRef = new WeakReference<BufferManagerImpl>(bufferManagerImpl);
+ }
+
+ @Override
+ public void run() {
+ while (true) {
+ BufferManagerImpl impl = this.bufferRef.get();
+ if (impl == null) {
+ this.cancel();
+ return;
+ }
+ boolean agingOut = false;
+ if (impl.reserveBatchBytes.get() < impl.maxReserveBytes.get()*.9 || impl.activeBatchBytes.get() < impl.maxReserveBytes.get()*.7) {
+ CacheEntry entry = impl.evictionQueue.firstEntry(false);
+ if (entry == null) {
+ return;
+ }
+ //we aren't holding too many memory entries, ensure that
+ //entries aren't old
+ long lastAccess = entry.getKey().getLastAccess();
+ long currentTime = impl.readAttempts.get();
+ if (currentTime - lastAccess < MAX_READ_AGE) {
+ return;
+ }
+ agingOut = true;
+ }
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Asynch eviction run", impl.reserveBatchBytes.get(), impl.maxReserveBytes.get(), impl.activeBatchBytes.get()); //$NON-NLS-1$
+ }
+ impl.doEvictions(0, false);
+ if (!agingOut) {
+ try {
+ Thread.sleep(100); //we don't want to evict too fast, because the processing threads are more than capable of evicting
+ } catch (InterruptedException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This estimate is based upon adding the value to 2/3 maps and having CacheEntry/PhysicalInfo keys
+ */
+ private static final long BATCH_OVERHEAD = 128;
- private final class BatchManagerImpl implements BatchManager, Serializer<List<? extends List<?>>> {
+ final class BatchManagerImpl implements BatchManager, Serializer<List<? extends List<?>>> {
final Long id;
SizeUtility sizeUtility;
private WeakReference<BatchManagerImpl> ref = new WeakReference<BatchManagerImpl>(this);
@@ -86,10 +139,13 @@
String[] types;
private LobManager lobManager;
- private BatchManagerImpl(Long newID, String[] types) {
+ private BatchManagerImpl(Long newID, Class<?>[] types) {
this.id = newID;
this.sizeUtility = new SizeUtility(types);
- this.types = types;
+ this.types = new String[types.length];
+ for (int i = 0; i < types.length; i++) {
+ this.types[i] = DataTypeManager.getDataTypeName(types[i]);
+ }
cache.createCacheGroup(newID);
}
@@ -114,7 +170,7 @@
@Override
public void setPrefersMemory(boolean prefers) {
- //TODO: it's only expected to move from not preferring to prefefring
+ //TODO: it's only expected to move from not preferring to preferring
this.prefersMemory.set(prefers);
}
@@ -129,19 +185,33 @@
}
@Override
- public Long createManagedBatch(List<? extends List<?>> batch)
+ public Long createManagedBatch(List<? extends List<?>> batch,
+ Long previous, boolean removeOld)
throws TeiidComponentException {
int sizeEstimate = getSizeEstimate(batch);
Long oid = batchAdded.getAndIncrement();
- CacheEntry ce = new CacheEntry(oid);
- ce.setObject(batch);
- ce.setSizeEstimate(sizeEstimate);
- ce.setSerializer(this.ref);
- return addCacheEntry(ce, this);
+ CacheEntry old = null;
+ if (previous != null) {
+ if (removeOld) {
+ old = BufferManagerImpl.this.remove(id, previous, prefersMemory.get());
+ } else {
+ old = fastGet(previous, prefersMemory.get(), true);
+ }
+ }
+ CacheKey key = new CacheKey(oid, (int)readAttempts.get(), old!=null?old.getKey().getOrderingValue():0);
+ CacheEntry ce = new CacheEntry(key, sizeEstimate, batch, this.ref, false);
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", ce.getId(), "with size estimate", ce.getSizeEstimate()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ maxReserveBytes.addAndGet(-BATCH_OVERHEAD);
+ reserveBatchBytes.addAndGet(-BATCH_OVERHEAD);
+ cache.addToCacheGroup(id, ce.getId());
+ addMemoryEntry(ce, true);
+ return oid;
}
@Override
- public List<? extends List<?>> deserialize(ObjectInputStream ois)
+ public List<? extends List<?>> deserialize(ObjectInput ois)
throws IOException, ClassNotFoundException {
List<? extends List<?>> batch = BatchSerializer.readBatch(ois, types);
if (lobManager != null) {
@@ -158,13 +228,26 @@
@Override
public void serialize(List<? extends List<?>> obj,
- ObjectOutputStream oos) throws IOException {
- //it's expected that the containing structure has updated the lob manager
- BatchSerializer.writeBatch(oos, types, obj);
+ ObjectOutput oos) throws IOException {
+ int expectedModCount = 0;
+ ResizingArrayList<?> list = null;
+ if (obj instanceof ResizingArrayList<?>) {
+ list = (ResizingArrayList<?>)obj;
+ }
+ try {
+ //it's expected that the containing structure has updated the lob manager
+ BatchSerializer.writeBatch(oos, types, obj);
+ } catch (RuntimeException e) {
+ //there is a chance of a concurrent persist while modifying
+ //in which case we want to swallow this exception
+ if (list == null || list.getModCount() == expectedModCount) {
+ throw e;
+ }
+ }
}
public int getSizeEstimate(List<? extends List<?>> obj) {
- return (int) Math.max(1, sizeUtility.getBatchSize(obj) / 1024);
+ return (int) Math.max(1, sizeUtility.getBatchSize(DataTypeManager.isValueCacheEnabled(), obj));
}
@SuppressWarnings("unchecked")
@@ -180,33 +263,34 @@
if (ce != null) {
return (List<List<?>>)(!retain?ce.nullOut():ce.getObject());
}
- synchronized (this) {
+ //obtain a granular lock to prevent double memory loading
+ Object o = cache.lockForLoad(batch, this);
+ try {
ce = fastGet(batch, prefersMemory.get(), retain);
if (ce != null) {
return (List<List<?>>)(!retain?ce.nullOut():ce.getObject());
}
long count = readCount.incrementAndGet();
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, id, id, "reading batch", batch, "from storage, total reads:", count); //$NON-NLS-1$ //$NON-NLS-2$
}
- ce = cache.get(batch, this);
+ ce = cache.get(o, batch, this.ref);
if (ce == null) {
throw new AssertionError("Batch not found in storage " + batch); //$NON-NLS-1$
}
if (!retain) {
- cache.remove(this.id, batch);
+ removeFromCache(this.id, batch);
+ } else {
+ addMemoryEntry(ce, false);
}
- ce.setSerializer(this.ref);
- if (retain) {
- addMemoryEntry(ce);
- }
- }
+ } finally {
+ cache.unlockForLoad(o);
+ }
return (List<List<?>>)ce.getObject();
}
-
+
@Override
public void remove(Long batch) {
- cleanSoftReferences();
BufferManagerImpl.this.remove(id, batch, prefersMemory.get());
}
@@ -234,6 +318,7 @@
}
}
+ static final int CONCURRENCY_LEVEL = 32; //TODO: make this configurable since it is roughly the same as max active plans
private static final int TARGET_BYTES_PER_ROW = 1 << 11; //2k bytes per row
private static ReferenceQueue<CacheEntry> SOFT_QUEUE = new ReferenceQueue<CacheEntry>();
@@ -241,10 +326,10 @@
private int connectorBatchSize = BufferManager.DEFAULT_CONNECTOR_BATCH_SIZE;
private int processorBatchSize = BufferManager.DEFAULT_PROCESSOR_BATCH_SIZE;
//set to acceptable defaults for testing
- private int maxProcessingKB = 1 << 11;
- private Integer maxProcessingKBOrig;
- private AtomicInteger maxReserveKB = new AtomicInteger(1 << 18);
- private volatile int reserveBatchKB;
+ private int maxProcessingBytes = 1 << 21;
+ private Integer maxProcessingBytesOrig;
+ AtomicLong maxReserveBytes = new AtomicLong(1 << 28);
+ AtomicLong reserveBatchBytes = new AtomicLong();
private int maxActivePlans = DQPConfiguration.DEFAULT_MAX_ACTIVE_PLANS; //used as a hint to set the reserveBatchKB
private boolean useWeakReferences = true;
private boolean inlineLobs = true;
@@ -254,12 +339,19 @@
private ReentrantLock lock = new ReentrantLock(true);
private Condition batchesFreed = lock.newCondition();
- private AtomicInteger activeBatchKB = new AtomicInteger();
+ AtomicLong activeBatchBytes = new AtomicLong();
- //tiered memory entries. the first tier is just a queue of adds/gets. once accessed again, the entry moves to the tenured tier.
- private LinkedHashMap<Long, CacheEntry> memoryEntries = new LinkedHashMap<Long, CacheEntry>(16, .75f, false);
- private LinkedHashMap<Long, CacheEntry> tenuredMemoryEntries = new LinkedHashMap<Long, CacheEntry>(16, .75f, true);
+ private AtomicLong readAttempts = new AtomicLong();
+ //TODO: consider the size estimate in the weighting function
+ LrfuEvictionQueue<CacheEntry> evictionQueue = new LrfuEvictionQueue<CacheEntry>(readAttempts);
+ ConcurrentHashMap<Long, CacheEntry> memoryEntries = new ConcurrentHashMap<Long, CacheEntry>(16, .75f, CONCURRENCY_LEVEL);
+ private ThreadLocal<Integer> reservedByThread = new ThreadLocal<Integer>() {
+ protected Integer initialValue() {
+ return 0;
+ }
+ };
+
//limited size reference caches based upon the memory settings
private WeakReferenceHashedValueCache<CacheEntry> weakReferenceCache;
private Map<Long, BatchSoftReference> softCache = Collections.synchronizedMap(new LinkedHashMap<Long, BatchSoftReference>(16, .75f, false) {
@@ -268,15 +360,15 @@
protected boolean removeEldestEntry(Map.Entry<Long,BatchSoftReference> eldest) {
if (size() > maxSoftReferences) {
BatchSoftReference bsr = eldest.getValue();
- maxReserveKB.addAndGet(bsr.sizeEstimate);
- bsr.clear();
+ clearSoftReference(bsr);
return true;
}
return false;
- };
+ }
+
});
- Cache cache;
+ private Cache cache;
private Map<String, TupleReference> tupleBufferMap = new ConcurrentHashMap<String, TupleReference>();
private ReferenceQueue<TupleBuffer> tupleBufferQueue = new ReferenceQueue<TupleBuffer>();
@@ -285,9 +377,30 @@
private AtomicLong batchAdded = new AtomicLong();
private AtomicLong readCount = new AtomicLong();
private AtomicLong writeCount = new AtomicLong();
- private AtomicLong readAttempts = new AtomicLong();
private AtomicLong referenceHit = new AtomicLong();
+ private static final Timer timer = new Timer("BufferManager Cleaner", true); //$NON-NLS-1$
+
+ public BufferManagerImpl() {
+ timer.schedule(new Cleaner(this), 15000, 15000);
+ }
+
+ void clearSoftReference(BatchSoftReference bsr) {
+ synchronized (bsr) {
+ maxReserveBytes.addAndGet(bsr.sizeEstimate);
+ reserveBatchBytes.addAndGet(bsr.sizeEstimate);
+ bsr.sizeEstimate = 0;
+ }
+ bsr.clear();
+ }
+
+ void removeFromCache(Long gid, Long batch) {
+ if (cache.remove(gid, batch)) {
+ maxReserveBytes.addAndGet(BATCH_OVERHEAD);
+ reserveBatchBytes.addAndGet(BATCH_OVERHEAD);
+ }
+ }
+
public long getBatchesAdded() {
return batchAdded.get();
}
@@ -305,9 +418,13 @@
}
@Override
- public int getMaxProcessingKB() {
- return maxProcessingKB;
+ public int getMaxProcessingSize() {
+ return maxProcessingBytes;
}
+
+ public long getReserveBatchBytes() {
+ return reserveBatchBytes.get();
+ }
/**
* Get processor batch size
@@ -344,7 +461,7 @@
TupleSourceType tupleSourceType) {
final Long newID = this.tsId.getAndIncrement();
int[] lobIndexes = LobManager.getLobIndexes(elements);
- String[] types = TupleBuffer.getTypeNames(elements);
+ Class<?>[] types = getTypeClasses(elements);
BatchManagerImpl batchManager = createBatchManager(newID, types);
LobManager lobManager = null;
FileStore lobStore = null;
@@ -367,7 +484,7 @@
public STree createSTree(final List elements, String groupName, int keyLength) {
Long newID = this.tsId.getAndIncrement();
int[] lobIndexes = LobManager.getLobIndexes(elements);
- String[] types = TupleBuffer.getTypeNames(elements);
+ Class<?>[] types = getTypeClasses(elements);
BatchManagerImpl bm = createBatchManager(newID, types);
LobManager lobManager = null;
if (lobIndexes != null) {
@@ -382,10 +499,19 @@
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating STree:", newID); //$NON-NLS-1$
}
- return new STree(keyManager, bm, new ListNestedSortComparator(compareIndexes), getProcessorBatchSize(elements), getProcessorBatchSize(elements.subList(0, keyLength)), keyLength, lobManager);
+ return new STree(keyManager, bm, new ListNestedSortComparator(compareIndexes), getProcessorBatchSize(elements.subList(0, keyLength)), getProcessorBatchSize(elements), keyLength, lobManager);
}
- private BatchManagerImpl createBatchManager(final Long newID, String[] types) {
+ private static Class<?>[] getTypeClasses(final List elements) {
+ Class<?>[] types = new Class[elements.size()];
+ for (ListIterator<? extends Expression> i = elements.listIterator(); i.hasNext();) {
+ Expression expr = i.next();
+ types[i.previousIndex()] = expr.getType();
+ }
+ return types;
+ }
+
+ private BatchManagerImpl createBatchManager(final Long newID, Class<?>[] types) {
BatchManagerImpl bm = new BatchManagerImpl(newID, types);
final AtomicBoolean prefersMemory = bm.prefersMemory;
AutoCleanupUtil.setCleanupReference(bm, new Removable() {
@@ -415,40 +541,52 @@
}
public void setMaxProcessingKB(int maxProcessingKB) {
- this.maxProcessingKB = maxProcessingKB;
+ if (maxProcessingKB > -1) {
+ this.maxProcessingBytes = maxProcessingKB<<10;
+ } else {
+ this.maxProcessingBytes = -1;
+ }
}
public void setMaxReserveKB(int maxReserveBatchKB) {
- this.maxReserveKB.set(maxReserveBatchKB);
+ if (maxReserveBatchKB > -1) {
+ int maxReserve = maxReserveBatchKB<<10;
+ this.maxReserveBytes.set(maxReserve);
+ this.reserveBatchBytes.set(maxReserve);
+ } else {
+ this.maxReserveBytes.set(-1);
+ }
}
@Override
public void initialize() throws TeiidComponentException {
- int maxMemory = (int)Math.min(Runtime.getRuntime().maxMemory() / 1024, Integer.MAX_VALUE);
- maxMemory -= 300 * 1024; //assume 300 megs of overhead for the AS/system stuff
+ long maxMemory = Runtime.getRuntime().maxMemory();
+ maxMemory = Math.max(0, maxMemory - (300 << 20)); //assume 300 megs of overhead for the AS/system stuff
if (getMaxReserveKB() < 0) {
- this.setMaxReserveKB(0);
- int one_gig = 1024 * 1024;
+ this.maxReserveBytes.set(0);
+ int one_gig = 1 << 30;
if (maxMemory > one_gig) {
//assume 75% of the memory over the first gig
- this.maxReserveKB.addAndGet(((int)Math.max(0, (maxMemory - one_gig) * .75)));
+ this.maxReserveBytes.addAndGet((long)Math.max(0, (maxMemory - one_gig) * .75));
}
- this.maxReserveKB.addAndGet(((int)Math.max(0, Math.min(one_gig, maxMemory) * .5)));
+ this.maxReserveBytes.addAndGet(Math.max(0, Math.min(one_gig, maxMemory) >> 1));
}
- this.reserveBatchKB = this.getMaxReserveKB();
- if (this.maxProcessingKBOrig == null) {
+ this.reserveBatchBytes.set(this.maxReserveBytes.get());
+ if (this.maxProcessingBytesOrig == null) {
//store the config value so that we can be reinitialized (this is not a clean approach)
- this.maxProcessingKBOrig = this.maxProcessingKB;
+ this.maxProcessingBytesOrig = this.maxProcessingBytes;
}
- if (this.maxProcessingKBOrig < 0) {
- this.maxProcessingKB = Math.max(Math.min(8 * processorBatchSize, Integer.MAX_VALUE), (int)(.1 * maxMemory)/maxActivePlans);
+ if (this.maxProcessingBytesOrig < 0) {
+ this.maxProcessingBytes = (int)Math.min(Math.max(processorBatchSize * targetBytesPerRow * 8l, (.1 * maxMemory)/maxActivePlans), Integer.MAX_VALUE);
}
- int memoryBatches = (this.maxProcessingKB * maxActivePlans + this.getMaxReserveKB()) / (processorBatchSize * targetBytesPerRow / 1024);
- int logSize = 39 - Integer.numberOfLeadingZeros(memoryBatches);
+ //make a guess at the max number of batches
+ long memoryBatches = maxMemory / (processorBatchSize * targetBytesPerRow);
+ //memoryBatches represents a full batch, so assume that most will be smaller
+ int logSize = 67 - Long.numberOfLeadingZeros(memoryBatches);
if (useWeakReferences) {
- weakReferenceCache = new WeakReferenceHashedValueCache<CacheEntry>(Math.min(20, logSize));
+ weakReferenceCache = new WeakReferenceHashedValueCache<CacheEntry>(Math.min(30, logSize));
}
- this.maxSoftReferences = 1 << Math.max(28, logSize+2);
+ this.maxSoftReferences = 1 << Math.min(30, logSize);
}
@Override
@@ -456,142 +594,198 @@
if (count < 1) {
return;
}
+ reservedByThread.set(reservedByThread.get() - count);
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Releasing buffer space", count); //$NON-NLS-1$
}
+ if (lock.tryLock()) {
+ try {
+ this.reserveBatchBytes.addAndGet(count);
+ batchesFreed.signalAll();
+ } finally {
+ lock.unlock();
+ }
+ } else {
+ this.reserveBatchBytes.addAndGet(count);
+ }
+ }
+
+ /**
+ * TODO: should consider other reservations by the current thread
+ */
+ @Override
+ public int reserveAdditionalBuffers(int additional) {
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Reserving buffer space", additional, "WAIT"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
lock.lock();
try {
- this.reserveBatchKB += count;
- batchesFreed.signalAll();
+ //don't wait for more than is available
+ int waitCount = Math.min(additional, this.getMaxReserveKB() - reservedByThread.get());
+ int committed = 0;
+ while (waitCount > 0 && waitCount > this.reserveBatchBytes.get() && committed < additional) {
+ long reserveBatchSample = this.reserveBatchBytes.get();
+ try {
+ batchesFreed.await(100, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ if (reserveBatchSample >= this.reserveBatchBytes.get()) {
+ waitCount >>= 3;
+ } else {
+ waitCount >>= 1;
+ }
+ int result = noWaitReserve(additional - committed, false);
+ committed += result;
+ }
+ return committed;
} finally {
lock.unlock();
+ persistBatchReferences();
}
- }
+ }
@Override
public int reserveBuffers(int count, BufferReserveMode mode) {
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Reserving buffer space", count, mode); //$NON-NLS-1$
}
- lock.lock();
- try {
- if (mode == BufferReserveMode.WAIT) {
- //don't wait for more than is available
- int waitCount = Math.min(count, this.getMaxReserveKB());
- while (waitCount > 0 && waitCount > this.reserveBatchKB) {
- try {
- batchesFreed.await(100, TimeUnit.MILLISECONDS);
- } catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
- }
- waitCount /= 2;
- }
- }
- if (this.reserveBatchKB >= count || mode == BufferReserveMode.FORCE) {
- this.reserveBatchKB -= count;
- return count;
- }
- int result = Math.max(0, this.reserveBatchKB);
- this.reserveBatchKB -= result;
- return result;
- } finally {
- lock.unlock();
- persistBatchReferences();
+ int result = count;
+ if (mode == BufferReserveMode.FORCE) {
+ this.reserveBatchBytes.addAndGet(-count);
+ } else {
+ result = noWaitReserve(count, true);
}
+ reservedByThread.set(reservedByThread.get() + result);
+ persistBatchReferences();
+ return result;
}
+
+ private int noWaitReserve(int count, boolean allOrNothing) {
+ for (int i = 0; i < 2; i++) {
+ long reserveBatch = this.reserveBatchBytes.get();
+ if (allOrNothing && count > reserveBatch) {
+ return 0;
+ }
+ count = (int)Math.min(count, Math.max(0, reserveBatch));
+ if (count == 0) {
+ return 0;
+ }
+ if (this.reserveBatchBytes.compareAndSet(reserveBatch, reserveBatch - count)) {
+ return count;
+ }
+ }
+ //the value is changing rapidly, but we've already potentially adjusted the value twice, so just proceed
+ this.reserveBatchBytes.addAndGet(-count);
+ return count;
+ }
void persistBatchReferences() {
- if (activeBatchKB.get() == 0 || activeBatchKB.get() <= reserveBatchKB) {
- int memoryCount = activeBatchKB.get() + getMaxReserveKB() - reserveBatchKB;
+ long activeBatch = activeBatchBytes.get();
+ long reserveBatch = reserveBatchBytes.get();
+ if (activeBatch <= reserveBatch) {
+ long memoryCount = activeBatch + getMaxReserveKB() - reserveBatch;
if (DataTypeManager.isValueCacheEnabled()) {
if (memoryCount < getMaxReserveKB() / 8) {
DataTypeManager.setValueCacheEnabled(false);
}
- } else if (memoryCount > getMaxReserveKB() / 4) {
+ } else if (memoryCount > getMaxReserveKB() / 2) {
DataTypeManager.setValueCacheEnabled(true);
}
return;
}
- boolean first = true;
- while (true) {
- CacheEntry ce = null;
- synchronized (memoryEntries) {
- if (activeBatchKB.get() == 0 || activeBatchKB.get() < reserveBatchKB * .8) {
- break;
+ long maxToFree = Math.max(maxProcessingBytes>>1, reserveBatch>>3);
+ doEvictions(maxToFree, true);
+ }
+
+ void doEvictions(long maxToFree, boolean checkActiveBatch) {
+ int freed = 0;
+ while (freed <= maxToFree && (!checkActiveBatch || activeBatchBytes.get() > reserveBatchBytes.get() * .8)) {
+ CacheEntry ce = evictionQueue.firstEntry(true);
+ if (ce == null) {
+ break;
+ }
+ synchronized (ce) {
+ if (!memoryEntries.containsKey(ce.getId())) {
+ continue; //not currently a valid eviction
}
- if (first) { //let one entry per persist cycle loose its tenure. this helps us be more write avoident.
- first = false;
- if (!tenuredMemoryEntries.isEmpty()) {
- Iterator<Map.Entry<Long, CacheEntry>> iter = tenuredMemoryEntries.entrySet().iterator();
- Map.Entry<Long, CacheEntry> entry = iter.next();
- iter.remove();
- memoryEntries.put(entry.getKey(), entry.getValue());
+ }
+ boolean evicted = true;
+ try {
+ evicted = evict(ce);
+ } catch (Throwable e) {
+ LogManager.logError(LogConstants.CTX_BUFFER_MGR, e, "Error persisting batch, attempts to read batch "+ ce.getId() +" later will result in an exception"); //$NON-NLS-1$ //$NON-NLS-2$
+ } finally {
+ synchronized (ce) {
+ if (evicted && memoryEntries.remove(ce.getId()) != null) {
+ freed += ce.getSizeEstimate();
+ activeBatchBytes.addAndGet(-ce.getSizeEstimate());
+ evictionQueue.remove(ce); //ensures that an intervening get will still be cleaned
}
}
- LinkedHashMap<Long, CacheEntry> toDrain = memoryEntries;
- if (memoryEntries.isEmpty()) {
- toDrain = tenuredMemoryEntries;
- if (tenuredMemoryEntries.isEmpty()) {
- break;
- }
- }
- Iterator<CacheEntry> iter = toDrain.values().iterator();
- ce = iter.next();
- iter.remove();
- activeBatchKB.addAndGet(-ce.getSizeEstimate());
}
- persist(ce);
}
}
- void persist(CacheEntry ce) {
- Serializer<?> s = ce.getSerializer().get();
+ boolean evict(CacheEntry ce) throws Exception {
+ Serializer<?> s = ce.getSerializer();
if (s == null) {
- return;
+ return true;
}
- if (!ce.isPersistent()) {
+ boolean persist = false;
+ synchronized (ce) {
+ if (!ce.isPersistent()) {
+ persist = true;
+ ce.setPersistent(true);
+ }
+ }
+ if (persist) {
long count = writeCount.incrementAndGet();
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, ce.getId(), "writing batch to storage, total writes: ", count); //$NON-NLS-1$
}
- cache.add(ce, s);
- ce.setPersistent(true);
}
+ boolean result = cache.add(ce, s);
if (s.useSoftCache()) {
createSoftReference(ce);
} else if (useWeakReferences) {
weakReferenceCache.getValue(ce); //a get will set the value
}
+ return result;
}
private void createSoftReference(CacheEntry ce) {
- BatchSoftReference ref = new BatchSoftReference(ce, SOFT_QUEUE, ce.getSizeEstimate()/2);
+ //if we don't set aside some reserve, we
+ //will push the soft ref out of memory potentially too quickly
+ int sizeEstimate = ce.getSizeEstimate()/2;
+ BatchSoftReference ref = new BatchSoftReference(ce, SOFT_QUEUE, sizeEstimate);
softCache.put(ce.getId(), ref);
- maxReserveKB.addAndGet(- ce.getSizeEstimate()/2);
+ maxReserveBytes.addAndGet(- sizeEstimate);
+ reserveBatchBytes.addAndGet(- sizeEstimate);
}
/**
- * Get a CacheEntry without hitting the cache
+ * Get a CacheEntry without hitting storage
*/
CacheEntry fastGet(Long batch, boolean prefersMemory, boolean retain) {
CacheEntry ce = null;
- synchronized (memoryEntries) {
- if (retain) {
- ce = tenuredMemoryEntries.get(batch);
- if (ce == null) {
- ce = memoryEntries.remove(batch);
- if (ce != null) {
- tenuredMemoryEntries.put(batch, ce);
+ if (retain) {
+ ce = memoryEntries.get(batch);
+ } else {
+ ce = memoryEntries.remove(batch);
+ }
+ if (ce != null) {
+ synchronized (ce) {
+ if (retain) {
+ //there is a minute chance the batch was evicted
+ //this call ensures that we won't leak
+ if (memoryEntries.containsKey(batch)) {
+ evictionQueue.touch(ce);
}
- }
- } else {
- ce = tenuredMemoryEntries.remove(batch);
- if (ce == null) {
- ce = memoryEntries.remove(batch);
+ } else {
+ evictionQueue.remove(ce);
}
}
- }
- if (ce != null) {
if (!retain) {
BufferManagerImpl.this.remove(ce, true);
}
@@ -602,7 +796,7 @@
if (bsr != null) {
ce = bsr.get();
if (ce != null) {
- maxReserveKB.addAndGet(bsr.sizeEstimate);
+ clearSoftReference(bsr);
}
}
} else if (useWeakReferences) {
@@ -614,7 +808,7 @@
if (ce != null && ce.getObject() != null) {
referenceHit.getAndIncrement();
if (retain) {
- addMemoryEntry(ce);
+ addMemoryEntry(ce, false);
} else {
BufferManagerImpl.this.remove(ce, false);
}
@@ -623,49 +817,56 @@
return null;
}
- void remove(Long gid, Long batch, boolean prefersMemory) {
+ AtomicInteger removed = new AtomicInteger();
+
+ CacheEntry remove(Long gid, Long batch, boolean prefersMemory) {
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Removing batch from BufferManager", batch); //$NON-NLS-1$
}
+ cleanSoftReferences();
CacheEntry ce = fastGet(batch, prefersMemory, false);
if (ce == null) {
- cache.remove(gid, batch);
+ removeFromCache(gid, batch);
} else {
ce.nullOut();
}
+ return ce;
}
private void remove(CacheEntry ce, boolean inMemory) {
if (inMemory) {
- activeBatchKB.addAndGet(-ce.getSizeEstimate());
+ activeBatchBytes.addAndGet(-ce.getSizeEstimate());
}
- Serializer<?> s = ce.getSerializer().get();
+ Serializer<?> s = ce.getSerializer();
if (s != null) {
- cache.remove(s.getId(), ce.getId());
+ removeFromCache(s.getId(), ce.getId());
}
}
- Long addCacheEntry(CacheEntry ce, Serializer<?> s) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", ce.getId(), "with size estimate", ce.getSizeEstimate()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- cache.addToCacheGroup(s.getId(), ce.getId());
- addMemoryEntry(ce);
- return ce.getId();
- }
-
- void addMemoryEntry(CacheEntry ce) {
+ void addMemoryEntry(CacheEntry ce, boolean initial) {
persistBatchReferences();
- synchronized (memoryEntries) {
- memoryEntries.put(ce.getId(), ce);
+ synchronized (ce) {
+ boolean added = memoryEntries.put(ce.getId(), ce) == null;
+ if (initial) {
+ evictionQueue.add(ce);
+ } else if (added) {
+ evictionQueue.recordAccess(ce);
+ evictionQueue.add(ce);
+ } else {
+ evictionQueue.touch(ce);
+ }
}
- activeBatchKB.getAndAdd(ce.getSizeEstimate());
+ activeBatchBytes.getAndAdd(ce.getSizeEstimate());
}
void removeCacheGroup(Long id, boolean prefersMemory) {
cleanSoftReferences();
Collection<Long> vals = cache.removeCacheGroup(id);
+ long overhead = vals.size() * BATCH_OVERHEAD;
+ maxReserveBytes.addAndGet(overhead);
+ reserveBatchBytes.addAndGet(overhead);
for (Long val : vals) {
+ //TODO: we will unnecessarily call remove on the cache, but that should be low cost
fastGet(val, prefersMemory, false);
}
}
@@ -677,8 +878,7 @@
break;
}
softCache.remove(ref.key);
- maxReserveKB.addAndGet(ref.sizeEstimate);
- ref.clear();
+ clearSoftReference(ref);
}
}
@@ -721,7 +921,7 @@
}
rowCount = Math.max(1, rowCount);
total *= rowCount;
- return new int[]{rowCount, Math.max(1, total / 1024)};
+ return new int[]{rowCount, Math.max(1, total)};
}
@Override
@@ -901,11 +1101,15 @@
this.inlineLobs = inlineLobs;
}
- private int getMaxReserveKB() {
- return maxReserveKB.get();
+ public int getMaxReserveKB() {
+ return (int)maxReserveBytes.get()>>10;
}
public void setCache(Cache cache) {
this.cache = cache;
}
+ public int getMemoryCacheEntries() {
+ return memoryEntries.size();
+ }
+
}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ConcurrentBitSet.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/ConcurrentBitSet.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ConcurrentBitSet.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ConcurrentBitSet.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,301 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.util.BitSet;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.teiid.core.util.Assertion;
+
+/**
+ * A segmented {@link BitSet} that supports greater concurrency
+ * and faster finding of clear bits.
+ */
+public class ConcurrentBitSet {
+
+ private static final int CONCURRENT_MODIFICATION = -2;
+ private static final int ADDRESS_BITS_PER_TOP_VALUE = 18;
+ private static final int MAX_TOP_VALUE = 1 << ADDRESS_BITS_PER_TOP_VALUE;
+
+ private static class Segment {
+ int offset;
+ int maxBits;
+ int startSearch;
+ int highestBitSet = -1;
+ int bitsSet;
+ int[] topVals;
+ final BitSet bitSet;
+
+ public Segment(int bitCount) {
+ bitSet = new BitSet();
+ maxBits = bitCount;
+ this.topVals = new int[Math.max(1, maxBits >> ADDRESS_BITS_PER_TOP_VALUE)];
+ }
+ }
+
+ private int bitsPerSegment;
+ private int totalBits;
+ private AtomicInteger counter = new AtomicInteger();
+ private AtomicInteger bitsSet = new AtomicInteger();
+ private Segment[] segments;
+ private boolean compact;
+
+ /**
+ * @param maxBits
+ * @param concurrencyLevel - should be a power of 2
+ */
+ public ConcurrentBitSet(int maxBits, int concurrencyLevel) {
+ Assertion.assertTrue(maxBits > 0);
+ while ((bitsPerSegment = maxBits/concurrencyLevel) < concurrencyLevel) {
+ concurrencyLevel >>= 1;
+ }
+ segments = new Segment[concurrencyLevel];
+ int modBits = maxBits%concurrencyLevel;
+ if (modBits > 0) {
+ bitsPerSegment++;
+ }
+ for (int i = 0; i < concurrencyLevel; i++) {
+ segments[i] = new Segment(bitsPerSegment);
+ segments[i].offset = i*bitsPerSegment;
+ if (i == concurrencyLevel - 1) {
+ segments[i].maxBits -= (bitsPerSegment * concurrencyLevel)-maxBits;
+ }
+ }
+ this.totalBits = maxBits;
+ }
+
+ public void clear(int bitIndex) {
+ checkIndex(bitIndex);
+ Segment s = segments[bitIndex/bitsPerSegment];
+ int segmentBitIndex = bitIndex%bitsPerSegment;
+ synchronized (s) {
+ if (!s.bitSet.get(segmentBitIndex)) {
+ throw new AssertionError(bitIndex + " not set"); //$NON-NLS-1$
+ }
+ if (compact) {
+ s.startSearch = Math.min(s.startSearch, segmentBitIndex);
+ }
+ s.bitSet.clear(segmentBitIndex);
+ s.bitsSet--;
+ s.topVals[segmentBitIndex>>ADDRESS_BITS_PER_TOP_VALUE]--;
+ }
+ bitsSet.decrementAndGet();
+ }
+
+ /**
+ * Makes a best effort to atomically find the next clear bit and set it
+ * @return the next bit index or -1 if no clear bits are found
+ */
+ public int getAndSetNextClearBit() {
+ return getAndSetNextClearBit(counter.getAndIncrement());
+ }
+
+ public int getNextSegment() {
+ return counter.getAndIncrement();
+ }
+
+ /**
+ * return an estimate of the number of bits set
+ * @param segment
+ * @return
+ */
+ public int getBitsSet(int segment) {
+ Segment s = segments[segment&(segments.length-1)];
+ return s.bitsSet;
+ }
+
+ /**
+ * return an estimate of the highest bit (relative index) that has been set
+ * @param segment
+ * @return
+ */
+ public int getHighestBitSet(int segment) {
+ Segment s = segments[segment&(segments.length-1)];
+ return s.highestBitSet;
+ }
+
+ /**
+ * @param segment
+ * @return the next clear bit index as an absolute index - not relative to a segment
+ */
+ public int getAndSetNextClearBit(int segment) {
+ int nextBit = -1;
+ for (int i = 0; i < segments.length; i++) {
+ Segment s = segments[(segment+i)&(segments.length-1)];
+ synchronized (s) {
+ if (s.bitsSet == s.maxBits) {
+ continue;
+ }
+ int indexSearchStart = s.startSearch >> ADDRESS_BITS_PER_TOP_VALUE;
+ for (int j = indexSearchStart; j < s.topVals.length; j++) {
+ if (s.topVals[j] == MAX_TOP_VALUE) {
+ continue;
+ }
+ if (s.topVals[j] == 0) {
+ if (j == segment) {
+ nextBit = s.startSearch;
+ break;
+ }
+ nextBit = j * MAX_TOP_VALUE;
+ break;
+ }
+ int index = j * MAX_TOP_VALUE;
+ if (j == indexSearchStart) {
+ index = s.startSearch;
+ }
+ nextBit = s.bitSet.nextClearBit(index);
+ if (s.startSearch > 0 && nextBit >= s.maxBits - 1) {
+ s.startSearch = 0;
+ //fallback full scan
+ nextBit = s.bitSet.nextClearBit(s.startSearch);
+ }
+ break;
+ }
+ if (nextBit >= s.maxBits) {
+ throw new AssertionError("could not find clear bit"); //$NON-NLS-1$
+ }
+ s.topVals[nextBit>>ADDRESS_BITS_PER_TOP_VALUE]++;
+ s.bitsSet++;
+ s.bitSet.set(nextBit);
+ s.startSearch = nextBit + 1;
+ s.highestBitSet = Math.max(s.highestBitSet, nextBit);
+ if (s.startSearch == s.maxBits) {
+ s.startSearch = 0;
+ }
+ nextBit += s.offset;
+ break;
+ }
+ }
+ if (nextBit != -1) {
+ bitsSet.getAndIncrement();
+ }
+ return nextBit;
+ }
+
+ private void checkIndex(int bitIndex) {
+ if (bitIndex >= totalBits) {
+ throw new ArrayIndexOutOfBoundsException(bitIndex);
+ }
+ }
+
+ public int getTotalBits() {
+ return totalBits;
+ }
+
+ public int getBitsSet() {
+ return bitsSet.get();
+ }
+
+ public int getBitsPerSegment() {
+ return bitsPerSegment;
+ }
+
+ /**
+ * Set to always allocate against the first available block in a segment.
+ * @param compact
+ */
+ public void setCompact(boolean compact) {
+ this.compact = compact;
+ }
+
+
+ public int compactHighestBitSet(int segment) {
+ Segment s = segments[segment&(segments.length-1)];
+ //first do an unlocked compact
+ for (int i = 0; i < 3; i++) {
+ int result = tryCompactHighestBitSet(s);
+ if (result != CONCURRENT_MODIFICATION) {
+ return result;
+ }
+ }
+ synchronized (s) {
+ return tryCompactHighestBitSet(s);
+ }
+ }
+
+ private int tryCompactHighestBitSet(Segment s) {
+ int highestBitSet = 0;
+ synchronized (s) {
+ highestBitSet = s.highestBitSet;
+ if (highestBitSet <= 0) {
+ return 0;
+ }
+ if (s.bitSet.get(highestBitSet)) {
+ return highestBitSet;
+ }
+ }
+ int indexSearchStart = highestBitSet >> ADDRESS_BITS_PER_TOP_VALUE;
+ for (int j = indexSearchStart; j >= 0; j--) {
+ if (s.topVals[j] == 0) {
+ if (j==0) {
+ synchronized (s) {
+ if (s.highestBitSet != highestBitSet) {
+ return CONCURRENT_MODIFICATION;
+ }
+ s.highestBitSet = -1;
+ }
+ }
+ continue;
+ }
+ if (s.topVals[j] == MAX_TOP_VALUE) {
+ synchronized (s) {
+ if (s.highestBitSet != highestBitSet) {
+ return CONCURRENT_MODIFICATION;
+ }
+ s.highestBitSet = ((j + 1) * MAX_TOP_VALUE) -1;
+ }
+ break;
+ }
+ int index = j * MAX_TOP_VALUE;
+ int end = index + s.maxBits;
+ if (j == indexSearchStart) {
+ end = highestBitSet;
+ }
+ BitSet bs = s.bitSet;
+ int offset = 0;
+ if (j == indexSearchStart) {
+ bs = s.bitSet.get(index, end); //ensures that we look only at a subset of the words
+ offset = index;
+ }
+ index = index - offset;
+ end = end - offset - 1;
+ while (index < end) {
+ int next = bs.nextSetBit(index);
+ if (next == -1) {
+ index--;
+ break;
+ }
+ index = next + 1;
+ }
+ synchronized (s) {
+ if (s.highestBitSet != highestBitSet) {
+ return CONCURRENT_MODIFICATION;
+ }
+ s.highestBitSet = index + offset;
+ return s.highestBitSet;
+ }
+ }
+ return -1;
+ }
+
+}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectInputStream.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectInputStream.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectInputStream.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectInputStream.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamClass;
+import java.io.StreamCorruptedException;
+
+public class DataObjectInputStream extends DataInputStream implements ObjectInput {
+
+ ObjectInput ois;
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+ public DataObjectInputStream(InputStream in) {
+ super(in);
+ }
+
+ @Override
+ public Object readObject() throws ClassNotFoundException, IOException {
+ if (ois == null) {
+ ois = new ObjectInputStream(this) {
+
+ @Override
+ protected void readStreamHeader() throws IOException,
+ StreamCorruptedException {
+ int version = readByte() & 0xFF;
+ if (version != STREAM_VERSION) {
+ throw new StreamCorruptedException("Unsupported version: " + version); //$NON-NLS-1$
+ }
+ }
+
+ @Override
+ protected ObjectStreamClass readClassDescriptor()
+ throws IOException, ClassNotFoundException {
+ int type = read();
+ if (type < 0) {
+ throw new EOFException();
+ }
+ switch (type) {
+ case DataObjectOutputStream.TYPE_FAT_DESCRIPTOR:
+ return super.readClassDescriptor();
+ case DataObjectOutputStream.TYPE_THIN_DESCRIPTOR:
+ String className = readUTF();
+ Class<?> clazz = loadClass(className);
+ return ObjectStreamClass.lookup(clazz);
+ default:
+ className = DataObjectOutputStream.typeMapping.get((byte)type);
+ if (className == null) {
+ throw new StreamCorruptedException("Unknown class type " + type); //$NON-NLS-1$
+ }
+ clazz = loadClass(className);
+ return ObjectStreamClass.lookup(clazz);
+ }
+ }
+
+ @Override
+ protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
+ String className = desc.getName();
+ try {
+ return loadClass(className);
+ } catch (ClassNotFoundException ex) {
+ return super.resolveClass(desc);
+ }
+ }
+
+ protected Class<?> loadClass(String className) throws ClassNotFoundException {
+ Class<?> clazz;
+ if (classLoader != null) {
+ clazz = classLoader.loadClass(className);
+ } else {
+ clazz = Class.forName(className);
+ }
+ return clazz;
+ }
+ };
+ }
+ return ois.readObject();
+ }
+
+}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectOutputStream.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectOutputStream.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectOutputStream.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/DataObjectOutputStream.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
+import java.io.OutputStream;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Extends the logic of Netty's CompactObjectOutputStream to use byte identifiers
+ * for some classes and to write/flush objects directly into the output.
+ *
+ * We can do this since buffer serialized data is ephemeral and good only for
+ * a single process.
+ */
+public class DataObjectOutputStream extends DataOutputStream implements ObjectOutput {
+
+ private static final int MAX_BYTE_IDS = 254;
+ static AtomicInteger counter = new AtomicInteger(2);
+ static final ConcurrentHashMap<String, Byte> knownClasses = new ConcurrentHashMap<String, Byte>();
+ static final ConcurrentHashMap<Byte, String> typeMapping = new ConcurrentHashMap<Byte, String>();
+
+ static final int TYPE_FAT_DESCRIPTOR = 0;
+ static final int TYPE_THIN_DESCRIPTOR = 1;
+
+ ObjectOutputStream oos;
+
+ public DataObjectOutputStream(OutputStream out) {
+ super(out);
+ }
+
+ @Override
+ public void writeObject(Object obj) throws IOException {
+ if (oos == null) {
+ oos = new ObjectOutputStream(this) {
+ @Override
+ protected void writeStreamHeader() throws IOException {
+ writeByte(STREAM_VERSION);
+ }
+
+ @Override
+ protected void writeClassDescriptor(ObjectStreamClass desc) throws IOException {
+ Class<?> clazz = desc.forClass();
+ if (clazz.isPrimitive() || clazz.isArray()) {
+ write(TYPE_FAT_DESCRIPTOR);
+ super.writeClassDescriptor(desc);
+ } else {
+ String name = desc.getName();
+ Byte b = knownClasses.get(name);
+ if (b == null && counter.get() < MAX_BYTE_IDS) {
+ synchronized (DataObjectOutputStream.class) {
+ b = knownClasses.get(name);
+ if (b == null && counter.get() < 254) {
+ b = (byte)counter.getAndIncrement();
+ knownClasses.put(name, b);
+ typeMapping.put(b, name);
+ }
+ }
+ }
+ if (b != null) {
+ write(b);
+ } else {
+ write(TYPE_THIN_DESCRIPTOR);
+ writeUTF(name);
+ }
+ }
+ }
+ };
+ }
+ oos.writeObject(obj);
+ oos.flush();
+ }
+
+}
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ExtensibleBufferedOutputStream.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ExtensibleBufferedOutputStream.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/ExtensibleBufferedOutputStream.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,22 +29,26 @@
public abstract class ExtensibleBufferedOutputStream extends OutputStream {
protected ByteBuffer buf;
+ protected int bytesWritten;
+ private int startPosition;
public ExtensibleBufferedOutputStream() {
}
public void write(int b) throws IOException {
ensureBuffer();
- if (buf.remaining() == 0) {
- flush();
- }
buf.put((byte)b);
}
- private void ensureBuffer() {
- if (buf == null) {
- buf = newBuffer();
- }
+ private void ensureBuffer() throws IOException {
+ if (buf != null) {
+ if (buf.remaining() != 0) {
+ return;
+ }
+ flush();
+ }
+ buf = newBuffer();
+ startPosition = buf.position();
}
public void write(byte b[], int off, int len) throws IOException {
@@ -57,24 +61,33 @@
if (buf.remaining() > 0) {
break;
}
- flush();
}
}
public void flush() throws IOException {
- if (buf != null && buf.position() > 0) {
- flushDirect();
+ if (buf != null) {
+ int bytes = buf.position() - startPosition;
+ if (bytes > 0) {
+ bytesWritten += flushDirect(bytes);
+ }
}
buf = null;
}
- protected abstract ByteBuffer newBuffer();
+ protected abstract ByteBuffer newBuffer() throws IOException;
- protected abstract void flushDirect() throws IOException;
+ /**
+ * Flush up to i bytes where i is the current position of the buffer
+ */
+ protected abstract int flushDirect(int i) throws IOException;
@Override
public void close() throws IOException {
flush();
}
+ public int getBytesWritten() {
+ return bytesWritten;
+ }
+
}
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,6 +29,7 @@
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import org.teiid.common.buffer.FileStore;
@@ -50,6 +51,7 @@
private long maxBufferSpace = DEFAULT_MAX_BUFFERSPACE;
private AtomicLong usedBufferSpace = new AtomicLong();
+ private AtomicInteger fileCounter = new AtomicInteger();
private class FileInfo {
private File file;
@@ -112,6 +114,9 @@
protected synchronized int readWrite(long fileOffset, byte[] b, int offSet,
int length, boolean write) throws IOException {
if (!write) {
+ if (fileInfo == null) {
+ return -1;
+ }
try {
RandomAccessFile fileAccess = fileInfo.open();
fileAccess.seek(fileOffset);
@@ -131,11 +136,10 @@
if (bytesUsed > 0) {
long used = usedBufferSpace.addAndGet(bytesUsed);
if (used > maxBufferSpace) {
- usedBufferSpace.addAndGet(-bytesUsed);
//TODO: trigger a compaction before this is thrown
throw new IOException(QueryPlugin.Util.getString("FileStoreageManager.space_exhausted", maxBufferSpace)); //$NON-NLS-1$
}
- fileAccess.setLength(bytesUsed);
+ fileAccess.setLength(newLength);
bytesUsed = 0;
}
fileAccess.seek(fileOffset);
@@ -175,6 +179,9 @@
private int maxOpenFiles = DEFAULT_MAX_OPEN_FILES;
private String directory;
private File dirFile;
+ //use subdirectories to hold the files since we may create a relatively unbounded amount of lob files and
+ //fs performance will typically degrade if a single directory is too large
+ private File[] subDirectories = new File[256];
// State
private Map<File, RandomAccessFile> fileCache = Collections.synchronizedMap(new LinkedHashMap<File, RandomAccessFile>() {
@@ -201,13 +208,20 @@
}
dirFile = new File(this.directory);
- if(dirFile.exists()) {
- if(! dirFile.isDirectory()) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.not_a_directory", dirFile.getAbsoluteFile())); //$NON-NLS-1$
-
+ makeDir(dirFile);
+ for (int i = 0; i < subDirectories.length; i++) {
+ subDirectories[i] = new File(this.directory, "b" +i); //$NON-NLS-1$
+ makeDir(subDirectories[i]);
+ }
+ }
+
+ private static void makeDir(File file) throws TeiidComponentException {
+ if(file.exists()) {
+ if(! file.isDirectory()) {
+ throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.not_a_directory", file.getAbsoluteFile())); //$NON-NLS-1$
}
- } else if(! dirFile.mkdirs()) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.error_creating", dirFile.getAbsoluteFile())); //$NON-NLS-1$
+ } else if(! file.mkdirs()) {
+ throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.error_creating", file.getAbsoluteFile())); //$NON-NLS-1$
}
}
@@ -220,7 +234,8 @@
}
File createFile(String name) throws IOException {
- File storageFile = File.createTempFile(FILE_PREFIX + name + "_", null, this.dirFile); //$NON-NLS-1$
+ //spray the files into separate different directories in a round robin fashion.
+ File storageFile = File.createTempFile(FILE_PREFIX + name + "_", null, this.subDirectories[fileCounter.getAndIncrement()&(this.subDirectories.length-1)]); //$NON-NLS-1$
if (LogManager.isMessageToBeRecorded(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
LogManager.logDetail(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, "Created temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
}
Deleted: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStoreCache.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStoreCache.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/FileStoreCache.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,746 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.common.buffer.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.teiid.common.buffer.Cache;
-import org.teiid.common.buffer.CacheEntry;
-import org.teiid.common.buffer.FileStore;
-import org.teiid.common.buffer.Serializer;
-import org.teiid.common.buffer.StorageManager;
-import org.teiid.core.TeiidComponentException;
-import org.teiid.core.TeiidRuntimeException;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
-import org.teiid.logging.MessageLevel;
-import org.teiid.query.QueryPlugin;
-
-/**
- * Implements storage against a {@link FileStore} abstraction using a filesystem paradigm.
- * The filesystem uses a 31bit address space on top of 2^14 byte blocks.
- *
- * Therefore there is 2^31*2^14 = 2^45 or 32 terabytes max of addressable space.
- *
- * Some amount of the space is taken up by system information (inodes and use flags).
- * This is held in a separate file.
- *
- * The 64 byte inode format is:
- * 14 32 bit direct block pointers
- * 1 32 bit block indirect pointer
- * 1 32 bit block doubly indirect pointer
- *
- * The data block format is:
- * data bytes | long gid | long oid | three byte int block num
- *
- * The gid/oid are stored with the block so that defrag/compaction can be performed
- * with minimal blocking/lookups.
- *
- * This means that the maximum number of blocks available to a "file" is
- * 14 + (2^14-18)/4 + ((2^14-18)/4)^2 ~= 2^24
- *
- * Thus the max serialized object size is: 2^24*(2^14-18) ~= 256GB.
- *
- * The root directory "physicalMapping" is held in memory for performance,
- * but could itself be switched to using a block map. It will grow in
- * proportion to the number of tables/tuplebuffers in use.
- *
- * TODO: defragment
- * TODO: lobs could also be supported in this structure.
- */
-public class FileStoreCache implements Cache, StorageManager {
-
- //TODO allow the block size to be configurable
- static final int LOG_BLOCK_SIZE = 14;
- static final int ADDRESS_BITS = 31;
- static final int SYSTEM_MASK = 1<<ADDRESS_BITS;
- static final int BLOCK_SIZE = 1 << LOG_BLOCK_SIZE;
- static final int BLOCK_MASK = BLOCK_SIZE - 1;
- static final int BLOCK_OVERHEAD = 8+8+3;
- static final int BLOCK_DATA_BYTES = BLOCK_SIZE - BLOCK_OVERHEAD;
- static final int BYTES_PER_BLOCK_ADDRESS = 4;
- static final int ADDRESSES_PER_BLOCK = BLOCK_DATA_BYTES/BYTES_PER_BLOCK_ADDRESS;
- static final int INODE_BYTES = 16*BYTES_PER_BLOCK_ADDRESS;
- static final int DIRECT_POINTERS = 14;
- static final int MAX_INDIRECT = DIRECT_POINTERS + ADDRESSES_PER_BLOCK;
- static final int MAX_DOUBLE_INDIRECT = MAX_INDIRECT + ADDRESSES_PER_BLOCK * ADDRESSES_PER_BLOCK;
- static final int EMPTY_ADDRESS = -1;
-
- private final class BlockOutputStream extends
- ExtensibleBufferedOutputStream {
- private final BlockManager blockManager;
- int blockNum = -1;
- BlockInfo bi;
-
- private BlockOutputStream(BlockManager blockManager) {
- this.blockManager = blockManager;
- }
-
- @Override
- protected ByteBuffer newBuffer() {
- bi = blockManager.allocateBlock(++blockNum);
- return bi.buf;
- }
-
- @Override
- protected void flushDirect() throws IOException {
- blockManager.updateBlock(bi);
- bi = null;
- }
- }
-
- private final class BitSetBlockManager implements BlockManager {
- final int offset;
-
- BitSetBlockManager(int offset) {
- this.offset = offset;
- }
-
- @Override
- public void updateBlock(BlockInfo info) {
- updatePhysicalBlock(info);
- }
-
- @Override
- public BlockInfo getBlock(int index) {
- return getPhysicalBlock(index + offset, true, false);
- }
-
- @Override
- public BlockInfo allocateBlock(int index) {
- return getPhysicalBlock(index + offset, true, true);
- }
-
- @Override
- public int getInode() {
- throw new AssertionError();
- }
-
- @Override
- public void freeBlock(int index) {
- throw new AssertionError();
- }
-
- @Override
- public void free() {
- throw new AssertionError();
- }
-
- }
-
- private enum Mode {
- GET,
- UPDATE,
- ALLOCATE
- }
-
- static final class BlockInfo {
- final boolean system;
- final int inodeOffset;
- final ByteBuffer buf;
- final int physicalAddress;
- boolean dirty;
-
- BlockInfo(boolean system, ByteBuffer ib, int index, int inodeOffset) {
- this.system = system;
- this.buf = ib;
- this.physicalAddress = index;
- this.inodeOffset = inodeOffset;
- }
- }
-
- private final class InodeBlockManager implements BlockManager {
- private final int inode;
- private final long gid;
- private final long oid;
- private int lastBlock = -1;
- boolean trackLast;
-
- InodeBlockManager(long gid, long oid, int inode) {
- if (inode == EMPTY_ADDRESS) {
- synchronized (inodesInuse) {
- inode = inodesInuse.nextClearBit(0);
- if (inode == -1) {
- throw new TeiidRuntimeException("no inodes available"); //$NON-NLS-1$
- }
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Allocating inode", inode, "to", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
- }
- inodesInuse.set(inode, true);
- }
- int inodeBlock = inode/inodesPerBlock;
- int inodePosition = INODE_BYTES*(inode%inodesPerBlock);
- BlockInfo bb = getInodeSubBlock(inodeBlock, inodePosition);
- bb.buf.putInt(EMPTY_ADDRESS);
- updatePhysicalBlock(bb);
- }
- this.inode = inode;
- this.gid = gid;
- this.oid = oid;
- }
-
- @Override
- public int getInode() {
- return inode;
- }
-
- @Override
- public void updateBlock(BlockInfo info) {
- updatePhysicalBlock(info);
- }
-
- @Override
- public BlockInfo getBlock(int index) {
- int dataBlock = getOrUpdateDataBlockIndex(index, EMPTY_ADDRESS, Mode.GET);
- BlockInfo bb = getPhysicalBlock(dataBlock, false, false);
- bb.buf.position(0);
- bb.buf.limit(BLOCK_DATA_BYTES);
- return bb;
- }
-
- private int getOrUpdateDataBlockIndex(int index, int value, Mode mode) {
- if (index >= MAX_DOUBLE_INDIRECT) {
- throw new TeiidRuntimeException("Max block number exceeded"); //$NON-NLS-1$
- }
- int dataBlock = 0;
- int position = 0;
- int inodePosition = INODE_BYTES*(inode%inodesPerBlock);
- BlockInfo info = getInodeSubBlock(inode/inodesPerBlock, inodePosition);
- if (index >= MAX_INDIRECT) {
- position = BYTES_PER_BLOCK_ADDRESS*(DIRECT_POINTERS+1);
- BlockInfo next = updateIndirectBlockInfo(info, index, position, MAX_INDIRECT, MAX_DOUBLE_INDIRECT+1, value, mode);
- if (next != info) {
- info = next;
- //should have traversed to the secondary
- int indirectAddressBlock = (index - MAX_INDIRECT) / ADDRESSES_PER_BLOCK;
- position = indirectAddressBlock * BYTES_PER_BLOCK_ADDRESS;
- if (mode == Mode.ALLOCATE && position + BYTES_PER_BLOCK_ADDRESS < BLOCK_DATA_BYTES) {
- info.buf.putInt(position + BYTES_PER_BLOCK_ADDRESS, EMPTY_ADDRESS);
- }
- next = updateIndirectBlockInfo(info, index, position, MAX_INDIRECT + indirectAddressBlock * ADDRESSES_PER_BLOCK, MAX_DOUBLE_INDIRECT + 2 + indirectAddressBlock, value, mode);
- if (next != info) {
- info = next;
- position = ((index - MAX_INDIRECT)%ADDRESSES_PER_BLOCK) * BYTES_PER_BLOCK_ADDRESS;
- if (mode == Mode.ALLOCATE && position + BYTES_PER_BLOCK_ADDRESS < BLOCK_DATA_BYTES) {
- info.buf.putInt(position + BYTES_PER_BLOCK_ADDRESS, EMPTY_ADDRESS);
- }
- }
- }
- } else if (index >= DIRECT_POINTERS) {
- //indirect
- position = BYTES_PER_BLOCK_ADDRESS*DIRECT_POINTERS;
- BlockInfo next = updateIndirectBlockInfo(info, index, position, DIRECT_POINTERS, MAX_DOUBLE_INDIRECT, value, mode);
- if (next != info) {
- info = next;
- position = (index - DIRECT_POINTERS) * BYTES_PER_BLOCK_ADDRESS;
- if (mode == Mode.ALLOCATE && position + BYTES_PER_BLOCK_ADDRESS < BLOCK_DATA_BYTES) {
- info.buf.putInt(position + BYTES_PER_BLOCK_ADDRESS, EMPTY_ADDRESS);
- }
- }
- } else {
- position = BYTES_PER_BLOCK_ADDRESS*index;
- if (mode == Mode.ALLOCATE) {
- info.buf.putInt(position + BYTES_PER_BLOCK_ADDRESS, EMPTY_ADDRESS);
- }
- }
- if (mode == Mode.ALLOCATE) {
- dataBlock = nextBlock();
- info.buf.putInt(position, dataBlock);
- updatePhysicalBlock(info);
- } else {
- dataBlock = info.buf.getInt(position);
- if (mode == Mode.UPDATE) {
- info.buf.putInt(position, value);
- updatePhysicalBlock(info);
- }
- }
- return dataBlock;
- }
-
- private BlockInfo updateIndirectBlockInfo(BlockInfo info, int index, int position, int cutOff, int blockId, int value, Mode mode) {
- int sib_index = info.buf.getInt(position);
- boolean newBlock = false;
- if (index == cutOff) {
- if (mode == Mode.ALLOCATE) {
- sib_index = nextBlock();
- info.buf.putInt(position, sib_index);
- updatePhysicalBlock(info);
- newBlock = true;
- } else if (mode == Mode.UPDATE && value == EMPTY_ADDRESS) {
- freeDataBlock(sib_index);
- return info;
- }
- }
- info = getPhysicalBlock(sib_index, false, false);
- if (newBlock) {
- putBlockId(blockId, info.buf);
- }
- return info;
- }
-
- private int nextBlock() {
- int next = -1;
- synchronized (blocksInuse) {
- next = blocksInuse.nextClearBit(lastBlock + 1);
- if (next == -1) {
- throw new TeiidRuntimeException("no freespace available"); //$NON-NLS-1$
- }
- blocksInuse.set(next, true);
- }
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "Allocating block", next, "to", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (trackLast) {
- lastBlock = next;
- }
- return next;
- }
-
- @Override
- public void freeBlock(int index) {
- int dataBlock = getOrUpdateDataBlockIndex(index, EMPTY_ADDRESS, Mode.UPDATE);
- freeDataBlock(dataBlock);
- }
-
- private void freeDataBlock(int dataBlock) {
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "freeing data block", dataBlock, "for", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
- }
- blockCache.remove(dataBlock);
- blocksInuse.set(dataBlock, false);
- }
-
- BlockInfo getInodeSubBlock(int inodeBlock, int inodePosition) {
- BlockInfo bi = getPhysicalBlock(inodeBlock + blocksInUseBlocks + inodesInUseBlocks, true, false);
- ByteBuffer bb = bi.buf.duplicate();
- bb.position(inodePosition);
- bb.limit(inodePosition + INODE_BYTES);
- bb = bb.slice();
- return new BlockInfo(true, bb, inodeBlock + blocksInUseBlocks + inodesInUseBlocks, inodePosition);
- }
-
- @Override
- public void free() {
- int inodeBlock = inode/inodesPerBlock;
- int inodePosition = INODE_BYTES*(inode%inodesPerBlock);
- BlockInfo bi = getInodeSubBlock(inodeBlock, inodePosition);
- ByteBuffer ib = bi.buf;
- int indirectIndexBlock = ib.getInt(ib.position() + BYTES_PER_BLOCK_ADDRESS*DIRECT_POINTERS);
- int doublyIndirectIndexBlock = ib.getInt(ib.position() + BYTES_PER_BLOCK_ADDRESS*(DIRECT_POINTERS+1));
- boolean freedAll = freeBlock(ib, DIRECT_POINTERS, true);
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_DQP, "freeing inode", inode, "for", gid, oid); //$NON-NLS-1$ //$NON-NLS-2$
- }
- inodesInuse.set(inode, false);
- if (!freedAll || indirectIndexBlock == EMPTY_ADDRESS) {
- return;
- }
- freedAll = freeIndirectBlock(indirectIndexBlock);
- if (!freedAll || doublyIndirectIndexBlock == EMPTY_ADDRESS) {
- return;
- }
- BlockInfo bb = getPhysicalBlock(doublyIndirectIndexBlock, false, false);
- freeBlock(bb.buf, ADDRESSES_PER_BLOCK, false);
- freeDataBlock(doublyIndirectIndexBlock);
- }
-
- private boolean freeIndirectBlock(int indirectIndexBlock) {
- BlockInfo bb = getPhysicalBlock(indirectIndexBlock, false, false);
- bb.buf.position(0);
- boolean freedAll = freeBlock(bb.buf, ADDRESSES_PER_BLOCK, true);
- freeDataBlock(indirectIndexBlock);
- return freedAll;
- }
-
- private boolean freeBlock(ByteBuffer ib, int numPointers, boolean primary) {
- for (int i = 0; i < numPointers; i++) {
- int dataBlock = ib.getInt();
- if (dataBlock == EMPTY_ADDRESS) {
- return false;
- }
- if (primary) {
- freeDataBlock(dataBlock);
- } else {
- freeIndirectBlock(dataBlock);
- }
- }
- return true;
- }
-
- @Override
- public BlockInfo allocateBlock(int blockNum) {
- int dataBlock = getOrUpdateDataBlockIndex(blockNum, EMPTY_ADDRESS, Mode.ALLOCATE);
- BlockInfo bb = getPhysicalBlock(dataBlock, false, true);
- putBlockId(blockNum, bb.buf);
- bb.buf.position(0);
- bb.buf.limit(BLOCK_DATA_BYTES);
- return bb;
- }
-
- private void putBlockId(int blockNum, ByteBuffer bb) {
- bb.position(BLOCK_DATA_BYTES);
- bb.putLong(gid);
- bb.putLong(oid);
- bb.put((byte)(blockNum >> 16));
- bb.putShort((short)blockNum);
- }
-
- }
-
- private StorageManager storageManager;
- private long maxBufferSpace = FileStorageManager.DEFAULT_MAX_BUFFERSPACE;
- private int inodes;
- private int blocks;
- private int inodesPerBlock;
- private int inodesInUseBlocks;
- private int blocksInUseBlocks;
- private FileStore store;
- private FileStore systemStore;
- private BlockBitSetTree blocksInuse;
- private BlockBitSetTree inodesInuse;
-
- //root directory
- ConcurrentHashMap<Long, BlockClosedLongIntHashTable> physicalMapping = new ConcurrentHashMap<Long, BlockClosedLongIntHashTable>();
-
- //block caching
- int blockCacheSize = 128; //2 MB
- ReentrantLock blockLock = new ReentrantLock();
- LinkedHashMap<Integer, BlockInfo> blockCache = new LinkedHashMap<Integer, BlockInfo>() {
- private static final long serialVersionUID = -4240291744435552008L;
- BlockInfo eldestEntry = null;
-
- protected boolean removeEldestEntry(Map.Entry<Integer,BlockInfo> eldest) {
- if (size() > blockCacheSize) {
- BlockInfo bi = eldest.getValue();
- if (bi.dirty) {
- eldestEntry = bi;
- }
- return true;
- }
- return false;
- }
-
- public BlockInfo put(Integer key, BlockInfo value) {
- blockLock.lock();
- value.dirty = true;
- try {
- return super.put(key, value);
- } finally {
- BlockInfo toUpdate = eldestEntry;
- eldestEntry = null;
- blockLock.unlock();
- if (toUpdate != null) {
- updatePhysicalBlockDirect(toUpdate);
- }
- }
- }
-
- public BlockInfo get(Object key) {
- blockLock.lock();
- try {
- return super.get(key);
- } finally {
- blockLock.unlock();
- }
- }
-
- public BlockInfo remove(Object key) {
- blockLock.lock();
- try {
- return super.remove(key);
- } finally {
- blockLock.unlock();
- }
- }
- };
-
- BlockInfo getPhysicalBlock(int block, boolean system, boolean allocate) {
- if (block < 0) {
- throw new AssertionError("invalid block address " + block); //$NON-NLS-1$
- }
- try {
- int key = block;
- if (system) {
- key |= SYSTEM_MASK;
- }
- BlockInfo result = blockCache.get(key);
- assert result == null || !allocate;
- if (result == null) {
- ByteBuffer bb = null;
- if (system) {
- bb = systemStore.getBuffer(block<<LOG_BLOCK_SIZE, BLOCK_SIZE, allocate);
- } else {
- bb = store.getBuffer(block<<LOG_BLOCK_SIZE, BLOCK_SIZE, allocate);
- }
- result = new BlockInfo(system, bb, block, -1);
- blockLock.lock();
- try {
- BlockInfo existing = blockCache.get(key);
- if (existing != null) {
- return existing;
- }
- blockCache.put(key, result);
- } finally {
- blockLock.unlock();
- }
- return result;
- }
- return result;
- } catch (IOException e) {
- throw new TeiidRuntimeException(e);
- }
- }
-
- void updatePhysicalBlock(BlockInfo bi) {
- int key = bi.physicalAddress;
- if (bi.system) {
- key |= SYSTEM_MASK;
- }
- if (bi.inodeOffset >= 0) {
- blockLock.lock();
- try {
- BlockInfo actual = blockCache.get(key);
- if (actual == null) {
- //we're not in the cache, so just update storage
- updatePhysicalBlockDirect(bi);
- } else {
- //TODO: check to see we're sharing the same buffer
- for (int i = 0; i < INODE_BYTES; i++) {
- actual.buf.put(bi.inodeOffset + i, bi.buf.get(i));
- }
- }
- } finally {
- blockLock.unlock();
- }
- return;
- }
- blockCache.put(key, bi);
- }
-
- private void updatePhysicalBlockDirect(BlockInfo bi) {
- try {
- bi.buf.rewind();
- if (!bi.system) {
- store.updateFromBuffer(bi.buf, bi.physicalAddress<<LOG_BLOCK_SIZE);
- } else {
- systemStore.updateFromBuffer(bi.buf, bi.physicalAddress<<LOG_BLOCK_SIZE);
- }
- } catch (IOException e) {
- throw new TeiidRuntimeException(e);
- }
- }
-
- InodeBlockManager getBlockManager(long gid, long oid, int inode) {
- return new InodeBlockManager(gid, oid, inode);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void add(CacheEntry entry, Serializer s) {
- boolean success = false;
- InodeBlockManager blockManager = null;
- try {
- BlockClosedLongIntHashTable map = physicalMapping.get(s.getId());
- if (map == null) {
- return;
- }
- blockManager = getBlockManager(s.getId(), entry.getId(), EMPTY_ADDRESS);
- blockManager.trackLast = true;
- ExtensibleBufferedOutputStream fsos = new BlockOutputStream(blockManager);
- ObjectOutputStream oos = new ObjectOutputStream(fsos);
- oos.writeInt(entry.getSizeEstimate());
- s.serialize(entry.getObject(), oos);
- oos.close();
- map.put(entry.getId(), blockManager.getInode());
- success = true;
- } catch (Throwable e) {
- LogManager.logError(LogConstants.CTX_BUFFER_MGR, e, "Error persisting batch, attempts to read batch "+ entry.getId() +" later will result in an exception"); //$NON-NLS-1$ //$NON-NLS-2$
- } finally {
- if (!success && blockManager != null) {
- blockManager.free();
- }
- }
- }
-
- @Override
- public CacheEntry get(Long oid, Serializer<?> serializer) throws TeiidComponentException {
- try {
- BlockClosedLongIntHashTable map = physicalMapping.get(serializer.getId());
- if (map == null) {
- return null;
- }
- final int inode = map.get(oid);
- if (inode == EMPTY_ADDRESS) {
- return null;
- }
- final BlockManager manager = getBlockManager(serializer.getId(), oid, inode);
- ObjectInputStream ois = new ObjectInputStream(new InputStream() {
-
- int blockIndex;
- BlockInfo buf;
-
- @Override
- public int read() throws IOException {
- ensureBytes();
- return buf.buf.get() & 0xff;
- }
-
- private void ensureBytes() {
- if (buf == null || buf.buf.remaining() == 0) {
- if (buf != null) {
- buf = null;
- }
- buf = manager.getBlock(blockIndex++);
- }
- }
-
- @Override
- public int read(byte[] b, int off, int len)
- throws IOException {
- ensureBytes();
- len = Math.min(len, buf.buf.remaining());
- buf.buf.get(b, off, len);
- return len;
- }
- });
- CacheEntry ce = new CacheEntry(oid);
- ce.setSizeEstimate(ois.readInt());
- ce.setObject(serializer.deserialize(ois));
- ce.setPersistent(true);
- return ce;
- } catch(IOException e) {
- throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", oid)); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", oid)); //$NON-NLS-1$
- }
- }
-
- @Override
- public FileStore createFileStore(String name) {
- return storageManager.createFileStore(name);
- }
-
- @Override
- public void initialize() throws TeiidComponentException {
- storageManager.initialize();
- int logSpace = Math.min(45, 63 - Long.numberOfLeadingZeros(this.maxBufferSpace));
-
- blocks = 1 << Math.min(Math.max(12, logSpace -LOG_BLOCK_SIZE +1), ADDRESS_BITS); //blocks per segment
-
- inodes = blocks>>1;
- inodesPerBlock = BLOCK_SIZE/INODE_BYTES;
-
- inodesInUseBlocks = computeInuseBlocks(inodes);
- blocksInUseBlocks = computeInuseBlocks(blocks);
-
- inodesInuse = new BlockBitSetTree(inodes - 1, new BitSetBlockManager(0));
- blocksInuse = new BlockBitSetTree(blocks - 1, new BitSetBlockManager(inodesInUseBlocks));
-
- store = storageManager.createFileStore("data_store"); //$NON-NLS-1$
- systemStore = storageManager.createFileStore("system_store"); //$NON-NLS-1$
- }
-
- static int computeInuseBlocks(int number) {
- int blockCount = (number>>LOG_BLOCK_SIZE) + ((number&BLOCK_MASK)>0?1:0);
- return (blockCount>>3) + ((blockCount&7)>0?1:0);
- }
-
- @Override
- public void addToCacheGroup(Long gid, Long oid) {
- BlockClosedLongIntHashTable map = physicalMapping.get(gid);
- if (map == null) {
- return;
- }
- map.put(oid, EMPTY_ADDRESS);
- }
-
- @Override
- public void createCacheGroup(Long gid) {
- BlockClosedLongIntHashTable map = new BlockClosedLongIntHashTable(getBlockManager(gid, -1, EMPTY_ADDRESS));
- physicalMapping.put(gid, map);
- }
-
- @Override
- public void remove(Long gid, Long id) {
- BlockClosedLongIntHashTable map = physicalMapping.get(gid);
- if (map == null) {
- return;
- }
- int inode = map.remove(id);
- free(gid, id, inode);
- }
-
- @Override
- public Collection<Long> removeCacheGroup(Long gid) {
- BlockClosedLongIntHashTable map = physicalMapping.remove(gid);
- if (map == null) {
- return Collections.emptySet();
- }
- Map<Long, Integer> values = map.remove();
- for (Map.Entry<Long, Integer> entry : values.entrySet()) {
- if (entry.getValue() != null) {
- free(gid, entry.getKey(), entry.getValue());
- }
- }
- return values.keySet();
- }
-
- void free(Long gid, Long oid, int inode) {
- if (inode == EMPTY_ADDRESS) {
- return;
- }
- BlockManager bm = getBlockManager(gid, oid, inode);
- bm.free();
- }
-
- public void setStorageManager(StorageManager storageManager) {
- this.storageManager = storageManager;
- }
-
- public StorageManager getStorageManager() {
- return storageManager;
- }
-
- public void setMaxBufferSpace(long maxBufferSpace) {
- this.maxBufferSpace = maxBufferSpace;
- }
-
- public int getInodesInUse() {
- return this.inodesInuse.getBitsSet();
- }
-
- public int getDataBlocksInUse() {
- return this.blocksInuse.getBitsSet();
- }
-
-}
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.teiid.common.buffer.BaseCacheEntry;
+import org.teiid.common.buffer.CacheKey;
+
+/**
+ * A Concurrent LRFU eviction queue. Has assumptions that match buffermanager usage.
+ * Null values are not allowed.
+ * @param <V>
+ */
+public class LrfuEvictionQueue<V extends BaseCacheEntry> {
+
+ //TODO: until Java 7 ConcurrentSkipListMap has a scaling bug in that
+ //the level function limits the effective map size to ~ 2^16
+ //above which it performs comparably under multi-threaded load to a synchronized LinkedHashMap
+ //just with more CPU overhead vs. wait time.
+ protected NavigableMap<CacheKey, V> evictionQueue = new ConcurrentSkipListMap<CacheKey, V>();
+ protected AtomicLong clock;
+ protected long maxInterval;
+ protected long halfLife;
+
+ public LrfuEvictionQueue(AtomicLong clock) {
+ this.clock = clock;
+ setHalfLife(1<<17);
+ }
+
+ public boolean remove(V value) {
+ return evictionQueue.remove(value.getKey()) != null;
+ }
+
+ public boolean add(V value) {
+ return evictionQueue.put(value.getKey(), value) == null;
+ }
+
+ public void touch(V value) {
+ evictionQueue.remove(value.getKey());
+ recordAccess(value);
+ evictionQueue.put(value.getKey(), value);
+ }
+
+ public Collection<V> getEvictionQueue() {
+ return evictionQueue.values();
+ }
+
+ public V firstEntry(boolean poll) {
+ Map.Entry<CacheKey, V> entry = null;
+ if (poll) {
+ entry = evictionQueue.pollFirstEntry();
+ } else {
+ entry = evictionQueue.firstEntry();
+ }
+ if (entry != null) {
+ return entry.getValue();
+ }
+ return null;
+ }
+
+ /**
+ * Callers should be synchronized on value
+ */
+ public void recordAccess(V value) {
+ CacheKey key = value.getKey();
+ long lastAccess = key.getLastAccess();
+ long currentClock = clock.get();
+ long orderingValue = key.getOrderingValue();
+ orderingValue = computeNextOrderingValue(currentClock, lastAccess,
+ orderingValue);
+ value.setKey(new CacheKey(key.getId(), currentClock, orderingValue));
+ }
+
+ long computeNextOrderingValue(long currentTime,
+ long lastAccess, long orderingValue) {
+ long delta = currentTime - lastAccess;
+ if (delta > maxInterval) {
+ return currentTime;
+ }
+ long increase = Math.min(orderingValue, currentTime);
+
+ //scale the increase based upon how hot we previously were
+ increase>>=1;
+ increase *= orderingValue/(double)lastAccess;
+
+ if (delta > halfLife) {
+ while ((delta-=halfLife) > halfLife && (increase>>=1) > 0) {
+ }
+ }
+ if (delta > 0 && increase > 0) {
+ //linear interpolate the rest of the delta (between 1 and 1/2)
+ increase = (long) (increase*(halfLife/((double)halfLife + delta)));
+ }
+ return currentTime + increase;
+ }
+
+ public void setHalfLife(long halfLife) {
+ this.halfLife = halfLife;
+ this.maxInterval = 62*this.halfLife;
+ }
+
+}
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,7 +22,7 @@
package org.teiid.common.buffer.impl;
-import java.io.IOException;
+import java.lang.ref.WeakReference;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
@@ -39,7 +39,7 @@
import org.teiid.core.TeiidComponentException;
-public class MemoryStorageManager implements Cache {
+public class MemoryStorageManager implements Cache<Long> {
public static final int MAX_FILE_SIZE = 1 << 17;
@@ -87,20 +87,6 @@
public synchronized long getLength() {
return buffer.limit();
}
-
- @Override
- public synchronized ByteBuffer getBuffer(long start, int length, boolean allocate) {
- int position = (int)start;
- buffer.limit(position + length);
- buffer.position(position);
- return buffer.slice();
- }
-
- @Override
- public void updateFromBuffer(ByteBuffer bb, long start)
- throws IOException {
- //do nothing we are sharing the bytes
- }
}
@@ -126,11 +112,12 @@
}
@Override
- public void add(CacheEntry entry, Serializer<?> s) {
+ public boolean add(CacheEntry entry, Serializer<?> s) {
Map<Long, CacheEntry> group = groups.get(s.getId());
if (group != null) {
group.put(entry.getId(), entry);
}
+ return true;
}
@Override
@@ -147,21 +134,37 @@
}
@Override
- public CacheEntry get(Long id, Serializer<?> serializer)
+ public Long lockForLoad(Long oid, Serializer<?> serializer) {
+ return oid;
+ }
+
+ @Override
+ public void unlockForLoad(Long o) {
+ //nothing to do no locking
+ }
+
+ @Override
+ public CacheEntry get(Long lock, Long oid,
+ WeakReference<? extends Serializer<?>> ref)
throws TeiidComponentException {
- Map<Long, CacheEntry> group = groups.get(serializer.getId());
+ Map<Long, CacheEntry> group = groups.get(ref.get().getId());
if (group != null) {
- return group.get(id);
+ return group.get(oid);
}
return null;
}
@Override
- public void remove(Long gid, Long id) {
+ public boolean remove(Long gid, Long id) {
Map<Long, CacheEntry> group = groups.get(gid);
if (group != null) {
- group.remove(id);
+ synchronized (group) {
+ int size = group.size();
+ group.remove(id);
+ return group.size() != size;
+ }
}
+ return false;
}
@Override
Copied: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java (from rev 3597, trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import org.teiid.common.buffer.BaseCacheEntry;
+import org.teiid.common.buffer.CacheKey;
+import org.teiid.core.TeiidRuntimeException;
+
+/**
+ * Represents the memory buffer and storage state of an object.
+ * It is important to minimize the amount of data held here.
+ * Currently should be 56 bytes.
+ */
+final class PhysicalInfo extends BaseCacheEntry {
+
+ static final Exception sizeChanged = new Exception();
+
+ final Long gid;
+ //the memory inode and block count
+ int inode = BufferFrontedFileStoreCache.EMPTY_ADDRESS;
+ int memoryBlockCount;
+ //the storage block and BlockStore index
+ int block = BufferFrontedFileStoreCache.EMPTY_ADDRESS;
+ byte sizeIndex = 0;
+ //state flags
+ boolean pinned; //indicates that the entry is being read
+ boolean evicting; //indicates that the entry will be moved out of the memory buffer
+ boolean loading; //used by tier 1 cache to prevent double loads
+ boolean adding; //used to prevent double adds
+
+ PhysicalInfo(Long gid, Long id, int inode, int lastAccess) {
+ super(new CacheKey(id, lastAccess, 0));
+ this.inode = inode;
+ this.gid = gid;
+ }
+
+ void setSize(int size) throws Exception {
+ int newMemoryBlockCount = (size>>BufferFrontedFileStoreCache.LOG_BLOCK_SIZE) + ((size&BufferFrontedFileStoreCache.BLOCK_MASK)>0?1:0);
+ if (this.memoryBlockCount != 0) {
+ if (newMemoryBlockCount != memoryBlockCount) {
+ throw sizeChanged;
+ }
+ return; //no changes
+ }
+ this.memoryBlockCount = newMemoryBlockCount;
+ while (newMemoryBlockCount > 1) {
+ this.sizeIndex++;
+ newMemoryBlockCount = (newMemoryBlockCount>>1) + ((newMemoryBlockCount&0x01)==0?0:1);
+ }
+ }
+
+ void await(boolean donePinning, boolean doneEvicting) {
+ while ((donePinning && pinned) || (doneEvicting && evicting)) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+ }
+
+ synchronized void lockForLoad() {
+ while (loading) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+ loading = true;
+ }
+
+ synchronized void unlockForLoad() {
+ assert loading;
+ loading = false;
+ notifyAll();
+ }
+
+}
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SizeUtility.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -26,8 +26,10 @@
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.teiid.core.types.DataTypeManager;
@@ -43,7 +45,7 @@
public static final int REFERENCE_SIZE = 8;
private static Map<Class<?>, int[]> SIZE_ESTIMATES = new HashMap<Class<?>, int[]>(128);
-
+ private static Set<Class<?>> VARIABLE_SIZE_TYPES = new HashSet<Class<?>>();
static {
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.STRING, new int[] {100, 256});
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.DATE, new int[] {20, 28});
@@ -61,24 +63,24 @@
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.BOOLEAN, new int[] {1, 1});
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.BIG_INTEGER, new int[] {75, 100});
SIZE_ESTIMATES.put(DataTypeManager.DefaultDataClasses.BIG_DECIMAL, new int[] {150, 200});
+ VARIABLE_SIZE_TYPES.add(DataTypeManager.DefaultDataClasses.STRING);
+ VARIABLE_SIZE_TYPES.add(DataTypeManager.DefaultDataClasses.OBJECT);
+ VARIABLE_SIZE_TYPES.add(DataTypeManager.DefaultDataClasses.BIG_INTEGER);
+ VARIABLE_SIZE_TYPES.add(DataTypeManager.DefaultDataClasses.BIG_DECIMAL);
}
private long bigIntegerEstimate;
private long bigDecimalEstimate;
- private String[] types;
+ private Class<?>[] types;
- public SizeUtility(String[] types) {
+ public SizeUtility(Class<?>[] types) {
boolean isValueCacheEnabled = DataTypeManager.isValueCacheEnabled();
bigIntegerEstimate = getSize(isValueCacheEnabled, DataTypeManager.DefaultDataClasses.BIG_INTEGER);
bigDecimalEstimate = getSize(isValueCacheEnabled, DataTypeManager.DefaultDataClasses.BIG_DECIMAL);
this.types = types;
}
- public long getBatchSize(List<? extends List<?>> data) {
- return getBatchSize(DataTypeManager.isValueCacheEnabled(), data);
- }
-
- private long getBatchSize(boolean accountForValueCache, List<? extends List<?>> data) {
+ public long getBatchSize(boolean accountForValueCache, List<? extends List<?>> data) {
int colLength = types.length;
int rowLength = data.size();
@@ -87,20 +89,15 @@
// array overhead for all the columns ( 8 object overhead + 4 ref + 4 int)
size += (rowLength * (48 + alignMemory(colLength * REFERENCE_SIZE)));
for (int col = 0; col < colLength; col++) {
- Class<?> type = DataTypeManager.getDataTypeClass(types[col]);
-
- if (type == DataTypeManager.DefaultDataClasses.STRING
- || type == DataTypeManager.DefaultDataClasses.OBJECT
- || type == DataTypeManager.DefaultDataClasses.BIG_INTEGER
- || type == DataTypeManager.DefaultDataClasses.BIG_DECIMAL) {
- int estRow = 0;
- for (int row = 0; row < rowLength; row++) {
- boolean updateEst = row == estRow;
- size += getSize(data.get(row).get(col), updateEst, accountForValueCache);
- if (updateEst) {
- estRow = estRow * 2 + 1;
- }
+ Class<?> type = types[col];
+ int rowsSampled = 0;
+ int estimatedSize = 0;
+ if (VARIABLE_SIZE_TYPES.contains(type)) {
+ for (int row = 0; row < rowLength; row=(row*2)+1) {
+ rowsSampled++;
+ estimatedSize += getSize(data.get(row).get(col), types[col], true, accountForValueCache);
}
+ size += estimatedSize/(float)rowsSampled * rowLength;
} else {
size += getSize(accountForValueCache, type) * rowLength;
}
@@ -122,25 +119,17 @@
* Get size of object
* @return Size in bytes
*/
- protected long getSize(Object obj, boolean updateEstimate, boolean accountForValueCache) {
+ protected long getSize(Object obj, Class<?> type, boolean updateEstimate, boolean accountForValueCache) {
if(obj == null) {
return 0;
}
- Class<?> type = DataTypeManager.determineDataTypeClass(obj);
if(type == DataTypeManager.DefaultDataClasses.STRING) {
int length = ((String)obj).length();
if (length > 0) {
return alignMemory(40 + (2 * length));
}
return 40;
- } else if(obj instanceof Iterable<?>) {
- Iterable<?> i = (Iterable<?>)obj;
- long total = 16;
- for (Object object : i) {
- total += getSize(object, true, false) + REFERENCE_SIZE;
- }
- return total;
} else if(type == DataTypeManager.DefaultDataClasses.BIG_DECIMAL) {
if (!updateEstimate) {
return bigDecimalEstimate;
@@ -162,13 +151,20 @@
bigIntegerEstimate = (bigIntegerEstimate + result)/2;
}
return result;
+ } else if(obj instanceof Iterable<?>) {
+ Iterable<?> i = (Iterable<?>)obj;
+ long total = 16;
+ for (Object object : i) {
+ total += getSize(object, DataTypeManager.determineDataTypeClass(object), true, false) + REFERENCE_SIZE;
+ }
+ return total;
} else if(obj.getClass().isArray()) {
Class<?> componentType = obj.getClass().getComponentType();
if (!componentType.isPrimitive()) {
Object[] rows = (Object[]) obj;
long total = 16 + alignMemory(rows.length * REFERENCE_SIZE); // Array overhead
for(int i=0; i<rows.length; i++) {
- total += getSize(rows[i], true, false);
+ total += getSize(rows[i], DataTypeManager.determineDataTypeClass(rows[i]), true, false);
}
return total;
}
Modified: branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SplittableStorageManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SplittableStorageManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/SplittableStorageManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -23,7 +23,6 @@
package org.teiid.common.buffer.impl;
import java.io.IOException;
-import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
@@ -79,7 +78,7 @@
FileStore store = null;
if (!write) {
synchronized (this) {
- if (fileOffset + length > len) {
+ if (fileOffset > len) {
throw new IOException("Invalid file position " + fileOffset + " length " + length); //$NON-NLS-1$ //$NON-NLS-2$
}
store = storageFiles.get((int)(fileOffset/maxFileSize));
@@ -118,28 +117,6 @@
len = length;
}
- @Override
- public ByteBuffer getBuffer(long start, int length, boolean allocate) throws IOException {
- FileStore store = null;
- synchronized (this) {
- ensureLength(start + length);
- store = storageFiles.get((int)(start/maxFileSize));
- }
- long fileBegin = start%maxFileSize;
- return store.getBuffer(fileBegin, length, allocate);
- }
-
- @Override
- public void updateFromBuffer(ByteBuffer bb, long start)
- throws IOException {
- FileStore store = null;
- synchronized (this) {
- store = storageFiles.get((int)(start/maxFileSize));
- }
- long fileBegin = start%maxFileSize;
- store.updateFromBuffer(bb, fileBegin);
- }
-
@Override
public synchronized void setLength(long length) throws IOException {
if (length > len) {
Property changes on: branches/as7/engine/src/main/java/org/teiid/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/core:3535-3555*
/trunk/engine/src/main/java/org/teiid/core:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/core/id
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/core/id:3535-3555
/trunk/engine/src/main/java/org/teiid/core/id:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AccessInfo.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AccessInfo.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AccessInfo.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -52,7 +52,7 @@
private static final long serialVersionUID = -2608267960584191359L;
private transient Set<Object> objectsAccessed;
-
+ private boolean sensitiveToMetadataChanges = true;
private List<List<String>> externalNames;
private transient long creationTime = System.currentTimeMillis();
@@ -67,6 +67,14 @@
this.creationTime = System.currentTimeMillis();
}
+ public boolean isSensitiveToMetadataChanges() {
+ return sensitiveToMetadataChanges;
+ }
+
+ public void setSensitiveToMetadataChanges(boolean sensitiveToMetadataChanges) {
+ this.sensitiveToMetadataChanges = sensitiveToMetadataChanges;
+ }
+
private static List<List<String>> initExternalList(List<List<String>> externalNames, Set<? extends Object> accessed) {
if (externalNames == null) {
externalNames = new ArrayList<List<String>>(accessed.size());
@@ -153,8 +161,14 @@
}
for (Object o : this.objectsAccessed) {
if (!data) {
- if (o instanceof Modifiable && ((Modifiable)o).getLastModified() - modTime > this.creationTime) {
- return false;
+ if (o instanceof Modifiable) {
+ Modifiable m = (Modifiable)o;
+ if (m.getLastModified() < 0) {
+ return false; //invalid object
+ }
+ if (sensitiveToMetadataChanges && m.getLastModified() - modTime > this.creationTime) {
+ return false;
+ }
}
} else if (o instanceof DataModifiable && ((DataModifiable)o).getLastDataModification() - modTime > this.creationTime) {
return false;
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -284,7 +284,6 @@
Map<String, LanguageObject> nameToSymbolMap = new LinkedHashMap<String, LanguageObject>();
for (LanguageObject symbol : symbols) {
try {
- String fullName = null;
Object metadataID = null;
if(symbol instanceof ElementSymbol) {
metadataID = ((ElementSymbol)symbol).getMetadataID();
@@ -294,20 +293,18 @@
} else if(symbol instanceof GroupSymbol) {
GroupSymbol group = (GroupSymbol)symbol;
metadataID = group.getMetadataID();
- if (metadataID instanceof TempMetadataID && !group.isProcedure()) {
- if (group.isTempTable()) {
+ if (metadataID instanceof TempMetadataID) {
+ if (group.isProcedure()) {
+ Map<String, LanguageObject> procMap = new LinkedHashMap<String, LanguageObject>();
+ addToNameMap(((TempMetadataID)metadataID).getOriginalMetadataID(), symbol, procMap);
+ validateEntitlements(PermissionType.EXECUTE, auditContext, procMap);
+ } else if (group.isTempTable()) {
validateTemp(actionCode, group, auditContext);
}
continue;
}
}
- fullName = getMetadata().getFullName(metadataID);
- Object modelId = getMetadata().getModelID(metadataID);
- String modelName = getMetadata().getFullName(modelId);
- if (isSystemSchema(modelName)) {
- continue;
- }
- nameToSymbolMap.put(fullName, symbol);
+ addToNameMap(metadataID, symbol, nameToSymbolMap);
} catch(QueryMetadataException e) {
handleException(e);
} catch(TeiidComponentException e) {
@@ -317,6 +314,15 @@
validateEntitlements(actionCode, auditContext, nameToSymbolMap);
}
+
+ private void addToNameMap(Object metadataID, LanguageObject symbol, Map<String, LanguageObject> nameToSymbolMap) throws QueryMetadataException, TeiidComponentException {
+ String fullName = getMetadata().getFullName(metadataID);
+ Object modelId = getMetadata().getModelID(metadataID);
+ String modelName = getMetadata().getFullName(modelId);
+ if (!isSystemSchema(modelName)) {
+ nameToSymbolMap.put(fullName, symbol);
+ }
+ }
private boolean isSystemSchema(String modelName) {
return CoreConstants.SYSTEM_MODEL.equalsIgnoreCase(modelName) || CoreConstants.ODBC_MODEL.equalsIgnoreCase(modelName);
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -30,7 +30,7 @@
static final int DEFAULT_FETCH_SIZE = RequestMessage.DEFAULT_FETCH_SIZE * 10;
static final int DEFAULT_PROCESSOR_TIMESLICE = 2000;
static final int DEFAULT_MAX_RESULTSET_CACHE_ENTRIES = 1024;
- static final int DEFAULT_QUERY_THRESHOLD = 600;
+ static final int DEFAULT_QUERY_THRESHOLD = 600000;
static final String PROCESS_PLAN_QUEUE_NAME = "QueryProcessorQueue"; //$NON-NLS-1$
public static final int DEFAULT_MAX_PROCESS_WORKERS = 64;
public static final int DEFAULT_MAX_SOURCE_ROWS = -1;
@@ -41,13 +41,14 @@
private int timeSliceInMilli = DEFAULT_PROCESSOR_TIMESLICE;
private int maxRowsFetchSize = DEFAULT_FETCH_SIZE;
private int lobChunkSizeInKB = 100;
- private int queryThresholdInSecs = DEFAULT_QUERY_THRESHOLD;
+ private long queryThresholdInMilli = DEFAULT_QUERY_THRESHOLD;
private boolean exceptionOnMaxSourceRows = true;
private int maxSourceRows = -1;
private int maxActivePlans = DEFAULT_MAX_ACTIVE_PLANS;
private int userRequestSourceConcurrency = DEFAULT_USER_REQUEST_SOURCE_CONCURRENCY;
private boolean detectingChangeEvents = true;
+ private long queryTimeout;
private transient AuthorizationValidator authorizationValidator;
@@ -114,11 +115,19 @@
}
public int getQueryThresholdInSecs() {
- return queryThresholdInSecs;
+ return (int)queryThresholdInMilli/1000;
}
+
+ public long getQueryThresholdInMilli() {
+ return queryThresholdInMilli;
+ }
+
+ public void setQueryThresholdInMilli(long queryThreshold) {
+ this.queryThresholdInMilli = queryThreshold;
+ }
public void setQueryThresholdInSecs(int queryThresholdInSecs) {
- this.queryThresholdInSecs = queryThresholdInSecs;
+ this.queryThresholdInMilli = queryThresholdInSecs * 1000;
}
/**
@@ -161,5 +170,13 @@
public void setDetectingChangeEvents(boolean detectingChangeEvents) {
this.detectingChangeEvents = detectingChangeEvents;
}
+
+ public void setQueryTimeout(long queryTimeout) {
+ this.queryTimeout = queryTimeout;
+ }
+
+ public long getQueryTimeout() {
+ return queryTimeout;
+ }
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,14 +22,18 @@
package org.teiid.dqp.internal.process;
+import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executor;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
@@ -57,6 +61,7 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.Streamable;
import org.teiid.core.util.ApplicationInfo;
+import org.teiid.core.util.ExecutorUtils;
import org.teiid.dqp.internal.process.ThreadReuseExecutor.PrioritizedRunnable;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.RequestID;
@@ -65,6 +70,7 @@
import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.dqp.service.TransactionService;
import org.teiid.events.EventDistributor;
+import org.teiid.jdbc.EnhancedTimer;
import org.teiid.logging.CommandLogMessage;
import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.logging.LogConstants;
@@ -184,7 +190,6 @@
private SessionAwareCache<PreparedPlan> prepPlanCache;
private SessionAwareCache<CachedResults> rsCache;
private TransactionService transactionService;
- private BufferService bufferService;
private EventDistributor eventDistributor;
private MetadataRepository metadataRepository;
@@ -199,8 +204,11 @@
private int currentlyActivePlans;
private int userRequestSourceConcurrency;
private LinkedList<RequestWorkItem> waitingPlans = new LinkedList<RequestWorkItem>();
+ private LinkedHashSet<RequestWorkItem> bufferFullPlans = new LinkedHashSet<RequestWorkItem>();
private AuthorizationValidator authorizationValidator;
+
+ private EnhancedTimer cancellationTimer;
/**
* perform a full shutdown and wait for 10 seconds for all threads to finish
@@ -246,16 +254,16 @@
}
public List<RequestMetadata> getLongRunningRequests(){
- return buildRequestInfos(requests.keySet(), this.config.getQueryThresholdInSecs());
+ return buildRequestInfos(requests.keySet(), System.currentTimeMillis() - this.config.getQueryThresholdInMilli() );
}
- private List<RequestMetadata> buildRequestInfos(Collection<RequestID> ids, int longRunningQueryThreshold) {
+ private List<RequestMetadata> buildRequestInfos(Collection<RequestID> ids, long longRunningQueryThreshold) {
List<RequestMetadata> results = new ArrayList<RequestMetadata>();
for (RequestID requestID : ids) {
RequestWorkItem holder = requests.get(requestID);
- if(holder != null && !holder.isCanceled()) {
+ if(holder != null && !holder.isCanceled() && (longRunningQueryThreshold == -1 || holder.getProcessingTimestamp() < longRunningQueryThreshold)) {
RequestMetadata req = new RequestMetadata();
req.setExecutionId(holder.requestID.getExecutionID());
@@ -306,11 +314,7 @@
results.add(info);
}
- // check if only need long running queries.
- long elapsedTime = System.currentTimeMillis() - req.getStartTime();
- if (longRunningQueryThreshold == -1 || elapsedTime > longRunningQueryThreshold) {
- results.add(req);
- }
+ results.add(req);
}
}
return results;
@@ -334,17 +338,44 @@
request.setAuthorizationValidator(this.authorizationValidator);
request.setUserRequestConcurrency(this.getUserRequestSourceConcurrency());
ResultsFuture<ResultsMessage> resultsFuture = new ResultsFuture<ResultsMessage>();
- RequestWorkItem workItem = new RequestWorkItem(this, requestMsg, request, resultsFuture.getResultsReceiver(), requestID, workContext);
+ final RequestWorkItem workItem = new RequestWorkItem(this, requestMsg, request, resultsFuture.getResultsReceiver(), requestID, workContext);
logMMCommand(workItem, Event.NEW, null);
addRequest(requestID, workItem, state);
+ long timeout = workContext.getVDB().getQueryTimeout();
+ timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, config.getQueryTimeout()>0?config.getQueryTimeout():Long.MAX_VALUE);
+ if (timeout < Long.MAX_VALUE) {
+ workItem.setCancelTask(this.cancellationTimer.add(new Runnable() {
+ WeakReference<RequestWorkItem> workItemRef = new WeakReference<RequestWorkItem>(workItem);
+ @Override
+ public void run() {
+ try {
+ RequestWorkItem wi = workItemRef.get();
+ if (wi != null) {
+ wi.requestCancel();
+ }
+ } catch (TeiidComponentException e) {
+ LogManager.logError(LogConstants.CTX_DQP, e, "Error processing cancellation task."); //$NON-NLS-1$
+ }
+ }
+ }, timeout));
+ }
boolean runInThread = DQPWorkContext.getWorkContext().useCallingThread() || requestMsg.isSync();
synchronized (waitingPlans) {
- if (runInThread || currentlyActivePlans < maxActivePlans) {
+ if (runInThread || currentlyActivePlans <= maxActivePlans) {
startActivePlan(workItem, !runInThread);
} else {
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Queuing plan, since max plans has been reached."); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_DQP, workItem.requestID, "Queuing plan, since max plans has been reached."); //$NON-NLS-1$
}
+ if (!bufferFullPlans.isEmpty()) {
+ Iterator<RequestWorkItem> id = bufferFullPlans.iterator();
+ RequestWorkItem bufferFull = id.next();
+ id.remove();
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_DQP, bufferFull.requestID, "Restarting plan with full buffer, since there is a pending active plan."); //$NON-NLS-1$
+ }
+ bufferFull.moreWork();
+ }
waitingPlans.add(workItem);
}
}
@@ -387,12 +418,23 @@
}
workItem.active = false;
currentlyActivePlans--;
+ bufferFullPlans.remove(workItem.requestID);
if (!waitingPlans.isEmpty()) {
startActivePlan(waitingPlans.remove(), true);
}
}
}
+ public boolean hasWaitingPlans(RequestWorkItem item) {
+ synchronized (waitingPlans) {
+ if (!waitingPlans.isEmpty()) {
+ return true;
+ }
+ this.bufferFullPlans.add(item);
+ }
+ return false;
+ }
+
void removeRequest(final RequestWorkItem workItem) {
finishProcessing(workItem);
this.requests.remove(workItem.requestID);
@@ -603,10 +645,11 @@
this.authorizationValidator = config.getAuthorizationValidator();
this.chunkSize = config.getLobChunkSizeInKB() * 1024;
- //get buffer manager
- this.bufferManager = bufferService.getBufferManager();
-
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
+ //we don't want cancellations waiting on normal processing, so they get a small dedicated pool
+ //TODO: overflow to the worker pool
+ Executor timeoutExecutor = ExecutorUtils.newFixedThreadPool(3, "Server Side Timeout"); //$NON-NLS-1$
+ this.cancellationTimer = new EnhancedTimer(timeoutExecutor, timeoutExecutor);
this.maxActivePlans = config.getMaxActivePlans();
if (this.maxActivePlans > config.getMaxThreads()) {
@@ -627,7 +670,7 @@
this.userRequestSourceConcurrency = Math.min(config.getMaxThreads(), 2*config.getMaxThreads()/this.maxActivePlans);
}
- DataTierManagerImpl processorDataManager = new DataTierManagerImpl(this,this.bufferService, this.config.isDetectingChangeEvents());
+ DataTierManagerImpl processorDataManager = new DataTierManagerImpl(this, this.bufferManager, this.config.isDetectingChangeEvents());
processorDataManager.setEventDistributor(eventDistributor);
processorDataManager.setMetadataRepository(metadataRepository);
dataTierMgr = new TempTableDataManager(processorDataManager, this.bufferManager, this.processWorkerPool, this.rsCache);
@@ -637,7 +680,7 @@
}
public void setBufferService(BufferService service) {
- this.bufferService = service;
+ this.bufferManager = service.getBufferManager();
}
public void setTransactionService(TransactionService service) {
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,7 +29,9 @@
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
+import java.util.TreeMap;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
@@ -48,6 +50,41 @@
private static final long serialVersionUID = -6389893410233192977L;
+ public enum Version {
+ SEVEN_1("7.1"), //$NON-NLS-1$
+ SEVEN_2("7.2"), //$NON-NLS-1$
+ SEVEN_3("7.3"), //$NON-NLS-1$
+ SEVEN_4("7.4"), //$NON-NLS-1$
+ SEVEN_5("7.5"), //$NON-NLS-1$
+ SEVEN_6("7.6"); //$NON-NLS-1$
+
+ private String string;
+
+ private Version(String string) {
+ this.string = string;
+ }
+
+ @Override
+ public String toString() {
+ return string;
+ }
+
+ private static TreeMap<String, Version> versionMap = new TreeMap<String, Version>();
+ static {
+ for (Version v : Version.values()) {
+ versionMap.put(v.toString(), v);
+ }
+ }
+
+ public static Version getVersion(String version) {
+ Map.Entry<String, Version> v = versionMap.floorEntry(version);
+ if (v == null) {
+ return SEVEN_1;
+ }
+ return v.getValue();
+ }
+ }
+
private static ThreadLocal<DQPWorkContext> CONTEXTS = new ThreadLocal<DQPWorkContext>() {
protected DQPWorkContext initialValue() {
return new DQPWorkContext();
@@ -72,6 +109,7 @@
private SecurityHelper securityHelper;
private HashMap<String, DataPolicy> policies;
private boolean useCallingThread;
+ private Version clientVersion = Version.SEVEN_4;
public DQPWorkContext() {
}
@@ -257,5 +295,13 @@
}
}
return roles;
- }
+ }
+
+ public Version getClientVersion() {
+ return clientVersion;
+ }
+
+ public void setClientVersion(Version clientVersion) {
+ this.clientVersion = clientVersion;
+ }
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -59,22 +59,10 @@
import org.teiid.dqp.internal.datamgr.ConnectorWork;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.RequestID;
-import org.teiid.dqp.service.BufferService;
import org.teiid.events.EventDistributor;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
-import org.teiid.metadata.AbstractMetadataRecord;
-import org.teiid.metadata.Column;
-import org.teiid.metadata.ColumnStats;
-import org.teiid.metadata.Datatype;
-import org.teiid.metadata.ForeignKey;
-import org.teiid.metadata.KeyRecord;
-import org.teiid.metadata.MetadataRepository;
-import org.teiid.metadata.Procedure;
-import org.teiid.metadata.ProcedureParameter;
-import org.teiid.metadata.Schema;
-import org.teiid.metadata.Table;
-import org.teiid.metadata.TableStats;
+import org.teiid.metadata.*;
import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.CompositeMetadataStore;
import org.teiid.query.metadata.TempMetadataID;
@@ -153,14 +141,14 @@
// Resources
private DQPCore requestMgr;
- private BufferService bufferService;
+ private BufferManager bufferManager;
private EventDistributor eventDistributor;
private boolean detectChangeEvents;
private MetadataRepository metadataRepository;
- public DataTierManagerImpl(DQPCore requestMgr, BufferService bufferService, boolean detectChangeEvents) {
+ public DataTierManagerImpl(DQPCore requestMgr, BufferManager bufferMgr, boolean detectChangeEvents) {
this.requestMgr = requestMgr;
- this.bufferService = bufferService;
+ this.bufferManager = bufferMgr;
this.detectChangeEvents = detectChangeEvents;
}
@@ -568,7 +556,7 @@
if (nodeID >= 0) {
aqr.setTransactionContext(workItem.getTransactionContext());
}
- aqr.setFetchSize(this.bufferService.getBufferManager().getConnectorBatchSize());
+ aqr.setFetchSize(this.bufferManager.getConnectorBatchSize());
if (connectorBindingId == null) {
VDBMetaData vdb = workItem.getDqpWorkContext().getVDB();
ModelMetaData model = vdb.getModel(modelName);
@@ -595,7 +583,7 @@
}
BufferManager getBufferManager() {
- return bufferService.getBufferManager();
+ return this.bufferManager;
}
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -39,6 +39,7 @@
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.XMLType;
import org.teiid.dqp.internal.process.DQPCore.ClientState;
+import org.teiid.dqp.internal.process.DQPWorkContext.Version;
import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
import org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper;
import org.teiid.dqp.message.RequestID;
@@ -78,6 +79,8 @@
private int vdbVersion;
private RequestID requestID;
+ private boolean labelAsName;
+
public MetaDataProcessor(DQPCore requestManager, SessionAwareCache<PreparedPlan> planCache, String vdbName, int vdbVersion) {
this.requestManager = requestManager;
this.planCache = planCache;
@@ -98,6 +101,7 @@
this.requestID = requestId;
this.metadata = workContext.getVDB().getAttachment(QueryMetadataInterface.class);
+ this.labelAsName = workContext.getClientVersion().compareTo(Version.SEVEN_3) <= 0;
// If multi-source, use the multi-source wrapper as well
Set<String> multiModels = workContext.getVDB().getMultiSourceModelNames();
@@ -246,7 +250,7 @@
Class<?> type = symbol.getType();
column.put(ResultsMetadataConstants.DATA_TYPE, DataTypeManager.getDataTypeName(type));
column.put(ResultsMetadataConstants.ELEMENT_LABEL, label);
- column.put(ResultsMetadataConstants.ELEMENT_NAME, metadata.getName(elementID));
+ column.put(ResultsMetadataConstants.ELEMENT_NAME, labelAsName?label:metadata.getName(elementID));
GroupSymbol group = symbol.getGroupSymbol();
if(group == null || group.getMetadataID() == null) {
@@ -399,7 +403,7 @@
column.put(ResultsMetadataConstants.VIRTUAL_DATABASE_NAME, vdbName);
column.put(ResultsMetadataConstants.VIRTUAL_DATABASE_VERSION, vdbVersion);
column.put(ResultsMetadataConstants.GROUP_NAME, tableName);
- column.put(ResultsMetadataConstants.ELEMENT_NAME, columnName);
+ column.put(ResultsMetadataConstants.ELEMENT_NAME, labelAsName?columnLabel:columnName);
column.put(ResultsMetadataConstants.ELEMENT_LABEL, columnLabel);
column.put(ResultsMetadataConstants.AUTO_INCREMENTING, Boolean.FALSE);
column.put(ResultsMetadataConstants.CASE_SENSITIVE, Boolean.FALSE);
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlan.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,6 +29,8 @@
import org.teiid.common.buffer.BufferManager;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.processor.ProcessorPlan;
+import org.teiid.query.processor.relational.AccessNode;
+import org.teiid.query.processor.relational.RelationalPlan;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.util.CommandContext;
@@ -77,6 +79,13 @@
public void setPlan(ProcessorPlan planValue, CommandContext context){
plan = planValue;
this.accessInfo.populate(context, false);
+ //TODO: expand this logic
+ if (planValue instanceof RelationalPlan) {
+ RelationalPlan rp = (RelationalPlan)planValue;
+ if (rp.getRootNode() instanceof AccessNode) {
+ this.accessInfo.setSensitiveToMetadataChanges(false);
+ }
+ }
}
/**
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -220,8 +220,8 @@
} else { //just accumulate copies of the command/plan - clones are not necessary
if (command == null) {
command = this.prepPlan.getCommand();
- command.setProcessorPlan(this.processPlan);
}
+ command.setProcessorPlan(this.processPlan);
commands.add(command);
}
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -52,6 +52,7 @@
import org.teiid.core.types.DataTypeManager;
import org.teiid.dqp.internal.process.DQPCore.CompletionListener;
import org.teiid.dqp.internal.process.DQPCore.FutureWork;
+import org.teiid.dqp.internal.process.DQPWorkContext.Version;
import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
import org.teiid.dqp.internal.process.ThreadReuseExecutor.PrioritizedRunnable;
import org.teiid.dqp.message.AtomicRequestID;
@@ -60,6 +61,7 @@
import org.teiid.dqp.service.TransactionService;
import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.jdbc.SQLStates;
+import org.teiid.jdbc.EnhancedTimer.Task;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
@@ -78,6 +80,9 @@
public class RequestWorkItem extends AbstractWorkItem implements PrioritizedRunnable {
+ //TODO: this could be configurable
+ private static final int OUTPUT_BUFFER_MAX_BATCHES = 20;
+
private final class WorkWrapper<T> implements
DQPCore.CompletionListener<T> {
@@ -166,6 +171,8 @@
protected boolean useCallingThread;
private volatile boolean hasThread;
+ private Task cancelTask;
+
public RequestWorkItem(DQPCore dqpCore, RequestMessage requestMsg, Request request, ResultsReceiver<ResultsMessage> receiver, RequestID requestID, DQPWorkContext workContext) {
this.requestMsg = requestMsg;
this.requestID = requestID;
@@ -276,7 +283,9 @@
resume();
if (this.state == ProcessingState.PROCESSING) {
- processMore();
+ if (!this.closeRequested) {
+ processMore();
+ }
if (this.closeRequested) {
this.state = ProcessingState.CLOSE;
}
@@ -287,37 +296,9 @@
LogManager.logDetail(LogConstants.CTX_DQP, "Request Thread", requestID, "- time slice expired"); //$NON-NLS-1$ //$NON-NLS-2$
this.moreWork();
} catch (Throwable e) {
- LogManager.logDetail(LogConstants.CTX_DQP, e, "Request Thread", requestID, "- error occurred"); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (!isCanceled()) {
- dqpCore.logMMCommand(this, Event.ERROR, null);
- //Case 5558: Differentiate between system level errors and
- //processing errors. Only log system level errors as errors,
- //log the processing errors as warnings only
- if(e instanceof TeiidProcessingException) {
- Throwable cause = e;
- while (cause.getCause() != null && cause.getCause() != cause) {
- cause = cause.getCause();
- }
- StackTraceElement[] elems = cause.getStackTrace();
- Object elem = null;
- if (elems.length > 0) {
- elem = cause.getStackTrace()[0];
- } else {
- elem = cause.getMessage();
- }
- LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(), requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
- }else {
- LogManager.logError(LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
- }
- }
-
- this.processingException = e;
- this.state = ProcessingState.CLOSE;
+ handleThrowable(e);
} finally {
- if (this.state == ProcessingState.CLOSE && !isClosed) {
- attemptClose();
- } else if (isClosed) {
+ if (isClosed) {
/*
* since there may be a client waiting notify them of a problem
*/
@@ -325,11 +306,43 @@
this.processingException = new IllegalStateException("Request is already closed"); //$NON-NLS-1$
}
sendError();
+ } else if (this.state == ProcessingState.CLOSE) {
+ close();
}
suspend();
}
}
+ private void handleThrowable(Throwable e) {
+ LogManager.logDetail(LogConstants.CTX_DQP, e, "Request Thread", requestID, "- error occurred"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (!isCanceled()) {
+ dqpCore.logMMCommand(this, Event.ERROR, null);
+ //Case 5558: Differentiate between system level errors and
+ //processing errors. Only log system level errors as errors,
+ //log the processing errors as warnings only
+ if(e instanceof TeiidProcessingException) {
+ Throwable cause = e;
+ while (cause.getCause() != null && cause.getCause() != cause) {
+ cause = cause.getCause();
+ }
+ StackTraceElement[] elems = cause.getStackTrace();
+ Object elem = null;
+ if (elems.length > 0) {
+ elem = cause.getStackTrace()[0];
+ } else {
+ elem = cause.getMessage();
+ }
+ LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(), requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
+ }else {
+ LogManager.logError(LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
+ }
+ }
+
+ this.processingException = e;
+ this.state = ProcessingState.CLOSE;
+ }
+
private void resume() throws XATransactionException {
if (this.transactionState == TransactionState.ACTIVE && this.transactionContext.getTransaction() != null) {
this.transactionService.resume(this.transactionContext);
@@ -382,65 +395,77 @@
* Client close is currently implemented as asynch.
* Any errors that occur will not make it to the client, instead we just log them here.
*/
- protected void attemptClose() {
+ protected void close() {
int rowcount = -1;
- if (this.resultsBuffer != null) {
- if (this.processor != null) {
- this.processor.closeProcessing();
-
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_DQP, "Removing tuplesource for the request " + requestID); //$NON-NLS-1$
- }
- rowcount = resultsBuffer.getRowCount();
- if (this.cid == null || !this.doneProducingBatches) {
- resultsBuffer.remove();
- } else {
- try {
- this.resultsBuffer.persistLobs();
- } catch (TeiidComponentException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, QueryPlugin.Util.getString("failed_to_cache")); //$NON-NLS-1$
+ try {
+ cancelCancelTask();
+ if (this.resultsBuffer != null) {
+ if (this.processor != null) {
+ this.processor.closeProcessing();
+
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_DQP, "Removing tuplesource for the request " + requestID); //$NON-NLS-1$
+ }
+ rowcount = resultsBuffer.getRowCount();
+ if (this.cid == null || !this.doneProducingBatches) {
+ resultsBuffer.remove();
+ } else {
+ try {
+ this.resultsBuffer.persistLobs();
+ } catch (TeiidComponentException e) {
+ LogManager.logDetail(LogConstants.CTX_DQP, QueryPlugin.Util.getString("failed_to_cache")); //$NON-NLS-1$
+ }
}
+
+ for (DataTierTupleSource connectorRequest : getConnectorRequests()) {
+ connectorRequest.fullyCloseSource();
+ }
}
+
+ this.resultsBuffer = null;
- for (DataTierTupleSource connectorRequest : getConnectorRequests()) {
- connectorRequest.fullyCloseSource();
- }
+ if (!this.lobStreams.isEmpty()) {
+ List<LobWorkItem> lobs = null;
+ synchronized (lobStreams) {
+ lobs = new ArrayList<LobWorkItem>(this.lobStreams.values());
+ }
+ for (LobWorkItem lobWorkItem : lobs) {
+ lobWorkItem.close();
+ }
+ }
}
-
- this.resultsBuffer = null;
-
- if (!this.lobStreams.isEmpty()) {
- List<LobWorkItem> lobs = null;
- synchronized (lobStreams) {
- lobs = new ArrayList<LobWorkItem>(this.lobStreams.values());
+
+ if (this.transactionState == TransactionState.ACTIVE) {
+ this.transactionState = TransactionState.DONE;
+ if (transactionContext.getTransactionType() == TransactionContext.Scope.REQUEST) {
+ try {
+ this.transactionService.rollback(transactionContext);
+ } catch (XATransactionException e1) {
+ LogManager.logWarning(LogConstants.CTX_DQP, e1, QueryPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
+ }
+ } else {
+ suspend();
}
- for (LobWorkItem lobWorkItem : lobs) {
- lobWorkItem.close();
- }
}
- }
-
- if (this.transactionState == TransactionState.ACTIVE) {
- this.transactionState = TransactionState.DONE;
- if (transactionContext.getTransactionType() == TransactionContext.Scope.REQUEST) {
- try {
- this.transactionService.rollback(transactionContext);
- } catch (XATransactionException e1) {
- LogManager.logWarning(LogConstants.CTX_DQP, e1, QueryPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
- }
+ } catch (Throwable t) {
+ handleThrowable(t);
+ } finally {
+ isClosed = true;
+
+ dqpCore.removeRequest(this);
+
+ if (this.processingException != null) {
+ sendError();
} else {
- suspend();
+ dqpCore.logMMCommand(this, Event.END, rowcount);
}
}
-
- isClosed = true;
+ }
- dqpCore.removeRequest(this);
-
- if (this.processingException != null) {
- sendError();
- } else {
- dqpCore.logMMCommand(this, Event.END, rowcount);
+ private void cancelCancelTask() {
+ if (this.cancelTask != null) {
+ this.cancelTask.cancel();
+ this.cancelTask = null;
}
}
@@ -485,10 +510,8 @@
collector = new BatchCollector(processor, processor.getBufferManager(), this.request.context, isForwardOnly()) {
protected void flushBatchDirect(TupleBatch batch, boolean add) throws TeiidComponentException,TeiidProcessingException {
resultsBuffer = getTupleBuffer();
- boolean added = false;
if (cid != null) {
super.flushBatchDirect(batch, add);
- added = true;
}
if (batch.getTerminationFlag()) {
doneProducingBatches();
@@ -496,14 +519,20 @@
addToCache();
synchronized (lobStreams) {
add = sendResultsIfNeeded(batch);
- if (!added) {
- super.flushBatchDirect(batch, add);
- //restrict the buffer size for forward only results
- if (add && !processor.hasFinalBuffer()
- && !batch.getTerminationFlag()
- && this.getTupleBuffer().getManagedRowCount() >= 20 * this.getTupleBuffer().getBatchSize()) {
+ if (cid != null) {
+ return;
+ }
+ super.flushBatchDirect(batch, add);
+ //restrict the buffer size for forward only results
+ if (add && !processor.hasFinalBuffer()
+ && !batch.getTerminationFlag()
+ && this.getTupleBuffer().getManagedRowCount() >= OUTPUT_BUFFER_MAX_BATCHES * this.getTupleBuffer().getBatchSize()) {
+ if (!dqpCore.hasWaitingPlans(RequestWorkItem.this)) {
//requestMore will trigger more processing
throw BlockedException.block(requestID, "Blocking due to full results buffer."); //$NON-NLS-1$
+ }
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Exceeding buffer limit since there are pending active plans."); //$NON-NLS-1$
}
}
}
@@ -515,7 +544,6 @@
resultsBuffer = this.processor.getBufferManager().createTupleBuffer(this.originalCommand.getProjectedSymbols(), this.request.context.getConnectionID(), TupleSourceType.FINAL);
}
analysisRecord = request.analysisRecord;
- analysisRecord.setQueryPlan(processor.getProcessorPlan().getDescriptionProperties());
transactionContext = request.transactionContext;
if (this.transactionContext != null && this.transactionContext.getTransactionType() != Scope.NONE) {
this.transactionState = TransactionState.ACTIVE;
@@ -634,6 +662,7 @@
receiver = this.resultsReceiver;
this.resultsReceiver = null;
}
+ cancelCancelTask();
receiver.receiveResults(response);
return result;
}
@@ -648,6 +677,7 @@
dataTypes[i] = DataTypeManager.getDataTypeName(symbol.getType());
}
ResultsMessage result = new ResultsMessage(batch, columnNames, dataTypes);
+ result.setClientSerializationVersion((byte)(this.dqpWorkContext.getClientVersion().compareTo(Version.SEVEN_6) >= 0?1:0));
setAnalysisRecords(result);
return result;
}
@@ -789,10 +819,10 @@
return;
}
}
- this.closeRequested = true;
if (!this.doneProducingBatches) {
this.requestCancel(); //pending work should be canceled for fastest clean up
}
+ this.closeRequested = true;
this.doMoreWork();
}
@@ -927,5 +957,9 @@
void scheduleWork(Runnable r, int priority, long delay) {
dqpCore.scheduleWork(r, priority, delay);
}
+
+ public void setCancelTask(Task cancelTask) {
+ this.cancelTask = cancelTask;
+ }
}
\ No newline at end of file
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/ThreadReuseExecutor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -291,7 +291,8 @@
synchronized (poolLock) {
if (success) {
completedCount++;
- r = queue.poll();
+ //we only poll if successful, to let the exception handling happen immediately otherwise
+ r = queue.poll();
}
if (!success || r == null) {
threads.remove(t);
@@ -301,10 +302,12 @@
}
}
}
- long warnTime = warnWaitTime;
- if (r != null && System.currentTimeMillis() - r.getCreationTime() > warnTime) {
- LogManager.logWarning(LogConstants.CTX_RUNTIME, QueryPlugin.Util.getString("WorkerPool.Max_thread", maximumPoolSize, poolName, highestQueueSize, warnTime)); //$NON-NLS-1$
- warnWaitTime*=2; //we don't really care if this is synchronized
+ if (success) {
+ long warnTime = warnWaitTime;
+ if (r != null && System.currentTimeMillis() - r.getCreationTime() > warnTime) {
+ LogManager.logWarning(LogConstants.CTX_RUNTIME, QueryPlugin.Util.getString("WorkerPool.Max_thread", maximumPoolSize, poolName, highestQueueSize, warnTime)); //$NON-NLS-1$
+ warnWaitTime*=2; //we don't really care if this is synchronized
+ }
}
t.setName(name);
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/message/RequestID.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/message/RequestID.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/message/RequestID.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -27,6 +27,9 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import org.teiid.core.util.EquivalenceUtil;
+import org.teiid.core.util.HashCodeUtil;
+
/**
* <p>This class represents an identifier for a request. However, there are some
* differences in what constitutes "uniqueness" for a given RequestID that
@@ -58,7 +61,6 @@
// Derived state
private String combinedID;
- private int hash;
/**
* Necessary for implementing Externalizable
@@ -74,17 +76,11 @@
public RequestID(String connectionID, long executionID) {
this.connectionID = connectionID;
this.executionID = executionID;
-
- createCombinedID();
- computeHashCode();
}
public RequestID(long connectionID, long executionID) {
this.connectionID = String.valueOf(connectionID);
this.executionID = executionID;
-
- createCombinedID();
- computeHashCode();
}
/**
@@ -129,28 +125,28 @@
this.combinedID = combinedStr.toString();
}
- private void computeHashCode() {
- this.hash = combinedID.hashCode();
- }
-
public int hashCode() {
- return this.hash;
+ return HashCodeUtil.hashCode(connectionID==null?0:connectionID.hashCode(), executionID);
}
public boolean equals(Object obj) {
if(obj == this) {
return true;
- } else if(obj == null || !(obj instanceof RequestID) || obj.hashCode() != this.hashCode()) {
+ } else if(obj == null || !(obj instanceof RequestID)) {
return false;
- } else {
- return this.toString().equals(obj.toString());
- }
+ }
+ RequestID other = (RequestID)obj;
+ return this.executionID == other.executionID
+ && EquivalenceUtil.areEqual(this.connectionID, other.connectionID);
}
/**
* Return a combined string for the ID.
*/
public String toString() {
+ if (combinedID == null) {
+ createCombinedID();
+ }
return this.combinedID;
}
@@ -160,9 +156,6 @@
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
connectionID = (String)in.readObject();
executionID = in.readLong();
-
- createCombinedID();
- computeHashCode();
}
/**
Property changes on: branches/as7/engine/src/main/java/org/teiid/query
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query:3535-3555*
/trunk/engine/src/main/java/org/teiid/query:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/ObjectReplicator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/ObjectReplicator.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/ObjectReplicator.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/QueryPlugin.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/QueryPlugin.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/ReplicatedObject.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/ReplicatedObject.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/ReplicatedObject.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/analysis
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/analysis:3535-3555
/trunk/engine/src/main/java/org/teiid/query/analysis:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -23,7 +23,6 @@
package org.teiid.query.analysis;
import java.io.PrintWriter;
-import java.io.Serializable;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
@@ -209,7 +208,7 @@
* @param projectedSymbols The list of SingleElementSymbol projected from a plan or node
* @return List of output columns for sending to the client as part of the plan
*/
- public static List<String> getOutputColumnProperties(List<SingleElementSymbol> projectedSymbols) {
+ public static List<String> getOutputColumnProperties(List<? extends SingleElementSymbol> projectedSymbols) {
if(projectedSymbols != null) {
List<String> outputCols = new ArrayList<String>(projectedSymbols.size());
for(int i=0; i<projectedSymbols.size() ; i++) {
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/eval
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/eval:3535-3555
/trunk/engine/src/main/java/org/teiid/query/eval:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/function:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/CharsetUtils.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/CharsetUtils.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/CharsetUtils.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java:3149-3171
/trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java:3149-3171,3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionForm.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionForm.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/FunctionForm.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionMetadataSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionMetadataSource.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/FunctionMetadataSource.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionTree.java:3149-3171
/trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/FunctionTree.java:3149-3171,3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/UDFSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/UDFSource.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/UDFSource.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/aggregate
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/aggregate:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/aggregate:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/metadata
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/metadata:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/metadata:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/function/source
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/function/source:3535-3555
/trunk/engine/src/main/java/org/teiid/query/function/source:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/mapping
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/mapping:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/mapping:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/mapping/relational
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/mapping/relational:3535-3555
/trunk/engine/src/main/java/org/teiid/query/mapping/relational:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/mapping/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/mapping/xml:3535-3555
/trunk/engine/src/main/java/org/teiid/query/mapping/xml:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/metadata
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/metadata:3535-3555
/trunk/engine/src/main/java/org/teiid/query/metadata:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/metadata/TempMetadataID.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/metadata/TempMetadataID.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/metadata/TempMetadataID.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -62,13 +62,17 @@
List<List<TempMetadataID>> keys;
List<List<TempMetadataID>> indexes;
long lastDataModification;
- long lastModified;
+ long lastModified = System.currentTimeMillis();
int modCount;
public long getLastDataModification() {
return lastDataModification;
}
+ public void removed() {
+ this.lastModified = -1;
+ }
+
public void dataModified(int updateCount) {
if (updateCount == 0) {
return;
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/optimizer:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -90,8 +90,8 @@
AnalysisRecord analysisRecord, CommandContext context)
throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
BatchedUpdateCommand batchedUpdateCommand = (BatchedUpdateCommand)command;
- List childPlans = new ArrayList(batchedUpdateCommand.getUpdateCommands().size());
- List updateCommands = batchedUpdateCommand.getUpdateCommands();
+ List<ProcessorPlan> childPlans = new ArrayList<ProcessorPlan>(batchedUpdateCommand.getUpdateCommands().size());
+ List<Command> updateCommands = batchedUpdateCommand.getUpdateCommands();
int numCommands = updateCommands.size();
List<VariableContext> allContexts = batchedUpdateCommand.getVariableContexts();
List<VariableContext> planContexts = null;
@@ -100,7 +100,7 @@
}
for (int commandIndex = 0; commandIndex < numCommands; commandIndex++) {
// Potentially the first command of a batch
- Command updateCommand = (Command)updateCommands.get(commandIndex);
+ Command updateCommand = updateCommands.get(commandIndex);
boolean commandWasBatched = false;
// If this command can be placed in a batch
if (isEligibleForBatching(updateCommand, metadata)) {
@@ -125,7 +125,7 @@
// Find out if there are other commands called on the same physical model
// immediately and contiguously after this one
batchLoop: for (int batchIndex = commandIndex+1; batchIndex < numCommands; batchIndex++) {
- Command batchingCandidate = (Command)updateCommands.get(batchIndex);
+ Command batchingCandidate = updateCommands.get(batchIndex);
// If this command updates the same model, and is eligible for batching, add it to the batch
if (canBeAddedToBatch(batchingCandidate, batchModelID, metadata, capFinder)) {
batch.add(batchingCandidate);
@@ -165,7 +165,7 @@
}
}
if (!commandWasBatched) { // If the command wasn't batched, just add the plan for this command to the list of plans
- Command cmd = (Command)batchedUpdateCommand.getUpdateCommands().get(commandIndex);
+ Command cmd = batchedUpdateCommand.getUpdateCommands().get(commandIndex);
ProcessorPlan plan = cmd.getProcessorPlan();
if (plan == null) {
plan = QueryOptimizer.optimizePlan(cmd, metadata, idGenerator, capFinder, analysisRecord, context);
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/CommandPlanner.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/CommandPlanner.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/CommandPlanner.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/DdlPlanner.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/DdlPlanner.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/DdlPlanner.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/TriggerActionPlanner.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/TriggerActionPlanner.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/TriggerActionPlanner.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/capabilities
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/capabilities:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/capabilities:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/AliasGenerator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/AliasGenerator.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/AliasGenerator.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/OptimizerRule.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/OptimizerRule.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/OptimizerRule.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/PartitionAnalyzer.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/PartitionAnalyzer.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PartitionAnalyzer.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/PlanHints.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanHints.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanHints.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java:3149-3217
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java:3149-3217,3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -64,6 +64,7 @@
import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.rules.CapabilitiesUtil;
import org.teiid.query.optimizer.relational.rules.CriteriaCapabilityValidatorVisitor;
+import org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements;
import org.teiid.query.optimizer.relational.rules.RuleCollapseSource;
import org.teiid.query.optimizer.relational.rules.RuleConstants;
import org.teiid.query.optimizer.relational.rules.RuleMergeCriteria;
@@ -406,7 +407,7 @@
rules.push(RuleConstants.CALCULATE_COST);
- rules.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ rules.push(new RuleAssignOutputElements(true));
if (hints.hasLimit) {
rules.push(RuleConstants.PUSH_LIMIT);
@@ -454,7 +455,7 @@
}
if (hints.hasVirtualGroups || (hints.hasJoin && hints.hasOptionalJoin)) {
//do initial filtering to make merging and optional join logic easier
- rules.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ rules.push(new RuleAssignOutputElements(false));
}
rules.push(RuleConstants.PLACE_ACCESS);
return rules;
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java:3149-3217
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java:3149-3217,3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RuleStack.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/RuleStack.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RuleStack.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/plantree
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/plantree:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -250,7 +250,7 @@
HashSet<PlanNode> criteria = new HashSet<PlanNode>(this.criteriaNodes);
HashSet<GroupSymbol> groups = new HashSet<GroupSymbol>(this.joinSourceNodes.size());
-
+ boolean hasUnknown = false;
for (int i = 0; i < joinOrder.length; i++) {
Integer source = (Integer)joinOrder[i];
@@ -286,6 +286,7 @@
if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
sourceCost = UNKNOWN_TUPLE_EST;
+ hasUnknown = true;
if (applicableCriteria != null && !applicableCriteria.isEmpty()) {
CompoundCriteria cc = new CompoundCriteria();
for (PlanNode planNode : applicableCriteria) {
@@ -322,6 +323,10 @@
sourceCost = depJoinCost;
}
}
+
+ if (i > 0 && (applicableCriteria == null || applicableCriteria.isEmpty()) && hasUnknown) {
+ sourceCost *= 10; //cross join penalty
+ }
cost *= sourceCost;
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -35,6 +35,8 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.metadata.FunctionMethod.PushDown;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
@@ -58,12 +60,16 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.ExpressionSymbol;
+import org.teiid.query.sql.symbol.Function;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.symbol.WindowFunction;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.AggregateSymbolCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
+import org.teiid.query.sql.visitor.EvaluatableVisitor;
+import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
+import org.teiid.query.sql.visitor.FunctionCollectorVisitor;
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
import org.teiid.query.util.CommandContext;
@@ -76,6 +82,13 @@
* from the children nodes. </p>
*/
public final class RuleAssignOutputElements implements OptimizerRule {
+
+ private boolean finalRun;
+ private boolean checkSymbols;
+
+ public RuleAssignOutputElements(boolean finalRun) {
+ this.finalRun = finalRun;
+ }
/**
* Execute the rule. This rule is executed exactly once during every planning
@@ -141,6 +154,13 @@
if (command instanceof StoredProcedure) {
//if the access node represents a stored procedure, then we can't actually change the output symbols
root.setProperty(NodeConstants.Info.OUTPUT_COLS, command.getProjectedSymbols());
+ } else if (checkSymbols) {
+ Object modelId = RuleRaiseAccess.getModelIDFromAccess(root, metadata);
+ for (SingleElementSymbol symbol : outputElements) {
+ if(!RuleRaiseAccess.canPushSymbol(symbol, true, modelId, metadata, capFinder, analysisRecord)) {
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RuleAssignOutputElements.couldnt_push_expression", symbol, modelId)); //$NON-NLS-1$
+ }
+ }
}
case NodeConstants.Types.TUPLE_LIMIT:
case NodeConstants.Types.DUP_REMOVE:
@@ -195,7 +215,7 @@
PlanNode sortNode = NodeEditor.findParent(root, NodeConstants.Types.SORT, NodeConstants.Types.SOURCE);
if (sortNode != null && sortNode.hasBooleanProperty(NodeConstants.Info.UNRELATED_SORT)) {
//if this is the initial rule run, remove unrelated order before changing the project cols
- if (rules.contains(RuleConstants.ASSIGN_OUTPUT_ELEMENTS)) {
+ if (!finalRun) {
OrderBy elements = (OrderBy) sortNode.getProperty(NodeConstants.Info.SORT_ORDER);
projectCols = new ArrayList<SingleElementSymbol>(projectCols);
for (OrderByItem item : elements.getOrderByItems()) {
@@ -298,16 +318,21 @@
* virtual elements - so just reset it and proceed as before
* @throws TeiidComponentException
* @throws QueryMetadataException
+ * @throws QueryPlannerException
*/
static List<? extends SingleElementSymbol> determineSourceOutput(PlanNode root,
List<SingleElementSymbol> outputElements,
QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder) throws QueryMetadataException, TeiidComponentException {
+ CapabilitiesFinder capFinder) throws QueryMetadataException, TeiidComponentException, QueryPlannerException {
PlanNode virtualRoot = root.getLastChild();
if(hasDupRemoval(virtualRoot)) {
// Reset the outputColumns for this source node to be all columns for the virtual group
SymbolMap symbolMap = (SymbolMap) root.getProperty(NodeConstants.Info.SYMBOL_MAP);
+ if (!symbolMap.asMap().keySet().containsAll(outputElements)) {
+ outputElements.removeAll(symbolMap.asMap().keySet());
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RuleAssignOutputElements.cannot_introduce_expressions", outputElements)); //$NON-NLS-1$
+ }
return symbolMap.getKeys();
}
PlanNode limit = NodeEditor.findNodePreOrder(root, NodeConstants.Types.TUPLE_LIMIT, NodeConstants.Types.PROJECT);
@@ -359,8 +384,9 @@
* @param sourceNode Node to filter
* @param metadata Metadata implementation
* @return The filtered list of columns for this node (used in recursing tree)
+ * @throws QueryPlannerException
*/
- static List<SingleElementSymbol> filterVirtualElements(PlanNode sourceNode, List<SingleElementSymbol> outputColumns, QueryMetadataInterface metadata) {
+ static List<SingleElementSymbol> filterVirtualElements(PlanNode sourceNode, List<SingleElementSymbol> outputColumns, QueryMetadataInterface metadata) throws QueryPlannerException {
PlanNode virtualRoot = sourceNode.getLastChild();
@@ -379,10 +405,16 @@
boolean updateGroups = outputColumns.size() != originalOrder.size();
boolean[] seenIndex = new boolean[outputColumns.size()];
+ boolean newSymbols = false;
for (int i = 0; i < outputColumns.size(); i++) {
Expression expr = outputColumns.get(i);
filteredIndex[i] = originalOrder.indexOf(expr);
+ if (filteredIndex[i] == -1) {
+ updateGroups = true;
+ //we're adding this symbol, which needs to be updated against respective symbol maps
+ newSymbols = true;
+ }
if (!updateGroups) {
seenIndex[filteredIndex[i]] = true;
}
@@ -402,8 +434,21 @@
PlanNode projectNode = allProjects.get(i);
List<SingleElementSymbol> projectCols = (List<SingleElementSymbol>) projectNode.getProperty(NodeConstants.Info.PROJECT_COLS);
- newCols = RelationalNode.projectTuple(filteredIndex, projectCols);
+ newCols = RelationalNode.projectTuple(filteredIndex, projectCols, true);
+ if (newSymbols) {
+ SymbolMap childMap = SymbolMap.createSymbolMap(symbolMap.getKeys(), (List) projectNode.getProperty(NodeConstants.Info.PROJECT_COLS));
+ for (int j = 0; j < filteredIndex.length; j++) {
+ if (filteredIndex[j] != -1) {
+ continue;
+ }
+ SingleElementSymbol ex = (SingleElementSymbol) outputColumns.get(j).clone();
+ ExpressionMappingVisitor.mapExpressions(ex, childMap.asMap());
+ newCols.set(j, ex);
+ filteredIndex[j] = j;
+ }
+ }
+
projectNode.setProperty(NodeConstants.Info.PROJECT_COLS, newCols);
if (updateGroups) {
projectNode.getGroups().clear();
@@ -428,25 +473,6 @@
for (int i = 0; i < filteredIndex.length; i++) {
newMap.addMapping(originalOrder.get(filteredIndex[i]), originalExpressionOrder.get(filteredIndex[i]));
}
- PlanNode sortNode = NodeEditor.findNodePreOrder(sourceNode, NodeConstants.Types.SORT, NodeConstants.Types.PROJECT);
- if (sortNode != null) {
- OrderBy elements = (OrderBy) sortNode.getProperty(NodeConstants.Info.SORT_ORDER);
- for (OrderByItem item : elements.getOrderByItems()) {
- if (item.getExpressionPosition() == -1) {
- continue;
- }
- item.setExpressionPosition(-1);
- for (int i = 0; i < filteredIndex.length; i++) {
- if (item.getExpressionPosition() == filteredIndex[i]) {
- item.setExpressionPosition(i);
- break;
- }
- }
- if (item.getExpressionPosition() == -1) {
- sortNode.setProperty(NodeConstants.Info.UNRELATED_SORT, true);
- }
- }
- }
sourceNode.setProperty(NodeConstants.Info.SYMBOL_MAP, newMap);
}
@@ -501,7 +527,23 @@
if (ss instanceof WindowFunction || (ss instanceof ExpressionSymbol && !(ss instanceof AggregateSymbol))) {
createdSymbols.add(ss);
}
- ElementCollectorVisitor.getElements(ss, requiredSymbols);
+ boolean symbolRequired = false;
+ if (finalRun && !(ss instanceof ElementSymbol) && NodeEditor.findParent(node, NodeConstants.Types.ACCESS) == null) {
+ Collection<Function> functions = FunctionCollectorVisitor.getFunctions(ss, false);
+ for (Function function : functions) {
+ if (function.getFunctionDescriptor().getPushdown() != PushDown.MUST_PUSHDOWN || EvaluatableVisitor.willBecomeConstant(function)) {
+ continue;
+ }
+ //assume we need the whole thing
+ requiredSymbols.add(ss);
+ symbolRequired = true;
+ checkSymbols = true;
+ break;
+ }
+ }
+ if (!symbolRequired) {
+ ElementCollectorVisitor.getElements(ss, requiredSymbols);
+ }
}
break;
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleConstants.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -36,7 +36,6 @@
public static final OptimizerRule RAISE_ACCESS = new RuleRaiseAccess();
public static final OptimizerRule CHOOSE_DEPENDENT = new RuleChooseDependent();
public static final OptimizerRule COLLAPSE_SOURCE = new RuleCollapseSource();
- public static final OptimizerRule ASSIGN_OUTPUT_ELEMENTS = new RuleAssignOutputElements();
public static final OptimizerRule COPY_CRITERIA = new RuleCopyCriteria();
public static final OptimizerRule CLEAN_CRITERIA = new RuleCleanCriteria();
public static final OptimizerRule VALIDATE_WHERE_ALL = new RuleValidateWhereAll();
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -202,11 +202,12 @@
* Removes source layers that only do a simple projection of the elements below.
* @throws TeiidComponentException
* @throws QueryMetadataException
+ * @throws QueryPlannerException
*/
private static PlanNode checkForSimpleProjection(PlanNode frame,
PlanNode root,
PlanNode parentProject,
- QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
+ QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException, QueryPlannerException {
// check that the parent only performs projection
PlanNode nodeToCheck = parentProject.getFirstChild();
while (nodeToCheck != frame) {
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -134,10 +134,12 @@
Criteria crit = Criteria.combineCriteria(conjuncts);
- accessNode.setProperty(NodeConstants.Info.PROCEDURE_CRITERIA, crit);
- accessNode.setProperty(NodeConstants.Info.PROCEDURE_INPUTS, inputReferences);
- accessNode.setProperty(NodeConstants.Info.PROCEDURE_DEFAULTS, defaults);
- accessNode.setProperty(NodeConstants.Info.IS_DEPENDENT_SET, Boolean.TRUE);
+ if (crit != null) {
+ accessNode.setProperty(NodeConstants.Info.PROCEDURE_CRITERIA, crit);
+ accessNode.setProperty(NodeConstants.Info.PROCEDURE_INPUTS, inputReferences);
+ accessNode.setProperty(NodeConstants.Info.PROCEDURE_DEFAULTS, defaults);
+ accessNode.setProperty(NodeConstants.Info.IS_DEPENDENT_SET, Boolean.TRUE);
+ }
}
return plan;
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -452,7 +452,7 @@
* @throws QueryMetadataException
* @since 4.1.2
*/
- private static boolean canPushSymbol(Expression symbol, boolean inSelectClause, Object modelID,
+ static boolean canPushSymbol(Expression symbol, boolean inSelectClause, Object modelID,
QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/optimizer/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/xml:3535-3555
/trunk/engine/src/main/java/org/teiid/query/optimizer/xml:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/parser
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/parser:3535-3555
/trunk/engine/src/main/java/org/teiid/query/parser:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -73,7 +73,7 @@
return result;
}
- String normalizeId(String s) {
+ public static String normalizeId(String s) {
if (s.indexOf('"') == -1) {
return s;
}
@@ -164,7 +164,7 @@
return validateName(id, true);
}
- String removeEscapeChars(String str, String tickChar) {
+ static String removeEscapeChars(String str, String tickChar) {
return StringUtil.replaceAll(str, tickChar + tickChar, tickChar);
}
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/processor:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/BatchCollector.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/BatchCollector.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/BatchCollector.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/BatchIterator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/BatchIterator.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/BatchIterator.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -68,8 +68,8 @@
* commands have been batched together.
* @since 4.2
*/
- public BatchedUpdatePlan(List childPlans, int commandsInBatch, List<VariableContext> contexts) {
- this.updatePlans = (ProcessorPlan[])childPlans.toArray(new ProcessorPlan[childPlans.size()]);
+ public BatchedUpdatePlan(List<? extends ProcessorPlan> childPlans, int commandsInBatch, List<VariableContext> contexts) {
+ this.updatePlans = childPlans.toArray(new ProcessorPlan[childPlans.size()]);
this.planOpened = new boolean[updatePlans.length];
this.updateCounts = new List[commandsInBatch];
this.contexts = contexts;
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/BatchedUpdatePlan.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/CollectionTupleSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/CollectionTupleSource.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/CollectionTupleSource.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/DdlPlan.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/DdlPlan.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/DdlPlan.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/ProcessorDataManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/ProcessorDataManager.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/ProcessorDataManager.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/ProcessorPlan.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/ProcessorPlan.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/ProcessorPlan.java:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -197,11 +197,13 @@
this.bufferMgr.releaseBuffers(reserved);
reserved = 0;
processorClosed = true;
- try {
- processPlan.close();
- } catch (TeiidComponentException e1){
- LogManager.logDetail(LogConstants.CTX_DQP, e1, "Error closing processor"); //$NON-NLS-1$
- }
+ if (initialized) {
+ try {
+ processPlan.close();
+ } catch (TeiidComponentException e1){
+ LogManager.logDetail(LogConstants.CTX_DQP, e1, "Error closing processor"); //$NON-NLS-1$
+ }
+ }
}
@Override
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java:3220-3275,3340-3349
/trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java:3220-3275,3340-3349,3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/proc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/proc:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/proc:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/relational
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/relational:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/relational:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -328,6 +328,15 @@
terminateBatches();
return pullBatch();
}
+
+ @Override
+ protected void addBatchRow(List row) {
+ if (this.getOutputElements().isEmpty()) {
+ //a dummy column was added to the query, just remove it now
+ row = Collections.emptyList();
+ }
+ super.addBatchRow(row);
+ }
private void registerNext() throws TeiidComponentException,
TeiidProcessingException {
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -299,8 +299,8 @@
List<SetState> source = sources.get(i);
- if (i == currentIndex++) {
-
+ if (i == currentIndex) {
+ currentIndex++;
int doneCount = 0;
while (doneCount < source.size()) {
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -255,7 +255,7 @@
return false; //index is too large
}
int schemaSize = this.joinNode.getBufferManager().getSchemaSize(other.getSource().getOutputElements());
- int toReserve = this.joinNode.getBufferManager().getMaxProcessingKB();
+ int toReserve = this.joinNode.getBufferManager().getMaxProcessingSize();
//check if the other side can be sorted in memory
if (other.getRowCount() <= this.joinNode.getBatchSize()
|| (possibleIndex.getRowCount() > this.joinNode.getBatchSize() && other.getRowCount()/this.joinNode.getBatchSize() < toReserve/schemaSize)) {
@@ -265,7 +265,7 @@
int indexSchemaSize = this.joinNode.getBufferManager().getSchemaSize(possibleIndex.getSource().getOutputElements());
//approximate that 1/2 of the index will be memory resident
toReserve = (int)(indexSchemaSize * possibleIndex.getTupleBuffer().getRowCount() / (possibleIndex.getTupleBuffer().getBatchSize() * .5));
- if (toReserve < this.joinNode.getBufferManager().getMaxProcessingKB()) {
+ if (toReserve < this.joinNode.getBufferManager().getMaxProcessingSize()) {
useIndex = true;
} else if (possibleIndex.getTupleBuffer().getRowCount() / this.joinNode.getBatchSize() < preferMemCutoff) {
useIndex = true;
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -167,7 +167,7 @@
}
// Incoming elements and lookup map for evaluating expressions
- List<SingleElementSymbol> sourceElements = this.getChildren()[0].getElements();
+ List<? extends SingleElementSymbol> sourceElements = this.getChildren()[0].getElements();
this.elementMap = createLookupMap(sourceElements);
// List should contain all grouping columns / expressions as we need those for sorting
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/NestedTableJoinStrategy.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -164,7 +164,7 @@
}
private void updateContext(List<?> tuple,
- List<SingleElementSymbol> elements) {
+ List<? extends SingleElementSymbol> elements) {
for (int i = 0; i < elements.size(); i++) {
SingleElementSymbol element = elements.get(i);
if (element instanceof ElementSymbol) {
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -46,6 +46,7 @@
import org.teiid.query.processor.BatchCollector.BatchProducer;
import org.teiid.query.sql.symbol.AliasSymbol;
import org.teiid.query.sql.symbol.Expression;
+import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.util.CommandContext;
@@ -53,7 +54,7 @@
static class NodeData {
int nodeID;
- List elements;
+ List<? extends SingleElementSymbol> elements;
Number estimateNodeCardinality;
Number setSizeEstimate;
Number depAccessEstimate;
@@ -165,16 +166,16 @@
}
}
- public void setElements(List elements) {
+ public void setElements(List<? extends SingleElementSymbol> elements) {
this.data.elements = elements;
}
@Override
- public List getOutputElements() {
+ public List<? extends SingleElementSymbol> getOutputElements() {
return getElements();
}
- public List getElements() {
+ public List<? extends SingleElementSymbol> getElements() {
return this.data.elements;
}
@@ -373,13 +374,21 @@
return result;
}
-
+
public static <T> List<T> projectTuple(int[] indexes, List<T> tupleValues) {
+ return projectTuple(indexes, tupleValues, false);
+ }
+ public static <T> List<T> projectTuple(int[] indexes, List<T> tupleValues, boolean omitMissing) {
+
List<T> projectedTuple = new ArrayList<T>(indexes.length);
for (int index : indexes) {
- projectedTuple.add(tupleValues.get(index));
+ if (omitMissing && index == -1) {
+ projectedTuple.add(null);
+ } else {
+ projectedTuple.add(tupleValues.get(index));
+ }
}
return projectedTuple;
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -233,11 +233,11 @@
//attempt to reserve more working memory if there are additional rows available before blocking
if (workingTuples.size() >= maxRows) {
int reserved = bufferManager.reserveBuffers(schemaSize,
- (totalReservedBuffers + schemaSize <= bufferManager.getMaxProcessingKB())?BufferReserveMode.FORCE:BufferReserveMode.NO_WAIT);
+ (totalReservedBuffers + schemaSize <= bufferManager.getMaxProcessingSize())?BufferReserveMode.FORCE:BufferReserveMode.NO_WAIT);
+ totalReservedBuffers += reserved;
if (reserved != schemaSize) {
break;
}
- totalReservedBuffers += reserved;
maxRows += this.batchSize;
}
try {
@@ -298,10 +298,10 @@
TupleBuffer merged = createTupleBuffer();
int desiredSpace = activeTupleBuffers.size() * schemaSize;
- int reserved = Math.min(desiredSpace, this.bufferManager.getMaxProcessingKB());
+ int reserved = Math.min(desiredSpace, Math.max(2*schemaSize, this.bufferManager.getMaxProcessingSize()));
bufferManager.reserveBuffers(reserved, BufferReserveMode.FORCE);
if (desiredSpace > reserved) {
- reserved += bufferManager.reserveBuffers(desiredSpace - reserved, BufferReserveMode.WAIT);
+ reserved += bufferManager.reserveAdditionalBuffers(desiredSpace - reserved);
}
int maxSortIndex = Math.max(2, reserved / schemaSize); //always allow progress
//release any partial excess
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/processor/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/processor/xml:3535-3555
/trunk/engine/src/main/java/org/teiid/query/processor/xml:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/report
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/report:3535-3555
/trunk/engine/src/main/java/org/teiid/query/report:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/resolver:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver/CommandResolver.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver/CommandResolver.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/resolver/CommandResolver.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver/VariableResolver.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver/VariableResolver.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/resolver/VariableResolver.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver/command
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver/command:3535-3555
/trunk/engine/src/main/java/org/teiid/query/resolver/command:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/resolver/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/resolver/util:3535-3555
/trunk/engine/src/main/java/org/teiid/query/resolver/util:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/rewriter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/rewriter:3535-3555
/trunk/engine/src/main/java/org/teiid/query/rewriter:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/sql:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/LanguageObject.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/LanguageObject.java:3149-3217
/trunk/engine/src/main/java/org/teiid/query/sql/LanguageObject.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/LanguageObject.java:3149-3217,3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/LanguageObject.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/ProcedureReservedWords.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/ProcedureReservedWords.java:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/ProcedureReservedWords.java:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/lang
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/lang:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/lang:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/navigator
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/navigator:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/navigator:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/proc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/proc:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/proc:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/symbol
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/symbol:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/symbol:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -75,7 +75,13 @@
*/
public Constant(Object value) {
this.value = DataTypeManager.convertToRuntimeType(value);
- this.type = DataTypeManager.determineDataTypeClass(this.value);
+ if (this.value == null) {
+ this.type = DataTypeManager.DefaultDataClasses.NULL;
+ } else if (DataTypeManager.getAllDataTypeClasses().contains(this.value.getClass())) {
+ this.type = this.value.getClass();
+ } else {
+ this.type = DataTypeManager.DefaultDataClasses.OBJECT;
+ }
}
/**
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/util:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/util:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/sql/visitor
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/sql/visitor:3535-3555
/trunk/engine/src/main/java/org/teiid/query/sql/visitor:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/tempdata
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/tempdata:3535-3555
/trunk/engine/src/main/java/org/teiid/query/tempdata:3507-3597
Modified: branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -114,7 +114,7 @@
}
for (int i = 0; i < indexes.length; i++) {
if (indexes[i] == -1) {
- AtomicInteger sequence = sequences.get(i);
+ AtomicInteger sequence = sequences.get(i + (addRowId?1:0));
if (sequence != null) {
newTuple.add(sequence.getAndIncrement());
} else {
@@ -230,7 +230,6 @@
int process() throws ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException {
int reserved = reserveBuffers();
- boolean held = lock.writeLock().isHeldByCurrentThread();
lock.writeLock().lock();
boolean success = false;
try {
@@ -265,9 +264,7 @@
}
} finally {
bm.releaseBuffers(reserved);
- if (!held) {
- lock.writeLock().unlock();
- }
+ lock.writeLock().unlock();
close();
}
}
@@ -563,6 +560,7 @@
public void remove() {
lock.writeLock().lock();
try {
+ tid.getTableData().removed();
tree.remove();
if (this.indexTables != null) {
for (TempTable indexTable : this.indexTables.values()) {
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/util:3535-3555
/trunk/engine/src/main/java/org/teiid/query/util:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/validator
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/validator:3535-3555
/trunk/engine/src/main/java/org/teiid/query/validator:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/xquery
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/xquery:3535-3555*
/trunk/engine/src/main/java/org/teiid/query/xquery:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/query/xquery/saxon:3535-3555
/trunk/engine/src/main/java/org/teiid/query/xquery/saxon:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/vdb
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/vdb:3535-3555*
/trunk/engine/src/main/java/org/teiid/vdb:3507-3597
Property changes on: branches/as7/engine/src/main/java/org/teiid/vdb/runtime
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/main/java/org/teiid/vdb/runtime:3535-3555
/trunk/engine/src/main/java/org/teiid/vdb/runtime:3507-3597
Modified: branches/as7/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- branches/as7/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3588,6 +3588,7 @@
Expression expression = null;
ArrayList args = new ArrayList(2);
+ ArrayList otherArgs = null;
Token funcToken = null;
}
{
@@ -3620,14 +3621,14 @@
<RPAREN>
)
|
- LOOKAHEAD(4, {getToken(1).image.equalsIgnoreCase("SUBSTRING")}) (
+ LOOKAHEAD(2, {getToken(1).image.equalsIgnoreCase("SUBSTRING")}) (
funcName = nonReserved("SUBSTRING")
<LPAREN>
expression = expression(info)
{
args.add(expression);
}
- <FROM> expression = expression(info)
+ ((<FROM> expression = expression(info)
{
args.add(expression);
}
@@ -3635,7 +3636,7 @@
{
args.add(expression);
}
- ]
+ ])|(<COMMA> otherArgs = expressionList(info)) {args.addAll(otherArgs);})
<RPAREN>
)
|
Modified: branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties 2011-11-02 15:15:47 UTC (rev 3601)
@@ -941,5 +941,8 @@
DdlPlan.event_already_exists={0} already has an INSTEAD OF trigger defined for {1}.
error_refresh=error occurred during refreshing the materialized view entries for view {0}
+
support_required=Without required support property {0}, pushdown will not be enabled for {1} on translator {2}.
-full_state_not_supported=Full state transfer is not supported in the resultset cache distribution
\ No newline at end of file
+full_state_not_supported=Full state transfer is not supported in the resultset cache distribution
+RuleAssignOutputElements.couldnt_push_expression=Expression(s) {0} cannot be pushed to source.
+RuleAssignOutputElements.cannot_introduce_expressions=Cannot introduce new expressions {1} in duplicate removal.
\ No newline at end of file
Property changes on: branches/as7/engine/src/test/java/org/teiid/cache
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/cache:3535-3555*
/trunk/engine/src/test/java/org/teiid/cache:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/cache/TestDefaultCache.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/cache/TestDefaultCache.java:3535-3555
/trunk/engine/src/test/java/org/teiid/cache/TestDefaultCache.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/common
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/common:3535-3555*
/trunk/engine/src/test/java/org/teiid/common:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/common/buffer
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/common/buffer:3535-3555
/trunk/engine/src/test/java/org/teiid/common/buffer:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/common/buffer/BufferManagerFactory.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/BufferManagerFactory.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/BufferManagerFactory.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,8 +22,8 @@
package org.teiid.common.buffer;
+import org.teiid.common.buffer.impl.BufferFrontedFileStoreCache;
import org.teiid.common.buffer.impl.BufferManagerImpl;
-import org.teiid.common.buffer.impl.FileStoreCache;
import org.teiid.common.buffer.impl.MemoryStorageManager;
import org.teiid.common.buffer.impl.SplittableStorageManager;
import org.teiid.core.TeiidComponentException;
@@ -85,8 +85,11 @@
MemoryStorageManager storageManager = new MemoryStorageManager();
SplittableStorageManager ssm = new SplittableStorageManager(storageManager);
ssm.setMaxFileSizeDirect(MemoryStorageManager.MAX_FILE_SIZE);
- FileStoreCache fsc = new FileStoreCache();
- fsc.setMaxBufferSpace(Runtime.getRuntime().maxMemory()/4);
+ BufferFrontedFileStoreCache fsc = new BufferFrontedFileStoreCache();
+ //use conservative allocations
+ fsc.setDirect(false); //allow the space to be GCed easily
+ fsc.setMaxStorageObjectSize(1<<20);
+ fsc.setMemoryBufferSpace(1<<21);
fsc.setStorageManager(ssm);
fsc.initialize();
bufferManager.setCache(fsc);
Modified: branches/as7/engine/src/test/java/org/teiid/common/buffer/TestSTree.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/TestSTree.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/TestSTree.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,6 +29,7 @@
import org.junit.Test;
import org.teiid.common.buffer.STree.InsertMode;
+import org.teiid.common.buffer.impl.BufferFrontedFileStoreCache;
import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.sql.symbol.ElementSymbol;
@@ -101,14 +102,14 @@
}
- /**
- * Forces the logic through several compaction cycles by using large strings
- * @throws TeiidComponentException
- */
- @Test public void testCompaction() throws TeiidComponentException {
+ @Test public void testStorageWrites() throws TeiidComponentException {
BufferManagerImpl bm = BufferManagerFactory.createBufferManager();
bm.setProcessorBatchSize(32);
bm.setMaxReserveKB(0);//force all to disk
+ BufferFrontedFileStoreCache fsc =(BufferFrontedFileStoreCache)bm.getCache();
+ fsc.setMaxStorageObjectSize(1 << 19);
+ fsc.setMemoryBufferSpace(1 << 19);
+ fsc.initialize();
bm.initialize();
ElementSymbol e1 = new ElementSymbol("x");
Deleted: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockBitSetTree.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockBitSetTree.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockBitSetTree.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
- package org.teiid.common.buffer.impl;
-
-import static org.junit.Assert.*;
-
-import java.util.BitSet;
-import java.util.Random;
-
-import org.junit.Test;
-
-public class TestBlockBitSetTree {
-
- @Test public void testBitsSet() {
- BlockBitSetTree bst = new BlockBitSetTree((1 << 20) -1, new TestBlockClosedLongIntHashTable.DummyBlockManager());
- bst.set(1, true);
- bst.set(100, true);
- bst.set(10000, true);
- bst.set(1000000, true);
- assertEquals(4, bst.getBitsSet());
- bst.set(1, false);
- assertEquals(3, bst.getBitsSet());
- assertFalse(bst.get(1));
- }
-
- @Test public void testNextClearSet() {
- BlockBitSetTree bst = new BlockBitSetTree((1 << 20) -1, new TestBlockClosedLongIntHashTable.DummyBlockManager());
- BitSet bst1 = new BitSet();
- Random r = new Random(1);
- for (int i = 0; i < 1000; i++) {
- int rand = r.nextInt() & bst.getMaxIndex();
- bst.set(rand, true);
- bst1.set(rand, true);
- assertTrue(bst.get(rand));
- assertEquals(bst1.nextSetBit(rand), bst.nextSetBit(rand));
- assertEquals(String.valueOf(i), bst1.nextSetBit(rand), bst.nextSetBit(rand));
- }
-
- for (int i = 0; i < 10000; i++) {
- int rand = r.nextInt() & bst.getMaxIndex();
- assertEquals(bst1.nextClearBit(rand), bst.nextClearBit(rand));
- assertEquals(bst1.nextSetBit(rand), bst.nextSetBit(rand));
- }
- }
-
-}
Deleted: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockClosedLongIntHashTable.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockClosedLongIntHashTable.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBlockClosedLongIntHashTable.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.common.buffer.impl;
-
-import static org.junit.Assert.*;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Random;
-
-import org.junit.Test;
-import org.teiid.common.buffer.impl.FileStoreCache.BlockInfo;
-
-public class TestBlockClosedLongIntHashTable {
-
- public static final class DummyBlockManager implements BlockManager {
- List<BlockInfo> blocks = new ArrayList<BlockInfo>();
-
- @Override
- public int getInode() {
- return 0;
- }
-
- @Override
- public void updateBlock(BlockInfo block) {
-
- }
-
- @Override
- public void free() {
- blocks.clear();
- }
-
- @Override
- public BlockInfo getBlock(int index) {
- BlockInfo block = blocks.get(index);
- block.buf.rewind();
- return block;
- }
-
- @Override
- public void freeBlock(int index) {
- blocks.remove(index);
- }
-
- @Override
- public BlockInfo allocateBlock(int index) {
- assertEquals(index, blocks.size());
- ByteBuffer result = ByteBuffer.wrap(new byte[FileStoreCache.BLOCK_SIZE]);
- blocks.add(new BlockInfo(false, result, index, -1));
- return blocks.get(blocks.size() - 1);
- }
- }
-
- @Test public void testAgainstHashMap() {
- BlockClosedLongIntHashTable table = new BlockClosedLongIntHashTable(new DummyBlockManager());
- HashMap<Long, Integer> table1 = new HashMap<Long, Integer>(16);
- for (long i = 1; i < 200000; i++) {
- table.put(i, (int)i);
- table1.put(i, (int)i);
- }
- Random r = new Random(0);
- for (int i = 1; i < 2000000; i++) {
- long toRemove = r.nextInt(i);
- boolean removed = table.remove(toRemove) != BlockClosedLongIntHashTable.EMPTY;
- assertEquals(table1.remove(toRemove) != null, removed);
- }
- }
-
-}
Copied: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBufferFrontedFileStoreCache.java (from rev 3597, trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestBufferFrontedFileStoreCache.java)
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBufferFrontedFileStoreCache.java (rev 0)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestBufferFrontedFileStoreCache.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,213 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.lang.ref.WeakReference;
+
+import org.junit.Test;
+import org.teiid.common.buffer.CacheEntry;
+import org.teiid.common.buffer.Serializer;
+import org.teiid.core.TeiidComponentException;
+
+public class TestBufferFrontedFileStoreCache {
+
+ private final class SimpleSerializer implements Serializer<Integer> {
+ @Override
+ public Integer deserialize(ObjectInput ois)
+ throws IOException, ClassNotFoundException {
+ Integer result = ois.readInt();
+ for (int i = 0; i < result; i++) {
+ assertEquals(i, ois.readInt());
+ }
+ return result;
+ }
+
+ @Override
+ public Long getId() {
+ return 1l;
+ }
+
+ @Override
+ public void serialize(Integer obj, ObjectOutput oos)
+ throws IOException {
+ oos.writeInt(obj);
+ for (int i = 0; i < obj; i++) {
+ oos.writeInt(i);
+ }
+ }
+
+ @Override
+ public boolean useSoftCache() {
+ return false;
+ }
+ }
+
+ @Test public void testAddGetMultiBlock() throws Exception {
+ BufferFrontedFileStoreCache cache = createLayeredCache(1 << 26, 1 << 26);
+
+ CacheEntry ce = new CacheEntry(2l);
+ Serializer<Integer> s = new SimpleSerializer();
+ cache.createCacheGroup(s.getId());
+ Integer cacheObject = Integer.valueOf(2);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+ ce = get(cache, 2l, s);
+ assertEquals(cacheObject, ce.getObject());
+
+ //test something that exceeds the direct inode data blocks
+ ce = new CacheEntry(3l);
+ cacheObject = Integer.valueOf(80000);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+
+ ce = get(cache, 3l, s);
+ assertEquals(cacheObject, ce.getObject());
+
+ //repeat the test to ensure proper cleanup
+ ce = new CacheEntry(4l);
+ cacheObject = Integer.valueOf(60000);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+
+ ce = get(cache, 4l, s);
+ assertEquals(cacheObject, ce.getObject());
+
+ cache.removeCacheGroup(1l);
+
+ assertEquals(0, cache.getDataBlocksInUse());
+ assertEquals(0, cache.getInodesInUse());
+
+ //test something that exceeds the indirect data blocks
+ ce = new CacheEntry(3l);
+ cache.createCacheGroup(s.getId());
+ cacheObject = Integer.valueOf(5000000);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+
+ ce = get(cache, 3l, s);
+ assertEquals(cacheObject, ce.getObject());
+
+ cache.removeCacheGroup(1l);
+
+ assertEquals(0, cache.getDataBlocksInUse());
+ assertEquals(0, cache.getInodesInUse());
+
+ //test something that exceeds the allowable object size
+ ce = new CacheEntry(3l);
+ cache.createCacheGroup(s.getId());
+ cacheObject = Integer.valueOf(500000000);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+
+ ce = get(cache, 3l, s);
+ assertNull(ce);
+
+ cache.removeCacheGroup(1l);
+
+ assertEquals(0, cache.getDataBlocksInUse());
+ assertEquals(0, cache.getInodesInUse());
+ }
+
+ private CacheEntry get(BufferFrontedFileStoreCache cache, Long oid,
+ Serializer<Integer> s) throws TeiidComponentException {
+ PhysicalInfo o = cache.lockForLoad(oid, s);
+ CacheEntry ce = cache.get(o, oid, new WeakReference<Serializer<?>>(s));
+ cache.unlockForLoad(o);
+ return ce;
+ }
+
+ @Test public void testEviction() throws Exception {
+ BufferFrontedFileStoreCache cache = createLayeredCache(1<<15, 1<<15);
+
+ CacheEntry ce = new CacheEntry(2l);
+ Serializer<Integer> s = new SimpleSerializer();
+ WeakReference<? extends Serializer<?>> ref = new WeakReference<Serializer<?>>(s);
+ ce.setSerializer(ref);
+ cache.createCacheGroup(s.getId());
+ Integer cacheObject = Integer.valueOf(5000);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+
+ ce = new CacheEntry(3l);
+ ce.setSerializer(ref);
+ cacheObject = Integer.valueOf(5001);
+ ce.setObject(cacheObject);
+ cache.addToCacheGroup(s.getId(), ce.getId());
+ cache.add(ce, s);
+
+ assertEquals(3, cache.getDataBlocksInUse());
+ assertEquals(1, cache.getInodesInUse());
+
+ ce = get(cache, 2l, s);
+ assertEquals(Integer.valueOf(5000), ce.getObject());
+
+ ce = get(cache, 3l, s);
+ assertEquals(Integer.valueOf(5001), ce.getObject());
+ }
+
+ private BufferFrontedFileStoreCache createLayeredCache(int bufferSpace, int objectSize) throws TeiidComponentException {
+ BufferFrontedFileStoreCache fsc = new BufferFrontedFileStoreCache();
+ fsc.setMemoryBufferSpace(bufferSpace);
+ fsc.setMaxStorageObjectSize(objectSize);
+ fsc.setDirect(false);
+ SplittableStorageManager ssm = new SplittableStorageManager(new MemoryStorageManager());
+ ssm.setMaxFileSizeDirect(MemoryStorageManager.MAX_FILE_SIZE);
+ fsc.setStorageManager(ssm);
+ fsc.initialize();
+ return fsc;
+ }
+
+ @Test public void testSizeIndex() throws Exception {
+ PhysicalInfo info = new PhysicalInfo(1l, 1l, -1, 0);
+ info.setSize(1<<13);
+ assertEquals(0, info.sizeIndex);
+
+ info = new PhysicalInfo(1l, 1l, -1, 0);
+ info.setSize(1 + (1<<13));
+ assertEquals(1, info.sizeIndex);
+
+ info = new PhysicalInfo(1l, 1l, -1, 0);
+ info.setSize(2 + (1<<15));
+ assertEquals(3, info.sizeIndex);
+ }
+
+ @Test(expected=Exception.class) public void testSizeChanged() throws Exception {
+ PhysicalInfo info = new PhysicalInfo(1l, 1l, -1, 0);
+ info.setSize(1<<13);
+ assertEquals(0, info.sizeIndex);
+
+ info.setSize(1 + (1<<13));
+ }
+
+}
Copied: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestConcurrentBitSet.java (from rev 3597, trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestConcurrentBitSet.java)
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestConcurrentBitSet.java (rev 0)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestConcurrentBitSet.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+ package org.teiid.common.buffer.impl;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class TestConcurrentBitSet {
+
+ @Test public void testBitsSet() {
+ ConcurrentBitSet bst = new ConcurrentBitSet(50001, 4);
+ assertEquals(0, bst.getAndSetNextClearBit());
+ assertEquals(12501, bst.getAndSetNextClearBit());
+ assertEquals(25002, bst.getAndSetNextClearBit());
+ assertEquals(37503, bst.getAndSetNextClearBit());
+ assertEquals(1, bst.getAndSetNextClearBit());
+ assertEquals(5, bst.getBitsSet());
+ bst.clear(1);
+ assertEquals(4, bst.getBitsSet());
+ bst.clear(12501);
+ try {
+ bst.clear(30000);
+ fail();
+ } catch (AssertionError e) {
+
+ }
+ assertEquals(3, bst.getBitsSet());
+
+ for (int i = 0; i < bst.getTotalBits()-3;i++) {
+ assertTrue(bst.getAndSetNextClearBit() != -1);
+ }
+
+ bst.clear(5);
+ bst.clear(12505);
+ bst.clear(25505);
+ bst.clear(37505);
+
+ for (int i = 0; i < 4; i++) {
+ int bit = bst.getAndSetNextClearBit();
+ assertTrue(bit < bst.getTotalBits() && bit > 0);
+ }
+ }
+
+ @Test public void testSegmentUse() {
+ ConcurrentBitSet bst = new ConcurrentBitSet(50001, 4);
+ assertEquals(0, bst.getAndSetNextClearBit(0));
+ assertEquals(1, bst.getAndSetNextClearBit(0));
+ assertEquals(2, bst.getAndSetNextClearBit(4));
+ }
+
+ @Test public void testCompactBitSet() {
+ ConcurrentBitSet bst = new ConcurrentBitSet(100000, 1);
+ bst.setCompact(true);
+ for (int i = 0; i < 100000; i++) {
+ assertEquals(i, bst.getAndSetNextClearBit());
+ }
+ bst.clear(50);
+ bst.clear(500);
+ bst.clear(5000);
+ assertEquals(50, bst.getAndSetNextClearBit());
+ }
+
+ @Test public void testCompactHighest() {
+ ConcurrentBitSet bst = new ConcurrentBitSet(1 << 19, 1);
+ bst.setCompact(true);
+ for (int i = 0; i < bst.getTotalBits(); i++) {
+ bst.getAndSetNextClearBit();
+ }
+ assertEquals(bst.getTotalBits()-1, bst.getHighestBitSet(0));
+ assertEquals(bst.getTotalBits()-1, bst.getHighestBitSet(1));
+
+ for (int i = bst.getTotalBits()-20; i < bst.getTotalBits(); i++) {
+ bst.clear(i);
+ }
+
+ assertEquals(bst.getTotalBits()-21, bst.compactHighestBitSet(0));
+
+ for (int i = bst.getTotalBits()-20; i < bst.getTotalBits(); i++) {
+ bst.getAndSetNextClearBit();
+ }
+
+ assertEquals(-1, bst.getAndSetNextClearBit());
+
+ for (int i = 20; i < bst.getTotalBits(); i++) {
+ bst.clear(i);
+ }
+
+ assertEquals(bst.getTotalBits()-1, bst.getHighestBitSet(0));
+ assertEquals(19, bst.compactHighestBitSet(0));
+
+ }
+
+}
Modified: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStorageManager.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStorageManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStorageManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -49,7 +49,14 @@
sm.initialize();
return sm;
}
-
+
+ @Test public void testInitialRead() throws Exception {
+ FileStorageManager sm = getStorageManager(null, null);
+ String tsID = "0"; //$NON-NLS-1$
+ FileStore store = sm.createFileStore(tsID);
+ assertEquals(-1, store.read(0, new byte[1], 0, 1));
+ }
+
@Test public void testWrite() throws Exception {
FileStorageManager sm = getStorageManager(null, null);
String tsID = "0"; //$NON-NLS-1$
@@ -59,6 +66,25 @@
store.remove();
assertEquals(0, sm.getUsedBufferSpace());
}
+
+ @Test public void testPositionalWrite() throws Exception {
+ FileStorageManager sm = getStorageManager(null, null);
+ String tsID = "0"; //$NON-NLS-1$
+ FileStore store = sm.createFileStore(tsID);
+ byte[] expectedBytes = writeBytes(store, 2048);
+ assertEquals(4096, sm.getUsedBufferSpace());
+
+ writeBytes(store, 4096);
+ assertEquals(6144, sm.getUsedBufferSpace());
+
+ byte[] bytesRead = new byte[2048];
+ store.readFully(2048, bytesRead, 0, bytesRead.length);
+
+ assertArrayEquals(expectedBytes, bytesRead);
+
+ store.remove();
+ assertEquals(0, sm.getUsedBufferSpace());
+ }
@Test(expected=IOException.class) public void testMaxSpace() throws Exception {
FileStorageManager sm = getStorageManager(null, null);
@@ -81,15 +107,19 @@
static Random r = new Random();
- static void writeBytes(FileStore store)
+ static void writeBytes(FileStore store) throws IOException {
+ writeBytes(store, store.getLength());
+ }
+
+ static byte[] writeBytes(FileStore store, long start)
throws IOException {
byte[] bytes = new byte[2048];
r.nextBytes(bytes);
- long start = store.getLength();
- store.write(bytes, 0, bytes.length);
+ store.write(start, bytes, 0, bytes.length);
byte[] bytesRead = new byte[2048];
store.readFully(start, bytesRead, 0, bytesRead.length);
assertTrue(Arrays.equals(bytes, bytesRead));
+ return bytes;
}
@Test public void testWritingMultipleFiles() throws Exception {
Deleted: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStoreCache.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStoreCache.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestFileStoreCache.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.common.buffer.impl;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.junit.Test;
-import org.teiid.common.buffer.CacheEntry;
-import org.teiid.common.buffer.Serializer;
-import org.teiid.core.util.UnitTestUtil;
-
-public class TestFileStoreCache {
-
- private final class SimpleSerializer implements Serializer<Integer> {
- @Override
- public Integer deserialize(ObjectInputStream ois)
- throws IOException, ClassNotFoundException {
- Integer result = ois.readInt();
- for (int i = 0; i < result; i++) {
- assertEquals(i, ois.readInt());
- }
- return result;
- }
-
- @Override
- public Long getId() {
- return 1l;
- }
-
- @Override
- public void serialize(Integer obj, ObjectOutputStream oos)
- throws IOException {
- oos.writeInt(obj);
- for (int i = 0; i < obj; i++) {
- oos.writeInt(i);
- }
- }
-
- @Override
- public boolean useSoftCache() {
- return false;
- }
- }
-
- @Test public void testAddGetMultiBlock() throws Exception {
- FileStoreCache fsc = new FileStoreCache();
- fsc.setMaxBufferSpace(1 << 28);
- SplittableStorageManager ssm = new SplittableStorageManager(new MemoryStorageManager());
- ssm.setMaxFileSizeDirect(MemoryStorageManager.MAX_FILE_SIZE);
- fsc.setStorageManager(ssm);
- fsc.initialize();
-
- //UnitTestUtil.enableTraceLogging("org.teiid"); //$NON-NLS-1$
-
- CacheEntry ce = new CacheEntry(2l);
- Serializer<Integer> s = new SimpleSerializer();
- fsc.createCacheGroup(s.getId());
- Integer cacheObject = Integer.valueOf(2);
- ce.setObject(cacheObject);
- fsc.add(ce, s);
-
- ce = fsc.get(2l, s);
- assertEquals(cacheObject, ce.getObject());
-
- //test something that exceeds the direct inode data blocks
- ce = new CacheEntry(3l);
- cacheObject = Integer.valueOf(80000);
- ce.setObject(cacheObject);
- fsc.add(ce, s);
-
- ce = fsc.get(3l, s);
- assertEquals(cacheObject, ce.getObject());
-
- fsc.removeCacheGroup(1l);
-
- assertEquals(0, fsc.getDataBlocksInUse());
- assertEquals(0, fsc.getInodesInUse());
-
- //test something that exceeds the indirect inode data blocks
- ce = new CacheEntry(3l);
- fsc.createCacheGroup(s.getId());
- cacheObject = Integer.valueOf(5000000);
- ce.setObject(cacheObject);
- fsc.add(ce, s);
-
- ce = fsc.get(3l, s);
- assertEquals(cacheObject, ce.getObject());
-
- fsc.removeCacheGroup(1l);
-
- assertEquals(0, fsc.getDataBlocksInUse());
- assertEquals(0, fsc.getInodesInUse());
- }
-
-}
Copied: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java (from rev 3597, trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java)
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java (rev 0)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.common.buffer.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.junit.Test;
+import org.teiid.common.buffer.BaseCacheEntry;
+
+public class TestLrfuEvictionQueue {
+
+ @Test public void testPrecision() {
+ LrfuEvictionQueue<?> q = new LrfuEvictionQueue<BaseCacheEntry>(new AtomicLong());
+ long value = 0;
+ for (long i = Integer.MAX_VALUE; i < 10l + Integer.MAX_VALUE; i++) {
+ long valueNext = q.computeNextOrderingValue(i, i-1, value);
+ assertTrue(valueNext > value);
+ value = valueNext;
+ }
+ }
+
+}
Modified: branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestSizeUtility.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestSizeUtility.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/impl/TestSizeUtility.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -34,6 +34,7 @@
import java.util.List;
import org.junit.Test;
+import org.teiid.core.types.DataTypeManager;
public class TestSizeUtility {
@@ -42,7 +43,7 @@
}
public void helpTestGetSize(Object obj, long expectedSize) {
- long actualSize = new SizeUtility(null).getSize(obj, true, false);
+ long actualSize = new SizeUtility(null).getSize(obj, DataTypeManager.determineDataTypeClass(obj), true, false);
assertEquals("Got unexpected size: ", expectedSize, actualSize); //$NON-NLS-1$
}
@@ -161,9 +162,14 @@
Arrays.asList(new Object[] { "c", new Integer(1), Boolean.FALSE, new Double(0.0), "c", new Integer(1) }) //$NON-NLS-1$ //$NON-NLS-2$
};
- String[] types = {"string", "integer", "boolean", "double", "string", "integer"}; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$ //$NON-NLS-5$//$NON-NLS-6$
+ Class<?>[] types = {DataTypeManager.DefaultDataClasses.STRING,
+ DataTypeManager.DefaultDataClasses.INTEGER,
+ DataTypeManager.DefaultDataClasses.BOOLEAN,
+ DataTypeManager.DefaultDataClasses.DOUBLE,
+ DataTypeManager.DefaultDataClasses.STRING,
+ DataTypeManager.DefaultDataClasses.INTEGER};
- long actualSize = new SizeUtility(types).getBatchSize(Arrays.asList(expected));
+ long actualSize = new SizeUtility(types).getBatchSize(false, Arrays.asList(expected));
assertEquals("Got unexpected size: ", 2667, actualSize); //$NON-NLS-1$
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/common/queue
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/common/queue:3535-3555
/trunk/engine/src/test/java/org/teiid/common/queue:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -81,7 +81,7 @@
pool.shutdown();
WorkerPoolStatisticsMetadata stats = pool.getStats();
- assertEquals("Expected 1 thread for serial execution", 1, stats.getHighestActiveThreads()); //$NON-NLS-1$
+ assertTrue("Expected approximately 1 thread for serial execution", stats.getHighestActiveThreads() <= 2); //$NON-NLS-1$
pool.awaitTermination(1000, TimeUnit.MILLISECONDS);
}
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -116,7 +116,8 @@
svc.addPermission(addResource(DataPolicy.PermissionType.UPDATE, "pm1.g1.e3")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.UPDATE, "pm1.g1.e4")); //$NON-NLS-1$
-
+ svc.addPermission(addResource(PermissionType.EXECUTE, "pm1.sp1"));
+
// pm1.g2
svc.addPermission(addResource(DataPolicy.PermissionType.CREATE, "pm1.g2")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.CREATE, false, "pm1.g2.e1")); //$NON-NLS-1$
@@ -206,6 +207,12 @@
}
}
+ @Test public void testProcRelational() throws Exception {
+ helpTest("select * from sp1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("select * from pm1.sp1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("select * from sp1", RealMetadataFactory.example1Cached(), new String[] {"sp1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
+ }
+
@Test public void testTemp() throws Exception {
//allowed by default
helpTest("create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -167,14 +167,14 @@
String sql = "SELECT hasRole('foo')"; //$NON-NLS-1$
String userName = "logon"; //$NON-NLS-1$
ResultsMessage rm = helpExecute(sql, userName);
- assertTrue((Boolean)rm.getResults()[0].get(0));
+ assertTrue((Boolean)rm.getResultsList().get(0).get(0));
}
@Test public void testNotHasRole() throws Exception {
String sql = "SELECT hasRole('bar')"; //$NON-NLS-1$
String userName = "logon"; //$NON-NLS-1$
ResultsMessage rm = helpExecute(sql, userName);
- assertFalse((Boolean)rm.getResults()[0].get(0));
+ assertFalse((Boolean)rm.getResultsList().get(0).get(0));
}
@Test public void testUser1() throws Exception {
@@ -235,14 +235,14 @@
String sql = "SELECT env('sessionid') as SessionID"; //$NON-NLS-1$
String userName = "1"; //$NON-NLS-1$
ResultsMessage rm = helpExecute(sql, userName);
- assertEquals("1", rm.getResults()[0].get(0)); //$NON-NLS-1$
+ assertEquals("1", rm.getResultsList().get(0).get(0)); //$NON-NLS-1$
}
@Test public void testEnvSessionIdMixedCase() throws Exception {
String sql = "SELECT env('sEsSIonId') as SessionID"; //$NON-NLS-1$
String userName = "1"; //$NON-NLS-1$
ResultsMessage rm = helpExecute(sql, userName);
- assertEquals("1", rm.getResults()[0].get(0)); //$NON-NLS-1$
+ assertEquals("1", rm.getResultsList().get(0).get(0)); //$NON-NLS-1$
}
@Test public void testTxnAutoWrap() throws Exception {
@@ -265,13 +265,13 @@
agds.setCaps(caps);
ResultsMessage rm = helpExecute(sql, "a"); //$NON-NLS-1$
//we test for > 0 here because the autogen service doesn't obey the limit
- assertTrue(rm.getResults().length > 0);
+ assertTrue(rm.getResultsList().size() > 0);
}
@Test public void testLimitCompensation1() throws Exception {
String sql = "SELECT * FROM VQT.SmallA_2589g LIMIT 1, 1"; //$NON-NLS-1$
ResultsMessage rm = helpExecute(sql, "a"); //$NON-NLS-1$
- assertEquals(1, rm.getResults().length);
+ assertEquals(1, rm.getResultsList().size());
}
@@ -317,13 +317,13 @@
assertNull(rm.getException());
int rowsPerBatch = 8;
- assertEquals(rowsPerBatch, rm.getResults().length);
+ assertEquals(rowsPerBatch, rm.getResultsList().size());
RequestWorkItem item = core.getRequestWorkItem(DQPWorkContext.getWorkContext().getRequestID(reqMsg.getExecutionId()));
message = core.processCursorRequest(reqMsg.getExecutionId(), 9, rowsPerBatch);
rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(rowsPerBatch, rm.getResults().length);
+ assertEquals(rowsPerBatch, rm.getResultsList().size());
//ensure that we are idle
for (int i = 0; i < 10 && item.getThreadState() != ThreadState.IDLE; i++) {
Thread.sleep(100);
@@ -378,17 +378,17 @@
Future<ResultsMessage> message = core.executeRequest(reqMsg.getExecutionId(), reqMsg);
ResultsMessage rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(5, rm.getResults().length);
+ assertEquals(5, rm.getResultsList().size());
message = core.processCursorRequest(reqMsg.getExecutionId(), 6, 5);
rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(5, rm.getResults().length);
+ assertEquals(5, rm.getResultsList().size());
message = core.processCursorRequest(reqMsg.getExecutionId(), 11, 5);
rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(5, rm.getResults().length);
+ assertEquals(5, rm.getResultsList().size());
}
@Test public void testSourceConcurrency() throws Exception {
@@ -429,38 +429,51 @@
Future<ResultsMessage> message = core.executeRequest(reqMsg.getExecutionId(), reqMsg);
ResultsMessage rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(1, rm.getResults().length);
+ assertEquals(1, rm.getResultsList().size());
message = core.processCursorRequest(reqMsg.getExecutionId(), 3, 2);
rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(1, rm.getResults().length);
+ assertEquals(1, rm.getResultsList().size());
message = core.processCursorRequest(reqMsg.getExecutionId(), 3, 2);
rm = message.get(500000, TimeUnit.MILLISECONDS);
assertNull(rm.getException());
- assertEquals(0, rm.getResults().length);
+ assertEquals(0, rm.getResultsList().size());
}
-
+
@Test public void testPreparedPlanInvalidation() throws Exception {
- String sql = "insert into #temp select * FROM vqt.SmallB"; //$NON-NLS-1$
+ helpTestPlanInvalidation("select * from #temp a, #temp b limit 10");
+
+ assertEquals(2, this.core.getPrepPlanCache().getCacheHitCount());
+ }
+
+ @Test public void testPreparedPlanSimpleNoInvalidation() throws Exception {
+ helpTestPlanInvalidation("select * from #temp");
+
+ assertEquals(3, this.core.getPrepPlanCache().getCacheHitCount());
+ }
+
+ private void helpTestPlanInvalidation(String query) throws InterruptedException,
+ ExecutionException, TimeoutException {
+ String sql = "insert into #temp select * FROM vqt.SmallB"; //$NON-NLS-1$
String userName = "1"; //$NON-NLS-1$
int sessionid = 1; //$NON-NLS-1$
RequestMessage reqMsg = exampleRequestMessage(sql);
ResultsMessage rm = execute(userName, sessionid, reqMsg);
- assertEquals(1, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(1, rm.getResultsList().size()); //$NON-NLS-1$
- sql = "select * from #temp"; //$NON-NLS-1$
+ sql = query;
reqMsg = exampleRequestMessage(sql);
reqMsg.setStatementType(StatementType.PREPARED);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(10, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(10, rm.getResultsList().size()); //$NON-NLS-1$
- sql = "select * from #temp"; //$NON-NLS-1$
+ sql = query;
reqMsg = exampleRequestMessage(sql);
reqMsg.setStatementType(StatementType.PREPARED);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(10, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(10, rm.getResultsList().size()); //$NON-NLS-1$
assertEquals(1, this.core.getPrepPlanCache().getCacheHitCount());
@@ -470,30 +483,28 @@
sql = "delete from #temp where a12345 = '11'"; //$NON-NLS-1$
reqMsg = exampleRequestMessage(sql);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(1, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(1, rm.getResultsList().size()); //$NON-NLS-1$
- sql = "select * from #temp"; //$NON-NLS-1$
+ sql = query;
reqMsg = exampleRequestMessage(sql);
reqMsg.setStatementType(StatementType.PREPARED);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(10, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(10, rm.getResultsList().size()); //$NON-NLS-1$
assertEquals(2, this.core.getPrepPlanCache().getCacheHitCount());
- //perform a major update, we will purge the plan
+ //perform a major update, it might purge the plan
sql = "delete from #temp"; //$NON-NLS-1$
reqMsg = exampleRequestMessage(sql);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(1, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(1, rm.getResultsList().size()); //$NON-NLS-1$
- sql = "select * from #temp"; //$NON-NLS-1$
+ sql = query;
reqMsg = exampleRequestMessage(sql);
reqMsg.setStatementType(StatementType.PREPARED);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(0, rm.getResults().length); //$NON-NLS-1$
-
- assertEquals(2, this.core.getPrepPlanCache().getCacheHitCount());
- }
+ assertEquals(0, rm.getResultsList().size()); //$NON-NLS-1$
+ }
@Test public void testRsCacheInvalidation() throws Exception {
String sql = "select * FROM vqt.SmallB"; //$NON-NLS-1$
@@ -502,13 +513,13 @@
RequestMessage reqMsg = exampleRequestMessage(sql);
reqMsg.setUseResultSetCache(true);
ResultsMessage rm = execute(userName, sessionid, reqMsg);
- assertEquals(10, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(10, rm.getResultsList().size()); //$NON-NLS-1$
sql = "select * FROM vqt.SmallB"; //$NON-NLS-1$
reqMsg = exampleRequestMessage(sql);
reqMsg.setUseResultSetCache(true);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(10, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(10, rm.getResultsList().size()); //$NON-NLS-1$
assertEquals(1, this.core.getRsCache().getCacheHitCount());
@@ -517,13 +528,13 @@
sql = "delete from bqt1.smalla"; //$NON-NLS-1$
reqMsg = exampleRequestMessage(sql);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(1, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(1, rm.getResultsList().size()); //$NON-NLS-1$
sql = "select * FROM vqt.SmallB"; //$NON-NLS-1$
reqMsg = exampleRequestMessage(sql);
reqMsg.setUseResultSetCache(true);
rm = execute(userName, sessionid, reqMsg);
- assertEquals(10, rm.getResults().length); //$NON-NLS-1$
+ assertEquals(10, rm.getResultsList().size()); //$NON-NLS-1$
assertEquals(1, this.core.getRsCache().getCacheHitCount());
}
@@ -539,7 +550,7 @@
@Override
public void onCompletion(ResultsFuture<ResultsMessage> future) {
try {
- final BlobType bt = (BlobType)future.get().getResults()[0].get(0);
+ final BlobType bt = (BlobType)future.get().getResultsList().get(0).get(0);
t.bt = bt;
t.workContext = DQPWorkContext.getWorkContext();
synchronized (t) {
@@ -556,6 +567,26 @@
assertNotNull(t.chunkFuture.get().getBytes());
}
+ @Test public void testServerTimeout() throws Exception {
+ RequestMessage reqMsg = exampleRequestMessage("select to_bytes(stringkey, 'utf-8') FROM BQT1.SmallA");
+ reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
+ agds.setSleep(100);
+ this.config.setQueryTimeout(1);
+ ResultsMessage rm = execute("A", 1, reqMsg);
+ assertNotNull(rm.getException());
+ }
+
+ @Test public void testLongRunningQuery() throws Exception {
+ RequestMessage reqMsg = exampleRequestMessage("select * FROM BQT1.SmallA");
+ execute("A", 1, reqMsg);
+ this.config.setQueryThresholdInMilli(5000);
+ assertEquals(1, this.core.getRequests().size());
+ assertEquals(0, this.core.getLongRunningRequests().size());
+ this.config.setQueryThresholdInMilli(10);
+ Thread.sleep(20);
+ assertEquals(1, this.core.getLongRunningRequests().size());
+ }
+
public void helpTestVisibilityFails(String sql) throws Exception {
RequestMessage reqMsg = exampleRequestMessage(sql);
reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -88,8 +88,7 @@
Mockito.stub(repo.getConnectorManager(Mockito.anyString())).toReturn(connectorManager);
- dtm = new DataTierManagerImpl(rm,
- bs, true);
+ dtm = new DataTierManagerImpl(rm,bs.getBufferManager(), true);
command = helpGetCommand(sql, metadata);
RequestMessage original = new RequestMessage();
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestMetaDataProcessor.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestMetaDataProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestMetaDataProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -28,6 +28,7 @@
import java.util.Map;
import java.util.Set;
+import org.junit.Before;
import org.junit.Test;
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
@@ -36,6 +37,7 @@
import org.teiid.client.metadata.ResultsMetadataConstants;
import org.teiid.core.types.DataTypeManager;
import org.teiid.dqp.internal.datamgr.FakeTransactionService;
+import org.teiid.dqp.internal.process.DQPWorkContext.Version;
import org.teiid.dqp.message.RequestID;
import org.teiid.metadata.Column;
import org.teiid.metadata.MetadataStore;
@@ -54,6 +56,12 @@
*/
@SuppressWarnings({"nls", "unchecked"})
public class TestMetaDataProcessor {
+
+ private boolean asLegacyClient;
+
+ @Before public void setup() {
+ asLegacyClient = false;
+ }
public Map[] helpGetMetadata(String sql, QueryMetadataInterface metadata, VDBMetaData vdb) throws Exception {
// Prepare sql
@@ -66,6 +74,9 @@
requestMgr.setTransactionService(new FakeTransactionService());
DQPWorkContext workContext = RealMetadataFactory.buildWorkContext(metadata, vdb);
+ if (asLegacyClient) {
+ workContext.setClientVersion(Version.SEVEN_3);
+ }
// Initialize components
RequestID requestID = workContext.getRequestID(1);
@@ -81,7 +92,18 @@
Map[] metadata = helpGetMetadata("SELECT e1 FROM pm1.g1", RealMetadataFactory.example1Cached(), RealMetadataFactory.example1VDB()); //$NON-NLS-1$
assertNotNull(metadata);
assertEquals(1, metadata.length);
+ assertEquals("e1", metadata[0].get(ResultsMetadataConstants.ELEMENT_NAME)); //$NON-NLS-1$
+ assertEquals("e1", metadata[0].get(ResultsMetadataConstants.ELEMENT_LABEL)); //$NON-NLS-1$
}
+
+ @Test public void testLegacyClient() throws Exception {
+ asLegacyClient = true;
+ Map[] metadata = helpGetMetadata("SELECT e1 as e2 FROM pm1.g1", RealMetadataFactory.example1Cached(), RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ assertNotNull(metadata);
+ assertEquals(1, metadata.length);
+ assertEquals("e2", metadata[0].get(ResultsMetadataConstants.ELEMENT_NAME)); //$NON-NLS-1$
+ assertEquals("e2", metadata[0].get(ResultsMetadataConstants.ELEMENT_LABEL)); //$NON-NLS-1$
+ }
@Test public void testSimpleUpdate() throws Exception {
Map[] metadata = helpGetMetadata("INSERT INTO pm1.g1 (e1) VALUES ('x')", RealMetadataFactory.example1Cached(), RealMetadataFactory.example1VDB()); //$NON-NLS-1$
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatementBatchedUpdate.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatementBatchedUpdate.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatementBatchedUpdate.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -79,6 +79,37 @@
assertTrue(((Constant)update.getChangeList().getClauses().get(0).getValue()).isMultiValued());
}
+ @Test public void testBatchedUpdateNotPushdown() throws Exception {
+ // Create query
+ String preparedSql = "UPDATE pm1.g1 SET pm1.g1.e1=?, pm1.g1.e3=? WHERE pm1.g1.e2=?"; //$NON-NLS-1$
+
+ // Create a testable prepared plan cache
+ SessionAwareCache<PreparedPlan> prepPlanCache = new SessionAwareCache<PreparedPlan>();
+
+ // Construct data manager with data
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("UPDATE pm1.g1 SET e1 = 'a', e3 = FALSE WHERE pm1.g1.e2 = 0", new List[] {Arrays.asList(2)}); //$NON-NLS-1$
+ dataManager.addData("UPDATE pm1.g1 SET e1 = null, e3 = FALSE WHERE pm1.g1.e2 = 1", new List[] {Arrays.asList(2)}); //$NON-NLS-1$
+ // Source capabilities must support batched updates
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setCapabilitySupport(Capability.BULK_UPDATE, false);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+
+ // batch with two commands
+ ArrayList<ArrayList<Object>> values = new ArrayList<ArrayList<Object>>(2);
+ values.add(new ArrayList<Object>(Arrays.asList(new Object[] { "a", Boolean.FALSE, new Integer(0) }))); //$NON-NLS-1$
+ values.add(new ArrayList<Object>(Arrays.asList(new Object[] { null, Boolean.FALSE, new Integer(1) })));
+
+ List<?>[] expected = new List[] {
+ Arrays.asList(2),
+ Arrays.asList(2)
+ };
+
+ // Create the plan and process the query
+ TestPreparedStatement.helpTestProcessing(preparedSql, values, expected, dataManager, capFinder, RealMetadataFactory.example1Cached(), prepPlanCache, false, false, false,RealMetadataFactory.example1VDB());
+ }
+
/**
* Test prepared statements that use batched updates using the same prepared
* command with same number of commands in the batch.
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -97,7 +97,7 @@
}
public void testSerialize2() throws Exception {
- RequestID copy = UnitTestUtil.helpSerialize(new RequestID(100)); //$NON-NLS-1$
+ RequestID copy = UnitTestUtil.helpSerialize(new RequestID(100));
assertEquals(null, copy.getConnectionID());
assertEquals(100, copy.getExecutionID());
Property changes on: branches/as7/engine/src/test/java/org/teiid/query
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query:3535-3555*
/trunk/engine/src/test/java/org/teiid/query:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/analysis
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/analysis:3535-3555
/trunk/engine/src/test/java/org/teiid/query/analysis:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function:3535-3555*
/trunk/engine/src/test/java/org/teiid/query/function:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/TestFunction.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunction.java:3281-3325
/trunk/engine/src/test/java/org/teiid/query/function/TestFunction.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunction.java:3281-3325,3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/TestFunction.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionLibrary.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunctionLibrary.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/function/TestFunctionLibrary.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunctionLibrary.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/TestFunctionLibrary.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionMethods.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunctionMethods.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/TestFunctionMethods.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/TestFunctionTree.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunctionTree.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/function/TestFunctionTree.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestFunctionTree.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/TestFunctionTree.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/metadata
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/metadata:3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/metadata:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/function/source
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/function/source:3535-3555
/trunk/engine/src/test/java/org/teiid/query/function/source:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/mapping
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/mapping:3535-3555*
/trunk/engine/src/test/java/org/teiid/query/mapping:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/mapping/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/mapping/xml:3535-3555
/trunk/engine/src/test/java/org/teiid/query/mapping/xml:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/metadata
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/metadata:3535-3555
/trunk/engine/src/test/java/org/teiid/query/metadata:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer:3535-3555*
/trunk/engine/src/test/java/org/teiid/query/optimizer:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/FakeFunctionMetadataSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/FakeFunctionMetadataSource.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/FakeFunctionMetadataSource.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/InlineViewCase.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/InlineViewCase.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/InlineViewCase.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestAccessPatterns.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestAccessPatterns.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestAccessPatterns.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestAccessPatterns.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestAccessPatterns.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestAggregatePushdown.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestAggregatePushdown.java:3149-3217,3220-3275
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestAggregatePushdown.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestAggregatePushdown.java:3149-3217,3220-3275,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestAggregatePushdown.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestAnsiJoinPushdown.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestAnsiJoinPushdown.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestAnsiJoinPushdown.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestAnsiJoinPushdown.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestAnsiJoinPushdown.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestBatchedUpdatePlanner.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestComparableMetadataPushdown.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestComparableMetadataPushdown.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestComparableMetadataPushdown.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestDependentJoins.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestDependentJoins.java:3149-3217,3220-3275
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestDependentJoins.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestDependentJoins.java:3149-3217,3220-3275,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestDependentJoins.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestExpressionsInGroupBy.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestExpressionsInGroupBy.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestExpressionsInGroupBy.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestExpressionsInGroupBy.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestExpressionsInGroupBy.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestInlineView.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestInlineView.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestInlineView.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestInlineView.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestInlineView.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -39,6 +39,7 @@
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.optimizer.TestOptimizer.ComparisonMode;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
+import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
import org.teiid.query.optimizer.relational.rules.JoinUtil;
@@ -1026,5 +1027,25 @@
0 // UnionAll
});
}
+
+ @Test public void testCrossJoinAvoidance() throws Exception {
+
+ CapabilitiesFinder capFinder = TestOptimizer.getGenericFinder();
+
+ QueryMetadataInterface metadata = RealMetadataFactory.exampleBQT();
+ RealMetadataFactory.setCardinality("bqt1.smallb", 1800, metadata); //$NON-NLS-1$
+ RealMetadataFactory.setCardinality("bqt1.smalla", 0, metadata); //$NON-NLS-1$
+ RealMetadataFactory.setCardinality("bqt2.smallb", 15662, metadata); //$NON-NLS-1$
+
+ TestOptimizer.helpPlan(
+ "SELECT BQT1.SmallA.IntKey FROM BQT1.SmallB, BQT1.Smalla, bqt2.smallb where bqt2.smallb.intkey = bqt1.smallb.intkey and bqt2.smallb.intkey = bqt1.smalla.intkey", //$NON-NLS-1$
+ metadata,
+ null, capFinder,
+ new String[] {"SELECT g_0.intkey AS c_0 FROM BQT1.Smalla AS g_0 ORDER BY c_0",
+ "SELECT g_0.intkey AS c_0 FROM BQT1.SmallB AS g_0 ORDER BY c_0",
+ "SELECT g_0.intkey AS c_0 FROM bqt2.smallb AS g_0 ORDER BY c_0"}, //$NON-NLS-1$ //$NON-NLS-2$
+ ComparisonMode.EXACT_COMMAND_STRING );
+
+ }
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java:3149-3217,3535-3555,3558-3585
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinPushdownRestrictions.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinPushdownRestrictions.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinPushdownRestrictions.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinPushdownRestrictions.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinPushdownRestrictions.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestJoinWithFunction.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinWithFunction.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinWithFunction.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestLimit.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -6471,77 +6471,9 @@
/**
* Test the query optimizer's ability to properly plan and optimize a query
- * that uses ambiguous alias names in the top level query and its sub-query.
- * <p>
- * No source table is being used. For example, <code>SELECT A.e2 FROM
- * (SELECT e2 FROM (SELECT 1 AS e2) AS A) AS A</code>
- * <p>
- * The test is to ensure that A.e2 from the top level is not confused with
- * e2 in the second level.
- * <p>
- * Related Defects: JBEDSP-1137
- */
- @Test public void testAmbiguousAliasInSubQueryNoSource() {
- // Create query
- String sql = "SELECT A.e2 AS e2 FROM (" + //$NON-NLS-1$
- " SELECT e2 AS e2 FROM (" + //$NON-NLS-1$
- " SELECT 5 AS e2" + //$NON-NLS-1$
- " ) AS A" + //$NON-NLS-1$
- ") AS A"; //$NON-NLS-1$
-
- helpPlan(sql, RealMetadataFactory.example1Cached(), new String[] {});
- }
-
- /**
- * Test the query optimizer's ability to properly plan and optimize a query
* that uses ambiguous alias names in the top level query and its sub-query
* and uses columns belonging to the alias as a parameter to a function.
* <p>
- * No source table is being used. For example, <code>SELECT CONVERT(A.e2,
- * biginteger) AS e2 FROM (SELECT CONVERT(e2, long) AS e2 FROM (SELECT 1 AS
- * e2) AS A) AS A</code>
- * <p>
- * The test is to ensure that A.e2 from the top level is not confused with
- * e2 in the second level.
- * <p>
- * Related Defects: JBEDSP-1137
- */
- @Test public void testAmbiguousAliasFunctionInSubQueryNoSource() {
- // Create query
- String sql = "SELECT CONVERT(A.e2, biginteger) AS e2 FROM (" + //$NON-NLS-1$
- " SELECT CONVERT(e2, long) AS e2 FROM (" + //$NON-NLS-1$
- " SELECT 5 AS e2" + //$NON-NLS-1$
- " ) AS A" + //$NON-NLS-1$
- ") AS A"; //$NON-NLS-1$
-
- helpPlan(sql, RealMetadataFactory.example1Cached(), new String[] {});
- }
-
- /**
- * Test the query optimizer's ability to properly plan and optimize a query
- * that uses ambiguous alias names in the top level query and its sub-query.
- * <p>
- * For example, <code>SELECT A.e2 FROM (SELECT e12FROM pm1.g1 AS A) AS A</code>
- * <p>
- * The test is to ensure that A.e2 from the top level is not confused with
- * e2 in the second level.
- * <p>
- * Related Defects: JBEDSP-1137
- */
- @Test public void testAmbiguousAliasInSubQuerySource() {
- // Create query
- String sql = "SELECT A.e2 AS e2 FROM (" + //$NON-NLS-1$
- " SELECT e2 AS e2 FROM pm1.g1 AS A" + //$NON-NLS-1$
- ") AS A"; //$NON-NLS-1$
-
- helpPlan(sql, RealMetadataFactory.example1Cached(), new String[] {"SELECT e2 FROM pm1.g1 AS A"}); //$NON-NLS-1$
- }
-
- /**
- * Test the query optimizer's ability to properly plan and optimize a query
- * that uses ambiguous alias names in the top level query and its sub-query
- * and uses columns belonging to the alias as a parameter to a function.
- * <p>
* For example, <code>SELECT CONVERT(A.e2, biginteger) AS e2 FROM (SELECT
* CONVERT(e2, long) AS e2 FROM pm1.g1 AS A) AS A</code>
* <p>
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java:3149-3217,3220-3275
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java:3149-3217,3220-3275,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestOptionalJoins.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptionalJoins.java:3149-3217,3220-3275
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptionalJoins.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptionalJoins.java:3149-3217,3220-3275,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestOptionalJoins.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestPartitionedJoinPlanning.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestPartitionedJoinPlanning.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestPartitionedJoinPlanning.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestPartitionedJoinPlanning.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestPartitionedJoinPlanning.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestRuleRemoveSorts.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRemoveSorts.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleRemoveSorts.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRemoveSorts.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleRemoveSorts.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestSortOptimization.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestSortOptimization.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestSortOptimization.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestSortOptimization.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestSortOptimization.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestStoredProcedurePlanning.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestStoredProcedurePlanning.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestStoredProcedurePlanning.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestStoredProcedurePlanning.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestStoredProcedurePlanning.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestSubqueryPushdown.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestSubqueryPushdown.java:3149-3217,3281-3325
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestSubqueryPushdown.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestSubqueryPushdown.java:3149-3217,3281-3325,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestSubqueryPushdown.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/TestUnionPlanning.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestUnionPlanning.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestUnionPlanning.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestUnionPlanning.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/TestUnionPlanning.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/capabilities
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/capabilities:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/capabilities:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/proc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/proc:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/proc:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational:3535-3555*
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestAliasGenerator.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational/TestAliasGenerator.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestAliasGenerator.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational/TestAliasGenerator.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestAliasGenerator.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,14 +22,12 @@
package org.teiid.query.optimizer.relational;
-import org.teiid.query.optimizer.relational.OptimizerRule;
-import org.teiid.query.optimizer.relational.RuleStack;
+import junit.framework.TestCase;
+
import org.teiid.query.optimizer.relational.rules.RuleConstants;
import org.teiid.query.optimizer.relational.rules.RulePushSelectCriteria;
-import junit.framework.TestCase;
-
/**
*/
public class TestRuleStack extends TestCase {
@@ -76,12 +74,12 @@
public void testRemove() {
// Set up
RuleStack stack = new RuleStack();
- stack.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.push(RuleConstants.ACCESS_PATTERN_VALIDATION);
stack.push(RuleConstants.COLLAPSE_SOURCE);
- stack.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.push(RuleConstants.ACCESS_PATTERN_VALIDATION);
// Remove all instances of ASSIGN_OUTPUT_ELEMENTS
- stack.remove(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.remove(RuleConstants.ACCESS_PATTERN_VALIDATION);
// Verify size and pop'ed values
assertEquals(1, stack.size());
@@ -92,10 +90,10 @@
public void testContains() {
// Set up
RuleStack stack = new RuleStack();
- stack.push(RuleConstants.ASSIGN_OUTPUT_ELEMENTS);
+ stack.push(RuleConstants.ACCESS_PATTERN_VALIDATION);
stack.push(RuleConstants.COLLAPSE_SOURCE);
- assertEquals(true, stack.contains(RuleConstants.ASSIGN_OUTPUT_ELEMENTS));
+ assertEquals(true, stack.contains(RuleConstants.ACCESS_PATTERN_VALIDATION));
assertEquals(false, stack.contains(RuleConstants.PLACE_ACCESS));
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational/TestRuleStack.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/plantree
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational/plantree:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational/plantree:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/rules
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/optimizer/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/xml:3535-3555
/trunk/engine/src/test/java/org/teiid/query/optimizer/xml:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/parser
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/parser:3535-3555
/trunk/engine/src/test/java/org/teiid/query/parser:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/parser/TestParser.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/parser/TestParser.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/parser/TestParser.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -6862,5 +6862,11 @@
@Test public void testTrim1() {
helpException("select trim('xy' from e1) from pm1.g1");
}
+
+ @Test public void testSubString() throws QueryParserException {
+ Query actualCommand = (Query)QueryParser.getQueryParser().parseCommand("SELECT substring(RTRIM(MED.BATDAT), 4, 4) FROM FCC.MEDMAS AS MED", new ParseInfo());
+ String actualString = actualCommand.toString();
+ assertEquals("SELECT substring(RTRIM(MED.BATDAT), 4, 4) FROM FCC.MEDMAS AS MED", actualString);
+ }
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor:3535-3555*
/trunk/engine/src/test/java/org/teiid/query/processor:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/FakeDataManager.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/FakeDataManager.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/FakeDataManager.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/FakeDataManager.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/FakeDataManager.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/FakeDataStore.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/FakeDataStore.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/FakeDataStore.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/FakeDataStore.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/FakeDataStore.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/FakeProcessorPlan.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/FakeProcessorPlan.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/FakeProcessorPlan.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/FakeTupleSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/FakeTupleSource.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/FakeTupleSource.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/HardcodedDataManager.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/HardcodedDataManager.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/HardcodedDataManager.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestAggregateProcessing.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestAggregateProcessing.java:3149-3217,3220-3275
/trunk/engine/src/test/java/org/teiid/query/processor/TestAggregateProcessing.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestAggregateProcessing.java:3149-3217,3220-3275,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestAggregateProcessing.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestArrayTable.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestArrayTable.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestArrayTable.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestBaseProcessorPlan.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestBaseProcessorPlan.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestBaseProcessorPlan.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestBatchIterator.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestBatchIterator.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestBatchIterator.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestBatchedUpdatePlan.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestBatchedUpdatePlan.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestBatchedUpdatePlan.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestCollectionTupleSource.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestCollectionTupleSource.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestCollectionTupleSource.java:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -638,6 +638,44 @@
helpTestLargeSetInDepAccessMultiJoinCriteria(1, 10, 2, 2);
}
+ @Test public void testLargeSetMultipleDependentSources() throws Exception {
+ String sql = "SELECT pm1.g1.e1 FROM pm1.g1, pm2.g1 makedep, /*+ makeind */ pm1.g2 where pm1.g1.e1=pm2.g1.e1 AND pm1.g2.e2=pm2.g1.e2 order by e1"; //$NON-NLS-1$
+
+ // Plan query
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities depcaps = new BasicSourceCapabilities();
+ depcaps.setCapabilitySupport(Capability.CRITERIA_IN, true);
+ depcaps.setSourceProperty(Capability.MAX_IN_CRITERIA_SIZE, 1);
+ depcaps.setSourceProperty(Capability.MAX_DEPENDENT_PREDICATES, 3);
+
+ BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
+
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", depcaps); //$NON-NLS-1$
+
+ List[] expected = new List[] {
+ Arrays.asList("a"), //$NON-NLS-1$
+ Arrays.asList("a"), //$NON-NLS-1$
+ };
+
+ Command command = TestProcessor.helpParse(sql);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(command, RealMetadataFactory.example1Cached(), capFinder);
+ TestOptimizer.checkAtomicQueries(new String[] {
+ "SELECT pm1.g2.e2 FROM pm1.g2",
+ "SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 IN (<dependent values>)) AND (pm2.g1.e2 IN (<dependent values>))",
+ "SELECT pm1.g1.e1 FROM pm1.g1"
+ }, plan);
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT pm1.g1.e1 FROM pm1.g1", new List<?>[] {Arrays.asList("a")});
+ dataManager.addData("SELECT pm1.g2.e2 FROM pm1.g2", new List<?>[] {Arrays.asList(1), Arrays.asList(2), Arrays.asList(3)});
+ dataManager.addData("SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 = 'a') AND ((pm2.g1.e2 = 1) OR (pm2.g1.e2 = 2))", new List<?>[] {Arrays.asList("a", 1)});
+ dataManager.addData("SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 = 'a') AND (pm2.g1.e2 = 3)", new List<?>[] {Arrays.asList("a", 3)});
+ CommandContext cc = TestProcessor.createCommandContext();
+ TestProcessor.helpProcess(plan, cc, dataManager, expected);
+ }
+
/**
* concurrentOpen will be minimum of 2 to gather the pm1 results.
*/
@@ -648,10 +686,6 @@
FakeDataManager dataManager = new FakeDataManager();
TestProcessor.sampleData1(dataManager);
- // Slightly modify metadata to set max set size to just a few rows - this
- // will allow us to test the dependent overflow case
- QueryMetadataInterface fakeMetadata = RealMetadataFactory.example1Cached();
-
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities depcaps = new BasicSourceCapabilities();
@@ -679,7 +713,7 @@
};
Command command = TestProcessor.helpParse(sql);
- ProcessorPlan plan = TestProcessor.helpGetPlan(command, fakeMetadata, capFinder);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(command, RealMetadataFactory.example1Cached(), capFinder);
TestOptimizer.checkAtomicQueries(new String[] {
"SELECT pm1.g2.e4 FROM pm1.g2",
"SELECT pm2.g1.e1, pm2.g1.e2, pm2.g1.e4 FROM pm2.g1 WHERE (pm2.g1.e1 IN (<dependent values>)) AND (pm2.g1.e2 IN (<dependent values>)) AND (pm2.g1.e4 IN (<dependent values>))",
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java:3149-3217,3535-3555,3558-3585
/trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java:3188-3450,3452-3597
Copied: branches/as7/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java (from rev 3597, trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java)
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java (rev 0)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.query.processor;
+
+import static org.teiid.query.optimizer.TestOptimizer.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+import org.teiid.query.function.FunctionTree;
+import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.optimizer.FakeFunctionMetadataSource;
+import org.teiid.query.optimizer.TestOptimizer;
+import org.teiid.query.optimizer.TestOptimizer.ComparisonMode;
+import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
+import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
+import org.teiid.query.unittest.RealMetadataFactory;
+
+@SuppressWarnings({"nls", "unchecked"})
+public class TestFunctionPushdown {
+
+ @Test public void testMustPushdownOverMultipleSourcesWithoutSupport() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2"; //$NON-NLS-1$
+
+ helpPlan(sql, metadata, null, capFinder,
+ new String[] {}, ComparisonMode.FAILED_PLANNING); //$NON-NLS-1$
+ }
+
+ @Test public void testMustPushdownOverMultipleSources() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setFunctionSupport("misc.namespace.func", true);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2"; //$NON-NLS-1$
+
+ ProcessorPlan plan = helpPlan(sql, metadata, null, capFinder,
+ new String[] {"SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1 FROM pm1.g1 AS g_0 ORDER BY c_0", "SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1 FROM pm1.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1, "a")});
+ dataManager.addData("SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1), Arrays.asList(2)});
+
+ TestProcessor.helpProcess(plan, dataManager, new List[] {Arrays.asList("a")});
+ }
+
+ @Test public void testMustPushdownOverMultipleSourcesWithView() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setFunctionSupport("misc.namespace.func", true);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from (select x.* from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2 order by e1 limit 10) as x"; //$NON-NLS-1$
+
+ ProcessorPlan plan = helpPlan(sql, metadata, null, capFinder,
+ new String[] {"SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0", "SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1, g_0.e1 AS c_2 FROM pm1.g1 AS g_0 ORDER BY c_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT g_0.e2 AS c_0 FROM pm2.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1)});
+ dataManager.addData("SELECT g_0.e2 AS c_0, func(g_0.e1) AS c_1, g_0.e1 AS c_2 FROM pm1.g1 AS g_0 ORDER BY c_0", new List[] {Arrays.asList(1, "aa", "a"), Arrays.asList(2, "bb", "b")});
+
+ TestProcessor.helpProcess(plan, dataManager, new List[] {Arrays.asList("aa")});
+ }
+
+ @Test public void testMustPushdownOverMultipleSourcesWithViewDupRemoval() throws Exception {
+ QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Cached().getMetadataStore(), "example1", new FunctionTree("foo", new FakeFunctionMetadataSource()));
+
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setFunctionSupport("misc.namespace.func", true);
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
+
+ String sql = "select func(x.e1) from (select distinct x.* from pm1.g1 as x, pm2.g1 as y where x.e2 = y.e2 order by e1 limit 10) as x"; //$NON-NLS-1$
+
+ helpPlan(sql, metadata, null, capFinder,
+ new String[] {}, ComparisonMode.FAILED_PLANNING); //$NON-NLS-1$
+ }
+
+}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:mergeinfo
+ /trunk/engine/src/test/java/org/teiid/query/processor/TestFunctionPushdown.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestInherintlyUpdatableViews.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestInherintlyUpdatableViews.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestInherintlyUpdatableViews.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestInsertProcessing.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestInsertProcessing.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestInsertProcessing.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestInsertProcessing.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestInsertProcessing.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestJoinWithFunction.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestJoinWithFunction.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestJoinWithFunction.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestJoinWithFunction.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestJoinWithFunction.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -29,13 +29,13 @@
import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import java.util.List;
-import java.util.concurrent.Executor;
import org.junit.Before;
import org.junit.Test;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.core.util.ExecutorUtils;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.QueryProcessorFactoryImpl;
import org.teiid.dqp.internal.process.SessionAwareCache;
@@ -75,13 +75,7 @@
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
cache.setBufferManager(bm);
- Executor executor = new Executor() {
- @Override
- public void execute(Runnable command) {
- command.run();
- }
- };
- dataManager = new TempTableDataManager(hdm, bm, executor, cache);
+ dataManager = new TempTableDataManager(hdm, bm, ExecutorUtils.getDirectExecutor(), cache);
}
private void execute(String sql, List<?>... expectedResults) throws Exception {
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestOptionalJoins.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestOptionalJoins.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestOptionalJoins.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestOptionalJoins.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestOptionalJoins.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestOrderByProcessing.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestOrderByProcessing.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestOrderByProcessing.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestOrderByProcessing.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestOrderByProcessing.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -753,4 +753,16 @@
TestProcessor.helpProcess(plan, dataManager, expected);
}
+ @Test public void testProcRelationalWithNoInputs1() {
+ String sql = "select e1 from pm1.sp1"; //$NON-NLS-1$
+
+ List<?>[] expected = new List[] {
+ Arrays.asList("c") //$NON-NLS-1$
+ };
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("EXEC pm1.sp1()", expected);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(sql, RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.example1Store(), "e1"));
+ TestProcessor.helpProcess(plan, dataManager, expected);
+ }
+
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -39,7 +39,6 @@
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
-import java.util.concurrent.Executor;
import org.junit.Test;
import org.teiid.client.metadata.ParameterInfo;
@@ -55,6 +54,7 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.XMLType;
+import org.teiid.core.util.ExecutorUtils;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.PreparedPlan;
import org.teiid.dqp.internal.process.QueryProcessorFactoryImpl;
@@ -254,13 +254,7 @@
if (!(dataManager instanceof TempTableDataManager)) {
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
cache.setBufferManager(bufferMgr);
- Executor executor = new Executor() {
- @Override
- public void execute(Runnable command) {
- command.run();
- }
- };
- dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache);
+ dataManager = new TempTableDataManager(dataManager, bufferMgr, ExecutorUtils.getDirectExecutor(), cache);
}
if (context.getQueryProcessorFactory() == null) {
context.setQueryProcessorFactory(new QueryProcessorFactoryImpl(bufferMgr, dataManager, new DefaultCapabilitiesFinder(), null, context.getMetadata()));
@@ -7614,5 +7608,17 @@
helpProcess(plan, dataManager, expected);
}
+ @Test public void testCrossJoinReduction() throws Exception {
+ String sql = "select x.e2 from pm1.g2 y, pm1.g1 x where x.e1 = y.e1 and x.e1 = 'a'"; //$NON-NLS-1$
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT g_0.e2 FROM pm1.g1 AS g_0 WHERE g_0.e1 = 'a'", new List[] {Arrays.asList(3)});
+ dataManager.addData("SELECT 1 FROM pm1.g2 AS g_0 WHERE g_0.e1 = 'a'", new List[] {Arrays.asList(1)});
+ ProcessorPlan plan = helpGetPlan(sql, RealMetadataFactory.example1Cached(), TestOptimizer.getGenericFinder(false));
+
+ helpProcess(plan, dataManager, new List[] {
+ Arrays.asList(3)});
+ }
+
private static final boolean DEBUG = false;
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestProcessor.java:3149-3217,3220-3275
/trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestProcessor.java:3149-3217,3220-3275,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,39 +22,30 @@
package org.teiid.query.processor;
+import static org.junit.Assert.*;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
+import org.junit.Test;
import org.teiid.common.buffer.BlockedException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.common.buffer.TupleBatch;
import org.teiid.common.buffer.TupleBuffer;
import org.teiid.common.buffer.TupleSource;
+import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidException;
-import org.teiid.query.processor.BatchCollector;
-import org.teiid.query.processor.QueryProcessor;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.util.CommandContext;
-import junit.framework.TestCase;
-
-
/**
*/
-public class TestQueryProcessor extends TestCase {
+public class TestQueryProcessor {
- /**
- * Constructor for TestQueryProcessor.
- * @param name
- */
- public TestQueryProcessor(String name) {
- super(name);
- }
-
- public void helpTestProcessor(FakeProcessorPlan plan, long timeslice, List[] expectedResults) throws TeiidException {
+ public void helpTestProcessor(FakeProcessorPlan plan, List[] expectedResults) throws TeiidException {
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
FakeDataManager dataManager = new FakeDataManager();
@@ -85,14 +76,14 @@
tsID.remove();
}
- public void testNoResults() throws Exception {
+ @Test public void testNoResults() throws Exception {
List elements = new ArrayList();
elements.add(new ElementSymbol("a")); //$NON-NLS-1$
FakeProcessorPlan plan = new FakeProcessorPlan(elements, null);
- helpTestProcessor(plan, 1000, new List[0]);
+ helpTestProcessor(plan, new List[0]);
}
- public void testBlockNoResults() throws Exception {
+ @Test public void testBlockNoResults() throws Exception {
List elements = new ArrayList();
elements.add(new ElementSymbol("a")); //$NON-NLS-1$
@@ -103,10 +94,10 @@
batches.add(batch);
FakeProcessorPlan plan = new FakeProcessorPlan(elements, batches);
- helpTestProcessor(plan, 1000, new List[0]);
+ helpTestProcessor(plan, new List[0]);
}
- public void testProcessWithOccasionalBlocks() throws Exception {
+ @Test public void testProcessWithOccasionalBlocks() throws Exception {
List elements = new ArrayList();
elements.add(new ElementSymbol("a")); //$NON-NLS-1$
@@ -137,6 +128,18 @@
}
FakeProcessorPlan plan = new FakeProcessorPlan(elements, batches);
- helpTestProcessor(plan, 1000, expectedResults);
+ helpTestProcessor(plan, expectedResults);
}
+
+ @Test public void testCloseBeforeInitialization() throws TeiidComponentException {
+ BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
+ FakeDataManager dataManager = new FakeDataManager();
+
+ CommandContext context = new CommandContext("pid", "group", null, null, 1); //$NON-NLS-1$ //$NON-NLS-2$
+
+ QueryProcessor processor = new QueryProcessor(null, context, bufferMgr, dataManager);
+ processor.closeProcessing();
+ }
+
+
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestQueryProcessor.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java:3149-3217,3220-3275,3281-3325,3340-3349
/trunk/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java:3149-3217,3220-3275,3281-3325,3340-3349,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestSecurityFunctions.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestSecurityFunctions.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestSecurityFunctions.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestSecurityFunctions.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestSecurityFunctions.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestSetProcessing.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestSetProcessing.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestSetProcessing.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestSetProcessing.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestSetProcessing.java:3188-3450,3452-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -28,7 +28,6 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import java.util.concurrent.Executor;
import javax.transaction.RollbackException;
import javax.transaction.Status;
@@ -44,6 +43,7 @@
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.core.util.ExecutorUtils;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.SessionAwareCache;
import org.teiid.dqp.service.TransactionContext;
@@ -94,13 +94,7 @@
BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
cache.setBufferManager(bm);
- Executor executor = new Executor() {
- @Override
- public void execute(Runnable command) {
- command.run();
- }
- };
- dataManager = new TempTableDataManager(fdm, bm, executor, cache);
+ dataManager = new TempTableDataManager(fdm, bm, ExecutorUtils.getDirectExecutor(), cache);
}
@Test public void testRollbackNoExisting() throws Exception {
@@ -277,6 +271,19 @@
}
//should revert back to original
execute("select count(*) from x", new List[] {Arrays.asList(2)}); //$NON-NLS-1$
+
+ Thread t = new Thread() {
+ public void run() {
+ try {
+ execute("select count(e1) from x", new List[] {Arrays.asList(2)});
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ };
+ t.start();
+ t.join(2000);
+ assertFalse(t.isAlive());
}
@Test public void testAtomicDelete() throws Exception {
@@ -427,6 +434,13 @@
execute("select * from x", new List[] {Arrays.asList(1, 1), Arrays.asList(2, 3)});
}
+ @Test public void testAutoIncrement1() throws Exception {
+ execute("create local temporary table x (e1 serial, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ execute("insert into x (e2) values (1)", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
+ execute("insert into x (e2) values (3)", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
+ execute("select * from x", new List[] {Arrays.asList(1, 1), Arrays.asList(2, 3)});
+ }
+
@Test(expected=TeiidProcessingException.class) public void testNotNull() throws Exception {
execute("create local temporary table x (e1 serial, e2 integer not null, primary key (e1))", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
execute("insert into x (e1, e2) values ((select null), 1)", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestTempTables.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestTempTables.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestTextTable.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestTextTable.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestTextTable.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestTextTable.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestTextTable.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestTriggerActions.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestTriggerActions.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestTriggerActions.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestVirtualDepJoin.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestVirtualDepJoin.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestVirtualDepJoin.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestVirtualDepJoin.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestVirtualDepJoin.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java:3149-3217
/trunk/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java:3149-3217,3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/eval
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/eval:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/eval:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/proc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/proc:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/proc:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2529,4 +2529,5 @@
}
private static final boolean DEBUG = false;
+
}
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/relational
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/relational:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/relational:3507-3597
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -37,6 +37,7 @@
import org.teiid.common.buffer.TupleBuffer;
import org.teiid.common.buffer.TupleSource;
import org.teiid.common.buffer.BufferManager.TupleSourceType;
+import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
@@ -52,7 +53,8 @@
public static final int BATCH_SIZE = 100;
private void helpTestSort(List elements, List[] data, List sortElements, List sortTypes, List[] expected, Mode mode) throws TeiidComponentException, TeiidProcessingException {
- BufferManager mgr = BufferManagerFactory.getTestBufferManager(100, BATCH_SIZE, BATCH_SIZE);
+ BufferManagerImpl mgr = BufferManagerFactory.getTestBufferManager(10000, BATCH_SIZE, BATCH_SIZE);
+ long reserve = mgr.getReserveBatchBytes();
CommandContext context = new CommandContext ("pid", "test", null, null, 1); //$NON-NLS-1$ //$NON-NLS-2$
BlockingFakeRelationalNode dataNode = new BlockingFakeRelationalNode(2, data);
@@ -87,6 +89,7 @@
}
}
assertEquals(expected.length, currentRow - 1);
+ assertEquals(reserve, mgr.getReserveBatchBytes());
}
/*
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/processor/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/xml:3535-3555
/trunk/engine/src/test/java/org/teiid/query/processor/xml:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/resolver
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/resolver:3535-3555
/trunk/engine/src/test/java/org/teiid/query/resolver:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/rewriter
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/rewriter:3535-3555
/trunk/engine/src/test/java/org/teiid/query/rewriter:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/sql
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/sql:3535-3555*
/trunk/engine/src/test/java/org/teiid/query/sql:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/sql/lang
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/sql/lang:3535-3555
/trunk/engine/src/test/java/org/teiid/query/sql/lang:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/sql/proc
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/sql/proc:3535-3555
/trunk/engine/src/test/java/org/teiid/query/sql/proc:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/sql/symbol
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/sql/symbol:3535-3555
/trunk/engine/src/test/java/org/teiid/query/sql/symbol:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/sql/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/sql/util:3535-3555
/trunk/engine/src/test/java/org/teiid/query/sql/util:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/sql/visitor
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/sql/visitor:3535-3555
/trunk/engine/src/test/java/org/teiid/query/sql/visitor:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/unittest
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/unittest:3535-3555
/trunk/engine/src/test/java/org/teiid/query/unittest:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/util:3535-3555
/trunk/engine/src/test/java/org/teiid/query/util:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/query/validator
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/validator:3535-3555
/trunk/engine/src/test/java/org/teiid/query/validator:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/vdb
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/vdb:3535-3555*
/trunk/engine/src/test/java/org/teiid/vdb:3507-3597
Property changes on: branches/as7/engine/src/test/java/org/teiid/vdb/runtime
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/java/org/teiid/vdb/runtime:3535-3555
/trunk/engine/src/test/java/org/teiid/vdb/runtime:3507-3597
Property changes on: branches/as7/engine/src/test/resources/text
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/resources/text:3535-3555*
/trunk/engine/src/test/resources/text:3507-3597
Property changes on: branches/as7/engine/src/test/resources/text/TextParts_HeaderRow2.csv
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/resources/text/TextParts_HeaderRow2.csv:3535-3555
/trunk/engine/src/test/resources/text/TextParts_HeaderRow2.csv:3507-3597
Property changes on: branches/as7/engine/src/test/resources/text/cdm_dos.txt
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/resources/text/cdm_dos.txt:3535-3555
/trunk/engine/src/test/resources/text/cdm_dos.txt:3507-3597
Property changes on: branches/as7/engine/src/test/resources/text/cdm_dos_win.txt
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/resources/text/cdm_dos_win.txt:3149-3164,3172-3217
/trunk/engine/src/test/resources/text/cdm_dos_win.txt:3188-3450,3452-3506
+ /branches/7.4.x/engine/src/test/resources/text/cdm_dos_win.txt:3149-3164,3172-3217,3535-3555
/trunk/engine/src/test/resources/text/cdm_dos_win.txt:3188-3450,3452-3597
Property changes on: branches/as7/engine/src/test/resources/text/test-file.txt.csv
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/engine/src/test/resources/text/test-file.txt.csv:3535-3555
/trunk/engine/src/test/resources/text/test-file.txt.csv:3507-3597
Modified: branches/as7/hibernate-dialect/pom.xml
===================================================================
--- branches/as7/hibernate-dialect/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/hibernate-dialect/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-hibernate-dialect</artifactId>
Modified: branches/as7/hibernate-dialect/src/main/java/org/teiid/dialect/TeiidDialect.java
===================================================================
--- branches/as7/hibernate-dialect/src/main/java/org/teiid/dialect/TeiidDialect.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/hibernate-dialect/src/main/java/org/teiid/dialect/TeiidDialect.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -147,8 +147,8 @@
registerFunction("uuid", new StandardSQLFunction("uuid", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
registerFunction("unescape", new StandardSQLFunction("unescape", Hibernate.STRING)); //$NON-NLS-1$ //$NON-NLS-2$
- registerFunction("array_get", new StandardSQLFunction("uuid", Hibernate.OBJECT)); //$NON-NLS-1$ //$NON-NLS-2$
- registerFunction("array_length", new StandardSQLFunction("unescape", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
+ registerFunction("array_get", new StandardSQLFunction("array_get", Hibernate.OBJECT)); //$NON-NLS-1$ //$NON-NLS-2$
+ registerFunction("array_length", new StandardSQLFunction("array_length", Hibernate.INTEGER)); //$NON-NLS-1$ //$NON-NLS-2$
}
public boolean dropConstraints() {
Modified: branches/as7/jboss-integration/pom.xml
===================================================================
--- branches/as7/jboss-integration/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
@@ -218,7 +218,7 @@
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-jdbc</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
<scope>test</scope>
</dependency>
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -56,7 +56,8 @@
MAX_SOURCE_ROWS_ELEMENT("max-source-rows-allowed", "max-source-rows-allowed", ModelType.INT, false, "-1"),
EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT("exception-on-max-source-rows", "exception-on-max-source-rows", ModelType.BOOLEAN, false, "true"),
DETECTING_CHANGE_EVENTS_ELEMENT("detect-change-events", "detect-change-events", ModelType.BOOLEAN, false, "true"),
-
+ QUERY_TIMEOUT("query-timeout", "query-timeout", ModelType.LONG, false, "0"),
+
POLICY_DECIDER_ELEMENT("policy-decider"),
POLICY_DECIDER_MODULE_ATTRIBUTE("module", "policy-decider-module", ModelType.STRING, false, null),
@@ -66,13 +67,16 @@
// buffer manager
BUFFER_SERVICE_ELEMENT("buffer-service"),
USE_DISK_ATTRIBUTE("use-disk", "buffer-service-use-disk", ModelType.BOOLEAN, false, "true"),
- PROCESSOR_BATCH_SIZE_ATTRIBUTE("processor-batch-size", "buffer-service-processor-batch-size", ModelType.INT, false, "512"),
- CONNECTOR_BATCH_SIZE_ATTRIBUTE("connector-batch-size", "buffer-service-connector-batch-size", ModelType.INT, false, "1024"),
+ PROCESSOR_BATCH_SIZE_ATTRIBUTE("processor-batch-size", "buffer-service-processor-batch-size", ModelType.INT, false, "256"),
+ CONNECTOR_BATCH_SIZE_ATTRIBUTE("connector-batch-size", "buffer-service-connector-batch-size", ModelType.INT, false, "512"),
MAX_PROCESSING_KB_ATTRIBUTE("max-processing-kb", "buffer-service-max-processing-kb", ModelType.INT, false, "-1"),
MAX_RESERVED_KB_ATTRIBUTE("max-reserve-kb", "buffer-service-max-reserve-kb", ModelType.INT, false, "-1"),
MAX_FILE_SIZE_ATTRIBUTE("max-file-size", "buffer-service-max-file-size", ModelType.LONG, false, "2048"),
MAX_BUFFER_SPACE_ATTRIBUTE("max-buffer-space", "buffer-service-max-buffer-space", ModelType.LONG, false, "51200"),
MAX_OPEN_FILES_ATTRIBUTE("max-open-files", "buffer-service-max-open-files", ModelType.INT, false, "64"),
+ MEMORY_BUFFER_SPACE_ATTRIBUTE("memory-buffer-space", "buffer-service-memory-buffer-space", ModelType.INT, false, "-1"),
+ MEMORY_BUFFER_OFFHEAP_ATTRIBUTE("memory-buffer-off-heap", "buffer-service-memory-buffer-off-heap", ModelType.BOOLEAN, false, "false"),
+ MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE("max-storage-object-size", "buffer-service-max-storage-object-size", ModelType.INT, false, "8388608"),
//prepared-plan-cache-config
PREPAREDPLAN_CACHE_ELEMENT("preparedplan-cache"),
@@ -114,6 +118,7 @@
SSL_AUTH_MODE_ATTRIBUTE("authentication-mode", "ssl-authentication-mode", ModelType.STRING, false, "anonymous"),
SSL_SSL_PROTOCOL_ATTRIBUTE("ssl-protocol", "ssl-ssl-protocol", ModelType.STRING, false, "SSLv3"),
SSL_KEY_MANAGEMENT_ALG_ATTRIBUTE("keymanagement-algorithm", "ssl-keymanagement-algorithm", ModelType.STRING, false, null),
+ SSL_ENABLED_CIPHER_SUITES_ATTRIBUTE("enabled-cipher-suites", "enabled-cipher-suites", ModelType.STRING, false, null),
SSL_KETSTORE_ELEMENT("keystore"),
SSL_KETSTORE_NAME_ATTRIBUTE("name", "keystore-name", ModelType.STRING, false, null),
SSL_KETSTORE_PASSWORD_ATTRIBUTE("password", "keystore-password", ModelType.STRING, false, null),
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -97,6 +97,7 @@
Element.MAX_SOURCE_ROWS_ELEMENT,
Element.EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT,
Element.DETECTING_CHANGE_EVENTS_ELEMENT,
+ Element.QUERY_TIMEOUT,
Element.AUTHORIZATION_VALIDATOR_MODULE_ATTRIBUTE,
Element.POLICY_DECIDER_MODULE_ATTRIBUTE,
@@ -113,6 +114,9 @@
Element.MAX_FILE_SIZE_ATTRIBUTE,
Element.MAX_BUFFER_SPACE_ATTRIBUTE,
Element.MAX_OPEN_FILES_ATTRIBUTE,
+ Element.MEMORY_BUFFER_SPACE_ATTRIBUTE,
+ Element.MEMORY_BUFFER_OFFHEAP_ATTRIBUTE,
+ Element.MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE,
// prepared plan cache
Element.PPC_MAX_ENTRIES_ATTRIBUTE,
@@ -377,7 +381,16 @@
}
if (Element.MAX_OPEN_FILES_ATTRIBUTE.isDefined(node)) {
bufferManger.setMaxOpenFiles(Element.MAX_OPEN_FILES_ATTRIBUTE.asInt(node));
- }
+ }
+ if (Element.MEMORY_BUFFER_SPACE_ATTRIBUTE.isDefined(node)) {
+ bufferManger.setMemoryBufferSpace(Element.MEMORY_BUFFER_SPACE_ATTRIBUTE.asInt(node));
+ }
+ if (Element.MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.isDefined(node)) {
+ bufferManger.setMemoryBufferOffHeap(Element.MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.asBoolean(node));
+ }
+ if (Element.MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE.isDefined(node)) {
+ bufferManger.setMaxStorageObjectSize(Element.MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE.asInt(node));
+ }
return bufferManger;
}
@@ -484,7 +497,10 @@
}
if (Element.DETECTING_CHANGE_EVENTS_ELEMENT.isDefined(node)) {
engine.setDetectingChangeEvents(Element.DETECTING_CHANGE_EVENTS_ELEMENT.asBoolean(node));
- }
+ }
+ if (Element.QUERY_TIMEOUT.isDefined(node)) {
+ engine.setQueryTimeout(Element.QUERY_TIMEOUT.asLong(node));
+ }
return engine;
}
}
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -72,6 +72,7 @@
writeElement(writer, Element.MAX_SOURCE_ROWS_ELEMENT, node);
writeElement(writer, Element.EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT, node);
writeElement(writer, Element.DETECTING_CHANGE_EVENTS_ELEMENT, node);
+ writeElement(writer, Element.QUERY_TIMEOUT, node);
if (like(node, Element.AUTHORIZATION_VALIDATOR_ELEMENT)) {
@@ -173,6 +174,7 @@
writeAttribute(writer, Element.SSL_AUTH_MODE_ATTRIBUTE, node);
writeAttribute(writer, Element.SSL_SSL_PROTOCOL_ATTRIBUTE, node);
writeAttribute(writer, Element.SSL_KEY_MANAGEMENT_ALG_ATTRIBUTE, node);
+ writeAttribute(writer, Element.SSL_ENABLED_CIPHER_SUITES_ATTRIBUTE, node);
if (like(node, Element.SSL_KETSTORE_ELEMENT)) {
writer.writeStartElement(Element.SSL_KETSTORE_ELEMENT.getLocalName());
@@ -201,6 +203,9 @@
writeAttribute(writer, Element.MAX_FILE_SIZE_ATTRIBUTE, node);
writeAttribute(writer, Element.MAX_BUFFER_SPACE_ATTRIBUTE, node);
writeAttribute(writer, Element.MAX_OPEN_FILES_ATTRIBUTE, node);
+ writeAttribute(writer, Element.MEMORY_BUFFER_SPACE_ATTRIBUTE, node);
+ writeAttribute(writer, Element.MEMORY_BUFFER_OFFHEAP_ATTRIBUTE, node);
+ writeAttribute(writer, Element.MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE, node);
}
private void writeResultsetCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
@@ -285,6 +290,7 @@
case LOB_CHUNK_SIZE_IN_KB_ELEMENT:
case QUERY_THRESHOLD_IN_SECS_ELEMENT:
case MAX_SOURCE_ROWS_ELEMENT:
+ case QUERY_TIMEOUT:
bootServices.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
break;
@@ -543,6 +549,7 @@
case SSL_AUTH_MODE_ATTRIBUTE:
case SSL_SSL_PROTOCOL_ATTRIBUTE:
case SSL_KEY_MANAGEMENT_ALG_ATTRIBUTE:
+ case SSL_ENABLED_CIPHER_SUITES_ATTRIBUTE:
node.get(element.getModelName()).set(attrValue);
break;
@@ -655,6 +662,15 @@
case MAX_BUFFER_SPACE_ATTRIBUTE:
node.get(element.getModelName()).set(Long.parseLong(attrValue));
break;
+ case MEMORY_BUFFER_SPACE_ATTRIBUTE:
+ node.get(element.getModelName()).set(Integer.parseInt(attrValue));
+ break;
+ case MEMORY_BUFFER_OFFHEAP_ATTRIBUTE:
+ node.get(element.getModelName()).set(Boolean.parseBoolean(attrValue));
+ break;
+ case MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE:
+ node.get(element.getModelName()).set(Integer.parseInt(attrValue));
+ break;
default:
throw ParseUtils.unexpectedAttribute(reader, i);
}
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TransportAdd.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -83,11 +83,13 @@
Element.SSL_AUTH_MODE_ATTRIBUTE,
Element.SSL_SSL_PROTOCOL_ATTRIBUTE,
Element.SSL_KEY_MANAGEMENT_ALG_ATTRIBUTE,
+ Element.SSL_ENABLED_CIPHER_SUITES_ATTRIBUTE,
Element.SSL_KETSTORE_NAME_ATTRIBUTE,
Element.SSL_KETSTORE_PASSWORD_ATTRIBUTE,
Element.SSL_KETSTORE_TYPE_ATTRIBUTE,
Element.SSL_TRUSTSTORE_NAME_ATTRIBUTE,
Element.SSL_TRUSTSTORE_PASSWORD_ATTRIBUTE
+
};
@Override
@@ -261,6 +263,10 @@
ssl.setKeystoreFilename(Element.SSL_KETSTORE_NAME_ATTRIBUTE.asString(node));
}
+ if (Element.SSL_ENABLED_CIPHER_SUITES_ATTRIBUTE.isDefined(node)) {
+ ssl.setEnabledCipherSuites(Element.SSL_ENABLED_CIPHER_SUITES_ATTRIBUTE.asString(node));
+ }
+
if (Element.SSL_KETSTORE_PASSWORD_ATTRIBUTE.isDefined(node)) {
ssl.setKeystorePassword(Element.SSL_KETSTORE_PASSWORD_ATTRIBUTE.asString(node));
}
Modified: branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-11-02 15:15:47 UTC (rev 3601)
@@ -88,18 +88,22 @@
event-distributor-name.describe=The JNDI name of the Teiid Event Distributor
detect-change-events.describe=Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)
allow-env-function.describe=Allow the execution of ENV function. (default false)
+query-timeout.describe=Set the default query timeout for all queries in milliseconds. 0 indicates no timeout. Lesser timeout values may be set per VDB or by clients. (default 0)
policy-decider-module.describe=Policy Module; Implementation of org.teiid.PolicyDecider class
authorization-validator-module.describe=Authorization Module; Implementation of org.teiid.dqp.internal.process.AuthorizationValidator class.
#buffer-manager
buffer-service-use-disk.describe=Use disk for buffer management
-buffer-service-processor-batch-size.describe=The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 512)
-buffer-service-connector-batch-size.describe=The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 1024)
+buffer-service-processor-batch-size.describe=The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 256)
+buffer-service-connector-batch-size.describe=The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 512)
buffer-service-max-file-size.describe= Max File size in MB (default 2GB)
buffer-service-max-buffer-space.describe=Max storage space, in MB, to be used for buffer files (default 50G)
buffer-service-max-open-files.describe=Max open buffer files (default 64)
buffer-service-max-processing-kb.describe=The approximate amount of buffer memory in kilobytes allowable for a single processing operation (sort, grouping, etc.) regardless of existing memory commitments. -1 means to automatically calculate a value (default -1)
buffer-service-max-reserve-kb.describe=The approximate amount of memory in kilobytes allowed to be held by the buffer manager. -1 means to automatically calculate a value (default -1)
+buffer-service-memory-buffer-space.describe=Memory buffer space used by the buffer manager in MB. -1 determines the setting automatically from the max-reserve-kb (default -1). This value cannot be smaller than max-storage-object-size
+buffer-service-memory-buffer-off-heap.describe=Set to true to hold the memory buffer off-heap. If true you must ensure that the VM can allocate that much direct memory (default false).
+buffer-service-max-storage-object-size.describe=The maximum size of a buffer managed object (typically a table page or a results batch) in bytes (default 8388608 or 8MB). Setting this value too high will reduce the effectiveness of the memory buffer.
#prepared-plan
preparedplan-cache-max-entries.describe=Max Entries allowed
@@ -141,6 +145,7 @@
ssl-authentication-mode.describe=Authentication Mode (1-way, 2-way, anonymous)
ssl-ssl-protocol.describe=SSL protocol used
ssl-keymanagement-algorithm.describe=Use key management algorithm
+enabled-cipher-suites.describe=Cipher suites that are allowed to be used for SSL. Use to restrict encryption strength(128 bit, 256 bit). Only provide encryption suites that are supported by both client and server JVM. ex:SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_KRB5_WITH_RC4_128_MD5,TLS_KRB5_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_KRB5_WITH_3DES_EDE_CBC_MD5,TLS_KRB5_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA
keystore-name.describe=Keystore File Name
keystore-password.describe=Keystore password
keystore-type.describe=Keystore type
Modified: branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
===================================================================
--- branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd 2011-11-02 15:15:47 UTC (rev 3601)
@@ -88,7 +88,22 @@
<xs:annotation>
<xs:documentation>Max open buffer files (default 64)</xs:documentation>
</xs:annotation>
- </xs:attribute>
+ </xs:attribute>
+ <xs:attribute name="memory-buffer-space" type="xs:int">
+ <xs:annotation>
+ <xs:documentation>Memory buffer space used by the buffer manager in MB. -1 determines the setting automatically from the max-reserve-kb (default -1). This value cannot be smaller than max-storage-object-size</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="memory-buffer-off-heap" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>Set to true to hold the memory buffer off-heap. If true you must ensure that the VM can allocate that much direct memory (default false).</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="max-storage-object-size" type="xs:int">
+ <xs:annotation>
+ <xs:documentation>The maximum size of a buffer managed object (typically a table page or a results batch) in bytes (default 8388608 or 8MB). Setting this value too high will reduce the effectiveness of the memory buffer.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
@@ -160,6 +175,11 @@
<xs:documentation>Set to true for the engine to detect local change events. Should be disabled if using external change data capture tools. (default true)</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="query-timeout" type="xs:long" minOccurs="0" maxOccurs="1" default="0">
+ <xs:annotation>
+ <xs:documentation>Set the default query timeout for all queries in milliseconds. 0 indicates no timeout. Lesser timeout values may be set per VDB or by clients. (default 0)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
<xs:element name="authorization-validator" minOccurs="0" maxOccurs="1">
<xs:complexType>
@@ -367,6 +387,12 @@
Setting this value above the max available processors is not recommended.</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="enabled-cipher-suites" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>Cipher suites that are allowed to be used for SSL. Use to restrict encryption strength(128 bit, 256 bit).
+ Only provide encryption suites that are supported by both client and server JVM.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:schema>
Copied: branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java (from rev 3596, branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java)
===================================================================
--- branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java (rev 0)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -0,0 +1,391 @@
+package org.teiid.jboss;
+
+import static junit.framework.Assert.assertEquals;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILD_TYPE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OUTCOME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUCCESS;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import junit.framework.Assert;
+
+import org.jboss.as.cli.Util;
+import org.jboss.as.controller.OperationContext.Type;
+import org.jboss.as.controller.PathAddress;
+import org.jboss.as.controller.PathElement;
+import org.jboss.as.subsystem.test.AbstractSubsystemTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.dmr.ModelNode;
+import org.junit.Test;
+import org.teiid.core.util.ObjectConverterUtil;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+@SuppressWarnings("nls")
+public class TestTeiidConfiguration extends AbstractSubsystemTest {
+
+ public TestTeiidConfiguration() {
+ super(TeiidExtension.TEIID_SUBSYSTEM, new TeiidExtension());
+ }
+
+ @Test
+ public void testDescribeHandler() throws Exception {
+ String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+ KernelServices servicesA = super.installInController(
+ new AdditionalInitialization() {
+ @Override
+ protected Type getType() {
+ return Type.MANAGEMENT;
+ }
+ },
+ subsystemXml);
+
+
+ //Get the model and the describe operations from the first controller
+ ModelNode modelA = servicesA.readWholeModel();
+ String marshalled = servicesA.getPersistedSubsystemXml();
+
+ ModelNode describeOp = new ModelNode();
+ describeOp.get(OP).set(DESCRIBE);
+ describeOp.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM)).toModelNode());
+ List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();
+
+
+ //Install the describe options from the first controller into a second controller
+ KernelServices servicesB = super.installInController(operations);
+ ModelNode modelB = servicesB.readWholeModel();
+
+ //Make sure the models from the two controllers are identical
+ super.compare(modelA, modelB);
+ }
+
+ @Test
+ public void testMinimumConfiguration() throws Exception {
+ String subsystemXml = "<subsystem xmlns=\"urn:jboss:domain:teiid:1.0\">\n" +
+ " <async-thread-pool>teiid-async</async-thread-pool>"+
+ "</subsystem>";
+ KernelServices services = super.installInController(subsystemXml);
+ services.readWholeModel();
+ }
+
+ @Test
+ public void testOutputPerisitence() throws Exception {
+ String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+
+ String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
+ ModelNode testModel = ModelNode.fromJSONString(json);
+ String triggered = outputModel(testModel);
+
+ KernelServices services = super.installInController(
+ new AdditionalInitialization() {
+ @Override
+ protected Type getType() {
+ return Type.MANAGEMENT;
+ }
+ },
+ subsystemXml);
+ //Get the model and the persisted xml from the controller
+ ModelNode model = services.readWholeModel();
+ String marshalled = services.getPersistedSubsystemXml();
+
+ //System.out.println(marshalled);
+
+ Assert.assertEquals(marshalled, triggered);
+ Assert.assertEquals(normalizeXML(marshalled), normalizeXML(triggered));
+ }
+
+ @Test
+ public void testOutputModel() throws Exception {
+ String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+
+ String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
+ ModelNode testModel = ModelNode.fromJSONString(json);
+ String triggered = outputModel(testModel);
+
+ KernelServices services = super.installInController(
+ new AdditionalInitialization() {
+ @Override
+ protected Type getType() {
+ return Type.MANAGEMENT;
+ }
+ },
+ subsystemXml);
+ //Get the model and the persisted xml from the controller
+ ModelNode model = services.readWholeModel();
+ String marshalled = services.getPersistedSubsystemXml();
+
+ Assert.assertEquals(marshalled, triggered);
+ Assert.assertEquals(normalizeXML(marshalled), normalizeXML(triggered));
+ }
+
+ @Test
+ public void testSchema() throws Exception {
+ String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+ validate(subsystemXml);
+
+ KernelServices services = super.installInController(
+ new AdditionalInitialization() {
+ @Override
+ protected Type getType() {
+ return Type.MANAGEMENT;
+ }
+ },
+ subsystemXml);
+ //Get the model and the persisted xml from the controller
+ ModelNode model = services.readWholeModel();
+ String marshalled = services.getPersistedSubsystemXml();
+
+ validate(marshalled);
+ }
+
+ private void validate(String marshalled) throws SAXException, IOException {
+ URL xsdURL = Thread.currentThread().getContextClassLoader().getResource("schema/jboss-teiid.xsd");
+ System.out.println(marshalled);
+
+ SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
+ Schema schema = factory.newSchema(xsdURL);
+
+ Validator validator = schema.newValidator();
+ Source source = new StreamSource(new ByteArrayInputStream(marshalled.getBytes()));
+ validator.setErrorHandler(new ErrorHandler() {
+
+ @Override
+ public void warning(SAXParseException exception) throws SAXException {
+ fail(exception.getMessage());
+ }
+
+ @Override
+ public void fatalError(SAXParseException exception) throws SAXException {
+ fail(exception.getMessage());
+ }
+
+ @Override
+ public void error(SAXParseException exception) throws SAXException {
+ if (!exception.getMessage().contains("cvc-enumeration-valid") && !exception.getMessage().contains("cvc-type"))
+ fail(exception.getMessage());
+ }
+ });
+
+ validator.validate(source);
+ }
+
+ @Test
+ public void testSubSystemDescription() throws IOException {
+ ModelNode node = new ModelNode();
+ TeiidAdd.describeTeiid(node, ATTRIBUTES, IntegrationPlugin.getResourceBundle(null));
+ assertEquals(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-config.txt")), node.toString());
+ }
+
+ @Test
+ public void testParseSubsystem() throws Exception {
+ //Parse the subsystem xml into operations
+ String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+ List<ModelNode> operations = super.parse(subsystemXml);
+
+ ///Check that we have the expected number of operations
+ Assert.assertEquals(5, operations.size());
+
+ //Check that each operation has the correct content
+ ModelNode addSubsystem = operations.get(0);
+ Assert.assertEquals(ADD, addSubsystem.get(OP).asString());
+ PathAddress addr = PathAddress.pathAddress(addSubsystem.get(OP_ADDR));
+ Assert.assertEquals(1, addr.size());
+ PathElement element = addr.getElement(0);
+ Assert.assertEquals(SUBSYSTEM, element.getKey());
+ Assert.assertEquals(TeiidExtension.TEIID_SUBSYSTEM, element.getValue());
+ }
+
+ @Test
+ public void testQueryOperations() throws Exception {
+ KernelServices services = buildSubsystem();
+
+ PathAddress addr = PathAddress.pathAddress(
+ PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
+ ModelNode addOp = new ModelNode();
+ addOp.get(OP).set("read-operation-names");
+ addOp.get(OP_ADDR).set(addr.toModelNode());
+
+ ModelNode result = services.executeOperation(addOp);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+ List<String> opNames = getList(result);
+ assertEquals(38, opNames.size());
+ String[] ops = { "add", "add-anyauthenticated-role", "add-data-role",
+ "assign-datasource", "cache-statistics", "cache-types",
+ "cancel-request", "change-vdb-connection-type", "clear-cache",
+ "describe", "execute-query", "get-translator", "get-vdb",
+ "list-requests", "list-sessions", "list-transactions",
+ "list-translators", "list-vdbs", "long-running-queries",
+ "mark-datasource-available",
+ "merge-vdbs", "read-attribute", "read-children-names",
+ "read-children-resources", "read-children-types",
+ "read-operation-description", "read-operation-names", "read-rar-description",
+ "read-resource", "read-resource-description",
+ "remove-anyauthenticated-role", "remove-data-role",
+ "requests-per-session", "requests-per-vdb",
+ "terminate-session", "terminate-transaction",
+ "workerpool-statistics", "write-attribute" };
+ assertEquals(Arrays.asList(ops), opNames);
+ }
+
+ @Test
+ public void testAddRemoveTransport() throws Exception {
+ KernelServices services = buildSubsystem();
+
+ PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
+
+ // look at current query engines make sure there are only two from configuration.
+ ModelNode read = new ModelNode();
+ read.get(OP).set("read-children-names");
+ read.get(OP_ADDR).set(addr.toModelNode());
+ read.get(CHILD_TYPE).set("transport");
+
+ ModelNode result = services.executeOperation(read);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+ List<String> opNames = getList(result);
+ assertEquals(2, opNames.size());
+ String [] ops = {"jdbc", "odbc"};
+ assertEquals(Arrays.asList(ops), opNames);
+
+ // add transport
+ ModelNode addOp = new ModelNode();
+ addOp.get(OP).set("add");
+ addOp.get(OP_ADDR).set(addr.toModelNode().add("transport", "newbie")); //$NON-NLS-1$);
+ addOp.get("protocol").set("pg");
+ addOp.get("socket-binding").set("socket");
+ addOp.get("authentication-security-domain").set("teiid-security");
+
+ result = services.executeOperation(addOp);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+ result = services.executeOperation(read);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+ opNames = getList(result);
+ assertEquals(3, opNames.size());
+ String [] ops2 = {"jdbc", "newbie", "odbc"};
+ assertEquals(Arrays.asList(ops2), opNames);
+
+ // add transport
+ ModelNode remove = new ModelNode();
+ remove.get(OP).set("remove");
+ remove.get(OP_ADDR).set(addr.toModelNode().add("transport", "jdbc")); //$NON-NLS-1$);
+ result = services.executeOperation(remove);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+ result = services.executeOperation(read);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+ opNames = getList(result);
+ assertEquals(2, opNames.size());
+ String [] ops3 = {"newbie", "odbc"};
+ assertEquals(Arrays.asList(ops3), opNames);
+ }
+
+ private KernelServices buildSubsystem() throws IOException,
+ FileNotFoundException, Exception {
+ String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
+
+ KernelServices services = super.installInController(subsystemXml);
+ return services;
+ }
+
+ private static List<String> getList(ModelNode operationResult) {
+ if(!operationResult.hasDefined("result"))
+ return Collections.emptyList();
+
+ List<ModelNode> nodeList = operationResult.get("result").asList();
+ if(nodeList.isEmpty())
+ return Collections.emptyList();
+
+ List<String> list = new ArrayList<String>(nodeList.size());
+ for(ModelNode node : nodeList) {
+ list.add(node.asString());
+ }
+ return list;
+ }
+
+// private ModelNode buildProperty(String name, String value) {
+// ModelNode node = new ModelNode();
+// node.get("property-name").set(name);
+// node.get("property-value").set(value);
+// return node;
+// }
+
+ @Test
+ public void testTranslator() throws Exception {
+ KernelServices services = buildSubsystem();
+
+ PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
+
+ ModelNode addOp = new ModelNode();
+ addOp.get(OP).set("add");
+ addOp.get(OP_ADDR).set(addr.toModelNode().add("translator", "oracle"));
+ ModelNode result = services.executeOperation(addOp);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+ ModelNode read = new ModelNode();
+ read.get(OP).set("read-children-names");
+ read.get(OP_ADDR).set(addr.toModelNode());
+ read.get(CHILD_TYPE).set("translator");
+
+ result = services.executeOperation(read);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+ List<String> translators = Util.getList(result);
+ Assert.assertTrue(translators.contains("oracle"));
+
+ ModelNode resourceRead = new ModelNode();
+ resourceRead.get(OP).set("read-resource");
+ resourceRead.get(OP_ADDR).set(addr.toModelNode());
+ resourceRead.get("translator").set("oracle");
+
+ result = services.executeOperation(resourceRead);
+ Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
+
+// ModelNode oracleNode = result.get("result");
+//
+// ModelNode oracle = new ModelNode();
+// oracle.get("translator-name").set("oracle");
+// oracle.get("description").set("A translator for Oracle 9i Database or later");
+// oracle.get("children", "properties").add(buildProperty("execution-factory-class","org.teiid.translator.jdbc.oracle.OracleExecutionFactory"));
+// oracle.get("children", "properties").add(buildProperty("TrimStrings","false"));
+// oracle.get("children", "properties").add(buildProperty("SupportedJoinCriteria","ANY"));
+// oracle.get("children", "properties").add(buildProperty("requiresCriteria","false"));
+// oracle.get("children", "properties").add(buildProperty("supportsOuterJoins","true"));
+// oracle.get("children", "properties").add(buildProperty("useCommentsInSourceQuery","false"));
+// oracle.get("children", "properties").add(buildProperty("useBindVariables","true"));
+// oracle.get("children", "properties").add(buildProperty("MaxPreparedInsertBatchSize","2048"));
+// oracle.get("children", "properties").add(buildProperty("supportsInnerJoins","true"));
+// oracle.get("children", "properties").add(buildProperty("MaxInCriteriaSize","1000"));
+// oracle.get("children", "properties").add(buildProperty("supportsSelectDistinct","true"));
+// oracle.get("children", "properties").add(buildProperty("supportsOrderBy","true"));
+// oracle.get("children", "properties").add(buildProperty("supportsFullOuterJoins","true"));
+// oracle.get("children", "properties").add(buildProperty("Immutable","false"));
+// oracle.get("children", "properties").add(buildProperty("MaxDependentInPredicates","50"));
+//
+// super.compare(oracleNode, oracle);
+ }
+}
Property changes on: branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidConfiguration.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java
===================================================================
--- branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/test/java/org/teiid/jboss/TestTeiidOperations.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -1,391 +0,0 @@
-package org.teiid.jboss;
-
-import static junit.framework.Assert.assertEquals;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILD_TYPE;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OUTCOME;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUCCESS;
-import static org.junit.Assert.fail;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-
-import junit.framework.Assert;
-
-import org.jboss.as.cli.Util;
-import org.jboss.as.controller.OperationContext.Type;
-import org.jboss.as.controller.PathAddress;
-import org.jboss.as.controller.PathElement;
-import org.jboss.as.subsystem.test.AbstractSubsystemTest;
-import org.jboss.as.subsystem.test.AdditionalInitialization;
-import org.jboss.as.subsystem.test.KernelServices;
-import org.jboss.dmr.ModelNode;
-import org.junit.Test;
-import org.teiid.core.util.ObjectConverterUtil;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-@SuppressWarnings("nls")
-public class TestTeiidOperations extends AbstractSubsystemTest {
-
- public TestTeiidOperations() {
- super(TeiidExtension.TEIID_SUBSYSTEM, new TeiidExtension());
- }
-
- @Test
- public void testDescribeHandler() throws Exception {
- String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
- KernelServices servicesA = super.installInController(
- new AdditionalInitialization() {
- @Override
- protected Type getType() {
- return Type.MANAGEMENT;
- }
- },
- subsystemXml);
-
-
- //Get the model and the describe operations from the first controller
- ModelNode modelA = servicesA.readWholeModel();
- String marshalled = servicesA.getPersistedSubsystemXml();
-
- ModelNode describeOp = new ModelNode();
- describeOp.get(OP).set(DESCRIBE);
- describeOp.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM)).toModelNode());
- List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();
-
-
- //Install the describe options from the first controller into a second controller
- KernelServices servicesB = super.installInController(operations);
- ModelNode modelB = servicesB.readWholeModel();
-
- //Make sure the models from the two controllers are identical
- super.compare(modelA, modelB);
- }
-
- @Test
- public void testMinimumConfiguration() throws Exception {
- String subsystemXml = "<subsystem xmlns=\"urn:jboss:domain:teiid:1.0\">\n" +
- " <async-thread-pool>teiid-async</async-thread-pool>"+
- "</subsystem>";
- KernelServices services = super.installInController(subsystemXml);
- services.readWholeModel();
- }
-
- @Test
- public void testOutputPerisitence() throws Exception {
- String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
-
- String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
- ModelNode testModel = ModelNode.fromJSONString(json);
- String triggered = outputModel(testModel);
-
- KernelServices services = super.installInController(
- new AdditionalInitialization() {
- @Override
- protected Type getType() {
- return Type.MANAGEMENT;
- }
- },
- subsystemXml);
- //Get the model and the persisted xml from the controller
- ModelNode model = services.readWholeModel();
- String marshalled = services.getPersistedSubsystemXml();
-
- //System.out.println(marshalled);
-
- Assert.assertEquals(marshalled, triggered);
- Assert.assertEquals(normalizeXML(marshalled), normalizeXML(triggered));
- }
-
- @Test
- public void testOutputModel() throws Exception {
- String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
-
- String json = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-json.txt"));
- ModelNode testModel = ModelNode.fromJSONString(json);
- String triggered = outputModel(testModel);
-
- KernelServices services = super.installInController(
- new AdditionalInitialization() {
- @Override
- protected Type getType() {
- return Type.MANAGEMENT;
- }
- },
- subsystemXml);
- //Get the model and the persisted xml from the controller
- ModelNode model = services.readWholeModel();
- String marshalled = services.getPersistedSubsystemXml();
-
- Assert.assertEquals(marshalled, triggered);
- Assert.assertEquals(normalizeXML(marshalled), normalizeXML(triggered));
- }
-
- @Test
- public void testSchema() throws Exception {
- String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
- validate(subsystemXml);
-
- KernelServices services = super.installInController(
- new AdditionalInitialization() {
- @Override
- protected Type getType() {
- return Type.MANAGEMENT;
- }
- },
- subsystemXml);
- //Get the model and the persisted xml from the controller
- ModelNode model = services.readWholeModel();
- String marshalled = services.getPersistedSubsystemXml();
-
- validate(marshalled);
- }
-
- private void validate(String marshalled) throws SAXException, IOException {
- URL xsdURL = Thread.currentThread().getContextClassLoader().getResource("schema/jboss-teiid.xsd");
- System.out.println(marshalled);
-
- SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
- Schema schema = factory.newSchema(xsdURL);
-
- Validator validator = schema.newValidator();
- Source source = new StreamSource(new ByteArrayInputStream(marshalled.getBytes()));
- validator.setErrorHandler(new ErrorHandler() {
-
- @Override
- public void warning(SAXParseException exception) throws SAXException {
- fail(exception.getMessage());
- }
-
- @Override
- public void fatalError(SAXParseException exception) throws SAXException {
- fail(exception.getMessage());
- }
-
- @Override
- public void error(SAXParseException exception) throws SAXException {
- if (!exception.getMessage().contains("cvc-enumeration-valid") && !exception.getMessage().contains("cvc-type"))
- fail(exception.getMessage());
- }
- });
-
- validator.validate(source);
- }
-
- @Test
- public void testSubSystemDescription() throws IOException {
- ModelNode node = new ModelNode();
- TeiidAdd.describeTeiid(node, ATTRIBUTES, IntegrationPlugin.getResourceBundle(null));
- assertEquals(ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-model-config.txt")), node.toString());
- }
-
- @Test
- public void testParseSubsystem() throws Exception {
- //Parse the subsystem xml into operations
- String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
- List<ModelNode> operations = super.parse(subsystemXml);
-
- ///Check that we have the expected number of operations
- Assert.assertEquals(5, operations.size());
-
- //Check that each operation has the correct content
- ModelNode addSubsystem = operations.get(0);
- Assert.assertEquals(ADD, addSubsystem.get(OP).asString());
- PathAddress addr = PathAddress.pathAddress(addSubsystem.get(OP_ADDR));
- Assert.assertEquals(1, addr.size());
- PathElement element = addr.getElement(0);
- Assert.assertEquals(SUBSYSTEM, element.getKey());
- Assert.assertEquals(TeiidExtension.TEIID_SUBSYSTEM, element.getValue());
- }
-
- @Test
- public void testQueryOperations() throws Exception {
- KernelServices services = buildSubsystem();
-
- PathAddress addr = PathAddress.pathAddress(
- PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
- ModelNode addOp = new ModelNode();
- addOp.get(OP).set("read-operation-names");
- addOp.get(OP_ADDR).set(addr.toModelNode());
-
- ModelNode result = services.executeOperation(addOp);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- List<String> opNames = getList(result);
- assertEquals(37, opNames.size());
- String[] ops = { "add", "add-anyauthenticated-role", "add-data-role",
- "assign-datasource", "cache-statistics", "cache-types",
- "cancel-request", "change-vdb-connection-type", "clear-cache",
- "describe", "execute-query", "get-translator", "get-vdb",
- "list-requests", "list-sessions", "list-transactions",
- "list-translators", "list-vdbs", "long-running-queries",
- "mark-datasource-available",
- "merge-vdbs", "read-attribute", "read-children-names",
- "read-children-resources", "read-children-types",
- "read-operation-description", "read-operation-names",
- "read-resource", "read-resource-description",
- "remove-anyauthenticated-role", "remove-data-role",
- "requests-per-session", "requests-per-vdb",
- "terminate-session", "terminate-transaction",
- "workerpool-statistics", "write-attribute" };
- assertEquals(Arrays.asList(ops), opNames);
- }
-
- @Test
- public void testAddRemoveTransport() throws Exception {
- KernelServices services = buildSubsystem();
-
- PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
-
- // look at current query engines make sure there are only two from configuration.
- ModelNode read = new ModelNode();
- read.get(OP).set("read-children-names");
- read.get(OP_ADDR).set(addr.toModelNode());
- read.get(CHILD_TYPE).set("transport");
-
- ModelNode result = services.executeOperation(read);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- List<String> opNames = getList(result);
- assertEquals(2, opNames.size());
- String [] ops = {"jdbc", "odbc"};
- assertEquals(Arrays.asList(ops), opNames);
-
- // add transport
- ModelNode addOp = new ModelNode();
- addOp.get(OP).set("add");
- addOp.get(OP_ADDR).set(addr.toModelNode().add("transport", "newbie")); //$NON-NLS-1$);
- addOp.get("protocol").set("pg");
- addOp.get("socket-binding").set("socket");
- addOp.get("authentication-security-domain").set("teiid-security");
-
- result = services.executeOperation(addOp);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- result = services.executeOperation(read);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
- opNames = getList(result);
- assertEquals(3, opNames.size());
- String [] ops2 = {"jdbc", "newbie", "odbc"};
- assertEquals(Arrays.asList(ops2), opNames);
-
- // add transport
- ModelNode remove = new ModelNode();
- remove.get(OP).set("remove");
- remove.get(OP_ADDR).set(addr.toModelNode().add("transport", "jdbc")); //$NON-NLS-1$);
- result = services.executeOperation(remove);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- result = services.executeOperation(read);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
- opNames = getList(result);
- assertEquals(2, opNames.size());
- String [] ops3 = {"newbie", "odbc"};
- assertEquals(Arrays.asList(ops3), opNames);
- }
-
- private KernelServices buildSubsystem() throws IOException,
- FileNotFoundException, Exception {
- String subsystemXml = ObjectConverterUtil.convertToString(new FileReader("src/test/resources/teiid-sample-config.xml"));
-
- KernelServices services = super.installInController(subsystemXml);
- return services;
- }
-
- private static List<String> getList(ModelNode operationResult) {
- if(!operationResult.hasDefined("result"))
- return Collections.emptyList();
-
- List<ModelNode> nodeList = operationResult.get("result").asList();
- if(nodeList.isEmpty())
- return Collections.emptyList();
-
- List<String> list = new ArrayList<String>(nodeList.size());
- for(ModelNode node : nodeList) {
- list.add(node.asString());
- }
- return list;
- }
-
-// private ModelNode buildProperty(String name, String value) {
-// ModelNode node = new ModelNode();
-// node.get("property-name").set(name);
-// node.get("property-value").set(value);
-// return node;
-// }
-
- @Test
- public void testTranslator() throws Exception {
- KernelServices services = buildSubsystem();
-
- PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TeiidExtension.TEIID_SUBSYSTEM));
-
- ModelNode addOp = new ModelNode();
- addOp.get(OP).set("add");
- addOp.get(OP_ADDR).set(addr.toModelNode().add("translator", "oracle"));
- ModelNode result = services.executeOperation(addOp);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- ModelNode read = new ModelNode();
- read.get(OP).set("read-children-names");
- read.get(OP_ADDR).set(addr.toModelNode());
- read.get(CHILD_TYPE).set("translator");
-
- result = services.executeOperation(read);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
- List<String> translators = Util.getList(result);
- Assert.assertTrue(translators.contains("oracle"));
-
- ModelNode resourceRead = new ModelNode();
- resourceRead.get(OP).set("read-resource");
- resourceRead.get(OP_ADDR).set(addr.toModelNode());
- resourceRead.get("translator").set("oracle");
-
- result = services.executeOperation(resourceRead);
- Assert.assertEquals(SUCCESS, result.get(OUTCOME).asString());
-
-// ModelNode oracleNode = result.get("result");
-//
-// ModelNode oracle = new ModelNode();
-// oracle.get("translator-name").set("oracle");
-// oracle.get("description").set("A translator for Oracle 9i Database or later");
-// oracle.get("children", "properties").add(buildProperty("execution-factory-class","org.teiid.translator.jdbc.oracle.OracleExecutionFactory"));
-// oracle.get("children", "properties").add(buildProperty("TrimStrings","false"));
-// oracle.get("children", "properties").add(buildProperty("SupportedJoinCriteria","ANY"));
-// oracle.get("children", "properties").add(buildProperty("requiresCriteria","false"));
-// oracle.get("children", "properties").add(buildProperty("supportsOuterJoins","true"));
-// oracle.get("children", "properties").add(buildProperty("useCommentsInSourceQuery","false"));
-// oracle.get("children", "properties").add(buildProperty("useBindVariables","true"));
-// oracle.get("children", "properties").add(buildProperty("MaxPreparedInsertBatchSize","2048"));
-// oracle.get("children", "properties").add(buildProperty("supportsInnerJoins","true"));
-// oracle.get("children", "properties").add(buildProperty("MaxInCriteriaSize","1000"));
-// oracle.get("children", "properties").add(buildProperty("supportsSelectDistinct","true"));
-// oracle.get("children", "properties").add(buildProperty("supportsOrderBy","true"));
-// oracle.get("children", "properties").add(buildProperty("supportsFullOuterJoins","true"));
-// oracle.get("children", "properties").add(buildProperty("Immutable","false"));
-// oracle.get("children", "properties").add(buildProperty("MaxDependentInPredicates","50"));
-//
-// super.compare(oracleNode, oracle);
- }
-}
Modified: branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/test/resources/teiid-model-config.txt 2011-11-02 15:15:47 UTC (rev 3601)
@@ -82,6 +82,13 @@
"max-occurs" => 1,
"default" => true
},
+ "query-timeout" => {
+ "type" => LONG,
+ "description" => "Set the default query timeout for all queries in milliseconds. 0 indicates no timeout. Lesser timeout values may be set per VDB or by clients. (default 0)",
+ "required" => false,
+ "max-occurs" => 1,
+ "default" => 0L
+ },
"authorization-validator-module" => {
"type" => STRING,
"description" => "Authorization Module; Implementation of org.teiid.dqp.internal.process.AuthorizationValidator class.",
@@ -115,17 +122,17 @@
},
"buffer-service-processor-batch-size" => {
"type" => INT,
- "description" => "The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 512)",
+ "description" => "The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 256)",
"required" => false,
"max-occurs" => 1,
- "default" => 512
+ "default" => 256
},
"buffer-service-connector-batch-size" => {
"type" => INT,
- "description" => "The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 1024)",
+ "description" => "The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 512)",
"required" => false,
"max-occurs" => 1,
- "default" => 1024
+ "default" => 512
},
"buffer-service-max-processing-kb" => {
"type" => INT,
@@ -162,6 +169,27 @@
"max-occurs" => 1,
"default" => 64
},
+ "buffer-service-memory-buffer-space" => {
+ "type" => INT,
+ "description" => "Memory buffer space used by the buffer manager in MB. -1 determines the setting automatically from the max-reserve-kb (default -1). This value cannot be smaller than max-storage-object-size",
+ "required" => false,
+ "max-occurs" => 1,
+ "default" => -1
+ },
+ "buffer-service-memory-buffer-off-heap" => {
+ "type" => BOOLEAN,
+ "description" => "Set to true to hold the memory buffer off-heap. If true you must ensure that the VM can allocate that much direct memory (default false).",
+ "required" => false,
+ "max-occurs" => 1,
+ "default" => false
+ },
+ "buffer-service-max-storage-object-size" => {
+ "type" => INT,
+ "description" => "The maximum size of a buffer managed object (typically a table page or a results batch) in bytes (default 8388608 or 8MB). Setting this value too high will reduce the effectiveness of the memory buffer.",
+ "required" => false,
+ "max-occurs" => 1,
+ "default" => 8388608
+ },
"preparedplan-cache-max-entries" => {
"type" => INT,
"description" => "Max Entries allowed",
Modified: branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/test/resources/teiid-model-json.txt 2011-11-02 15:15:47 UTC (rev 3601)
@@ -9,9 +9,13 @@
"buffer-service-max-reserve-kb" : -1,
"buffer-service-processor-batch-size" : 512,
"buffer-service-use-disk" : true,
+ "buffer-service-memory-buffer-space" : -2,
+ "buffer-service-memory-buffer-off-heap" : true,
+ "buffer-service-max-storage-object-size" : 102400,
"detect-change-events" : true,
"exception-on-max-source-rows" : true,
"lob-chunk-size-in-kb" : 100,
+ "query-timeout" : 23,
"max-active-plans" : 20,
"max-row-fetch-size" : 20480,
"max-source-rows-allowed" : -1,
Modified: branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml
===================================================================
--- branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/jboss-integration/src/test/resources/teiid-sample-config.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,8 @@
<async-thread-pool>teiid-async</async-thread-pool>
<buffer-service use-disk="true" processor-batch-size="512" connector-batch-size="1024"
- max-processing-kb="-1" max-reserve-kb="-1" max-file-size="2048" max-buffer-space="51200" max-open-files="64"/>
+ max-processing-kb="-1" max-reserve-kb="-1" max-file-size="2048" max-buffer-space="51200" max-open-files="64"
+ memory-buffer-space="-2" memory-buffer-off-heap="true" max-storage-object-size="102400"/>
<max-threads>64</max-threads>
<max-active-plans>20</max-active-plans>
@@ -15,6 +16,7 @@
<max-source-rows-allowed>-1</max-source-rows-allowed>
<exception-on-max-source-rows>true</exception-on-max-source-rows>
<detect-change-events>true</detect-change-events>
+ <query-timeout>23</query-timeout>
<!--
<authorization-validator module="javax.api"/>
Modified: branches/as7/metadata/pom.xml
===================================================================
--- branches/as7/metadata/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/metadata/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-metadata</artifactId>
Property changes on: branches/as7/metadata/src/test/java/org/teiid/cdk
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/cdk:3535-3555*
/trunk/metadata/src/test/java/org/teiid/cdk:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/cdk/api
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/cdk/api:3535-3555
/trunk/metadata/src/test/java/org/teiid/cdk/api:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/cdk/unittest
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/cdk/unittest:3535-3555
/trunk/metadata/src/test/java/org/teiid/cdk/unittest:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/core:3535-3555*
/trunk/metadata/src/test/java/org/teiid/core:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/core/util
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/core/util:3535-3555
/trunk/metadata/src/test/java/org/teiid/core/util:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/internal
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/internal:3535-3555*
/trunk/metadata/src/test/java/org/teiid/internal:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/internal/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/internal/core:3535-3555*
/trunk/metadata/src/test/java/org/teiid/internal/core:3507-3597
Property changes on: branches/as7/metadata/src/test/java/org/teiid/internal/core/index
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/metadata/src/test/java/org/teiid/internal/core/index:3535-3555
/trunk/metadata/src/test/java/org/teiid/internal/core/index:3507-3597
Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -5,7 +5,7 @@
<artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
<description>Federated SQL and XML query engine.</description>
<properties>
<ant.version>1.7.0</ant.version>
@@ -78,6 +78,26 @@
<module>documentation</module>
<module>build</module>
</modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <maxmemory>512m</maxmemory>
+ <excludePackageNames>*.internal,com.*,net.*,org.teiid.cache,org.teiid.common.*,org.teiid.core,org.teiid.deployers,org.teiid.dqp.*,org.teiid.jboss,org.teiid.netty.*,org.teiid.odbc,org.teiid.query,org.teiid.resource.*,org.teiid.rhq.*,org.teiid.runtime,org.teiid.security,org.teiid.services,org.teiid.templates,org.teiid.test.*,org.teiid.transport,org.teiid.vdb.*</excludePackageNames>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>aggregate-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<profile>
<!--
@@ -106,6 +126,15 @@
</plugins>
</pluginManagement>
<plugins>
+ <!-- workaround for build errors with javadoc:aggregate-jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <preparationGoals>clean install</preparationGoals>
+ </configuration>
+ </plugin>
<!-- Specify the compiler options and settings -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -183,27 +212,8 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.5</version>
- </plugin>
</plugins>
</build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <aggregate>true</aggregate>
- <maxmemory>512m</maxmemory>
- <excludePackageNames>*.internal</excludePackageNames>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
<repositories>
<repository>
<id>jboss-public-repository</id>
@@ -463,11 +473,6 @@
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-connector</artifactId>
- <version>${jbossas-version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
<artifactId>jboss-as-subsystem-test</artifactId>
<version>${jbossas-version}</version>
</dependency>
Modified: branches/as7/runtime/pom.xml
===================================================================
--- branches/as7/runtime/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -56,6 +56,7 @@
import org.teiid.logging.LogManager;
import org.teiid.net.TeiidURL.CONNECTION.AuthenticationType;
import org.teiid.odbc.PGUtil.PgColInfo;
+import org.teiid.query.parser.SQLParserUtil;
import org.teiid.runtime.RuntimePlugin;
import org.teiid.transport.ODBCClientInstance;
import org.teiid.transport.PgFrontendProtocol.NullTerminatedStringDataInputStream;
@@ -71,11 +72,11 @@
private static Pattern pkPattern = Pattern.compile("select ta.attname, ia.attnum, ic.relname, n.nspname, tc.relname " +//$NON-NLS-1$
"from pg_catalog.pg_attribute ta, pg_catalog.pg_attribute ia, pg_catalog.pg_class tc, pg_catalog.pg_index i, " +//$NON-NLS-1$
- "pg_catalog.pg_namespace n, pg_catalog.pg_class ic where tc.relname = (E?(?:'[^']*')+) AND n.nspname = (E?(?:'[^']*')+).*" );//$NON-NLS-1$
+ "pg_catalog.pg_namespace n, pg_catalog.pg_class ic where tc.relname = (E?(?:'[^']*')+) AND n.nspname = (E?(?:'[^']*')+).*", Pattern.DOTALL|Pattern.CASE_INSENSITIVE);//$NON-NLS-1$
private static Pattern pkKeyPattern = Pattern.compile("select ta.attname, ia.attnum, ic.relname, n.nspname, NULL from " + //$NON-NLS-1$
"pg_catalog.pg_attribute ta, pg_catalog.pg_attribute ia, pg_catalog.pg_class ic, pg_catalog.pg_index i, " + //$NON-NLS-1$
- "pg_catalog.pg_namespace n where ic.relname = (E?(?:'[^']*')+) AND n.nspname = (E?(?:'[^']*')+) .*"); //$NON-NLS-1$
+ "pg_catalog.pg_namespace n where ic.relname = (E?(?:'[^']*')+) AND n.nspname = (E?(?:'[^']*')+) .*", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private Pattern fkPattern = Pattern.compile("select\\s+((?:'[^']*')+)::name as PKTABLE_CAT," + //$NON-NLS-1$
"\\s+n2.nspname as PKTABLE_SCHEM," + //$NON-NLS-1$
@@ -141,22 +142,21 @@
"\\s+left outer join pg_catalog.pg_constraint cn" + //$NON-NLS-1$
"\\s+on cn.conrelid = ref.confrelid" + //$NON-NLS-1$
"\\s+and cn.contype = 'p'\\)" + //$NON-NLS-1$
- "\\s+order by ref.oid, ref.i"); //$NON-NLS-1$
+ "\\s+order by ref.oid, ref.i", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private static Pattern preparedAutoIncrement = Pattern.compile("select 1 \\s*from pg_catalog.pg_attrdef \\s*where adrelid = \\$1 AND adnum = \\$2 " + //$NON-NLS-1$
- "\\s*and pg_catalog.pg_get_expr\\(adbin, adrelid\\) \\s*like '%nextval\\(%'", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ "\\s*and pg_catalog.pg_get_expr\\(adbin, adrelid\\) \\s*like '%nextval\\(%'", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private static Pattern cursorSelectPattern = Pattern.compile("DECLARE \"(\\w+)\" CURSOR(\\s(WITH HOLD|SCROLL))? FOR (.*)", Pattern.CASE_INSENSITIVE|Pattern.DOTALL); //$NON-NLS-1$
- private static Pattern fetchPattern = Pattern.compile("FETCH (\\d+) IN \"(\\w+)\".*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern movePattern = Pattern.compile("MOVE (\\d+) IN \"(\\w+)\".*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern closePattern = Pattern.compile("CLOSE \"(\\w+)\"", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern fetchPattern = Pattern.compile("FETCH (\\d+) IN \"(\\w+)\".*", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern movePattern = Pattern.compile("MOVE (\\d+) IN \"(\\w+)\".*", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern closePattern = Pattern.compile("CLOSE \"(\\w+)\"", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern deallocatePattern = Pattern.compile("DEALLOCATE \"(\\w+\\d+_*)\"", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern releasePattern = Pattern.compile("RELEASE (\\w+\\d?_*)", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern savepointPattern = Pattern.compile("SAVEPOINT (\\w+\\d?_*)", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern rollbackPattern = Pattern.compile("ROLLBACK\\s*(to)*\\s*(\\w+\\d+_*)*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern deallocatePattern = Pattern.compile("DEALLOCATE(?:\\s+PREPARE)?\\s+(.*)", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern releasePattern = Pattern.compile("RELEASE (\\w+\\d?_*)", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern savepointPattern = Pattern.compile("SAVEPOINT (\\w+\\d?_*)", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern rollbackPattern = Pattern.compile("ROLLBACK\\s*(to)*\\s*(\\w+\\d+_*)*", Pattern.DOTALL|Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
-
private TeiidDriver driver;
private ODBCClientRemote client;
private Properties props;
@@ -551,11 +551,9 @@
if (sql == null) {
return null;
}
+ Matcher m = null;
// selects are coming with "select\t" so using a space after "select" does not always work
if (StringUtil.startsWithIgnoreCase(sql, "select")) { //$NON-NLS-1$
- modified = sql.replace('\n', ' ');
-
- Matcher m = null;
if ((m = pkPattern.matcher(modified)).matches()) {
return new StringBuffer("SELECT k.Name AS attname, convert(Position, short) AS attnum, TableName AS relname, SchemaName AS nspname, TableName AS relname") //$NON-NLS-1$
.append(" FROM SYS.KeyColumns k") //$NON-NLS-1$
@@ -606,19 +604,21 @@
else if (sql.equalsIgnoreCase("show max_identifier_length")){ //$NON-NLS-1$
return "select 63"; //$NON-NLS-1$
}
- else {
- Matcher m = setPattern.matcher(sql);
- if (m.matches()) {
- return "SET " + m.group(2) + " " + m.group(4); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (modified.equalsIgnoreCase("BEGIN")) { //$NON-NLS-1$
- return "START TRANSACTION"; //$NON-NLS-1$
- }
- else if ((m = rollbackPattern.matcher(modified)).matches()) {
- return "ROLLBACK"; //$NON-NLS-1$
- }
+ else if ((m = setPattern.matcher(sql)).matches()) {
+ return "SET " + m.group(2) + " " + m.group(4); //$NON-NLS-1$ //$NON-NLS-2$
}
- modified = sql;
+ else if (modified.equalsIgnoreCase("BEGIN")) { //$NON-NLS-1$
+ return "START TRANSACTION"; //$NON-NLS-1$
+ }
+ else if ((m = rollbackPattern.matcher(modified)).matches()) {
+ return "ROLLBACK"; //$NON-NLS-1$
+ }
+ else if ((m = savepointPattern.matcher(sql)).matches()) {
+ return "SELECT 0"; //$NON-NLS-1$
+ }
+ else if ((m = releasePattern.matcher(sql)).matches()) {
+ return "SELECT 0"; //$NON-NLS-1$
+ }
//these are somewhat dangerous
modified = modified.replaceAll("::[A-Za-z0-9]*", " "); //$NON-NLS-1$ //$NON-NLS-2$
modified = modified.replaceAll("'pg_toast'", "'SYS'"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -933,16 +933,10 @@
cursorClose(m.group(1));
results.getResultsReceiver().receiveResults(1);
}
- else if ((m = savepointPattern.matcher(sql)).matches()) {
- client.sendCommandComplete("SAVEPOINT", 0); //$NON-NLS-1$
- results.getResultsReceiver().receiveResults(1);
- }
- else if ((m = releasePattern.matcher(sql)).matches()) {
- client.sendCommandComplete("RELEASE", 0); //$NON-NLS-1$
- results.getResultsReceiver().receiveResults(1);
- }
else if ((m = deallocatePattern.matcher(sql)).matches()) {
- closePreparedStatement(m.group(1));
+ String plan_name = m.group(1);
+ plan_name = SQLParserUtil.normalizeId(plan_name);
+ closePreparedStatement(plan_name);
client.sendCommandComplete("DEALLOCATE", 0); //$NON-NLS-1$
results.getResultsReceiver().receiveResults(1);
}
Modified: branches/as7/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -27,9 +27,9 @@
import java.io.Serializable;
import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.impl.BufferFrontedFileStoreCache;
import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.common.buffer.impl.FileStorageManager;
-import org.teiid.common.buffer.impl.FileStoreCache;
import org.teiid.common.buffer.impl.MemoryStorageManager;
import org.teiid.common.buffer.impl.SplittableStorageManager;
import org.teiid.core.TeiidComponentException;
@@ -63,6 +63,9 @@
private int maxReserveKb = BufferManager.DEFAULT_RESERVE_BUFFER_KB;
private long maxBufferSpace = FileStorageManager.DEFAULT_MAX_BUFFERSPACE>>20;
private boolean inlineLobs = true;
+ private long memoryBufferSpace = -1;
+ private int maxStorageObjectSize = BufferFrontedFileStoreCache.DEFAuLT_MAX_OBJECT_SIZE;
+ private boolean memoryBufferOffHeap;
private FileStorageManager fsm;
/**
@@ -86,7 +89,6 @@
this.bufferMgr.setProcessorBatchSize(Integer.valueOf(processorBatchSize));
this.bufferMgr.setMaxReserveKB(this.maxReserveKb);
this.bufferMgr.setMaxProcessingKB(this.maxProcessingKb);
-
this.bufferMgr.initialize();
// If necessary, add disk storage manager
@@ -101,9 +103,23 @@
fsm.setMaxBufferSpace(maxBufferSpace*MB);
SplittableStorageManager ssm = new SplittableStorageManager(fsm);
ssm.setMaxFileSize(maxFileSize);
- FileStoreCache fsc = new FileStoreCache();
+ BufferFrontedFileStoreCache fsc = new BufferFrontedFileStoreCache();
+ fsc.setMaxStorageObjectSize(maxStorageObjectSize);
+ fsc.setDirect(memoryBufferOffHeap);
+ int batchOverheadKB = (int)(this.memoryBufferSpace<0?(this.bufferMgr.getMaxReserveKB()<<8):this.memoryBufferSpace)>>20;
+ this.bufferMgr.setMaxReserveKB(Math.max(0, this.bufferMgr.getMaxReserveKB() - batchOverheadKB));
+ if (memoryBufferSpace < 0) {
+ //use approximately 25% of what's set aside for the reserved
+ fsc.setMemoryBufferSpace(((long)this.bufferMgr.getMaxReserveKB()) << 8);
+ } else {
+ //scale from MB to bytes
+ fsc.setMemoryBufferSpace(memoryBufferSpace << 20);
+ }
+ if (!memoryBufferOffHeap && this.maxReserveKb < 0) {
+ //adjust the value
+ this.bufferMgr.setMaxReserveKB(this.bufferMgr.getMaxReserveKB() - (int)Math.min(this.bufferMgr.getMaxReserveKB(), (fsc.getMemoryBufferSpace()>>10)));
+ }
fsc.setStorageManager(ssm);
- fsc.setMaxBufferSpace(maxBufferSpace*MB);
fsc.initialize();
this.bufferMgr.setCache(fsc);
} else {
@@ -229,4 +245,28 @@
public long getReadAttempts() {
return bufferMgr.getReadAttempts();
}
+
+ public long getMemoryBufferSpace() {
+ return memoryBufferSpace;
+ }
+
+ public int getMaxStorageObjectSize() {
+ return maxStorageObjectSize;
+ }
+
+ public boolean isMemoryBufferOffHeap() {
+ return memoryBufferOffHeap;
+ }
+
+ public void setMemoryBufferOffHeap(boolean memoryBufferOffHeap) {
+ this.memoryBufferOffHeap = memoryBufferOffHeap;
+ }
+
+ public void setMemoryBufferSpace(int memoryBufferSpace) {
+ this.memoryBufferSpace = memoryBufferSpace;
+ }
+
+ public void setMaxStorageObjectSize(int maxStorageObjectSize) {
+ this.maxStorageObjectSize = maxStorageObjectSize;
+ }
}
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -56,6 +56,7 @@
import org.teiid.client.util.ResultsFuture;
import org.teiid.core.util.ObjectConverterUtil;
import org.teiid.core.util.ReflectionHelper;
+import org.teiid.core.util.StringUtil;
import org.teiid.jdbc.ResultSetImpl;
import org.teiid.jdbc.TeiidSQLException;
import org.teiid.logging.LogConstants;
@@ -112,19 +113,20 @@
while (true) {
try {
nextFuture = rs.submitNext();
- if (!nextFuture.isDone()) {
- nextFuture.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
- @Override
- public void onCompletion(ResultsFuture<Boolean> future) {
- if (processRow(future)) {
- if (rowsSent != rows2Send) {
- //this can be recursive, but ideally won't be called many times
- ResultsWorkItem.this.run();
- }
- }
- }
- });
- return;
+ synchronized (nextFuture) {
+ if (!nextFuture.isDone()) {
+ nextFuture.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
+ @Override
+ public void onCompletion(ResultsFuture<Boolean> future) {
+ if (processRow(future)) {
+ if (rowsSent != rows2Send) {
+ ResultsWorkItem.this.run();
+ }
+ }
+ }
+ });
+ return;
+ }
}
if (!processRow(nextFuture)) {
break;
@@ -420,33 +422,36 @@
@Override
public void sendCommandComplete(String sql, int updateCount) {
startMessage('C');
- sql = sql.trim().toUpperCase();
// TODO remove remarks at the beginning
String tag;
- if (sql.startsWith("INSERT")) {
+ if (StringUtil.startsWithIgnoreCase(sql, "INSERT")) {
tag = "INSERT 0 " + updateCount;
- } else if (sql.startsWith("DELETE")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "DELETE")) {
tag = "DELETE " + updateCount;
- } else if (sql.startsWith("UPDATE")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "UPDATE")) {
tag = "UPDATE " + updateCount;
- } else if (sql.startsWith("SELECT") || sql.startsWith("CALL")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "SELECT") || StringUtil.startsWithIgnoreCase(sql, "CALL")) {
tag = "SELECT";
- } else if (sql.startsWith("BEGIN") || sql.startsWith("START TRANSACTION")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "BEGIN") || StringUtil.startsWithIgnoreCase(sql, "START TRANSACTION")) {
tag = "BEGIN";
- } else if (sql.startsWith("COMMIT")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "COMMIT")) {
tag = "COMMIT";
- } else if (sql.startsWith("ROLLBACK")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "ROLLBACK")) {
tag = "ROLLBACK";
- } else if (sql.startsWith("SET ")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "SET ")) {
tag = "SET";
- } else if (sql.startsWith("DECLARE CURSOR")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "DECLARE CURSOR")) {
tag = "DECLARE CURSOR";
- } else if (sql.startsWith("CLOSE CURSOR")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "CLOSE CURSOR")) {
tag = "CLOSE CURSOR";
- } else if (sql.startsWith("FETCH")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "FETCH")) {
tag = "FETCH "+ updateCount;
- } else if (sql.startsWith("MOVE")) {
+ } else if (StringUtil.startsWithIgnoreCase(sql, "MOVE")) {
tag = "MOVE "+ updateCount;
+ } else if (StringUtil.startsWithIgnoreCase(sql, "RELEASE")) {
+ tag = "RELEASE "+ updateCount;
+ } else if (StringUtil.startsWithIgnoreCase(sql, "SAVEPOINT")) {
+ tag = "SAVEPOINT "+ updateCount;
}
else {
tag = sql;
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -59,8 +59,10 @@
private String trustStoreFileName;
private String trustStorePassword = ""; //$NON-NLS-1$
private String authenticationMode = ONEWAY;
+ private String[] enabledCipherSuites;
- public SSLEngine getServerSSLEngine() throws IOException, GeneralSecurityException {
+
+ public SSLEngine getServerSSLEngine() throws IOException, GeneralSecurityException {
if (!isSslEnabled()) {
return null;
}
@@ -86,10 +88,13 @@
if (!(Arrays.asList(result.getSupportedCipherSuites()).contains(SocketUtil.ANON_CIPHER_SUITE))) {
throw new GeneralSecurityException(RuntimePlugin.Util.getString("SSLConfiguration.no_anonymous")); //$NON-NLS-1$
}
- result.setEnabledCipherSuites(new String[] {
- SocketUtil.ANON_CIPHER_SUITE
- });
- }
+ result.setEnabledCipherSuites(new String[] {SocketUtil.ANON_CIPHER_SUITE});
+ } else {
+ if (this.enabledCipherSuites != null) {
+ result.setEnabledCipherSuites(this.enabledCipherSuites);
+ }
+ }
+
result.setNeedClientAuth(TWOWAY.equals(authenticationMode));
return result;
}
@@ -142,4 +147,11 @@
this.authenticationMode = value;
}
+ public void setEnabledCipherSuites(String enabledCipherSuites) {
+ this.enabledCipherSuites = enabledCipherSuites.split(","); //$NON-NLS-1$
+ }
+
+ public String[] getEnabledCipherSuites() {
+ return enabledCipherSuites;
+ }
}
Property changes on: branches/as7/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java:3535-3555
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -33,6 +33,7 @@
import org.teiid.core.crypto.DhKeyGenerator;
import org.teiid.core.crypto.NullCryptor;
import org.teiid.dqp.internal.process.DQPWorkContext;
+import org.teiid.dqp.internal.process.DQPWorkContext.Version;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
@@ -125,6 +126,8 @@
}
private void receivedHahdshake(Handshake handshake) throws CommunicationException {
+ String clientVersion = handshake.getVersion();
+ this.workContext.setClientVersion(Version.getVersion(clientVersion));
if (usingEncryption) {
byte[] returnedPublicKey = handshake.getPublicKey();
Property changes on: branches/as7/runtime/src/main/java/org/teiid/transport/pg
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/main/java/org/teiid/transport/pg:3535-3555*
/trunk/runtime/src/main/java/org/teiid/transport/pg:3507-3597
Property changes on: branches/as7/runtime/src/main/java/org/teiid/transport/pg/PGbytea.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/main/java/org/teiid/transport/pg/PGbytea.java:3535-3555
/trunk/runtime/src/main/java/org/teiid/transport/pg/PGbytea.java:3507-3597
Property changes on: branches/as7/runtime/src/main/resources/org/teiid/transport
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/main/resources/org/teiid/transport:3535-3555*
/trunk/runtime/src/main/resources/org/teiid/transport:3507-3597
Modified: branches/as7/runtime/src/test/java/org/teiid/deployers/TestExtendedPropertyMetadata.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/deployers/TestExtendedPropertyMetadata.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/test/java/org/teiid/deployers/TestExtendedPropertyMetadata.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -41,7 +41,7 @@
Assert.assertEquals(false, metadata.advanced());
Assert.assertEquals(false, metadata.required());
Assert.assertEquals(false, metadata.masked());
- Assert.assertEquals(true , metadata.readOnly());
+ Assert.assertEquals(false , metadata.readOnly());
}
@Test
@@ -57,7 +57,7 @@
Assert.assertEquals(true, metadata.advanced());
Assert.assertEquals(true, metadata.required());
Assert.assertEquals(false, metadata.masked());
- Assert.assertEquals(true , metadata.readOnly());
+ Assert.assertEquals(false , metadata.readOnly());
Assert.assertEquals(allowed , Arrays.asList(metadata.allowed()));
}
@@ -74,7 +74,7 @@
Assert.assertEquals(true, metadata.advanced());
Assert.assertEquals(true, metadata.required());
Assert.assertEquals(false, metadata.masked());
- Assert.assertEquals(true , metadata.readOnly());
+ Assert.assertEquals(false , metadata.readOnly());
Assert.assertEquals(allowed , Arrays.asList(metadata.allowed()));
}
@@ -91,7 +91,7 @@
Assert.assertEquals(true, metadata.advanced());
Assert.assertEquals(true, metadata.required());
Assert.assertEquals(false, metadata.masked());
- Assert.assertEquals(true , metadata.readOnly());
+ Assert.assertEquals(false , metadata.readOnly());
Assert.assertEquals(allowed , Arrays.asList(metadata.allowed()));
}
}
Property changes on: branches/as7/runtime/src/test/java/org/teiid/dqp
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/test/java/org/teiid/dqp:3535-3555*
/trunk/runtime/src/test/java/org/teiid/dqp:3507-3597
Property changes on: branches/as7/runtime/src/test/java/org/teiid/dqp/service
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/test/java/org/teiid/dqp/service:3535-3555*
/trunk/runtime/src/test/java/org/teiid/dqp/service:3507-3597
Property changes on: branches/as7/runtime/src/test/java/org/teiid/dqp/service/buffer
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/runtime/src/test/java/org/teiid/dqp/service/buffer:3535-3555
/trunk/runtime/src/test/java/org/teiid/dqp/service/buffer:3507-3597
Modified: branches/as7/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -22,7 +22,9 @@
package org.teiid.dqp.service.buffer;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -32,12 +34,12 @@
import org.junit.Test;
import org.teiid.common.buffer.BufferManager;
+import org.teiid.common.buffer.BufferManager.TupleSourceType;
import org.teiid.common.buffer.TupleBatch;
import org.teiid.common.buffer.TupleBuffer;
-import org.teiid.common.buffer.BufferManager.TupleSourceType;
+import org.teiid.common.buffer.impl.BufferFrontedFileStoreCache;
import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.common.buffer.impl.FileStorageManager;
-import org.teiid.common.buffer.impl.FileStoreCache;
import org.teiid.common.buffer.impl.SplittableStorageManager;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.DataTypeManager.DefaultDataTypes;
@@ -63,7 +65,7 @@
assertTrue(svc.isUseDisk());
BufferManagerImpl mgr = svc.getBufferManager();
- SplittableStorageManager ssm = (SplittableStorageManager)((FileStoreCache)mgr.getCache()).getStorageManager();
+ SplittableStorageManager ssm = (SplittableStorageManager)((BufferFrontedFileStoreCache)mgr.getCache()).getStorageManager();
assertTrue(((FileStorageManager)ssm.getStorageManager()).getDirectory().endsWith(svc.getBufferDirectory().getName()));
}
@@ -102,8 +104,8 @@
svc.start();
BufferManager mgr = svc.getBufferManager();
- assertEquals(6570, mgr.getSchemaSize(schema));
- assertEquals(256, mgr.getProcessorBatchSize(schema));
+ assertEquals(3364096, mgr.getSchemaSize(schema));
+ assertEquals(128, mgr.getProcessorBatchSize(schema));
}
@Test
@@ -128,36 +130,45 @@
buffer.setBatchSize(50);
buffer.setId("state_id"+i);
- for(int batch = 0; batch < 3; batch++) {
+ for (int batch=0; batch<3; batch++) {
for (int row = 0; row < 50; row++) {
- buffer.addTuple(Arrays.asList(new Object[] {"String"+row, new Integer(row)}));
+ int val = (i*150)+(batch*50)+row;
+ buffer.addTuple(Arrays.asList(new Object[] {"String"+val, new Integer(val)}));
}
}
+ buffer.close();
mgr.distributeTupleBuffer(buffer.getId(), buffer);
}
- ((BufferManagerImpl)mgr).getState(new FileOutputStream(UnitTestUtil.getTestScratchPath()+"/teiid/statetest"));
+ FileOutputStream fo = new FileOutputStream(UnitTestUtil.getTestScratchPath()+"/teiid/statetest");
+ ((BufferManagerImpl)mgr).getState(fo);
+ fo.close();
+ svc.stop();
// now read back
BufferServiceImpl svc2 = new BufferServiceImpl();
- svc2.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
+ svc2.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/2");
svc2.setUseDisk(true);
svc2.start();
- BufferManager mgr2 = svc2.getBufferManager();
- ((BufferManagerImpl)mgr2).setState(new FileInputStream(UnitTestUtil.getTestScratchPath()+"/teiid/statetest"));
+ BufferManagerImpl mgr2 = svc2.getBufferManager();
+ FileInputStream fis = new FileInputStream(UnitTestUtil.getTestScratchPath()+"/teiid/statetest");
+ mgr2.setState(fis);
+ fis.close();
for (int i = 0; i < 5; i++) {
String id = "state_id"+i;
- TupleBuffer buffer = mgr.getTupleBuffer(id);
-
- TupleBatch tb = buffer.getBatch(50);
- List[] rows = tb.getAllTuples();
- for (int row = 0; row < 50; row++) {
- assertEquals("String"+row, rows[row].get(0));
- assertEquals(row, rows[row].get(1));
+ TupleBuffer buffer = mgr2.getTupleBuffer(id);
+ for (int batch=0; batch<3; batch++) {
+ TupleBatch tb = buffer.getBatch((batch*50)+1);
+ List[] rows = tb.getAllTuples();
+ for (int row = 0; row < 50; row++) {
+ int val = (i*150)+(batch*50)+row;
+ assertEquals("String"+val, rows[row].get(0));
+ assertEquals(val, rows[row].get(1));
+ }
}
}
+ svc2.stop();
}
-
}
Modified: branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/runtime/src/test/java/org/teiid/transport/TestCommSockets.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -217,6 +217,7 @@
@Test public void testAnonSSLConnect() throws Exception {
SSLConfiguration config = new SSLConfiguration();
config.setMode(SSLConfiguration.ENABLED);
+ config.setEnabledCipherSuites("x"); //ensure that this cipher suite is not used
config.setAuthenticationMode(SSLConfiguration.ANONYMOUS);
Properties p = new Properties();
p.setProperty("org.teiid.sockets.soTimeout", "100");
@@ -255,4 +256,10 @@
conn.close();
}
+ @Test public void testEnableCipherSuites() throws Exception {
+ SSLConfiguration config = new SSLConfiguration();
+ config.setEnabledCipherSuites("x,y,z");
+ assertArrayEquals(new String[] {"x","y","z"}, config.getEnabledCipherSuites());
+ }
+
}
Modified: branches/as7/test-integration/common/pom.xml
===================================================================
--- branches/as7/test-integration/common/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-integration-common</artifactId>
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/arquillian/TestDeployment.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -17,6 +17,7 @@
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teiid.adminapi.Admin;
@@ -31,6 +32,7 @@
@RunWith(Arquillian.class)
@SuppressWarnings("nls")
+@Ignore
public class TestDeployment {
@Test
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/cdk
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/cdk:3535-3555*
/trunk/test-integration/common/src/test/java/org/teiid/cdk:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/cdk/api
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/cdk/api:3535-3555
/trunk/test-integration/common/src/test/java/org/teiid/cdk/api:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/dqp
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/dqp:3535-3555*
/trunk/test-integration/common/src/test/java/org/teiid/dqp:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/dqp/internal:3535-3555*
/trunk/test-integration/common/src/test/java/org/teiid/dqp/internal:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/process
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/dqp/internal/process:3535-3555
/trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process:3507-3597
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestXMLTypeTranslations.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -35,6 +35,7 @@
import org.teiid.core.util.ObjectConverterUtil;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.dqp.message.RequestID;
+import org.teiid.dqp.service.FakeBufferService;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
@@ -109,7 +110,7 @@
Mockito.stub(rwi.getDqpWorkContext()).toReturn(workContext);
Mockito.stub(core.getRequestWorkItem((RequestID)Mockito.anyObject())).toReturn(rwi);
- DataTierManagerImpl dataMgr = new DataTierManagerImpl(core, null, true);
+ DataTierManagerImpl dataMgr = new DataTierManagerImpl(core, new FakeBufferService().getBufferManager(), true);
doProcess(metadata,
sql,
finder, dataMgr , new List[] {Arrays.asList(new String(ObjectConverterUtil.convertToByteArray(new FileInputStream(UnitTestUtil.getTestDataFile("test-schema.xsd")))))}, DEBUG); //$NON-NLS-1$
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -23,7 +23,12 @@
import java.io.File;
import java.security.Principal;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
import javax.security.auth.Subject;
@@ -39,12 +44,21 @@
import org.teiid.cache.DefaultCacheFactory;
import org.teiid.client.DQP;
import org.teiid.client.security.ILogon;
-import org.teiid.deployers.*;
+import org.teiid.core.util.UnitTestUtil;
+import org.teiid.deployers.CompositeVDB;
+import org.teiid.deployers.MetadataStoreGroup;
+import org.teiid.deployers.UDFMetaData;
+import org.teiid.deployers.VDBLifeCycleListener;
+import org.teiid.deployers.VDBRepository;
+import org.teiid.deployers.VirtualDatabaseException;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
import org.teiid.dqp.internal.datamgr.FakeTransactionService;
-import org.teiid.dqp.internal.process.*;
-import org.teiid.dqp.service.BufferService;
+import org.teiid.dqp.internal.process.CachedResults;
+import org.teiid.dqp.internal.process.DQPConfiguration;
+import org.teiid.dqp.internal.process.DQPCore;
+import org.teiid.dqp.internal.process.PreparedPlan;
+import org.teiid.dqp.internal.process.SessionAwareCache;
import org.teiid.dqp.service.FakeBufferService;
import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.MetadataRepository;
@@ -63,6 +77,7 @@
import org.teiid.query.tempdata.GlobalTableStore;
import org.teiid.query.tempdata.GlobalTableStoreImpl;
import org.teiid.security.SecurityHelper;
+import org.teiid.services.BufferServiceImpl;
import org.teiid.services.SessionServiceImpl;
import org.teiid.transport.ClientServiceRegistry;
import org.teiid.transport.ClientServiceRegistryImpl;
@@ -89,10 +104,14 @@
}
public FakeServer(DQPConfiguration config) {
-
+ this(config, false);
+ }
+
+ public FakeServer(DQPConfiguration config, boolean realBufferMangaer) {
+
Map<String, SecurityDomainContext> securityDomainMap = new HashMap<String, SecurityDomainContext>();
- SecurityDomainContext securityContext = Mockito.mock(SecurityDomainContext.class);
- AuthenticationManager authManager = new AuthenticationManager() {
+ SecurityDomainContext securityContext = Mockito.mock(SecurityDomainContext.class);
+ AuthenticationManager authManager = new AuthenticationManager() {
@Override
public String getSecurityDomain() {
return null;
@@ -115,13 +134,13 @@
Map<String, Object> contextMap) {
return null;
}
-
- };
- Mockito.stub(securityContext.getAuthenticationManager()).toReturn(authManager);
- securityDomainMap.put("somedomain", securityContext); //$NON-NLS-1$
- sessionService.setSecurityHelper(Mockito.mock(SecurityHelper.class));
+
+ };
+ Mockito.stub(securityContext.getAuthenticationManager()).toReturn(authManager);
+ securityDomainMap.put("somedomain", securityContext); //$NON-NLS-1$
+ sessionService.setSecurityHelper(Mockito.mock(SecurityHelper.class));
- sessionService.setSecurityDomains(Arrays.asList("somedomain"), securityDomainMap);
+ sessionService.setSecurityDomains(Arrays.asList("somedomain"), securityDomainMap);
this.logon = new LogonImpl(sessionService, null);
this.repo.addListener(new VDBLifeCycleListener() {
@@ -150,22 +169,28 @@
this.repo.start();
this.sessionService.setVDBRepository(repo);
- BufferService fbs = new FakeBufferService();
- this.dqp.setBufferService(fbs);
+ if (!realBufferMangaer) {
+ this.dqp.setBufferService(new FakeBufferService());
+ } else {
+ BufferServiceImpl bsi = new BufferServiceImpl();
+ bsi.setDiskDirectory(UnitTestUtil.getTestScratchPath());
+ this.dqp.setBufferService(bsi);
+ bsi.start();
+ }
DefaultCacheFactory dcf = new DefaultCacheFactory() {
@Override
public boolean isReplicated() {
return true; //pretend to be replicated for matview tests
}
- };
-
- SessionAwareCache rs = new SessionAwareCache<CachedResults>(dcf, SessionAwareCache.Type.RESULTSET, new CacheConfiguration(Policy.LRU, 60, 250, "resultsetcache"));
- rs.setBufferManager(fbs.getBufferManager());
+ };
+ SessionAwareCache rs = new SessionAwareCache<CachedResults>(dcf, SessionAwareCache.Type.RESULTSET, new CacheConfiguration(Policy.LRU, 60, 250, "resultsetcache"));
+ SessionAwareCache ppc = new SessionAwareCache<PreparedPlan>(dcf, SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration());
+ rs.setBufferManager(this.dqp.getBufferManager());
this.dqp.setResultsetCache(rs);
- SessionAwareCache ppc = new SessionAwareCache<PreparedPlan>(dcf, SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration());
- ppc.setBufferManager(fbs.getBufferManager());
- this.dqp.setPreparedPlanCache(ppc);
+ ppc.setBufferManager(this.dqp.getBufferManager());
+ this.dqp.setPreparedPlanCache(ppc);
+
this.dqp.setTransactionService(new FakeTransactionService());
cmr = Mockito.mock(ConnectorManagerRepository.class);
@@ -183,6 +208,10 @@
registerClientService(DQP.class, dqp, null);
}
+ public DQPCore getDqp() {
+ return dqp;
+ }
+
public void setConnectorManagerRepository(ConnectorManagerRepository cmr) {
this.cmr = cmr;
}
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -35,6 +35,7 @@
import org.jgroups.Channel;
import org.jgroups.JChannelFactory;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.UnitTestUtil;
@@ -46,6 +47,7 @@
import org.teiid.replication.jboss.JGroupsObjectReplicator;
@SuppressWarnings("nls")
+@Ignore
public class TestMatViewReplication {
private static final String MATVIEWS = "matviews";
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/transport
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport:3535-3555*
/trunk/test-integration/common/src/test/java/org/teiid/transport:3507-3597
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -36,6 +36,7 @@
import org.junit.Test;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.util.UnitTestUtil;
+import org.teiid.dqp.internal.process.DQPConfiguration;
import org.teiid.jdbc.FakeServer;
import org.teiid.jdbc.TeiidDriver;
import org.teiid.jdbc.TestMMDatabaseMetaData;
@@ -53,7 +54,9 @@
config.setBindAddress(addr.getHostName());
config.setPortNumber(0);
- FakeServer server = new FakeServer();
+ DQPConfiguration dqpConfig = new DQPConfiguration();
+ dqpConfig.setMaxActivePlans(2);
+ FakeServer server = new FakeServer(dqpConfig);
server.setUseCallingThread(false);
server.deployVDB("parts", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
@@ -81,13 +84,23 @@
}
}
- /**
- * Under the covers this still executes a prepared statement due to the driver handling
- */
@Test public void testSelect() throws Exception {
Statement s = conn.createStatement();
assertTrue(s.execute("select * from tables order by name"));
TestMMDatabaseMetaData.compareResultSet(s.getResultSet());
}
+ /**
+ * Ensures if you start more than the maxActivePlans
+ * where all the plans take up more than output buffer limit
+ * that processing still proceeds
+ * @throws Exception
+ */
+ @Test public void testSimultaneousLargeSelects() throws Exception {
+ for (int j = 0; j < 3; j++) {
+ Statement s = conn.createStatement();
+ assertTrue(s.execute("select * from columns c1, columns c2"));
+ }
+ }
+
}
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java:3455-3509,3535-3555
/trunk/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java:3507-3597
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java 2011-11-02 15:15:47 UTC (rev 3601)
@@ -128,7 +128,7 @@
config.setSSLConfiguration(sslConfig);
addr = new InetSocketAddress(0);
config.setBindAddress(addr.getHostName());
- config.setPortNumber(0);
+ config.setPortNumber(addr.getPort());
odbcTransport = new ODBCSocketListener(addr, config, Mockito.mock(ClientServiceRegistryImpl.class), BufferManagerFactory.getStandaloneBufferManager(), 100000, Mockito.mock(ILogon.class));
odbcTransport.setMaxBufferSize(1000); //set to a small size to ensure buffering over the limit works
FakeServer server = new FakeServer();
Property changes on: branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java:3149-3217,3281-3325
/trunk/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java:3188-3450,3452-3506
+ /branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java:3149-3217,3281-3325,3535-3555
/trunk/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java:3188-3450,3452-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestJDBCSocketTransport
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestJDBCSocketTransport:3535-3555*
/trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestJDBCSocketTransport/testSelect.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport:3535-3555*
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testColumnMetadataWithAlias.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport/testColumnMetadataWithAlias.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testColumnMetadataWithAlias.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testPk.expected
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport/testPk.expected:3281-3325
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testPk.expected:3188-3450,3452-3506
+ /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport/testPk.expected:3281-3325,3535-3555
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testPk.expected:3188-3450,3452-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testPkPrepared.expected
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport/testPkPrepared.expected:3281-3325
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testPkPrepared.expected:3188-3450,3452-3506
+ /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport/testPkPrepared.expected:3281-3325,3535-3555
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testPkPrepared.expected:3188-3450,3452-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestODBCSocketTransport/testSelect.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel:3535-3555*
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testDataTypes.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeyColumns.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testKeys.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected:3220-3275
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected:3188-3450,3452-3506
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected:3220-3275,3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected:3188-3450,3452-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected:3220-3275
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected:3188-3450,3452-3506
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected:3220-3275,3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected:3188-3450,3452-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testReferenceKeyColumns.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testReferenceKeyColumns.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testReferenceKeyColumns.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected:3507-3597
Property changes on: branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected:3535-3555
/trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected:3507-3597
Modified: branches/as7/test-integration/db/pom.xml
===================================================================
--- branches/as7/test-integration/db/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/db/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -9,7 +9,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Property changes on: branches/as7/test-integration/db/src/main/java/org/teiid/internal
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/db/src/main/java/org/teiid/internal:3535-3555*
/trunk/test-integration/db/src/main/java/org/teiid/internal:3507-3597
Property changes on: branches/as7/test-integration/db/src/main/java/org/teiid/internal/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/db/src/main/java/org/teiid/internal/core:3535-3555*
/trunk/test-integration/db/src/main/java/org/teiid/internal/core:3507-3597
Property changes on: branches/as7/test-integration/db/src/main/java/org/teiid/internal/core/xml
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/db/src/main/java/org/teiid/internal/core/xml:3535-3555
/trunk/test-integration/db/src/main/java/org/teiid/internal/core/xml:3507-3597
Property changes on: branches/as7/test-integration/db/src/test/java/com
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/db/src/test/java/com:3535-3555*
/trunk/test-integration/db/src/test/java/com:3507-3597
Property changes on: branches/as7/test-integration/db/src/test/java/org/teiid/internal
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/db/src/test/java/org/teiid/internal:3535-3555*
/trunk/test-integration/db/src/test/java/org/teiid/internal:3507-3597
Property changes on: branches/as7/test-integration/db/src/test/java/org/teiid/internal/core
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.4.x/test-integration/db/src/test/java/org/teiid/internal/core:3535-3555*
/trunk/test-integration/db/src/test/java/org/teiid/internal/core:3507-3597
Modified: branches/as7/test-integration/pom.xml
===================================================================
--- branches/as7/test-integration/pom.xml 2011-11-01 20:16:59 UTC (rev 3600)
+++ branches/as7/test-integration/pom.xml 2011-11-02 15:15:47 UTC (rev 3601)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha1-SNAPSHOT</version>
+ <version>7.6.0.Beta2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-test-integration</artifactId>
13 years, 1 month
teiid SVN: r3600 - in trunk: client/src/main/java/org/teiid/jdbc and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-01 16:16:59 -0400 (Tue, 01 Nov 2011)
New Revision: 3600
Added:
trunk/client/src/main/java/org/teiid/jdbc/NonBlockingRowProcessor.java
trunk/client/src/main/java/org/teiid/jdbc/StatementCallback.java
trunk/client/src/main/java/org/teiid/jdbc/TeiidPreparedStatement.java
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java
trunk/client/src/main/java/org/teiid/jdbc/TeiidStatement.java
trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java
Log:
TEIID-1800 adding a statement callback for non-blocking processing of results.
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-01 20:16:59 UTC (rev 3600)
@@ -36,6 +36,7 @@
<LI><B>Server-side Query Timeouts</B> - default query timeouts can be configured at both the VDB (via the query-timeout VDB property) and entire server (via the teiid-jboss-beans.xml queryTimeout property).
<LI><B>Native Queries</B> - added the ability to specify native query SQL for JDBC physical tables and stored procedures via extension metadata.
<LI><B>View removal hint</B> - the NO_UNNEST hint now also applies to from clause views and subqueries. It will instruct the planner to not perform view flattening.
+ <LI><B>Non-blocking statement execution</B> - Teiid JDBC extensions TeiidStatement and TeiidPreparedStatement can be used to submit queries against embedded connections with a callback to process results in a non-blocking manner.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
Added: trunk/client/src/main/java/org/teiid/jdbc/NonBlockingRowProcessor.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/NonBlockingRowProcessor.java (rev 0)
+++ trunk/client/src/main/java/org/teiid/jdbc/NonBlockingRowProcessor.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.teiid.client.util.ResultsFuture;
+
+/**
+ * Handles the future processing logic and makes the appropriate calls to the callback
+ */
+public class NonBlockingRowProcessor implements
+ ResultsFuture.CompletionListener<Boolean> {
+
+ private static Logger logger = Logger.getLogger(NonBlockingRowProcessor.class.getName());
+ private StatementImpl stmt;
+ private StatementCallback callback;
+
+ public NonBlockingRowProcessor(StatementImpl stmt, StatementCallback callback) {
+ this.stmt = stmt;
+ this.callback = callback;
+ }
+
+ @Override
+ public void onCompletion(ResultsFuture<Boolean> future) {
+ try {
+ boolean hasResultSet = future.get();
+ if (!hasResultSet) {
+ callback.onComplete(stmt);
+ return;
+ }
+ final ResultSetImpl resultSet = stmt.getResultSet();
+ Runnable rowProcessor = new Runnable() {
+ @Override
+ public void run() {
+ while (true) {
+ try {
+ ResultsFuture<Boolean> hasNext = resultSet.submitNext();
+ synchronized (hasNext) {
+ if (!hasNext.isDone()) {
+ hasNext.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
+
+ @Override
+ public void onCompletion(
+ ResultsFuture<Boolean> f) {
+ if (processRow(f)) {
+ run();
+ }
+ }
+ });
+ break; // will be resumed by onCompletion above
+ }
+ }
+ if (!processRow(hasNext)) {
+ break;
+ }
+ } catch (Exception e) {
+ onException(e);
+ }
+ }
+ }
+ };
+ rowProcessor.run();
+ } catch (Exception e) {
+ onException(e);
+ }
+ }
+
+ /**
+ * return true to continue processing
+ */
+ boolean processRow(ResultsFuture<Boolean> hasNext) {
+ try {
+ if (!hasNext.get()) {
+ callback.onComplete(stmt);
+ return false;
+ }
+
+ callback.onRow(stmt, stmt.getResultSet());
+
+ return true;
+ } catch (Exception e) {
+ onException(e);
+ return false;
+ }
+ }
+
+ private void onException(Exception e) {
+ try {
+ callback.onException(stmt, e);
+ } catch (Exception e1) {
+ logger.log(Level.WARNING, "Unhandled exception from StatementCallback", e); //$NON-NLS-1$
+ }
+ }
+
+}
Property changes on: trunk/client/src/main/java/org/teiid/jdbc/NonBlockingRowProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -33,7 +33,6 @@
import java.sql.Clob;
import java.sql.NClob;
import java.sql.ParameterMetaData;
-import java.sql.PreparedStatement;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
@@ -80,7 +79,7 @@
* preparedstatement object.</p>
*/
-public class PreparedStatementImpl extends StatementImpl implements PreparedStatement {
+public class PreparedStatementImpl extends StatementImpl implements TeiidPreparedStatement {
// sql, which this prepared statement is operating on
protected String prepareSql;
@@ -174,6 +173,12 @@
}
@Override
+ public void submitExecute(String sql, StatementCallback callback) throws TeiidSQLException {
+ String msg = JDBCPlugin.Util.getString("JDBC.Method_not_supported"); //$NON-NLS-1$
+ throw new TeiidSQLException(msg);
+ }
+
+ @Override
public ResultSet executeQuery(String sql) throws SQLException {
String msg = JDBCPlugin.Util.getString("JDBC.Method_not_supported"); //$NON-NLS-1$
throw new TeiidSQLException(msg);
@@ -191,6 +196,12 @@
throw new TeiidSQLException(msg);
}
+ @Override
+ public void submitExecute(StatementCallback callback) throws SQLException {
+ NonBlockingRowProcessor processor = new NonBlockingRowProcessor(this, callback);
+ submitExecute(ResultsMode.EITHER).addCompletionListener(processor);
+ }
+
public ResultsFuture<Boolean> submitExecute(ResultsMode mode) throws SQLException {
return executeSql(new String[] {this.prepareSql}, false, mode, false);
}
Added: trunk/client/src/main/java/org/teiid/jdbc/StatementCallback.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/StatementCallback.java (rev 0)
+++ trunk/client/src/main/java/org/teiid/jdbc/StatementCallback.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+/**
+ * A callback for non-blocking statement result processing.
+ * {@link Statement#close()} must still be called to release
+ * statement resources.
+ *
+ * Statement methods, such as cancel, are perfectly valid
+ * even when using a callback.
+ */
+public interface StatementCallback {
+
+ /**
+ * Process the current row of the {@link ResultSet}.
+ * Any call that retrieves non-lob values from the current row
+ * will be performed without blocking on more data from sources.
+ * Calls outside of the current row, such as next(), may block.
+ * @param rs
+ * @throws Exception
+ */
+ void onRow(Statement s, ResultSet rs) throws Exception;
+
+ /**
+ * Called when an exception occurs. No further rows will
+ * be processed by this callback.
+ * @param e
+ */
+ void onException(Statement s, Exception e) throws Exception;
+
+ /**
+ * Called when processing has completed normally.
+ * @param rs
+ */
+ void onComplete(Statement s) throws Exception;
+
+}
Property changes on: trunk/client/src/main/java/org/teiid/jdbc/StatementCallback.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -307,6 +307,12 @@
}
}
+ @Override
+ public void submitExecute(String sql, StatementCallback callback) throws SQLException {
+ NonBlockingRowProcessor processor = new NonBlockingRowProcessor(this, callback);
+ submitExecute(sql).addCompletionListener(processor);
+ }
+
public ResultsFuture<Boolean> submitExecute(String sql) throws SQLException {
return executeSql(new String[] {sql}, false, ResultsMode.EITHER, false);
}
Added: trunk/client/src/main/java/org/teiid/jdbc/TeiidPreparedStatement.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/TeiidPreparedStatement.java (rev 0)
+++ trunk/client/src/main/java/org/teiid/jdbc/TeiidPreparedStatement.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.jdbc;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+/**
+ * This interface provides methods in
+ * addition to the standard JDBC methods.
+ */
+public interface TeiidPreparedStatement extends PreparedStatement {
+
+ /**
+ * Execute the given statement using a non-blocking callback.
+ * This method is only valid for use with embedded connections.
+ * @param callback
+ * @throws SQLException
+ */
+ void submitExecute(StatementCallback callback) throws SQLException;
+
+}
Property changes on: trunk/client/src/main/java/org/teiid/jdbc/TeiidPreparedStatement.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/client/src/main/java/org/teiid/jdbc/TeiidStatement.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/TeiidStatement.java 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/client/src/main/java/org/teiid/jdbc/TeiidStatement.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -23,6 +23,7 @@
package org.teiid.jdbc;
import java.io.Serializable;
+import java.sql.SQLException;
import java.util.Collection;
import org.teiid.client.plan.Annotation;
@@ -99,4 +100,12 @@
* @since 4.2
*/
void setPayload(Serializable payload);
+
+ /**
+ * Execute the given statement using a non-blocking callback.
+ * This method is only valid for use with embedded connections.
+ * @param callback
+ * @throws SQLException
+ */
+ void submitExecute(String sql, StatementCallback callback) throws SQLException;
}
Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2011-11-01 20:16:59 UTC (rev 3600)
@@ -519,7 +519,7 @@
there is a way to make connections that by-pass making a socket based JDBC connection.
You can use slightly modified data source configuration to make a "local" connection, where the JDBC API will lookup a local Teiid runtime in the same VM.</para>
<warning><para>Since DataSources start before before Teiid VDBs are deployed, leave the min pool size of local connections as the default of 0. Otherwise errors will occur on the startup of the Teiid DataSource.</para></warning>
- <note><para>Be default local connections use their calling thread to perform processing operations rather than using an engine thread while the calling thread is blocked.
+ <note><para>By default local connections use their calling thread to perform processing operations rather than using an engine thread while the calling thread is blocked.
To disable this behavior set the connection property useCallingThreads=false.</para></note>
<example>
<title>Local data source</title>
Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml 2011-11-01 20:16:59 UTC (rev 3600)
@@ -389,4 +389,37 @@
</section>
</section>
+ <section>
+ <title>Non-blocking Statement Execution</title>
+ <para>JDBC query execution can indefinitely block the calling thread when a statement is executed or a resultset is being iterated.
+ In some situations you may wish to have your calling threads held in these blocked states. When using embedded connections, you may optionally use the
+ <code>org.teiid.jdbc.TeiidStatement</code> and <code>org.teiid.jdbc.TeiidPreparedStatement</code> interfaces to execute queries with a callback <code>org.teiid.jdbc.StatementCallback</code> that will be notified
+ of statement events, such as an available row, an exception, or completion. Your calling thread will be free to perform other work. The callback will be executed by an engine processing thread as needed. If your results processing is itself blocking and you want query processing to be concurrent with results processing, then your callback should implement onRow
+ handling in a multi-threaded manner to allow the engine thread to continue.
+ </para>
+ <example>
+ <title>Non-blocking Prepared Statement Execution</title>
+ <programlisting>PreparedStatemnt stmt = connection.prepareStatement(sql);
+TeiidPreparedStatement tStmt = stmt.unwrap(TeiidPreparedStatement.class);
+tStmt.submitExecute(new StatementCallback() {
+ @Override
+ public void onRow(Statement s, ResultSet rs) {
+ //any logic that accesses the current row ...
+ System.out.println(rs.getString(1));
+ }
+
+ @Override
+ public void onException(Statement s, Exception e) throws Exception {
+ s.close();
+ }
+
+ @Override
+ public void onComplete(Statement s) throws Exception {
+ s.close();
+ }
+);</programlisting>
+ </example>
+ <note><para>The non-blocking logic is limited to statement execution only. Other JDBC operations, such as connection creation or batched executions do not yet have non-blocking options.</para></note>
+ </section>
+
</chapter>
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -181,10 +181,6 @@
}
}
- public static interface ContextProvider {
- DQPWorkContext getContext(String vdbName, int vdbVersion);
- }
-
private ThreadReuseExecutor processWorkerPool;
// Resources
@@ -364,7 +360,7 @@
}
}, timeout));
}
- boolean runInThread = DQPWorkContext.getWorkContext().useCallingThread() || requestMsg.isSync();
+ boolean runInThread = requestMsg.isSync();
synchronized (waitingPlans) {
if (runInThread || currentlyActivePlans <= maxActivePlans) {
startActivePlan(workItem, !runInThread);
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java 2011-11-01 17:22:07 UTC (rev 3599)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java 2011-11-01 20:16:59 UTC (rev 3600)
@@ -25,13 +25,18 @@
import static org.junit.Assert.*;
import java.io.IOException;
+import java.sql.ResultSet;
import java.sql.SQLException;
+import java.sql.Statement;
import org.junit.Before;
import org.junit.Test;
+import org.teiid.client.util.ResultsFuture;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.jdbc.AbstractMMQueryTestCase;
import org.teiid.jdbc.FakeServer;
+import org.teiid.jdbc.StatementCallback;
+import org.teiid.jdbc.TeiidStatement;
import org.teiid.jdbc.TestMMDatabaseMetaData;
@@ -182,4 +187,28 @@
@Test(expected=SQLException.class) public void testLogMsg1() throws Exception {
execute("call logMsg(level=>'foo', context=>'org.teiid.foo', msg=>'hello world')"); //$NON-NLS-1$
}
+
+ @Test public void testAsynch() throws Exception {
+ Statement s = this.internalConnection.createStatement();
+ TeiidStatement ts = s.unwrap(TeiidStatement.class);
+ final ResultsFuture<Integer> result = new ResultsFuture<Integer>();
+ ts.submitExecute("select * from SYS.Schemas", new StatementCallback() {
+ int rowCount;
+ @Override
+ public void onRow(Statement s, ResultSet rs) {
+ rowCount++;
+ }
+
+ @Override
+ public void onException(Statement s, Exception e) {
+ result.getResultsReceiver().exceptionOccurred(e);
+ }
+
+ @Override
+ public void onComplete(Statement s) {
+ result.getResultsReceiver().receiveResults(rowCount);
+ }
+ });
+ assertEquals(4, result.get().intValue());
+ }
}
13 years, 1 month
teiid SVN: r3599 - in trunk: documentation/reference/src/main/docbook/en-US/content and 8 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-11-01 13:22:07 -0400 (Tue, 01 Nov 2011)
New Revision: 3599
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/FromClause.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java
trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java
Log:
TEIID-1805 adding support for no_unnest control over view removal
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-11-01 17:22:07 UTC (rev 3599)
@@ -35,6 +35,7 @@
<LI><B>GSSAPI</B> - both the Teiid JDBC client/server and the ODBC pg backend can now support GSSAPI for single sign-on.
<LI><B>Server-side Query Timeouts</B> - default query timeouts can be configured at both the VDB (via the query-timeout VDB property) and entire server (via the teiid-jboss-beans.xml queryTimeout property).
<LI><B>Native Queries</B> - added the ability to specify native query SQL for JDBC physical tables and stored procedures via extension metadata.
+ <LI><B>View removal hint</B> - the NO_UNNEST hint now also applies to from clause views and subqueries. It will instruct the planner to not perform view flattening.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/sql_clauses.xml 2011-11-01 17:22:07 UTC (rev 3599)
@@ -49,14 +49,15 @@
<listitem><para>FROM table1 JOIN /*+ MAKEDEP */ table2 ON join-criteria</para></listitem>
<listitem><para>FROM table1 JOIN /*+ MAKENOTDEP */ table2 ON join-criteria</para></listitem>
<listitem><para>FROM /*+ MAKEIND */ table1 JOIN table2 ON join-criteria</para></listitem>
+ <listitem><para>FROM /*+ NO_UNNEST */ vw1 JOIN table2 ON join-criteria</para></listitem>
<listitem><para>FROM table1 left outer join <link linkend="optional_join">/*+ optional */</link> table2 ON join-criteria</para></listitem>
<listitem><para>FROM <link linkend="texttable">TEXTTABLE...</link></para></listitem>
<listitem><para>FROM <link linkend="xmltable">XMLTABLE...</link></para></listitem>
<listitem><para>FROM <link linkend="arraytable">ARRAYTABLE...</link></para></listitem>
<listitem><para>FROM <link linkend="from_subquery">(SELECT ...</link></para></listitem>
</itemizedlist>
- <note>
- <title>DEP Hints</title>
+ <section>
+ <title>From Clause Hints</title>
<para>
MAKEIND, MAKEDEP, and MAKENOTDEP are hints used to control
<link linkend="dependent_joins">dependent join</link>
@@ -65,7 +66,12 @@
metadata, and costing information. The hints may appear in a comment that proceeds the from clause.
The hints can be specified against any from clause, not just a named table.
</para>
- </note>
+ <para>
+ NO_UNNEST can be specified against a subquery from clause or view to instruct the planner to not merge
+ the nested SQL in the surrounding query - also known as view flattening. This hint only applies to Teiid
+ planning and is not passed to source queries. NO_UNNEST may appear in a comment that proceeds the from clause.
+ </para>
+ </section>
<section id="nested_table">
<title>Nested Table Reference</title>
<para>Nested tables may appear in the FROM clause with the TABLE
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -839,6 +839,9 @@
if (group.getModelMetadataId() != null) {
node.setProperty(Info.MODEL_ID, group.getModelMetadataId());
}
+ if (ufc.isNoUnnest()) {
+ node.setProperty(Info.NO_UNNEST, Boolean.TRUE);
+ }
node.addGroup(group);
if (nestedCommand != null) {
UpdateInfo info = ProcedureContainerResolver.getUpdateInfo(group, metadata);
@@ -882,6 +885,9 @@
if (sfc.isTable()) {
sfc.getCommand().setCorrelatedReferences(getCorrelatedReferences(parent, node, sfc));
}
+ if (sfc.isNoUnnest()) {
+ node.setProperty(Info.NO_UNNEST, Boolean.TRUE);
+ }
node.addGroup(group);
addNestedCommand(node, group, nestedCommand, nestedCommand, true);
if (nestedCommand instanceof SetQuery) {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeConstants.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -126,6 +126,7 @@
CORRELATED_REFERENCES, // SymbolMap
MAKE_NOT_DEP, // Boolean
INLINE_VIEW, // If the source node represents an inline view
+ NO_UNNEST,
MAKE_IND,
// Group node properties
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleMergeVirtual.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -81,7 +81,9 @@
static PlanNode doMerge(PlanNode frame,
PlanNode root, boolean beforeDecomposeJoin,
QueryMetadataInterface metadata) throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
-
+ if (frame.hasBooleanProperty(Info.NO_UNNEST)) {
+ return root;
+ }
GroupSymbol virtualGroup = frame.getGroups().iterator().next();
// check to see if frame represents a proc relational query.
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -180,7 +180,9 @@
fromClause.setMakeNotDep(true);
} else if (parts[i].equalsIgnoreCase(FromClause.MAKEIND)) {
fromClause.setMakeInd(true);
- }
+ } else if (parts[i].equalsIgnoreCase(SubqueryHint.NOUNNEST)) {
+ fromClause.setNoUnnest(true);
+ }
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/FromClause.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/FromClause.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/FromClause.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -45,6 +45,7 @@
private boolean makeDep;
private boolean makeNotDep;
private boolean makeInd;
+ private boolean noUnnest;
public boolean isOptional() {
return optional;
@@ -72,8 +73,17 @@
clone.makeInd = makeInd;
clone.makeNotDep = makeNotDep;
clone.optional = optional;
+ clone.noUnnest = noUnnest;
return clone;
}
+
+ public void setNoUnnest(boolean noUnnest) {
+ this.noUnnest = noUnnest;
+ }
+
+ public boolean isNoUnnest() {
+ return noUnnest;
+ }
public boolean isMakeDep() {
return this.makeDep;
@@ -92,7 +102,7 @@
}
public boolean hasHint() {
- return optional || makeDep || makeNotDep || makeInd;
+ return optional || makeDep || makeNotDep || makeInd || noUnnest;
}
public boolean equals(Object obj) {
@@ -109,7 +119,8 @@
return other.isOptional() == this.isOptional()
&& other.isMakeDep() == this.isMakeDep()
&& other.isMakeNotDep() == this.isMakeNotDep()
- && other.isMakeInd() == this.isMakeInd();
+ && other.isMakeInd() == this.isMakeInd()
+ && other.isNoUnnest() == this.isNoUnnest();
}
@Override
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -530,6 +530,10 @@
append(FromClause.MAKEIND);
append(SPACE);
}
+ if (obj.isNoUnnest()) {
+ append(SubqueryHint.NOUNNEST);
+ append(SPACE);
+ }
append(END_HINT);
append(SPACE);
}
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/TestRuleMergeVirtual.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -48,6 +48,24 @@
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
+ @Test public void testNoUnnest() {
+ ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x FROM /*+ no_unnest */ (SELECT e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
+ new String[] {
+ "SELECT v_0.c_0 FROM (SELECT MAX(g_0.e2) AS c_0 FROM pm1.g1 AS g_0 GROUP BY g_0.e1) AS v_0"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
+
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
+ }
+
+ @Test public void testNoUnnestView() {
+ ProcessorPlan plan = TestOptimizer.helpPlan("SELECT e1 FROM /*+ no_unnest */ vm1.g1", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
+ new String[] {
+ "SELECT v_0.c_0 FROM (SELECT g_0.e1 AS c_0 FROM pm1.g1 AS g_0) AS v_0"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
+
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
+ }
+
@Test public void testSimpleMergeGroupBy1() {
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x FROM (SELECT distinct min(e1), max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
RealMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java 2011-11-01 15:25:47 UTC (rev 3598)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestOptionsAndHints.java 2011-11-01 17:22:07 UTC (rev 3599)
@@ -29,6 +29,7 @@
import java.util.List;
import org.junit.Test;
+import org.teiid.api.exception.query.QueryParserException;
import org.teiid.query.sql.lang.AbstractCompareCriteria;
import org.teiid.query.sql.lang.CacheHint;
import org.teiid.query.sql.lang.CompareCriteria;
@@ -57,12 +58,12 @@
import org.teiid.query.sql.proc.HasCriteria;
import org.teiid.query.sql.proc.IfStatement;
import org.teiid.query.sql.proc.Statement;
-import org.teiid.query.sql.symbol.MultipleElementSymbol;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.Function;
import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.sql.symbol.MultipleElementSymbol;
import org.teiid.query.sql.symbol.Reference;
@SuppressWarnings("nls")
@@ -1156,4 +1157,9 @@
TestParser.helpTest(sql, "SELECT a FROM db.g WHERE b IN /*+ MJ */ (SELECT a FROM db.g WHERE a2 = 5)", q); //$NON-NLS-1$
}
+ @Test public void testNoUnnest() throws QueryParserException {
+ String sql = "SELECT a FROM /*+ no_unnest */ (SELECT a FROM db.g WHERE a2 = 5) x"; //$NON-NLS-1$
+ assertEquals("SELECT a FROM /*+ NO_UNNEST */ (SELECT a FROM db.g WHERE a2 = 5) AS x", QueryParser.getQueryParser().parseCommand(sql, new ParseInfo()).toString()); //$NON-NLS-1$
+ }
+
}
13 years, 1 month
teiid SVN: r3597 - in branches/as7: admin/src/main/java/org/teiid/adminapi and 6 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-11-01 11:20:11 -0400 (Tue, 01 Nov 2011)
New Revision: 3597
Modified:
branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
branches/as7/admin/src/main/java/org/teiid/adminapi/impl/PropertyDefinitionMetadata.java
branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
branches/as7/jboss-integration/pom.xml
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/OperationsConstants.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
branches/as7/pom.xml
branches/as7/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java
Log:
TEIID-1720: Added the exposing of ra.xml properties to the Admin API
Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2011-11-01 15:20:11 UTC (rev 3597)
@@ -838,51 +838,51 @@
@Override
public Collection<PropertyDefinition> getTemplatePropertyDefinitions(String templateName) throws AdminException {
- boolean connectionFactory = false;
- Set<String> resourceAdapters = getAvailableResourceAdapterNames();
- if (resourceAdapters.contains(templateName)) {
- connectionFactory = true;
- }
-
- DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
ModelNode request = null;
+ ModelNode result = null;
try {
- if (connectionFactory) {
- builder.addNode("subsystem", "resource-adapters"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("resource-adapter", templateName); //$NON-NLS-1$
- builder.addNode("connection-definitions", "any"); //$NON-NLS-1$
- }
- else {
- builder.addNode("subsystem", "datasources"); //$NON-NLS-1$ //$NON-NLS-2$
- builder.addNode("data-source", "any"); //$NON-NLS-1$
- }
+ Set<String> resourceAdapters = getAvailableResourceAdapterNames();
+ if (resourceAdapters.contains(templateName)) {
+ DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
+ builder.addNode("subsystem", "teiid"); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.setOperationName("read-rar-description"); //$NON-NLS-1$
+ builder.addProperty("rar-name", templateName);
+ request = builder.buildRequest();
+ try {
+ ModelNode outcome = this.connection.execute(request);
+ if (!Util.isSuccess(outcome)) {
+ throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ }
+ result = outcome.get("result");
+ } catch (IOException e) {
+ throw new AdminProcessingException(e);
+ }
+ }
+ else {
+ result = new ModelNode();
+ result.add(buildProperty("connection-url", "connection URL", ModelType.STRING, "connection url", true));
+ result.add(buildProperty("user-name", "User Name", ModelType.STRING, "user name", false));
+ result.add(buildProperty("password", "Password", ModelType.STRING, "password", false));
+ result.add(buildProperty("check-valid-connection-sql", "Connection Validate SQL", ModelType.STRING, "SQL to be used to validate the connection", false));
+ }
- builder.setOperationName("read-resource-description"); //$NON-NLS-1$
- request = builder.buildRequest();
} catch (OperationFormatException e) {
throw new IllegalStateException("Failed to build operation", e); //$NON-NLS-1$
}
-
- ModelNode result = null;
- try {
- ModelNode outcome = this.connection.execute(request);
- if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
- }
- result = outcome.get("result");
- } catch (IOException e) {
- throw new AdminProcessingException(e);
- }
-
- ArrayList<PropertyDefinition> propDefinitions = new ArrayList<PropertyDefinition>();
- List<ModelNode> propsNodes = null;
- if (templateName.equals("data-source") || templateName.equals("xa-data-source")) {
- propsNodes = result.get("attributes").asList();
- }
- else {
- propsNodes = result.get("connection-definitions", "attributes").asList();
- }
-
+ return buildPropertyDefinitions(result.asList());
+ }
+
+ private ModelNode buildProperty(String name, String displayName, ModelType modelType, String description, boolean required) {
+ ModelNode node = new ModelNode();
+ node.get(name, "type").set(modelType);
+ node.get(name, "description").set(description);
+ node.get(name, "required").set(required);
+ node.get(name, "display").set(displayName);
+ return node;
+ }
+
+ private ArrayList<PropertyDefinition> buildPropertyDefinitions(List<ModelNode> propsNodes) {
+ ArrayList<PropertyDefinition> propDefinitions = new ArrayList<PropertyDefinition>();
for (ModelNode node:propsNodes) {
PropertyDefinitionMetadata def = new PropertyDefinitionMetadata();
Set<String> keys = node.keys();
@@ -891,26 +891,44 @@
def.setName(name);
node = node.get(name);
+ if (node.hasDefined("display")) {
+ def.setDisplayName(node.get("display").asString());
+ }
+
if (node.hasDefined("description")) {
def.setDescription(node.get("description").asString());
}
+ if (node.hasDefined("allowed")) {
+ List<ModelNode> allowed = node.get("allowed").asList();
+ ArrayList<String> list = new ArrayList<String>();
+ for(ModelNode m:allowed) {
+ list.add(m.asString());
+ }
+ def.setAllowedValues(list);
+ }
+
if (node.hasDefined("required")) {
def.setRequired(node.get("required").asBoolean());
}
- if (node.hasDefined("access-type")) {
- String access = node.get("access-type").asString();
- if ("read-only".equals(access)) {
- def.setModifiable(false);
- }
- else if ("read-write".equals(access)) {
- def.setModifiable(true);
- }
+ if (node.hasDefined("read-only")) {
+ String access = node.get("read-only").asString();
+ def.setModifiable(Boolean.parseBoolean(access));
}
+ if (node.hasDefined("advanced")) {
+ String access = node.get("advanced").asString();
+ def.setAdvanced(Boolean.parseBoolean(access));
+ }
+
+ if (node.hasDefined("masked")) {
+ String access = node.get("masked").asString();
+ def.setAdvanced(Boolean.parseBoolean(access));
+ }
+
if (node.hasDefined("restart-required")) {
- def.setRequiresRestart(RestartType.CLUSTER);
+ def.setRequiresRestart(RestartType.NONE);
}
String type = node.get("type").asString();
@@ -955,7 +973,7 @@
}
propDefinitions.add(def);
}
- return propDefinitions;
+ return propDefinitions;
}
@Override
Modified: branches/as7/admin/src/main/java/org/teiid/adminapi/impl/PropertyDefinitionMetadata.java
===================================================================
--- branches/as7/admin/src/main/java/org/teiid/adminapi/impl/PropertyDefinitionMetadata.java 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/admin/src/main/java/org/teiid/adminapi/impl/PropertyDefinitionMetadata.java 2011-11-01 15:20:11 UTC (rev 3597)
@@ -50,6 +50,7 @@
public String toString() {
StringBuffer result = new StringBuffer();
result.append("Display Name:").append(getDisplayName()); //$NON-NLS-1$
+ result.append(" Name:").append(getName()); //$NON-NLS-1$
result.append(" Description:").append(getDescription()); //$NON-NLS-1$
result.append(" Property Type Classname:").append(getPropertyTypeClassName()); //$NON-NLS-1$
result.append(" Default Value:").append(getDefaultValue()); //$NON-NLS-1$
Modified: branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml 2011-11-01 15:20:11 UTC (rev 3597)
@@ -41,6 +41,10 @@
<module name="javax.transaction.api"/>
<module name="javax.activation.api"/>
<module name="org.jboss.as.clustering.jgroups"/>
+ <!-- These dependencies here for ra.xml description -->
+ <module name="org.jboss.as.connector"/>
+ <module name="org.jboss.ironjacamar.api"/>
+ <module name="org.jboss.ironjacamar.impl"/>
</dependencies>
</module>
\ No newline at end of file
Modified: branches/as7/jboss-integration/pom.xml
===================================================================
--- branches/as7/jboss-integration/pom.xml 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/jboss-integration/pom.xml 2011-11-01 15:20:11 UTC (rev 3597)
@@ -99,6 +99,12 @@
<dependency>
<groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-connector</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.as</groupId>
<artifactId>jboss-as-subsystem-test</artifactId>
<scope>test</scope>
</dependency>
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/OperationsConstants.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/OperationsConstants.java 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/OperationsConstants.java 2011-11-01 15:20:11 UTC (rev 3597)
@@ -34,6 +34,7 @@
public static final String MODEL_NAME = "model-name"; //$NON-NLS-1$
public static final String SOURCE_NAME = "source-name"; //$NON-NLS-1$
public static final String DS_NAME = "ds-name"; //$NON-NLS-1$
+ public static final String RAR_NAME = "rar-name"; //$NON-NLS-1$
public static final String SOURCE_VDBNAME = "source-vdb-name";//$NON-NLS-1$
public static final String SOURCE_VDBVERSION = "source-vdb-version";//$NON-NLS-1$
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidExtension.java 2011-11-01 15:20:11 UTC (rev 3597)
@@ -140,6 +140,7 @@
new TerminateTransaction().register(teiidSubsystem);
new ExecuteQuery().register(teiidSubsystem);
new MarkDataSourceAvailable().register(teiidSubsystem);
+ new ReadRARDescription().register(teiidSubsystem);
}
@Override
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2011-11-01 15:20:11 UTC (rev 3597)
@@ -21,7 +21,10 @@
*/
package org.teiid.jboss;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEFAULT;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.READ_ONLY;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUEST_PROPERTIES;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
@@ -45,11 +48,17 @@
import javax.xml.stream.XMLStreamException;
+import org.jboss.as.connector.metadata.xmldescriptors.ConnectorXmlDescriptor;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.PathAddress;
+import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
+import org.jboss.jca.common.api.metadata.ra.ConfigProperty;
+import org.jboss.jca.common.api.metadata.ra.ConnectionDefinition;
+import org.jboss.jca.common.api.metadata.ra.ResourceAdapter;
+import org.jboss.jca.common.api.metadata.ra.ResourceAdapter1516;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
import org.teiid.adminapi.Admin;
@@ -63,6 +72,7 @@
import org.teiid.client.security.SessionToken;
import org.teiid.client.util.ResultsFuture;
import org.teiid.core.TeiidComponentException;
+import org.teiid.deployers.ExtendedPropertyMetadata;
import org.teiid.deployers.VDBRepository;
import org.teiid.deployers.VDBStatusChecker;
import org.teiid.dqp.internal.datamgr.TranslatorRepository;
@@ -1206,4 +1216,94 @@
operationNode.get(REQUEST_PROPERTIES, OperationsConstants.DS_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.DS_NAME));
}
+}
+
+class ReadRARDescription extends TeiidOperationHandler {
+
+ protected ReadRARDescription() {
+ super("read-rar-description"); //$NON-NLS-1$
+ }
+ @Override
+ protected void executeOperation(OperationContext context, DQPCore engine, ModelNode operation) throws OperationFailedException {
+ ModelNode result = context.getResult();
+
+ if (!operation.hasDefined(OperationsConstants.RAR_NAME)) {
+ throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString(OperationsConstants.RAR_NAME+MISSING)));
+ }
+ String rarName = operation.get(OperationsConstants.RAR_NAME).asString();
+
+ ServiceName svcName = ServiceName.JBOSS.append("deployment", "unit").append(rarName); //$NON-NLS-1$ //$NON-NLS-2$
+ ServiceController<?> sc = context.getServiceRegistry(false).getService(svcName);
+ DeploymentUnit du = DeploymentUnit.class.cast(sc.getValue());
+ ConnectorXmlDescriptor cd = du.getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY);
+ ResourceAdapter ra = cd.getConnector().getResourceadapter();
+ if (ra instanceof ResourceAdapter1516) {
+ ResourceAdapter1516 ra1516 = (ResourceAdapter1516)ra;
+ List<ConnectionDefinition> connDefinitions = ra1516.getOutboundResourceadapter().getConnectionDefinitions();
+ for (ConnectionDefinition p:connDefinitions) {
+ List<? extends ConfigProperty> props = p.getConfigProperties();
+ for (ConfigProperty prop:props) {
+ result.add(buildNode(prop));
+ }
+ }
+ }
+ }
+ private ModelNode buildNode(ConfigProperty prop) {
+ ModelNode node = new ModelNode();
+ String name = prop.getConfigPropertyName().getValue();
+ String type = prop.getConfigPropertyType().getValue();
+
+ String defaltValue = null;
+ if (prop.getConfigPropertyValue() != null) {
+ defaltValue = prop.getConfigPropertyValue().getValue();
+ }
+
+ String description = null;
+ if (prop.getDescriptions() != null) {
+ description = prop.getDescriptions().get(0).getValue();
+ }
+
+ ExtendedPropertyMetadata extended = new ExtendedPropertyMetadata(name, type, description, defaltValue);
+
+ if ("java.lang.String".equals(type)) { //$NON-NLS-1$
+ node.get(name, TYPE).set(ModelType.STRING);
+ }
+ else if ("java.lang.Integer".equals(type)) { //$NON-NLS-1$
+ node.get(name, TYPE).set(ModelType.INT);
+ }
+ else if ("java.lang.Long".equals(type)) { //$NON-NLS-1$
+ node.get(name, TYPE).set(ModelType.LONG);
+ }
+ else if ("java.lang.Boolean".equals(type)) { //$NON-NLS-1$
+ node.get(name, TYPE).set(ModelType.BOOLEAN);
+ }
+
+ node.get(name, REQUIRED).set(extended.required());
+
+ if (extended.description() != null) {
+ node.get(name, DESCRIPTION).set(extended.description());
+ }
+ node.get(name, "display").set(extended.display()); //$NON-NLS-1$
+ node.get(name, READ_ONLY).set(extended.readOnly());
+ node.get(name, "advanced").set(extended.advanced()); //$NON-NLS-1$
+
+ if (extended.allowed() != null) {
+ for (String s:extended.allowed()) {
+ node.get(name, ALLOWED).add(s);
+ }
+ }
+
+ node.get(name, "masked").set(extended.masked()); //$NON-NLS-1$
+
+ if (extended.defaultValue() != null) {
+ node.get(name, DEFAULT).set(extended.defaultValue());
+ }
+ return node;
+ }
+
+ protected void describeParameters(ModelNode operationNode, ResourceBundle bundle) {
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, TYPE).set(ModelType.STRING);
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, REQUIRED).set(true);
+ operationNode.get(REQUEST_PROPERTIES, OperationsConstants.RAR_NAME, DESCRIPTION).set(getParameterDescription(bundle, OperationsConstants.RAR_NAME));
+ }
}
\ No newline at end of file
Modified: branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-11-01 15:20:11 UTC (rev 3597)
@@ -195,10 +195,9 @@
ds-name.missing=Parameter "ds-name" is required
model-name.missing=Parameter "model-name" is required
connection-type.missing = Parameter "connection-type" is required. Must be one of [NONE, BY_VERSION, ANY]
+rar-name.missing=Parameter "rar-name" is is required.
-
-
# Operation descriptions (alpha layout)
add-anyauthenticated-role.describe=Mark any authenticated to the datarole
add-anyauthenticated-role.vdb-name.describe=VDB Name
@@ -302,4 +301,7 @@
terminate-transaction.describe=Terminate the XA transaction
terminate-transaction.xid.describe=xid identifier of the XA transaction
-workerpool-statistics.describe=Get thread statistics worker pool
\ No newline at end of file
+workerpool-statistics.describe=Get thread statistics worker pool
+
+read-rar-description.describe=Describe the properties of the Resource Adapter
+read-rar-description.rar-name.describe=resource adapter name
\ No newline at end of file
Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/pom.xml 2011-11-01 15:20:11 UTC (rev 3597)
@@ -460,9 +460,14 @@
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering-jgroups</artifactId>
<version>${jbossas-version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-connector</artifactId>
+ <version>${jbossas-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
<artifactId>jboss-as-subsystem-test</artifactId>
<version>${jbossas-version}</version>
</dependency>
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java 2011-10-31 20:16:17 UTC (rev 3596)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java 2011-11-01 15:20:11 UTC (rev 3597)
@@ -150,7 +150,7 @@
return masked;
}
public boolean readOnly() {
- return editable;
+ return !editable;
}
public boolean required() {
return required;
13 years, 1 month