teiid SVN: r3460 - branches/7.4.x/documentation/reference/src/main/docbook/en-US/content.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-09-09 13:05:51 -0400 (Fri, 09 Sep 2011)
New Revision: 3460
Modified:
branches/7.4.x/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
Log:
TEIID-1746 updating env/commandpayload docs
Modified: branches/7.4.x/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
===================================================================
--- branches/7.4.x/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-09-09 11:24:58 UTC (rev 3459)
+++ branches/7.4.x/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-09-09 17:05:51 UTC (rev 3460)
@@ -1854,7 +1854,7 @@
<entry>
<para>Retrieve the string form of 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 <code>TeiidStatement.setPayload</code> method on the Teiid JDBC API
extensions on a per-query basis.</para>
</entry>
<entry>
@@ -1868,7 +1868,10 @@
<entry>
<para>Cast the command payload object to a
java.util.Properties object and look up the specified key in
- the object</para>
+ the object. Returns null if the command payload is not a Properties object of the key does not exist.
+ The command payload is set by <code>TeiidStatement.setPayload</code> method on the Teiid JDBC API
+ extensions on a per-query basis.
+ </para>
</entry>
<entry>
<para>key in {string}, return is string</para>
@@ -1880,8 +1883,8 @@
</entry>
<entry>
<para>Retrieve a system environment property. 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.
+ <note><para>The preferred mechanism for getting the session id is with the session_id() function.</para></note>
+ 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>
</entry>
<entry>
13 years, 7 months
teiid SVN: r3459 - in trunk/engine/src: test/java/org/teiid/dqp/internal/process and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-09-09 07:24:58 -0400 (Fri, 09 Sep 2011)
New Revision: 3459
Modified:
trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
Log:
adding a unit test for hasrole
Modified: trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java 2011-09-09 02:28:24 UTC (rev 3458)
+++ trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java 2011-09-09 11:24:58 UTC (rev 3459)
@@ -31,7 +31,7 @@
public class SecuritySystemFunctions {
- public static boolean hasRole(CommandContext context, Object roleName) throws FunctionExecutionException {
+ public static boolean hasRole(CommandContext context, String roleName) throws FunctionExecutionException {
SecurityFunctionEvaluator eval = context.getSecurityFunctionEvaluator();
if (eval == null) {
@@ -39,13 +39,13 @@
}
try {
- return eval.hasRole(SecurityFunctionEvaluator.DATA_ROLE, (String)roleName);
+ return eval.hasRole(SecurityFunctionEvaluator.DATA_ROLE, roleName);
} catch (TeiidComponentException err) {
throw new FunctionExecutionException(err, err.getMessage());
}
}
- public static boolean hasRole(CommandContext context, Object roleType, Object roleName) throws FunctionExecutionException {
+ public static boolean hasRole(CommandContext context, String roleType, String roleName) throws FunctionExecutionException {
SecurityFunctionEvaluator eval = context.getSecurityFunctionEvaluator();
@@ -54,7 +54,7 @@
}
try {
- return eval.hasRole((String)roleType, (String)roleName);
+ return eval.hasRole(roleType, roleName);
} catch (TeiidComponentException err) {
throw new FunctionExecutionException(err, err.getMessage());
}
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-09-09 02:28:24 UTC (rev 3458)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-09-09 11:24:58 UTC (rev 3459)
@@ -25,6 +25,7 @@
import static org.junit.Assert.*;
import java.sql.ResultSet;
+import java.util.HashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -35,6 +36,8 @@
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
+import org.teiid.adminapi.DataPolicy;
+import org.teiid.adminapi.impl.DataPolicyMetadata;
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.cache.CacheConfiguration;
import org.teiid.cache.DefaultCacheFactory;
@@ -104,6 +107,9 @@
DQPWorkContext context = RealMetadataFactory.buildWorkContext(RealMetadataFactory.createTransformationMetadata(RealMetadataFactory.exampleBQTCached().getMetadataStore(), "bqt"));
context.getVDB().getModel("BQT3").setVisible(false); //$NON-NLS-1$
context.getVDB().getModel("VQT").setVisible(false); //$NON-NLS-1$
+ HashMap<String, DataPolicy> policies = new HashMap<String, DataPolicy>();
+ policies.put("foo", new DataPolicyMetadata());
+ context.setPolicies(policies);
ConnectorManagerRepository repo = Mockito.mock(ConnectorManagerRepository.class);
context.getVDB().addAttchment(ConnectorManagerRepository.class, repo);
@@ -124,6 +130,9 @@
config.setMaxActivePlans(1);
config.setUserRequestSourceConcurrency(2);
config.setResultsetCacheConfig(new CacheConfiguration());
+ DefaultAuthorizationValidator daa = new DefaultAuthorizationValidator();
+ daa.setPolicyDecider(new DataRolePolicyDecider());
+ config.setAuthorizationValidator(daa);
core.start(config);
core.getPrepPlanCache().setModTime(1);
core.getRsCache().setModTime(1);
@@ -151,6 +160,20 @@
@Test public void testRequest1() throws Exception {
helpExecute("SELECT IntKey FROM BQT1.SmallA", "a"); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ @Test public void testHasRole() throws Exception {
+ 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));
+ }
+
+ @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));
+ }
@Test public void testUser1() throws Exception {
String sql = "SELECT IntKey FROM BQT1.SmallA WHERE user() = 'logon'"; //$NON-NLS-1$
13 years, 7 months
teiid SVN: r3458 - trunk/metadata/src/main/java/org/teiid/internal/core/index.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-09-08 22:28:24 -0400 (Thu, 08 Sep 2011)
New Revision: 3458
Modified:
trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java
Log:
TEIID-1739 adding a null check
Modified: trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java 2011-09-08 02:02:25 UTC (rev 3457)
+++ trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java 2011-09-09 02:28:24 UTC (rev 3458)
@@ -60,9 +60,12 @@
//System.out.println(" Closing Index File: " + this.indexFile.getName());
summary= null;
setOpen(false);
- if (raf != null)
+ if (raf != null) {
raf.close();
- vraf.close();
+ }
+ if (vraf != null) {
+ vraf.close();
+ }
}
}
13 years, 7 months
teiid SVN: r3457 - in branches/7.4.x: engine/src/main/java/org/teiid/dqp/message and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-09-07 22:02:25 -0400 (Wed, 07 Sep 2011)
New Revision: 3457
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
branches/7.4.x/engine/src/main/java/org/teiid/dqp/message/RequestID.java
branches/7.4.x/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java
branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
Log:
TEIID-1745 fix for buffer full plans holding active plans
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-09-07 20:04:39 UTC (rev 3456)
+++ branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-09-08 02:02:25 UTC (rev 3457)
@@ -25,6 +25,8 @@
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;
@@ -209,6 +211,7 @@
private int currentlyActivePlans;
private int userRequestSourceConcurrency;
private LinkedList<RequestWorkItem> waitingPlans = new LinkedList<RequestWorkItem>();
+ private LinkedHashSet<RequestWorkItem> bufferFullPlans = new LinkedHashSet<RequestWorkItem>();
private CacheFactory cacheFactory;
private SessionAwareCache<CachedResults> matTables;
@@ -352,12 +355,21 @@
addRequest(requestID, workItem, state);
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);
}
}
@@ -400,12 +412,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);
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-09-07 20:04:39 UTC (rev 3456)
+++ branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-09-08 02:02:25 UTC (rev 3457)
@@ -77,6 +77,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> {
@@ -275,7 +278,9 @@
resume();
if (this.state == ProcessingState.PROCESSING) {
- processMore();
+ if (!this.closeRequested) {
+ processMore();
+ }
if (this.closeRequested) {
this.state = ProcessingState.CLOSE;
}
@@ -478,10 +483,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();
@@ -489,14 +492,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$
}
}
}
@@ -782,10 +791,10 @@
return;
}
}
- this.closeRequested = true;
if (!this.doneProducingBatches) {
this.requestCancel(); //pending work should be canceled for fastest clean up
}
+ this.closeRequested = true;
this.doMoreWork();
}
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/message/RequestID.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/dqp/message/RequestID.java 2011-09-07 20:04:39 UTC (rev 3456)
+++ branches/7.4.x/engine/src/main/java/org/teiid/dqp/message/RequestID.java 2011-09-08 02:02:25 UTC (rev 3457)
@@ -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();
}
/**
Modified: branches/7.4.x/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java
===================================================================
--- branches/7.4.x/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java 2011-09-07 20:04:39 UTC (rev 3456)
+++ branches/7.4.x/engine/src/test/java/org/teiid/dqp/message/TestRequestID.java 2011-09-08 02:02:25 UTC (rev 3457)
@@ -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());
Modified: branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java
===================================================================
--- branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java 2011-09-07 20:04:39 UTC (rev 3456)
+++ branches/7.4.x/test-integration/common/src/test/java/org/teiid/transport/TestJDBCSocketTransport.java 2011-09-08 02:02:25 UTC (rev 3457)
@@ -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,6 +54,8 @@
config.setBindAddress(addr.getHostName());
config.setPortNumber(0);
+ DQPConfiguration dqpConfig = new DQPConfiguration();
+ dqpConfig.setMaxActivePlans(2);
FakeServer server = new FakeServer();
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"));
+ }
+ }
+
}
13 years, 7 months
teiid SVN: r3456 - branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce.
by teiid-commits@lists.jboss.org
Author: mdrillin
Date: 2011-09-07 16:04:39 -0400 (Wed, 07 Sep 2011)
New Revision: 3456
Added:
branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java
Modified:
branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
Log:
TEIID-1733 - Update of the salesforce connector to api v22
Modified: branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
===================================================================
--- branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java 2011-09-07 20:03:56 UTC (rev 3455)
+++ branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java 2011-09-07 20:04:39 UTC (rev 3456)
@@ -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();
- }
-
+ }
}
Added: branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java
===================================================================
--- branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java (rev 0)
+++ branches/7.4.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceHandlerResolver.java 2011-09-07 20:04:39 UTC (rev 3456)
@@ -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) {
+ }
+ }
+}
13 years, 7 months
teiid SVN: r3455 - in branches/7.4.x/connectors/salesforce-api/src/main: java/com/sforce/soap/partner/fault and 1 other directories.
by teiid-commits@lists.jboss.org
Author: mdrillin
Date: 2011-09-07 16:03:56 -0400 (Wed, 07 Sep 2011)
New Revision: 3455
Added:
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java
branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v22.wsdl
Removed:
branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
Modified:
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java
branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java
Log:
TEIID-1733 - Update of the salesforce connector to api v22
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllOrNoneHeader.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategory.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DataCategoryGroupSobjectTypePair.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupResult.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructureResult.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructures.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupStructuresResponse.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroups.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeDataCategoryGroupsResponse.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeGlobalSObjectResult.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayout.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeLayoutResult.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSObjectResult.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneLayoutCallType.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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>
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DescribeSoftphoneScreenPopOption.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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;
+ }
+
+}
Added: branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/DisableFeedTrackingHeader.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Field.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/FieldType.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/GetUserInfoResult.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidFieldFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidIdFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidNewPasswordFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidQueryLocatorFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/InvalidSObjectFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/LoginFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedQueryFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/MalformedSearchFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/ObjectFactory.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/Soap.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/StatusCode.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/UnexpectedErrorFault.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ExceptionCode.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/fault/ObjectFactory.java 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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/7.4.x/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v17.wsdl 2011-09-06 21:53:22 UTC (rev 3454)
+++ branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v17.wsdl 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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
Added: branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v22.wsdl
===================================================================
--- branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v22.wsdl (rev 0)
+++ branches/7.4.x/connectors/salesforce-api/src/main/resources/partner_v22.wsdl 2011-09-07 20:03:56 UTC (rev 3455)
@@ -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>
+
13 years, 7 months
teiid SVN: r3454 - in branches/as7: build/kits/jboss-as7/domain and 11 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-09-06 17:53:22 -0400 (Tue, 06 Sep 2011)
New Revision: 3454
Added:
branches/as7/build/kits/jboss-as7/domain/
branches/as7/build/kits/jboss-as7/domain/domain-teiid.xml
Modified:
branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml
branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.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/SessionAwareCache.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/jboss-integration/pom.xml
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.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/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
Log:
TEIID-1720: Fixed Teiid specific configuration for the cache stuff
Added: branches/as7/build/kits/jboss-as7/domain/domain-teiid.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/domain/domain-teiid.xml (rev 0)
+++ branches/as7/build/kits/jboss-as7/domain/domain-teiid.xml 2011-09-06 21:53:22 UTC (rev 3454)
@@ -0,0 +1,702 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<domain xmlns="urn:jboss:domain:1.0">
+
+ <extensions>
+ <extension module="org.jboss.as.clustering.infinispan"/>
+ <extension module="org.jboss.as.clustering.jgroups"/>
+ <extension module="org.jboss.as.connector"/>
+ <extension module="org.jboss.as.ee"/>
+ <extension module="org.jboss.as.ejb3"/>
+ <extension module="org.jboss.as.jaxrs"/>
+ <extension module="org.jboss.as.jmx"/>
+ <extension module="org.jboss.as.jpa"/>
+ <extension module="org.jboss.as.logging"/>
+ <extension module="org.jboss.as.modcluster"/>
+ <extension module="org.jboss.as.naming"/>
+ <extension module="org.jboss.as.osgi"/>
+ <extension module="org.jboss.as.remoting"/>
+ <extension module="org.jboss.as.sar"/>
+ <extension module="org.jboss.as.security"/>
+ <extension module="org.jboss.teiid"/>
+ <extension module="org.jboss.as.threads"/>
+ <extension module="org.jboss.as.transactions"/>
+ <extension module="org.jboss.as.web"/>
+ <extension module="org.jboss.as.weld"/>
+ </extensions>
+
+ <system-properties>
+ <!-- IPv4 is not required, but setting this helps avoid unintended use of IPv6 -->
+ <property name="java.net.preferIPv4Stack" value="true"/>
+ </system-properties>
+
+ <profiles>
+ <profile name="default">
+ <subsystem xmlns="urn:jboss:domain:logging:1.1">
+ <console-handler name="CONSOLE">
+ <level name="INFO"/>
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+ </formatter>
+ </console-handler>
+
+ <periodic-rotating-file-handler name="FILE">
+ <level name="INFO"/>
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+ </formatter>
+ <file relative-to="jboss.server.log.dir" path="server.log"/>
+ <suffix value=".yyyy-MM-dd"/>
+ </periodic-rotating-file-handler>
+
+ <logger category="com.arjuna">
+ <level name="WARN"/>
+ </logger>
+ <logger category="org.apache.tomcat.util.modeler">
+ <level name="WARN"/>
+ </logger>
+ <logger category="sun.rmi">
+ <level name="WARN"/>
+ </logger>
+
+ <root-logger>
+ <level name="INFO"/>
+ <handlers>
+ <handler name="CONSOLE"/>
+ <handler name="FILE"/>
+ </handlers>
+ </root-logger>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:datasources:1.0">
+ <datasources>
+ <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+ <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+ <driver>h2</driver>
+ <pool></pool>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+ <drivers>
+ <driver name="h2" module="com.h2database.h2">
+ <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+ </driver>
+ </drivers>
+ </datasources>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">
+ <!-- EJB3 pools -->
+ <pools>
+ <bean-instance-pools>
+ <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
+ instance-acquisition-timeout-unit="MINUTES"/>
+ </bean-instance-pools>
+ </pools>
+
+ <!-- Session bean configurations -->
+ <session-bean>
+ <stateless>
+ <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+ </stateless>
+ </session-bean>
+
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">
+ <cache-container name="hibernate" default-cache="local-query">
+ <local-cache name="entity">
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </local-cache>
+ <local-cache name="local-query">
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </local-cache>
+ <local-cache name="timestamps">
+ <eviction strategy="NONE"/>
+ </local-cache>
+ </cache-container>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:jca:1.0">
+ <archive-validation enabled="true"/>
+ <bean-validation enabled="true"/>
+ <default-workmanager>
+ <short-running-threads blocking="true">
+ <core-threads count="10" per-cpu="20"/>
+ <queue-length count="10" per-cpu="20"/>
+ <max-threads count="10" per-cpu="20"/>
+ <keepalive-time time="10" unit="seconds"/>
+ </short-running-threads>
+ <long-running-threads blocking="true">
+ <core-threads count="10" per-cpu="20"/>
+ <queue-length count="10" per-cpu="20"/>
+ <max-threads count="10" per-cpu="20"/>
+ <keepalive-time time="10" unit="seconds"/>
+ </long-running-threads>
+ </default-workmanager>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jmx:1.0">
+ <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+ <jpa default-datasource=""/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
+ <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
+ <property name="manager.root">jboss-osgi</property>
+ </configuration>
+ <properties>
+ <!--
+ A comma seperated list of module identifiers. Each system module
+ is added as a dependency to the OSGi framework module. The packages
+ from these system modules can be made visible as framework system packages.
+ http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAME...
+ -->
+ <property name="org.jboss.osgi.system.modules">
+ org.apache.commons.logging,
+ org.apache.log4j,
+ org.jboss.as.osgi,
+ org.slf4j,
+ </property>
+ <!--
+ Framework environment property identifying extra packages which the system bundle
+ must export from the current execution environment
+ -->
+ <property name="org.osgi.framework.system.packages.extra">
+ org.apache.commons.logging;version=1.1.1,
+ org.apache.log4j;version=1.2,
+ org.jboss.as.osgi.service;version=7.0,
+ org.jboss.osgi.deployment.interceptor;version=1.0,
+ org.jboss.osgi.spi.capability;version=1.0,
+ org.jboss.osgi.spi.util;version=1.0,
+ org.jboss.osgi.testing;version=1.0,
+ org.jboss.osgi.vfs;version=1.0,
+ org.slf4j;version=1.5.10,
+ </property>
+ <!-- Specifies the beginning start level of the framework -->
+ <property name="org.osgi.framework.startlevel.beginning">1</property>
+ </properties>
+ <modules>
+ <!-- modules registered with the OSGi layer on startup -->
+ <module identifier="javaee.api"/>
+ <module identifier="org.jboss.logging"/>
+ <!-- bundles installed on startup -->
+ <module identifier="org.apache.aries.util"/>
+ <module identifier="org.jboss.osgi.webconsole"/>
+ <module identifier="org.osgi.compendium"/>
+ <!-- bundles started in startlevel 1 -->
+ <module identifier="org.apache.felix.log" startlevel="1"/>
+ <module identifier="org.jboss.osgi.logging" startlevel="1"/>
+ <module identifier="org.apache.felix.configadmin" startlevel="1"/>
+ <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>
+ <!-- bundles started in startlevel 2 -->
+ <module identifier="org.apache.aries.jmx" startlevel="2"/>
+ <module identifier="org.apache.felix.eventadmin" startlevel="2"/>
+ <module identifier="org.apache.felix.metatype" startlevel="2"/>
+ <module identifier="org.apache.felix.webconsole" startlevel="2"/>
+ <module identifier="org.jboss.osgi.jmx" startlevel="2"/>
+ <module identifier="org.jboss.osgi.http" startlevel="2"/>
+ <!-- bundles started in startlevel 3 -->
+ <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>
+ <module identifier="org.jboss.osgi.webapp" startlevel="3"/>
+ <module identifier="org.jboss.osgi.xerces" startlevel="3"/>
+ </modules>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:security:1.0">
+ <security-domains>
+ <security-domain name="other">
+ <authentication>
+ <login-module code="UsersRoles" flag="required"/>
+ </authentication>
+ </security-domain>
+ <security-domain name="teiid-security" cache-type="default">
+ <authentication>
+ <login-module code="UsersRoles" flag="required">
+ <module-option name="usersProperties" value="teiid-security-users.properties"/>
+ <module-option name="rolesProperties" value="teiid-security-roles.properties"/>
+ </login-module>
+ </authentication>
+ </security-domain>
+ </security-domains>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:teiid:1.0">
+ <async-thread-group>teiid-async</async-thread-group>
+
+ <query-engine name = "default">
+ <object-replicator-name>teiid/replicator</object-replicator-name>
+ <security-domain>teiid-security</security-domain>
+ <jdbc socket-binding="teiid-jdbc"/>
+ <odbc socket-binding="teiid-odbc"/>
+ </query-engine>
+
+ <translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="access" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="db2" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="derby" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="h2" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="hsql" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="informix" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="metamatrix" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="mysql" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="mysql5" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="oracle" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="postgresql" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="sqlserver" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="sybase" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="teiid" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="teradata" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="modeshape" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="ingres" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="ingres93" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="intersystems-cache" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="netezza" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="file" module="org.jboss.teiid.translator.file"/>
+ <translator name="ldap" module="org.jboss.teiid.translator.ldap"/>
+ <translator name="loopback" module="org.jboss.teiid.translator.loopback"/>
+ <translator name="olap" module="org.jboss.teiid.translator.olap"/>
+ <translator name="ws" module="org.jboss.teiid.translator.ws"/>
+ </subsystem>
+
+ <subsystem xmlns="urn:jboss:domain:threads:1.0">
+ <queueless-thread-pool name="teiid-async">
+ <max-threads count="2" per-cpu="2" />
+ </queueless-thread-pool>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:transactions:1.0">
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+ <core-environment>
+ <process-id>
+ <uuid />
+ </process-id>
+ </core-environment>
+ <coordinator-environment default-timeout="300"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
+ <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+ <virtual-server name="default-host">
+ <alias name="localhost" />
+ <alias name="example.com" />
+ </virtual-server>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
+ </profile>
+
+ <profile name="ha">
+ <subsystem xmlns="urn:jboss:domain:logging:1.1">
+ <console-handler name="CONSOLE">
+ <level name="INFO"/>
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+ </formatter>
+ </console-handler>
+
+ <periodic-rotating-file-handler name="FILE">
+ <level name="INFO"/>
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+ </formatter>
+ <file relative-to="jboss.server.log.dir" path="server.log"/>
+ <suffix value=".yyyy-MM-dd"/>
+ </periodic-rotating-file-handler>
+
+ <logger category="com.arjuna">
+ <level name="WARN"/>
+ </logger>
+ <logger category="org.apache.tomcat.util.modeler">
+ <level name="WARN"/>
+ </logger>
+ <logger category="sun.rmi">
+ <level name="WARN"/>
+ </logger>
+
+ <root-logger>
+ <level name="INFO"/>
+ <handlers>
+ <handler name="CONSOLE"/>
+ <handler name="FILE"/>
+ </handlers>
+ </root-logger>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:datasources:1.0">
+ <datasources>
+ <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+ <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+ <driver>h2</driver>
+ <pool></pool>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+ <drivers>
+ <driver name="h2" module="com.h2database.h2">
+ <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+ </driver>
+ </drivers>
+ </datasources>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">
+ <!-- EJB3 pools -->
+ <pools>
+ <bean-instance-pools>
+ <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"
+ instance-acquisition-timeout-unit="MINUTES"/>
+ </bean-instance-pools>
+ </pools>
+
+ <!-- Session bean configurations -->
+ <session-bean>
+ <stateless>
+ <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+ </stateless>
+ </session-bean>
+
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="cluster">
+ <cache-container name="cluster" default-cache="default">
+ <alias>ha-partition</alias>
+ <replicated-cache name="default" mode="SYNC" batching="true">
+ <locking isolation="REPEATABLE_READ"/>
+ </replicated-cache>
+ </cache-container>
+ <cache-container name="web" default-cache="repl">
+ <alias>standard-session-cache</alias>
+ <replicated-cache name="repl" mode="ASYNC" batching="true">
+ <locking isolation="REPEATABLE_READ"/>
+ <file-store/>
+ </replicated-cache>
+ <distributed-cache name="dist" mode="ASYNC" batching="true">
+ <locking isolation="REPEATABLE_READ"/>
+ <file-store/>
+ </distributed-cache>
+ </cache-container>
+ <cache-container name="sfsb" default-cache="repl">
+ <alias>sfsb-cache</alias>
+ <alias>jboss.cache:service=EJB3SFSBClusteredCache</alias>
+ <replicated-cache name="repl" mode="ASYNC" batching="true">
+ <locking isolation="REPEATABLE_READ"/>
+ <eviction strategy="LRU" max-entries="10000"/>
+ <file-store/>
+ </replicated-cache>
+ </cache-container>
+ <cache-container name="hibernate" default-cache="local-query">
+ <invalidation-cache name="entity" mode="SYNC">
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </invalidation-cache>
+ <local-cache name="local-query">
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </local-cache>
+ <replicated-cache name="timestamps" mode="ASYNC">
+ <eviction strategy="NONE"/>
+ </replicated-cache>
+ </cache-container>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:jca:1.0">
+ <archive-validation enabled="true"/>
+ <bean-validation enabled="true"/>
+ <default-workmanager>
+ <short-running-threads blocking="true">
+ <core-threads count="10" per-cpu="20"/>
+ <queue-length count="10" per-cpu="20"/>
+ <max-threads count="10" per-cpu="20"/>
+ <keepalive-time time="10" unit="seconds"/>
+ </short-running-threads>
+ <long-running-threads blocking="true">
+ <core-threads count="10" per-cpu="20"/>
+ <queue-length count="10" per-cpu="20"/>
+ <max-threads count="10" per-cpu="20"/>
+ <keepalive-time time="10" unit="seconds"/>
+ </long-running-threads>
+ </default-workmanager>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jgroups:1.0" default-stack="udp">
+ <stack name="udp">
+ <transport type="UDP" socket-binding="jgroups-udp" diagnostics-socket-binding="jgroups-diagnostics"/>
+ <protocol type="PING"/>
+ <protocol type="MERGE2"/>
+ <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
+ <protocol type="FD"/>
+ <protocol type="VERIFY_SUSPECT"/>
+ <protocol type="BARRIER"/>
+ <protocol type="pbcast.NAKACK"/>
+ <protocol type="UNICAST"/>
+ <protocol type="pbcast.STABLE"/>
+ <protocol type="VIEW_SYNC"/>
+ <protocol type="pbcast.GMS"/>
+ <protocol type="UFC"/>
+ <protocol type="MFC"/>
+ <protocol type="FRAG2"/>
+ <protocol type="pbcast.STREAMING_STATE_TRANSFER"/>
+ <protocol type="pbcast.FLUSH"/>
+ </stack>
+ <stack name="tcp">
+ <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
+ <protocol type="MPING" socket-binding="jgroups-mping"/>
+ <protocol type="MERGE2"/>
+ <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
+ <protocol type="FD"/>
+ <protocol type="VERIFY_SUSPECT"/>
+ <protocol type="BARRIER"/>
+ <protocol type="pbcast.NAKACK"/>
+ <protocol type="UNICAST"/>
+ <protocol type="pbcast.STABLE"/>
+ <protocol type="VIEW_SYNC"/>
+ <protocol type="pbcast.GMS"/>
+ <protocol type="UFC"/>
+ <protocol type="MFC"/>
+ <protocol type="FRAG2"/>
+ <protocol type="pbcast.STREAMING_STATE_TRANSFER"/>
+ <protocol type="pbcast.FLUSH"/>
+ </stack>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jmx:1.0">
+ <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+ <jpa default-datasource=""/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
+ <mod-cluster-config advertise-socket="modcluster"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:naming:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
+ <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
+ <property name="manager.root">jboss-osgi</property>
+ </configuration>
+ <properties>
+ <!--
+ A comma seperated list of module identifiers. Each system module
+ is added as a dependency to the OSGi framework module. The packages
+ from these system modules can be made visible as framework system packages.
+ http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAME...
+ -->
+ <property name="org.jboss.osgi.system.modules">
+ org.apache.commons.logging,
+ org.apache.log4j,
+ org.jboss.as.osgi,
+ org.slf4j,
+ </property>
+ <!--
+ Framework environment property identifying extra packages which the system bundle
+ must export from the current execution environment
+ -->
+ <property name="org.osgi.framework.system.packages.extra">
+ org.apache.commons.logging;version=1.1.1,
+ org.apache.log4j;version=1.2,
+ org.jboss.as.osgi.service;version=7.0,
+ org.jboss.osgi.deployment.interceptor;version=1.0,
+ org.jboss.osgi.spi.capability;version=1.0,
+ org.jboss.osgi.spi.util;version=1.0,
+ org.jboss.osgi.testing;version=1.0,
+ org.jboss.osgi.vfs;version=1.0,
+ org.slf4j;version=1.5.10,
+ </property>
+ <!-- Specifies the beginning start level of the framework -->
+ <property name="org.osgi.framework.startlevel.beginning">1</property>
+ </properties>
+ <modules>
+ <!-- modules registered with the OSGi layer on startup -->
+ <module identifier="javaee.api"/>
+ <module identifier="org.jboss.logging"/>
+ <!-- bundles installed on startup -->
+ <module identifier="org.apache.aries.util"/>
+ <module identifier="org.jboss.osgi.webconsole"/>
+ <module identifier="org.osgi.compendium"/>
+ <!-- bundles started in startlevel 1 -->
+ <module identifier="org.apache.felix.log" startlevel="1"/>
+ <module identifier="org.jboss.osgi.logging" startlevel="1"/>
+ <module identifier="org.apache.felix.configadmin" startlevel="1"/>
+ <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>
+ <!-- bundles started in startlevel 2 -->
+ <module identifier="org.apache.aries.jmx" startlevel="2"/>
+ <module identifier="org.apache.felix.eventadmin" startlevel="2"/>
+ <module identifier="org.apache.felix.metatype" startlevel="2"/>
+ <module identifier="org.apache.felix.webconsole" startlevel="2"/>
+ <module identifier="org.jboss.osgi.jmx" startlevel="2"/>
+ <module identifier="org.jboss.osgi.http" startlevel="2"/>
+ <!-- bundles started in startlevel 3 -->
+ <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>
+ <module identifier="org.jboss.osgi.webapp" startlevel="3"/>
+ <module identifier="org.jboss.osgi.xerces" startlevel="3"/>
+ </modules>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:security:1.0">
+ <security-domains>
+ <security-domain name="other">
+ <authentication>
+ <login-module code="UsersRoles" flag="required"/>
+ </authentication>
+ </security-domain>
+ <security-domain name="teiid-security" cache-type="default">
+ <authentication>
+ <login-module code="UsersRoles" flag="required">
+ <module-option name="usersProperties" value="teiid-security-users.properties"/>
+ <module-option name="rolesProperties" value="teiid-security-roles.properties"/>
+ </login-module>
+ </authentication>
+ </security-domain>
+ </security-domains>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:teiid:1.0">
+ <async-thread-group>teiid-async</async-thread-group>
+
+ <query-engine name = "default">
+ <object-replicator-name>teiid/replicator</object-replicator-name>
+ <security-domain>teiid-security</security-domain>
+ <jdbc socket-binding="teiid-jdbc"/>
+ <odbc socket-binding="teiid-odbc"/>
+ </query-engine>
+
+ <translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="access" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="db2" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="derby" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="h2" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="hsql" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="informix" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="metamatrix" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="mysql" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="mysql5" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="oracle" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="postgresql" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="sqlserver" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="sybase" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="teiid" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="teradata" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="modeshape" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="ingres" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="ingres93" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="intersystems-cache" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="netezza" module="org.jboss.teiid.translator.jdbc"/>
+ <translator name="file" module="org.jboss.teiid.translator.file"/>
+ <translator name="ldap" module="org.jboss.teiid.translator.ldap"/>
+ <translator name="loopback" module="org.jboss.teiid.translator.loopback"/>
+ <translator name="olap" module="org.jboss.teiid.translator.olap"/>
+ <translator name="ws" module="org.jboss.teiid.translator.ws"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:threads:1.0">
+ <queueless-thread-pool name="teiid-async">
+ <max-threads count="2" per-cpu="2" />
+ </queueless-thread-pool>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:transactions:1.0">
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+ <core-environment>
+ <process-id>
+ <uuid />
+ </process-id>
+ </core-environment>
+ <coordinator-environment default-timeout="300"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
+ <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
+ <virtual-server name="default-host">
+ <alias name="localhost" />
+ <alias name="example.com" />
+ </virtual-server>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
+ </profile>
+ </profiles>
+
+
+ <!--
+ Named interfaces that can be referenced elsewhere in the configuration. The configuration
+ for how to associate these logical names with an actual network interface can either
+ be specified here or can be declared on a per-host basis in the equivalent element in host.xml.
+
+ These default configurations require the binding specification to be done in host.xml.
+ -->
+ <interfaces>
+ <interface name="management"/>
+ <interface name="public"/>
+ </interfaces>
+
+ <socket-binding-groups>
+ <socket-binding-group name="standard-sockets" default-interface="public">
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <socket-binding name="jmx-connector-registry" port="1090"/>
+ <socket-binding name="jmx-connector-server" port="1091"/>
+ <socket-binding name="jndi" port="1099"/>
+ <socket-binding name="osgi-http" port="8090"/>
+ <socket-binding name="remoting" port="4447"/>
+ <socket-binding name="txn-recovery-environment" port="4712"/>
+ <socket-binding name="txn-status-manager" port="4713"/>
+ <socket-binding name="teiid-jdbc" port="31000"/>
+ <socket-binding name="teiid-odbc" port="35432"/>
+ </socket-binding-group>
+ <socket-binding-group name="ha-sockets" default-interface="public">
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>
+ <socket-binding name="jgroups-mping" port="0" multicast-address="230.0.0.4" multicast-port="45700"/>
+ <socket-binding name="jgroups-tcp" port="7600"/>
+ <socket-binding name="jgroups-tcp-fd" port="57600"/>
+ <socket-binding name="jgroups-udp" port="55200" multicast-address="230.0.0.4" multicast-port="45688"/>
+ <socket-binding name="jgroups-udp-fd" port="54200"/>
+ <socket-binding name="jmx-connector-registry" port="1090"/>
+ <socket-binding name="jmx-connector-server" port="1091"/>
+ <socket-binding name="jndi" port="1099"/>
+ <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
+ <socket-binding name="osgi-http" port="8090"/>
+ <socket-binding name="remoting" port="4447"/>
+ <socket-binding name="txn-recovery-environment" port="4712"/>
+ <socket-binding name="txn-status-manager" port="4713"/>
+ <socket-binding name="teiid-jdbc" port="31000"/>
+ <socket-binding name="teiid-odbc" port="35432"/>
+ </socket-binding-group>
+ </socket-binding-groups>
+
+ <server-groups>
+ <server-group name="main-server-group" profile="default">
+ <jvm name="default">
+ <heap size="64m" max-size="512m"/>
+ </jvm>
+ <socket-binding-group ref="standard-sockets"/>
+ </server-group>
+
+ <server-group name="other-server-group" profile="ha">
+ <jvm name="default">
+ <heap size="64m" max-size="512m"/>
+ </jvm>
+ <socket-binding-group ref="ha-sockets"/>
+ </server-group>
+ </server-groups>
+
+</domain>
Property changes on: branches/as7/build/kits/jboss-as7/domain/domain-teiid.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/build/kits/jboss-as7/modules/org/jboss/teiid/main/module.xml 2011-09-06 21:53:22 UTC (rev 3454)
@@ -10,6 +10,7 @@
<resource-root path="teiid-runtime-${project.version}.jar" />
<resource-root path="teiid-engine-${project.version}.jar" />
<resource-root path="teiid-admin-${project.version}.jar" />
+ <resource-root path="teiid-cache-jbosscache-${project.version}.jar" />
<resource-root path="saxonhe-9.2.1.5.jar" />
<resource-root path="json-simple-1.1.jar" />
<resource-root path="conf" />
Modified: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-09-06 21:53:22 UTC (rev 3454)
@@ -276,15 +276,11 @@
<async-thread-group>teiid-async</async-thread-group>
<query-engine name = "default">
- <object-replicator-name>teiid/replicator</object-replicator-name>
<security-domain>teiid-security</security-domain>
- <jdbc>
- <socket-binding>teiid-jdbc</socket-binding>
- </jdbc>
- <odbc>
- <socket-binding>teiid-odbc</socket-binding>
- </odbc>
+ <jdbc socket-binding="teiid-jdbc"/>
+ <odbc socket-binding="teiid-odbc"/>
</query-engine>
+
<translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
<translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
<translator name="access" module="org.jboss.teiid.translator.jdbc"/>
Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -29,15 +29,14 @@
import org.jboss.cache.Node;
import org.jboss.cache.Region;
import org.jboss.cache.config.EvictionAlgorithmConfig;
-import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
import org.jboss.cache.eviction.LRUAlgorithmConfig;
import org.jboss.cache.eviction.RemoveOnEvictActionPolicy;
import org.teiid.cache.Cache;
import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.CacheFactory;
import org.teiid.cache.CacheConfiguration.Policy;
+import org.teiid.cache.CacheFactory;
import org.teiid.core.TeiidRuntimeException;
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -21,7 +21,6 @@
*/
package org.teiid.dqp.internal.process;
-import org.teiid.cache.CacheConfiguration;
import org.teiid.client.RequestMessage;
@@ -46,8 +45,6 @@
private boolean exceptionOnMaxSourceRows = true;
private int maxSourceRows = -1;
private int maxActivePlans = DEFAULT_MAX_ACTIVE_PLANS;
- private CacheConfiguration resultsetCacheConfig;
- private CacheConfiguration preparedPlanCacheConfig = new CacheConfiguration();
private int maxODBCLobSizeAllowed = 5*1024*1024; // 5 MB
private int userRequestSourceConcurrency = DEFAULT_USER_REQUEST_SOURCE_CONCURRENCY;
private boolean detectingChangeEvents = true;
@@ -101,19 +98,7 @@
public void setLobChunkSizeInKB(int lobChunkSizeInKB) {
this.lobChunkSizeInKB = lobChunkSizeInKB;
}
-
- public CacheConfiguration getResultsetCacheConfig() {
- return this.resultsetCacheConfig;
- }
- public void setResultsetCacheConfig(CacheConfiguration config) {
- this.resultsetCacheConfig = config;
- }
-
- public boolean isResultSetCacheEnabled() {
- return this.resultsetCacheConfig != null;
- }
-
/**
* Determine whether role checking is enabled on the server.
* @return <code>true</code> if server-side role checking is enabled.
@@ -177,15 +162,6 @@
this.authorizationValidator = authorizationValidator;
}
- public CacheConfiguration getPreparedPlanCacheConfig() {
- return preparedPlanCacheConfig;
- }
-
- public void setPreparedPlanCacheConfig(
- CacheConfiguration preparedPlanCacheConfig) {
- this.preparedPlanCacheConfig = preparedPlanCacheConfig;
- }
-
public boolean isDetectingChangeEvents() {
return detectingChangeEvents;
}
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -22,12 +22,7 @@
package org.teiid.dqp.internal.process;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.FutureTask;
@@ -44,8 +39,6 @@
import org.teiid.adminapi.impl.RequestMetadata;
import org.teiid.adminapi.impl.TransactionMetadata;
import org.teiid.adminapi.impl.WorkerPoolStatisticsMetadata;
-import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.CacheFactory;
import org.teiid.client.DQP;
import org.teiid.client.RequestMessage;
import org.teiid.client.ResultsMessage;
@@ -65,13 +58,10 @@
import org.teiid.dqp.message.RequestID;
import org.teiid.dqp.service.BufferService;
import org.teiid.dqp.service.TransactionContext;
-import org.teiid.dqp.service.TransactionService;
import org.teiid.dqp.service.TransactionContext.Scope;
+import org.teiid.dqp.service.TransactionService;
import org.teiid.events.EventDistributor;
-import org.teiid.logging.CommandLogMessage;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
-import org.teiid.logging.MessageLevel;
+import org.teiid.logging.*;
import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.metadata.MetadataRepository;
import org.teiid.query.QueryPlugin;
@@ -202,7 +192,6 @@
private int currentlyActivePlans;
private int userRequestSourceConcurrency;
private LinkedList<RequestWorkItem> waitingPlans = new LinkedList<RequestWorkItem>();
- private CacheFactory cacheFactory;
private AuthorizationValidator authorizationValidator;
@@ -685,18 +674,6 @@
//get buffer manager
this.bufferManager = bufferService.getBufferManager();
- //result set cache
- CacheConfiguration rsCacheConfig = config.getResultsetCacheConfig();
- if (rsCacheConfig != null) {
- this.rsCache = new SessionAwareCache<CachedResults>(this.cacheFactory, SessionAwareCache.Type.RESULTSET, rsCacheConfig);
- this.rsCache.setBufferManager(this.bufferManager);
- }
-
- //prepared plan cache
- CacheConfiguration ppCacheConfig = config.getPreparedPlanCacheConfig();
- prepPlanCache = new SessionAwareCache<PreparedPlan>(this.cacheFactory, SessionAwareCache.Type.PREPAREDPLAN, ppCacheConfig);
- prepPlanCache.setBufferManager(this.bufferManager);
-
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
this.maxActivePlans = config.getMaxActivePlans();
@@ -899,10 +876,14 @@
return this.config.getMaxSourceRows();
}
- public void setCacheFactory(CacheFactory factory) {
- this.cacheFactory = factory;
+ public void setResultsetCache(SessionAwareCache<CachedResults> cache) {
+ this.rsCache = cache;
}
+ public void setPreparedPlanCache(SessionAwareCache<PreparedPlan> cache) {
+ this.prepPlanCache = cache;
+ }
+
public int getUserRequestSourceConcurrency() {
return userRequestSourceConcurrency;
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -79,7 +79,7 @@
this(new DefaultCacheFactory(), Type.RESULTSET, new CacheConfiguration(Policy.LRU, 60, maxSize, "default")); //$NON-NLS-1$
}
- SessionAwareCache (final CacheFactory cacheFactory, final Type type, final CacheConfiguration config){
+ public SessionAwareCache (final CacheFactory cacheFactory, final Type type, final CacheConfiguration config){
this.maxSize = config.getMaxEntries();
if(this.maxSize < 0){
this.maxSize = Integer.MAX_VALUE;
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -117,13 +117,13 @@
return BufferManagerFactory.createBufferManager();
}
});
- core.setCacheFactory(new DefaultCacheFactory());
+ core.setResultsetCache(new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, new CacheConfiguration()));
+ core.setPreparedPlanCache(new SessionAwareCache<PreparedPlan>(new DefaultCacheFactory(), SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration()));
core.setTransactionService(new FakeTransactionService());
config = new DQPConfiguration();
config.setMaxActivePlans(1);
config.setUserRequestSourceConcurrency(2);
- config.setResultsetCacheConfig(new CacheConfiguration());
core.start(config);
core.getPrepPlanCache().setModTime(1);
core.getRsCache().setModTime(1);
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -27,6 +27,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
+import org.teiid.cache.CacheConfiguration;
import org.teiid.cache.DefaultCacheFactory;
import org.teiid.client.RequestMessage;
import org.teiid.common.buffer.BlockedException;
@@ -78,7 +79,8 @@
rm = new DQPCore();
rm.setTransactionService(new FakeTransactionService());
rm.setBufferService(new FakeBufferService());
- rm.setCacheFactory(new DefaultCacheFactory());
+ rm.setResultsetCache(new SessionAwareCache<CachedResults>(new DefaultCacheFactory(), SessionAwareCache.Type.RESULTSET, new CacheConfiguration()));
+ rm.setPreparedPlanCache(new SessionAwareCache<PreparedPlan>(new DefaultCacheFactory(), SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration()));
rm.start(new DQPConfiguration());
FakeBufferService bs = new FakeBufferService();
Modified: branches/as7/jboss-integration/pom.xml
===================================================================
--- branches/as7/jboss-integration/pom.xml 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/pom.xml 2011-09-06 21:53:22 UTC (rev 3454)
@@ -17,6 +17,11 @@
<artifactId>teiid-runtime</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-cache-jbosscache</artifactId>
+ </dependency>
+
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-api</artifactId>
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -69,16 +69,15 @@
public static final String MAX_OPEN_FILES = "max-open-files";//$NON-NLS-1$
//cache-config
- public static final String MAX_ENTRIES = "maxEntries";//$NON-NLS-1$
- public static final String MAX_AGE_IN_SECS = "maxAgeInSeconds";//$NON-NLS-1$
- public static final String MAX_STALENESS = "maxStaleness";//$NON-NLS-1$
+ public static final String MAX_ENTRIES = "max-entries";//$NON-NLS-1$
+ public static final String MAX_AGE_IN_SECS = "max-age-in-seconds";//$NON-NLS-1$
+ public static final String MAX_STALENESS = "max-staleness";//$NON-NLS-1$
public static final String CACHE_TYPE = "type";//$NON-NLS-1$
- public static final String CACHE_LOCATION= "location";//$NON-NLS-1$
+ public static final String ENABLE = "enable";//$NON-NLS-1$
// cache-factory
- public static final String CACHE_SERVICE_JNDI_NAME = "cache-service-jndi-name";//$NON-NLS-1$
+ public static final String CACHE_SERVICE_JNDI_NAME = "cache-manager-jndi-name";//$NON-NLS-1$
public static final String RESULTSET_CACHE_NAME = "resultsetCacheName";//$NON-NLS-1$
- public static final String CLASS = "class";//$NON-NLS-1$
//socket config
public static final String MAX_SOCKET_THREAD_SIZE = "maxSocketThreads";//$NON-NLS-1$
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -76,7 +76,7 @@
MAX_AGE_IN_SECS_ELEMENT(MAX_AGE_IN_SECS),
MAX_STALENESS_ELEMENT(MAX_STALENESS),
CACHE_TYPE_ELEMENT(CACHE_TYPE),
- CACHE_LOCATION_ELEMENT(CACHE_LOCATION),
+ ENABLE_ATTRIBUTE(ENABLE),
// cache-factory
CACHE_SERVICE_JNDI_NAME_ELEMENT(CACHE_SERVICE_JNDI_NAME),
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -46,11 +46,11 @@
import org.jboss.msc.inject.ConcurrentMapInjector;
import org.jboss.msc.service.*;
import org.jboss.msc.value.InjectedValue;
-import org.teiid.cache.CacheFactory;
import org.teiid.deployers.SystemVDBDeployer;
import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.datamgr.TranslatorRepository;
import org.teiid.dqp.internal.process.AuthorizationValidator;
+import org.teiid.dqp.internal.process.SessionAwareCache;
import org.teiid.jboss.deployers.RuntimeEngineDeployer;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
@@ -122,7 +122,8 @@
engineBuilder.addDependency(TeiidServiceNames.TRANSLATOR_REPO, TranslatorRepository.class, engine.getTranslatorRepositoryInjector());
engineBuilder.addDependency(TeiidServiceNames.VDB_REPO, VDBRepository.class, engine.getVdbRepositoryInjector());
engineBuilder.addDependency(TeiidServiceNames.AUTHORIZATION_VALIDATOR, AuthorizationValidator.class, engine.getAuthorizationValidatorInjector());
- engineBuilder.addDependency(TeiidServiceNames.CACHE_FACTORY, CacheFactory.class, engine.getCachefactoryInjector());
+ engineBuilder.addDependency(TeiidServiceNames.CACHE_RESULTSET, SessionAwareCache.class, engine.getResultSetCacheInjector());
+ engineBuilder.addDependency(TeiidServiceNames.CACHE_PREPAREDPLAN, SessionAwareCache.class, engine.getPreparedPlanCacheInjector());
if (jdbc != null) {
engineBuilder.addDependency(ServiceName.JBOSS.append("binding", jdbc.getSocketBinding()), SocketBinding.class, engine.getJdbcSocketBindingInjector()); //$NON-NLS-1$
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidBootServicesAdd.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -45,17 +45,20 @@
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoadException;
-import org.jboss.msc.service.*;
+import org.jboss.msc.service.ServiceBuilder;
+import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.ServiceTarget;
+import org.jboss.msc.service.ValueService;
import org.teiid.PolicyDecider;
import org.teiid.cache.CacheConfiguration;
+import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.cache.CacheFactory;
-import org.teiid.cache.DefaultCacheFactory;
+import org.teiid.cache.jboss.ClusterableCacheFactory;
+import org.teiid.common.buffer.BufferManager;
import org.teiid.deployers.SystemVDBDeployer;
import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.datamgr.TranslatorRepository;
-import org.teiid.dqp.internal.process.AuthorizationValidator;
-import org.teiid.dqp.internal.process.DataRolePolicyDecider;
-import org.teiid.dqp.internal.process.DefaultAuthorizationValidator;
+import org.teiid.dqp.internal.process.*;
import org.teiid.query.function.SystemFunctionManager;
import org.teiid.services.BufferServiceImpl;
@@ -104,7 +107,7 @@
distributedCacheNode.get(TYPE).set(ModelType.OBJECT);
distributedCacheNode.get(DESCRIPTION).set(bundle.getString(Configuration.CACHE_FACORY+DESC));
distributedCacheNode.get(REQUIRED).set(false);
- describeDistributedCache(preparedPlanCacheNode, ATTRIBUTES, bundle);
+ describeCacheFactory(preparedPlanCacheNode, ATTRIBUTES, bundle);
}
@Override
@@ -115,12 +118,18 @@
if (operation.hasDefined(Configuration.ASYNC_THREAD_GROUP)) {
model.get(Configuration.ASYNC_THREAD_GROUP).set(operation.get(Configuration.ASYNC_THREAD_GROUP).asString());
}
+
populateBufferManager(operation, model);
- //TODO: add cache model descriptions
- // these are just place holders
-// model.get(Configuration.QUERY_ENGINE);
-// model.get(Configuration.TRANSLATOR);
+ if (operation.hasDefined(Configuration.POLICY_DECIDER_MODULE)) {
+ model.get(Configuration.POLICY_DECIDER_MODULE).set(operation.get(Configuration.POLICY_DECIDER_MODULE).asString());
+ }
+
+ if (operation.hasDefined(Configuration.AUTHORIZATION_VALIDATOR_MODULE)) {
+ model.get(Configuration.AUTHORIZATION_VALIDATOR_MODULE).set(operation.get(Configuration.AUTHORIZATION_VALIDATOR_MODULE).asString());
+ }
+
+ populateCache(operation, model);
}
@Override
@@ -214,7 +223,7 @@
newControllers.add(target.addService(TeiidServiceNames.AUTHORIZATION_VALIDATOR, authValidatorService).install());
//cache factory
- final CacheFactory cacheFactory = getCacheFactory(operation.get(Configuration.CACHE_FACORY));
+ final CacheFactory cacheFactory = buildCacheFactory(operation.get(Configuration.CACHE_FACORY));
ValueService<CacheFactory> cacheFactoryService = new ValueService<CacheFactory>(new org.jboss.msc.value.Value<CacheFactory>() {
@Override
public CacheFactory getValue() throws IllegalStateException, IllegalArgumentException {
@@ -223,13 +232,27 @@
});
newControllers.add(target.addService(TeiidServiceNames.CACHE_FACTORY, cacheFactoryService).install());
- CacheConfiguration resultsetCache = buildCacheConfig(operation.get(Configuration.RESULTSET_CACHE));
- CacheConfiguration preparePlanCache = buildCacheConfig(operation.get(Configuration.PREPAREDPLAN_CACHE));
+ // resultset cache
+ final SessionAwareCache<CachedResults> resultsetCache = buildResultsetCache(operation.get(Configuration.RESULTSET_CACHE), cacheFactory, bufferManager.getBufferManager());
+ ValueService<SessionAwareCache<CachedResults>> resultSetService = new ValueService<SessionAwareCache<CachedResults>>(new org.jboss.msc.value.Value<SessionAwareCache<CachedResults>>() {
+ @Override
+ public SessionAwareCache<CachedResults> getValue() throws IllegalStateException, IllegalArgumentException {
+ return resultsetCache;
+ }
+ });
+ newControllers.add(target.addService(TeiidServiceNames.CACHE_RESULTSET, resultSetService).install());
+ // prepared-plan cache
+ final SessionAwareCache<PreparedPlan> preparedPlanCache = buildPreparedPlanCache(operation.get(Configuration.PREPAREDPLAN_CACHE), cacheFactory, bufferManager.getBufferManager());
+ ValueService<SessionAwareCache<PreparedPlan>> preparedPlanService = new ValueService<SessionAwareCache<PreparedPlan>>(new org.jboss.msc.value.Value<SessionAwareCache<PreparedPlan>>() {
+ @Override
+ public SessionAwareCache<PreparedPlan> getValue() throws IllegalStateException, IllegalArgumentException {
+ return preparedPlanCache;
+ }
+ });
+ newControllers.add(target.addService(TeiidServiceNames.CACHE_PREPAREDPLAN, preparedPlanService).install());
- // add translators
-
// Register VDB deployer
context.addStep(new AbstractDeploymentChainStep() {
@Override
@@ -338,7 +361,47 @@
}
}
- private static void describeDistributedCache(ModelNode node, String type, ResourceBundle bundle) {
+ private void populateCache(ModelNode operation, ModelNode model) {
+ if (operation.hasDefined(Configuration.CACHE_FACORY)) {
+ ModelNode cacheFactory = operation.get(Configuration.CACHE_FACORY);
+ if (cacheFactory.hasDefined(Configuration.CACHE_SERVICE_JNDI_NAME)) {
+ model.get(Configuration.CACHE_FACORY, Configuration.CACHE_SERVICE_JNDI_NAME).set(cacheFactory.get(Configuration.CACHE_SERVICE_JNDI_NAME).asString());
+ }
+ if (cacheFactory.hasDefined(Configuration.RESULTSET_CACHE_NAME)) {
+ model.get(Configuration.CACHE_FACORY, Configuration.RESULTSET_CACHE_NAME).set(cacheFactory.get(Configuration.RESULTSET_CACHE_NAME).asString());
+ }
+ }
+
+ if (operation.hasDefined(Configuration.RESULTSET_CACHE)) {
+ ModelNode cache = operation.get(Configuration.RESULTSET_CACHE);
+ populateCacheConfig(cache, model.get(Configuration.RESULTSET_CACHE));
+ }
+
+ if (operation.hasDefined(Configuration.PREPAREDPLAN_CACHE)) {
+ ModelNode cache = operation.get(Configuration.PREPAREDPLAN_CACHE);
+ populateCacheConfig(cache, model.get(Configuration.PREPAREDPLAN_CACHE));
+ }
+ }
+
+ private void populateCacheConfig(ModelNode operation, ModelNode model) {
+ if (operation.hasDefined(Configuration.ENABLE)) {
+ model.get(Configuration.ENABLE).set(operation.get(Configuration.ENABLE).asBoolean());
+ }
+ if (operation.hasDefined(Configuration.MAX_ENTRIES)) {
+ model.get(Configuration.MAX_ENTRIES).set(operation.get(Configuration.MAX_ENTRIES).asInt());
+ }
+ if (operation.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
+ model.get(Configuration.MAX_AGE_IN_SECS).set(operation.get(Configuration.MAX_AGE_IN_SECS).asInt());
+ }
+ if (operation.hasDefined(Configuration.MAX_STALENESS)) {
+ model.get(Configuration.MAX_STALENESS).set(operation.get(Configuration.MAX_STALENESS).asInt());
+ }
+ if (operation.hasDefined(Configuration.CACHE_TYPE)) {
+ model.get(Configuration.CACHE_TYPE).set(operation.get(Configuration.CACHE_TYPE).asString());
+ }
+ }
+
+ private static void describeCacheFactory(ModelNode node, String type, ResourceBundle bundle) {
addAttribute(node, Configuration.CACHE_SERVICE_JNDI_NAME, type, bundle.getString(Configuration.CACHE_SERVICE_JNDI_NAME+DESC), ModelType.STRING, false, "java:TeiidCacheManager"); //$NON-NLS-1$
addAttribute(node, Configuration.RESULTSET_CACHE_NAME, type, bundle.getString(Configuration.RESULTSET_CACHE_NAME+DESC), ModelType.STRING, false, "teiid-resultset-cache"); //$NON-NLS-1$
}
@@ -348,7 +411,6 @@
addAttribute(node, Configuration.MAX_AGE_IN_SECS, type, bundle.getString(Configuration.MAX_AGE_IN_SECS+DESC), ModelType.INT, false, "7200");//$NON-NLS-1$
addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "60");//$NON-NLS-1$
addAttribute(node, Configuration.CACHE_TYPE, type, bundle.getString(Configuration.CACHE_TYPE+DESC), ModelType.STRING, false, "EXPIRATION"); //$NON-NLS-1$
- addAttribute(node, Configuration.CACHE_LOCATION, type, bundle.getString(Configuration.CACHE_LOCATION+DESC), ModelType.STRING, false, "resultset"); //$NON-NLS-1$
}
private static void describePreparedPlanCache(ModelNode node, String type, ResourceBundle bundle) {
@@ -356,51 +418,97 @@
addAttribute(node, Configuration.MAX_AGE_IN_SECS, type, bundle.getString(Configuration.MAX_AGE_IN_SECS+DESC), ModelType.INT, false, "28800");//$NON-NLS-1$
addAttribute(node, Configuration.MAX_STALENESS, type, bundle.getString(Configuration.MAX_STALENESS+DESC), ModelType.INT, false, "0");//$NON-NLS-1$
addAttribute(node, Configuration.CACHE_TYPE, type, bundle.getString(Configuration.CACHE_TYPE+DESC), ModelType.STRING, false, "LRU"); //$NON-NLS-1$
- addAttribute(node, Configuration.CACHE_LOCATION, type, bundle.getString(Configuration.CACHE_LOCATION+DESC), ModelType.STRING, false, "preparedplan"); //$NON-NLS-1$
}
- private CacheFactory getCacheFactory(ModelNode node) {
- CacheFactory cacheFactory = new DefaultCacheFactory();
- /*
- if (node.hasDefined(Configuration.CLASS)) {
- String className = node.get(Configuration.CLASS).asString();
- }
-
- if (node.hasDefined(Configuration.ENABLED)) {
- cacheFactory.setEnabled(node.get(Configuration.ENABLED).asBoolean());
- }
- else {
- cacheFactory.setEnabled(true);
- }
+ private CacheFactory buildCacheFactory(ModelNode node) {
+ ClusterableCacheFactory cacheFactory = new ClusterableCacheFactory();
if (node.hasDefined(Configuration.CACHE_SERVICE_JNDI_NAME)) {
cacheFactory.setCacheManager(node.get(Configuration.CACHE_SERVICE_JNDI_NAME).asString());
}
if (node.hasDefined(Configuration.RESULTSET_CACHE_NAME)) {
cacheFactory.setResultsetCacheName(node.get(Configuration.RESULTSET_CACHE_NAME).asString());
}
- */
return cacheFactory;
}
- private CacheConfiguration buildCacheConfig(ModelNode node) {
+ private SessionAwareCache<CachedResults> buildResultsetCache(ModelNode node, CacheFactory cacheFactory, BufferManager bufferManager) {
+ if (node.hasDefined(Configuration.ENABLE)) {
+ if (!node.get(Configuration.ENABLE).asBoolean()) {
+ return null;
+ }
+ }
+
CacheConfiguration cacheConfig = new CacheConfiguration();
+ if (node.hasDefined(Configuration.MAX_ENTRIES)) {
+ cacheConfig.setMaxEntries(node.get(Configuration.MAX_ENTRIES).asInt());
+ }
+ else {
+ cacheConfig.setMaxEntries(1024);
+ }
+ if (node.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
+ cacheConfig.setMaxAgeInSeconds(node.get(Configuration.MAX_AGE_IN_SECS).asInt());
+ }
+ else {
+ cacheConfig.setMaxAgeInSeconds(7200);
+ }
+
+ if (node.hasDefined(Configuration.MAX_STALENESS)) {
+ cacheConfig.setMaxStaleness(node.get(Configuration.MAX_STALENESS).asInt());
+ }
+ else {
+ cacheConfig.setMaxStaleness(60);
+ }
+ if (node.hasDefined(Configuration.CACHE_TYPE)) {
+ cacheConfig.setType(node.get(Configuration.CACHE_TYPE).asString());
+ }
+ else {
+ cacheConfig.setType(Policy.EXPIRATION.name());
+ }
+
+ cacheConfig.setLocation("resultset"); //$NON-NLS-1$
+ SessionAwareCache<CachedResults> resultsetCache = new SessionAwareCache<CachedResults>(cacheFactory, SessionAwareCache.Type.RESULTSET, cacheConfig);
+ resultsetCache.setBufferManager(bufferManager);
+
+ return resultsetCache;
+ }
+
+
+ private SessionAwareCache<PreparedPlan> buildPreparedPlanCache(ModelNode node, CacheFactory cacheFactory, BufferManager bufferManager) {
+
+ CacheConfiguration cacheConfig = new CacheConfiguration();
if (node.hasDefined(Configuration.MAX_ENTRIES)) {
cacheConfig.setMaxEntries(node.get(Configuration.MAX_ENTRIES).asInt());
}
+ else {
+ cacheConfig.setMaxEntries(512);
+ }
+
if (node.hasDefined(Configuration.MAX_AGE_IN_SECS)) {
cacheConfig.setMaxAgeInSeconds(node.get(Configuration.MAX_AGE_IN_SECS).asInt());
}
+ else {
+ cacheConfig.setMaxAgeInSeconds(28800);
+ }
+
if (node.hasDefined(Configuration.MAX_STALENESS)) {
cacheConfig.setMaxStaleness(node.get(Configuration.MAX_STALENESS).asInt());
}
+ else {
+ cacheConfig.setMaxStaleness(0);
+ }
if (node.hasDefined(Configuration.CACHE_TYPE)) {
cacheConfig.setType(node.get(Configuration.CACHE_TYPE).asString());
}
- if (node.hasDefined(Configuration.CACHE_LOCATION)) {
- cacheConfig.setLocation(node.get(Configuration.CACHE_LOCATION).asString());
- }
- return cacheConfig;
- }
+ else {
+ cacheConfig.setType(Policy.LRU.name());
+ }
+
+ cacheConfig.setLocation("prepared"); //$NON-NLS-1$
+ SessionAwareCache<PreparedPlan> cache = new SessionAwareCache<PreparedPlan>(cacheFactory, SessionAwareCache.Type.PREPAREDPLAN, cacheConfig);
+ cache.setBufferManager(bufferManager);
+
+ return cache;
+ }
}
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidServiceNames.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -36,6 +36,8 @@
private static ServiceName VDB_SVC_BASE = ServiceName.JBOSS.append("teiid", "vdb"); //$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName OBJECT_SERIALIZER = ServiceName.JBOSS.append("teiid", "object-serializer"); //$NON-NLS-1$ //$NON-NLS-2$
public static ServiceName CACHE_FACTORY = ServiceName.JBOSS.append("teiid", "cache-factory"); //$NON-NLS-1$ //$NON-NLS-2$
+ public static ServiceName CACHE_RESULTSET = ServiceName.JBOSS.append("teiid", "cache", "resultset"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ public static ServiceName CACHE_PREPAREDPLAN = ServiceName.JBOSS.append("teiid", "cache", "prepared-plan"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
public static ServiceName translatorServiceName(String name) {
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -149,10 +149,10 @@
}
private void writeSocketConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+ writeAttribute(writer, Element.SOCKET_BINDING_ELEMENT, node);
writeElement(writer, Element.MAX_SOCKET_SIZE_ELEMENT, node);
writeElement(writer, Element.IN_BUFFER_SIZE_ELEMENT, node);
writeElement(writer, Element.OUT_BUFFER_SIZE_ELEMENT, node);
- writeElement(writer, Element.SOCKET_BINDING_ELEMENT, node);
if (has(node, Element.SSL_ELEMENT.getLocalName())) {
writer.writeStartElement(Element.SSL_ELEMENT.getLocalName());
@@ -190,11 +190,11 @@
}
private void writeCacheConfiguration(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {
+ writeAttribute(writer, Element.ENABLE_ATTRIBUTE, node);
writeElement(writer, Element.MAX_ENTRIES_ELEMENT, node);
writeElement(writer, Element.MAX_AGE_IN_SECS_ELEMENT, node);
writeElement(writer, Element.MAX_STALENESS_ELEMENT, node);
writeElement(writer, Element.CACHE_TYPE_ELEMENT, node);
- writeElement(writer, Element.CACHE_LOCATION_ELEMENT, node);
}
private boolean has(ModelNode node, String name) {
@@ -410,7 +410,6 @@
node.get(reader.getLocalName()).set(Integer.parseInt(reader.getElementText()));
break;
case CACHE_TYPE_ELEMENT:
- case CACHE_LOCATION_ELEMENT:
node.get(reader.getLocalName()).set(reader.getElementText());
break;
default:
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -52,7 +52,6 @@
import org.teiid.adminapi.AdminException;
import org.teiid.adminapi.AdminProcessingException;
import org.teiid.adminapi.impl.*;
-import org.teiid.cache.CacheFactory;
import org.teiid.client.DQP;
import org.teiid.client.RequestMessage;
import org.teiid.client.ResultsMessage;
@@ -66,7 +65,6 @@
import org.teiid.core.util.ApplicationInfo;
import org.teiid.core.util.LRUCache;
import org.teiid.deployers.CompositeVDB;
-import org.teiid.deployers.ContainerLifeCycleListener;
import org.teiid.deployers.VDBLifeCycleListener;
import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.datamgr.TranslatorRepository;
@@ -129,7 +127,8 @@
private final InjectedValue<TranslatorRepository> translatorRepositoryInjector = new InjectedValue<TranslatorRepository>();
private final InjectedValue<VDBRepository> vdbRepositoryInjector = new InjectedValue<VDBRepository>();
private final InjectedValue<AuthorizationValidator> authorizationValidatorInjector = new InjectedValue<AuthorizationValidator>();
- private final InjectedValue<CacheFactory> cachefactoryInjector = new InjectedValue<CacheFactory>();
+ private final InjectedValue<SessionAwareCache> preparedPlanCacheInjector = new InjectedValue<SessionAwareCache>();
+ private final InjectedValue<SessionAwareCache> resultSetCacheInjector = new InjectedValue<SessionAwareCache>();
public final ConcurrentMap<String, SecurityDomainContext> securityDomains = new ConcurrentHashMap<String, SecurityDomainContext>();
private LinkedList<String> securityDomainNames = new LinkedList<String>();
@@ -204,7 +203,8 @@
}
this.dqpCore.setMetadataRepository(this.vdbRepository.getMetadataRepository());
this.dqpCore.setEventDistributor(this.eventDistributor);
- this.dqpCore.setCacheFactory(getCachefactoryInjector().getValue());
+ this.dqpCore.setResultsetCache(getResultSetCacheInjector().getValue());
+ this.dqpCore.setPreparedPlanCache(getPreparedPlanCacheInjector().getValue());
this.dqpCore.start(this);
this.eventDistributorProxy = (EventDistributor)Proxy.newProxyInstance(Module.getCallerModule().getClassLoader(), new Class[] {EventDistributor.class}, new InvocationHandler() {
@@ -783,9 +783,13 @@
this.securityDomainNames.add(domain);
}
- public InjectedValue<CacheFactory> getCachefactoryInjector() {
- return cachefactoryInjector;
+ public InjectedValue<SessionAwareCache> getResultSetCacheInjector() {
+ return resultSetCacheInjector;
}
+
+ public InjectedValue<SessionAwareCache> getPreparedPlanCacheInjector() {
+ return preparedPlanCacheInjector;
+ }
public InjectedValue<TranslatorRepository> getTranslatorRepositoryInjector() {
return translatorRepositoryInjector;
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-09-06 21:53:22 UTC (rev 3454)
@@ -106,13 +106,12 @@
#cache-config
enabled.describe=enabled
-maxEntries.describe=Max Entries allowed
-maxAgeInSeconds.describe=Max age in seconds
-maxStaleness.describe=Max staleness in seconds. Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)
+max-entries.describe=Max Entries allowed
+max-age-in-seconds.describe=Max age in seconds
+max-staleness.describe=Max staleness in seconds. Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)
type.describe=Allowed values are LRU, EXPIRATION. \
Setting this value to LRU will cause cache hint TTL values \
to be ignored. (default EXPIRATION)
-location.describe=location
#cache-factory
cache-service-jndi-name.describe=cache service for the distributed cache
Modified: branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd
===================================================================
--- branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd 2011-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/jboss-integration/src/main/resources/schema/jboss-teiid.xsd 2011-09-06 21:53:22 UTC (rev 3454)
@@ -152,17 +152,17 @@
</xs:complexType>
<xs:complexType name="cache-config">
<xs:sequence>
- <xs:element name="maxEntries" type="xs:string" minOccurs="0" maxOccurs="1" default="1024">
+ <xs:element name="max-entries" type="xs:string" minOccurs="0" maxOccurs="1" default="1024">
<xs:annotation>
<xs:documentation>Max Entries allowed (default 1024)</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="maxAgeInSeconds" type="xs:int" minOccurs="0" maxOccurs="1" default="7200">
+ <xs:element name="max-age-in-seconds" type="xs:int" minOccurs="0" maxOccurs="1" default="7200">
<xs:annotation>
<xs:documentation>Max age in seconds (default 7200 - 2 hours)</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="maxStaleness" type="xs:int" minOccurs="0" maxOccurs="1" default="-1">
+ <xs:element name="max-staleness" type="xs:int" minOccurs="0" maxOccurs="1" default="-1">
<xs:annotation>
<xs:documentation>Max staleness in seconds. Modifications are based upon data updates -1 indicates no max. (default 60 - 1 minute)</xs:documentation>
</xs:annotation>
@@ -178,11 +178,6 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="location" type="xs:string" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>location</xs:documentation>
- </xs:annotation>
- </xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="runtime-engine-type">
@@ -311,17 +306,13 @@
<xs:documentation>SO_SNDBUF size, 0 indicates that system default should be used (default 0)</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="socket-binding" type="xs:string" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>Port binding name</xs:documentation>
- </xs:annotation>
- </xs:element>
<xs:element name="ssl" type="ssl-config" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>SSL Configuration</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
+ <xs:attribute name="socket-binding" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="ssl-config">
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-09-06 20:27:27 UTC (rev 3453)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2011-09-06 21:53:22 UTC (rev 3454)
@@ -43,8 +43,7 @@
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.DQPConfiguration;
-import org.teiid.dqp.internal.process.DQPCore;
+import org.teiid.dqp.internal.process.*;
import org.teiid.dqp.service.FakeBufferService;
import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.MetadataRepository;
@@ -151,7 +150,16 @@
this.sessionService.setVDBRepository(repo);
this.dqp.setBufferService(new FakeBufferService());
- this.dqp.setCacheFactory(new DefaultCacheFactory());
+ DefaultCacheFactory dcf = new DefaultCacheFactory() {
+ @Override
+ public boolean isReplicated() {
+ return true; //pretend to be replicated for matview tests
+ }
+ };
+
+ this.dqp.setResultsetCache(new SessionAwareCache<CachedResults>(dcf, SessionAwareCache.Type.RESULTSET, new CacheConfiguration(Policy.LRU, 60, 250, "resultsetcache")));
+ this.dqp.setPreparedPlanCache(new SessionAwareCache<PreparedPlan>(dcf, SessionAwareCache.Type.PREPAREDPLAN, new CacheConfiguration()));
+
this.dqp.setTransactionService(new FakeTransactionService());
cmr = Mockito.mock(ConnectorManagerRepository.class);
@@ -162,13 +170,6 @@
}
});
- config.setResultsetCacheConfig(new CacheConfiguration(Policy.LRU, 60, 250, "resultsetcache")); //$NON-NLS-1$
- this.dqp.setCacheFactory(new DefaultCacheFactory() {
- @Override
- public boolean isReplicated() {
- return true; //pretend to be replicated for matview tests
- }
- });
this.dqp.start(config);
this.sessionService.setDqp(this.dqp);
13 years, 7 months
teiid SVN: r3453 - in branches/7.4.x/engine/src/main/java/org/teiid/common/buffer: impl and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-09-06 16:27:27 -0400 (Tue, 06 Sep 2011)
New Revision: 3453
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/SPage.java
branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
Log:
TEIID-1742 using longs instead of integers for page ids
Modified: branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/SPage.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-09-06 20:08:58 UTC (rev 3452)
+++ branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-09-06 20:27:27 UTC (rev 3453)
@@ -27,7 +27,6 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
import org.teiid.common.buffer.BatchManager.ManagedBatch;
import org.teiid.core.TeiidComponentException;
@@ -54,8 +53,6 @@
}
}
- private static AtomicInteger counter = new AtomicInteger();
-
STree stree;
protected SPage next;
@@ -66,7 +63,7 @@
SPage(STree stree, boolean leaf) {
this.stree = stree;
- this.values = new TupleBatch(counter.getAndIncrement(), new ArrayList(stree.pageSize/4));
+ this.values = new TupleBatch(0, new ArrayList(stree.pageSize/4));
if (!leaf) {
children = new ArrayList<SPage>(stree.pageSize/4);
}
Modified: branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-09-06 20:08:58 UTC (rev 3452)
+++ branches/7.4.x/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-09-06 20:27:27 UTC (rev 3453)
@@ -163,7 +163,9 @@
store = newStore;
long oldOffset = offset;
offset = store.getLength();
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Compacted store", id, "pre-size", oldOffset, "post-size", offset); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Compacted store", id, "pre-size", oldOffset, "post-size", offset); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
return offset;
} finally {
this.compactionLock.writeLock().unlock();
@@ -180,10 +182,10 @@
* Holder for active batches
*/
private class TupleBufferInfo {
- TreeMap<Integer, ManagedBatchImpl> batches = new TreeMap<Integer, ManagedBatchImpl>();
- Integer lastUsed = null;
+ TreeMap<Long, ManagedBatchImpl> batches = new TreeMap<Long, ManagedBatchImpl>();
+ Long lastUsed = null;
- ManagedBatchImpl removeBatch(int row) {
+ ManagedBatchImpl removeBatch(long row) {
ManagedBatchImpl result = batches.remove(row);
if (result != null) {
activeBatchKB -= result.sizeEstimate;
@@ -213,7 +215,9 @@
this.lobManager = new LobManager();
}
sizeEstimate = (int) Math.max(1, manager.sizeUtility.getBatchSize(batch) / 1024);
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", id, "with size estimate", sizeEstimate); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", id, "with size estimate", sizeEstimate); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
@Override
@@ -242,26 +246,28 @@
if (update) {
activeBatches.put(batchManager.id, tbi);
}
- Assertion.isNull(tbi.batches.put(this.beginRow, this));
+ tbi.batches.put(this.id, this);
}
}
@Override
public TupleBatch getBatch(boolean cache, String[] types) throws TeiidComponentException {
long reads = readAttempts.incrementAndGet();
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, "getting batch", reads, "reference hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, "getting batch", reads, "reference hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
synchronized (activeBatches) {
TupleBufferInfo tbi = activeBatches.remove(batchManager.id);
if (tbi != null) {
boolean put = true;
if (!cache) {
- tbi.removeBatch(this.beginRow);
+ tbi.removeBatch(this.id);
if (tbi.batches.isEmpty()) {
put = false;
}
}
if (put) {
- tbi.lastUsed = this.beginRow;
+ tbi.lastUsed = this.id;
activeBatches.put(batchManager.id, tbi);
}
}
@@ -286,7 +292,9 @@
}
}
long count = readCount.incrementAndGet();
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "reading batch from disk, total reads:", count); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "reading batch from disk, total reads:", count); //$NON-NLS-1$
+ }
try {
this.batchManager.compactionLock.readLock().lock();
long[] info = batchManager.physicalMapping.get(this.id);
@@ -324,7 +332,9 @@
if (batch != null) {
if (!persistent) {
long count = writeCount.incrementAndGet();
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "writing batch to disk, total writes: ", count); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "writing batch to disk, total writes: ", count); //$NON-NLS-1$
+ }
long offset = 0;
if (lobManager != null) {
for (List<?> tuple : batch.getTuples()) {
@@ -341,7 +351,9 @@
long[] info = new long[] {offset, size};
batchManager.physicalMapping.put(this.id, info);
}
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "batch written starting at:", offset); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "batch written starting at:", offset); //$NON-NLS-1$
+ }
}
if (softCache) {
this.batchReference = new SoftReference<TupleBatch>(batch);
@@ -365,7 +377,7 @@
public void remove() {
synchronized (activeBatches) {
TupleBufferInfo tbi = activeBatches.get(batchManager.id);
- if (tbi != null && tbi.removeBatch(this.beginRow) != null) {
+ if (tbi != null && tbi.removeBatch(this.id) != null) {
if (tbi.batches.isEmpty()) {
activeBatches.remove(batchManager.id);
}
@@ -381,7 +393,7 @@
@Override
public String toString() {
- return "ManagedBatch " + batchManager.id + " " + activeBatch; //$NON-NLS-1$ //$NON-NLS-2$
+ return "ManagedBatch " + batchManager.id + " " + this.id + " " + activeBatch; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -496,13 +508,17 @@
for (int i = 1; i < compareIndexes.length; i++) {
compareIndexes[i] = i;
}
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating STree:", newID); //$NON-NLS-1$
+ 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(), keyLength, TupleBuffer.getTypeNames(elements));
}
@Override
public FileStore createFileStore(String name) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$
+ }
return this.diskMgr.createFileStore(name);
}
@@ -610,7 +626,7 @@
}
Iterator<TupleBufferInfo> iter = activeBatches.values().iterator();
TupleBufferInfo tbi = iter.next();
- Map.Entry<Integer, ManagedBatchImpl> entry = null;
+ Map.Entry<Long, ManagedBatchImpl> entry = null;
if (tbi.lastUsed != null) {
entry = tbi.batches.floorEntry(tbi.lastUsed - 1);
}
13 years, 7 months
teiid SVN: r3452 - in trunk/engine/src: main/java/org/teiid/common/buffer/impl and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-09-06 16:08:58 -0400 (Tue, 06 Sep 2011)
New Revision: 3452
Modified:
trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java
trunk/engine/src/main/java/org/teiid/common/buffer/STree.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
Log:
TEIID-942 TEIID-1742 refining transaction support, fixing ids to use longs.
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -31,6 +31,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
import org.teiid.common.buffer.BatchManager.CleanupHook;
import org.teiid.common.buffer.BatchManager.ManagedBatch;
@@ -83,25 +84,25 @@
}
}
}
-
+
+ private static AtomicLong counter = new AtomicLong();
+
STree stree;
- private int id;
+ private long id;
protected SPage next;
protected SPage prev;
protected ManagedBatch managedBatch;
private Object trackingObject;
protected TupleBatch values;
protected ArrayList<SPage> children;
- //TODO: could track cloning more completely, which would allow for earlier batch removal
- private boolean cloned;
+ protected boolean cloned;
SPage(STree stree, boolean leaf) {
this.stree = stree;
- this.id = stree.counter.getAndIncrement();
+ this.id = counter.getAndIncrement();
stree.pages.put(this.id, this);
- //TODO: this counter is a hack. need a better idea of a storage id
- this.values = new TupleBatch(id, new ArrayList(stree.pageSize/4));
+ this.values = new TupleBatch(0, new ArrayList(stree.pageSize/4));
if (!leaf) {
children = new ArrayList<SPage>(stree.pageSize/4);
}
@@ -121,7 +122,7 @@
clone.children = new ArrayList<SPage>(children);
}
if (values != null) {
- clone.values = new TupleBatch(stree.counter.getAndIncrement(), new ArrayList<List<?>>(values.getTuples()));
+ clone.values = new TupleBatch(0, new ArrayList<List<?>>(values.getTuples()));
}
return clone;
} catch (CloneNotSupportedException e) {
@@ -129,7 +130,7 @@
}
}
- public int getId() {
+ public long getId() {
return id;
}
@@ -196,7 +197,6 @@
values.setDataTypes(stree.types);
}
if (cloned) {
- values.setRowOffset(stree.counter.getAndIncrement());
cloned = false;
trackingObject = null;
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/STree.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/STree.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/STree.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -57,8 +57,7 @@
private int mask = 1;
private int shift = 1;
- protected AtomicInteger counter = new AtomicInteger();
- protected ConcurrentHashMap<Integer, SPage> pages = new ConcurrentHashMap<Integer, SPage>();
+ protected ConcurrentHashMap<Long, SPage> pages = new ConcurrentHashMap<Long, SPage>();
protected volatile SPage[] header = new SPage[] {new SPage(this, true)};
protected BatchManager keyManager;
protected BatchManager leafManager;
@@ -103,12 +102,12 @@
clone.updateLock = new ReentrantLock();
clone.rowCount = new AtomicInteger(rowCount.get());
//clone the pages
- clone.pages = new ConcurrentHashMap<Integer, SPage>(pages);
- for (Map.Entry<Integer, SPage> entry : clone.pages.entrySet()) {
+ clone.pages = new ConcurrentHashMap<Long, SPage>(pages);
+ for (Map.Entry<Long, SPage> entry : clone.pages.entrySet()) {
entry.setValue(entry.getValue().clone(clone));
}
//reset the pointers
- for (Map.Entry<Integer, SPage> entry : clone.pages.entrySet()) {
+ for (Map.Entry<Long, SPage> entry : clone.pages.entrySet()) {
SPage clonePage = entry.getValue();
clonePage.next = clone.getPage(clonePage.next);
clonePage.prev = clone.getPage(clonePage.prev);
@@ -447,7 +446,7 @@
}
public void remove() {
- truncate(false);
+ truncate(true);
this.keyManager.remove();
this.leafManager.remove();
}
@@ -530,4 +529,12 @@
this.comparator.setSortParameters(sortParameters);
}
+ public void clearClonedFlags() {
+ for (SPage page : pages.values()) {
+ page.cloned = false;
+ //we don't really care about using synchronization or a volatile here
+ //since the worst case is that we'll just use gc cleanup
+ }
+ }
+
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -95,12 +95,10 @@
private final class CleanupHook implements org.teiid.common.buffer.BatchManager.CleanupHook {
private long id;
- private int beginRow;
private WeakReference<BatchManagerImpl> ref;
- CleanupHook(long id, int beginRow, BatchManagerImpl batchManager) {
+ CleanupHook(long id, BatchManagerImpl batchManager) {
this.id = id;
- this.beginRow = beginRow;
this.ref = new WeakReference<BatchManagerImpl>(batchManager);
}
@@ -109,7 +107,7 @@
if (batchManager == null) {
return;
}
- cleanupManagedBatch(batchManager, beginRow, id);
+ cleanupManagedBatch(batchManager, id);
}
}
@@ -204,10 +202,10 @@
* Holder for active batches
*/
private class TupleBufferInfo {
- TreeMap<Integer, ManagedBatchImpl> batches = new TreeMap<Integer, ManagedBatchImpl>();
- Integer lastUsed = null;
+ TreeMap<Long, ManagedBatchImpl> batches = new TreeMap<Long, ManagedBatchImpl>();
+ Long lastUsed = null;
- ManagedBatchImpl removeBatch(int row) {
+ ManagedBatchImpl removeBatch(long row) {
ManagedBatchImpl result = batches.remove(row);
if (result != null) {
activeBatchKB -= result.sizeEstimate;
@@ -268,7 +266,7 @@
if (update) {
activeBatches.put(batchManager.id, tbi);
}
- Assertion.isNull(tbi.batches.put(this.beginRow, this));
+ tbi.batches.put(this.id, this);
}
}
@@ -283,13 +281,13 @@
if (tbi != null) {
boolean put = true;
if (!cache) {
- tbi.removeBatch(this.beginRow);
+ tbi.removeBatch(this.id);
if (tbi.batches.isEmpty()) {
put = false;
}
}
if (put) {
- tbi.lastUsed = this.beginRow;
+ tbi.lastUsed = this.id;
activeBatches.put(batchManager.id, tbi);
}
}
@@ -397,17 +395,17 @@
}
public void remove() {
- cleanupManagedBatch(batchManager, beginRow, id);
+ cleanupManagedBatch(batchManager, id);
}
@Override
public CleanupHook getCleanupHook() {
- return new CleanupHook(id, beginRow, batchManager);
+ return new CleanupHook(id, batchManager);
}
@Override
public String toString() {
- return "ManagedBatch " + batchManager.id + " " + this.beginRow + " " + activeBatch; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return "ManagedBatch " + batchManager.id + " " + this.id + " " + activeBatch; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -513,10 +511,10 @@
return tupleBuffer;
}
- private void cleanupManagedBatch(BatchManagerImpl batchManager, int beginRow, long id) {
+ private void cleanupManagedBatch(BatchManagerImpl batchManager, long id) {
synchronized (activeBatches) {
TupleBufferInfo tbi = activeBatches.get(batchManager.id);
- if (tbi != null && tbi.removeBatch(beginRow) != null) {
+ if (tbi != null && tbi.removeBatch(id) != null) {
if (tbi.batches.isEmpty()) {
activeBatches.remove(batchManager.id);
}
@@ -655,7 +653,7 @@
}
Iterator<TupleBufferInfo> iter = activeBatches.values().iterator();
TupleBufferInfo tbi = iter.next();
- Map.Entry<Integer, ManagedBatchImpl> entry = null;
+ Map.Entry<Long, ManagedBatchImpl> entry = null;
if (tbi.lastUsed != null) {
entry = tbi.batches.floorEntry(tbi.lastUsed - 1);
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -290,7 +290,7 @@
if (tempTable != null) {
TempMetadataID id = tableStore.getMetadataStore().getTempGroupID(matTableName);
synchronized (id) {
- boolean clone = tempTable.getActiveReaders().get() != 0;
+ boolean clone = tempTable.getActive().get() != 0;
if (clone) {
tempTable = tempTable.clone();
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -36,6 +36,7 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.teiid.api.exception.query.ExpressionEvaluationException;
@@ -275,9 +276,9 @@
}
}
- private static AtomicInteger ID_GENERATOR = new AtomicInteger();
+ private static AtomicLong ID_GENERATOR = new AtomicLong();
- private int id = ID_GENERATOR.getAndIncrement();
+ private Long id = ID_GENERATOR.getAndIncrement();
private STree tree;
private AtomicInteger rowId;
private List<ElementSymbol> columns;
@@ -361,7 +362,7 @@
}
}
- public AtomicInteger getActiveReaders() {
+ public AtomicInteger getActive() {
return activeReaders;
}
@@ -803,13 +804,13 @@
return tid;
}
- public int getId() {
+ public Long getId() {
return id;
}
@Override
public int hashCode() {
- return id;
+ return id.hashCode();
}
@Override
@@ -821,7 +822,7 @@
return false;
}
TempTable other = (TempTable)obj;
- return id == other.id;
+ return id.equals(other.id);
}
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -82,7 +82,7 @@
public class TempTableSynchronization implements Synchronization {
private String id;
- Set<Integer> existingTables = new HashSet<Integer>();
+ Set<Long> existingTables = new HashSet<Long>();
ConcurrentHashMap<String, TempTable> tables = new ConcurrentHashMap<String, TempTable>();
private List<TransactionCallback> callbacks = new LinkedList<TransactionCallback>();
@@ -131,10 +131,21 @@
@Override
public synchronized void afterCompletion(int status) {
- //TODO: cleanup tables
completed = true;
synchronizations.remove(id);
- for (TransactionCallback callback : callbacks) {
+ if (transactionMode == TransactionMode.ISOLATE_READS) {
+ for (TempTable table : tables.values()) {
+ table.getActive().decrementAndGet();
+ }
+ } else {
+ HashSet<TempTable> current = new HashSet<TempTable>(tempTables.values());
+ current.retainAll(tables.values());
+ for (TempTable table : current) {
+ table.getActive().set(0);
+ table.getTree().clearClonedFlags();
+ }
+ }
+ for (TransactionCallback callback : callbacks) {
if (status == Status.STATUS_COMMITTED) {
callback.commit();
} else {
@@ -144,6 +155,10 @@
callbacks.clear();
}
+ public boolean isCompleted() {
+ return completed;
+ }
+
@Override
public void beforeCompletion() {
@@ -307,11 +322,21 @@
if (synch != null && synch.existingTables.contains(tempTable.getId())) {
TempTable result = synch.tables.get(tempTableID);
if (result == null) {
- synch.tables.put(tempTableID, tempTable.clone());
+ synchronized (synch) {
+ if (synch.isCompleted()) {
+ throw new AssertionError("Expected active transaction"); //$NON-NLS-1$
+ }
+ if (!tempTable.getActive().compareAndSet(0, 1)) {
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTableStore.pending_update", tempTableID)); //$NON-NLS-1$
+ }
+ synch.tables.put(tempTableID, tempTable.clone());
+ }
}
return tempTable;
}
- }
+ } else if (tempTable.getActive().get() != 0) {
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTableStore.pending_update", tempTableID)); //$NON-NLS-1$
+ }
}
} else if (transactionMode == TransactionMode.ISOLATE_READS) {
TransactionContext tc = context.getTransactionContext();
@@ -320,24 +345,13 @@
if (synch != null) {
TempTable result = synch.tables.get(tempTableID);
if (result == null) {
- synch.tables.put(tempTableID, tempTable);
result = tempTable;
- result.getActiveReaders().getAndIncrement();
- TransactionCallback callback = new TransactionCallback() {
-
- @Override
- public void rollback() {
- tempTable.getActiveReaders().getAndDecrement();
- }
-
- @Override
- public void commit() {
- tempTable.getActiveReaders().getAndDecrement();
- }
- };
- if (!synch.addCallback(callback)) {
- callback.rollback();
- }
+ synchronized (synch) {
+ if (!synch.isCompleted()) {
+ synch.tables.put(tempTableID, tempTable);
+ result.getActive().getAndIncrement();
+ }
+ }
}
return result;
}
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2011-09-06 20:08:58 UTC (rev 3452)
@@ -791,6 +791,7 @@
RulePlanJoins.cantSatisfy=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
TempTableStore.table_exist_error=Temporary table "{0}" already exists.
TempTableStore.table_doesnt_exist_error=Temporary table "{0}" does not exist.
+TempTableStore.pending_update=Table {0} is locked by pending transaction update.
XMLQueryPlanner.cannot_plan=Cannot create a query for MappingClass with user criteria {0}
XMLQueryPlanner.invalid_relationship=Conjunct "{0}" has no relationship with target context {1}.
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-09-05 14:27:44 UTC (rev 3451)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-09-06 20:08:58 UTC (rev 3452)
@@ -135,6 +135,34 @@
execute("select * from x", new List[] {});
}
+ @Test public void testCommitExistingRemoved() throws Exception {
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ execute("drop table x", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ synch.afterCompletion(Status.STATUS_COMMITTED);
+ try {
+ execute("select * from x", new List[] {});
+ fail();
+ } catch (Exception e) {
+
+ }
+ }
+
+ @Test public void testUpdateLock() throws Exception {
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ tc = null;
+ try {
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ fail();
+ } catch (Exception e) {
+
+ }
+ synch.afterCompletion(Status.STATUS_COMMITTED);
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ }
+
@Test public void testRollbackExisting1() throws Exception {
execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
for (int i = 0; i < 86; i++) {
13 years, 7 months
teiid SVN: r3451 - in branches/as7: adminshell/src/main/java/org/teiid/adminshell and 85 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2011-09-05 10:27:44 -0400 (Mon, 05 Sep 2011)
New Revision: 3451
Added:
branches/as7/api/src/main/java/org/teiid/Replicated.java
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/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestProcedureExecution.java
branches/as7/engine/src/main/java/org/teiid/query/ObjectReplicator.java
branches/as7/engine/src/main/java/org/teiid/query/ReplicatedObject.java
branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStore.java
branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java
branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java
Removed:
branches/as7/cache-jbosscache/src/main/java/org/teiid/events/jboss/
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
Modified:
branches/as7/
branches/as7/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
branches/as7/api/src/main/java/org/teiid/events/EventDistributor.java
branches/as7/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java
branches/as7/api/src/main/java/org/teiid/translator/ExecutionFactory.java
branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
branches/as7/build/kits/jboss-container/conf/jboss-teiid-log4j.xml
branches/as7/build/kits/jboss-container/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml
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/teiid/cache/jboss/ExpirationAwareCache.java
branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
branches/as7/client/src/main/java/org/teiid/client/security/LogonResult.java
branches/as7/client/src/main/java/org/teiid/jdbc/BatchResults.java
branches/as7/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/DatabaseMetaDataImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
branches/as7/client/src/main/java/org/teiid/jdbc/JDBCURL.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/StatementImpl.java
branches/as7/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java
branches/as7/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java
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/TestConnection.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestSQLException.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestStatement.java
branches/as7/client/src/test/java/org/teiid/jdbc/TestTeiidDriver.java
branches/as7/common-core/src/main/java/org/teiid/core/TeiidException.java
branches/as7/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
branches/as7/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java
branches/as7/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java
branches/as7/connectors/connector-file/src/main/rar/META-INF/ra.xml
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java
branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java
branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java
branches/as7/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/ProcedureExecutionParentImpl.java
branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml
branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/security.xml
branches/as7/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml
branches/as7/documentation/client-developers-guide/src/main/docbook/en-US/content/odbc.xml
branches/as7/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
branches/as7/documentation/reference/src/main/docbook/en-US/content/ddl_support.xml
branches/as7/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
branches/as7/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml
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/SPage.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBatch.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AccessInfo.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/DataRolePolicyDecider.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/Request.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
branches/as7/engine/src/main/java/org/teiid/dqp/service/SessionService.java
branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionContext.java
branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionService.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
branches/as7/engine/src/main/java/org/teiid/query/function/FunctionTree.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.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/plantree/NodeEditor.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
branches/as7/engine/src/main/java/org/teiid/query/processor/BatchCollector.java
branches/as7/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
branches/as7/engine/src/main/java/org/teiid/query/processor/proc/Program.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/RelationalNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNodeUtil.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalPlan.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/WindowFunctionProjectNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
branches/as7/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
branches/as7/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
branches/as7/engine/src/main/java/org/teiid/query/sql/LanguageObject.java
branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/AggregateSymbol.java
branches/as7/engine/src/main/java/org/teiid/query/tempdata/AlterTempTable.java
branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
branches/as7/engine/src/main/java/org/teiid/query/util/CommandContext.java
branches/as7/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java
branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/StreamingUtils.java
branches/as7/engine/src/main/java/org/teiid/security/SecurityHelper.java
branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties
branches/as7/engine/src/test/java/org/teiid/common/buffer/TestTupleBuffer.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/TestRequest.java
branches/as7/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java
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/TestFunctionTree.java
branches/as7/engine/src/test/java/org/teiid/query/function/TestResolvedFunctions.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/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/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/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/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/TestAggregateProcessing.java
branches/as7/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.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/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/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/relational/TestAccessNode.java
branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java
branches/as7/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java
branches/as7/engine/src/test/java/org/teiid/query/validator/TestValidator.java
branches/as7/engine/src/test/resources/text/cdm_dos_win.txt
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java
branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.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/CompositeVDB.java
branches/as7/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
branches/as7/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java
branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCClientRemote.java
branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
branches/as7/runtime/src/main/java/org/teiid/transport/LogonImpl.java
branches/as7/runtime/src/main/java/org/teiid/transport/ODBCClientInstance.java
branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java
branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
branches/as7/runtime/src/main/resources/org/teiid/runtime/i18n.properties
branches/as7/runtime/src/test/java/org/teiid/deployers/TestCompositeVDB.java
branches/as7/test-integration/common/pom.xml
branches/as7/test-integration/common/src/test/java/org/teiid/cdk/api/TestTranslationUtility.java
branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java
branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.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/TestSystemVirtualModel/testProcedureParams.expected
branches/as7/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
Log:
TEIID-1720: -r3382:3450 forward merge trunk
Property changes on: branches/as7
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:3188-3382
+ /trunk:3188-3450
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-3382
+ /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
Copied: branches/as7/api/src/main/java/org/teiid/Replicated.java (from rev 3450, trunk/api/src/main/java/org/teiid/Replicated.java)
===================================================================
--- branches/as7/api/src/main/java/org/teiid/Replicated.java (rev 0)
+++ branches/as7/api/src/main/java/org/teiid/Replicated.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Used to replicate Teiid components - this should be used in extension logic.
+ */
+(a)Target({ElementType.METHOD})
+(a)Retention(RetentionPolicy.RUNTIME)
+@Inherited
+@Documented
+public @interface Replicated {
+ /**
+ * @return true if members should be called asynchronously. asynch methods should be void.
+ */
+ boolean asynch() default true;
+ /**
+ * @return the timeout in milliseconds, or 0 if no timeout. affects only synch calls.
+ */
+ long timeout() default 0;
+ /**
+ * @return true if only remote members should be called. should not be used with replicateState. method should be void.
+ */
+ boolean remoteOnly() default false;
+ /**
+ * @return true if the remote members should have a partial state replication called using the first argument as the state after
+ * the local method has been invoked. should not be used with remoteOnly.
+ */
+ boolean replicateState() default false;
+
+}
\ No newline at end of file
Modified: branches/as7/api/src/main/java/org/teiid/events/EventDistributor.java
===================================================================
--- branches/as7/api/src/main/java/org/teiid/events/EventDistributor.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/api/src/main/java/org/teiid/events/EventDistributor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -24,6 +24,7 @@
import java.util.List;
+import org.teiid.Replicated;
import org.teiid.metadata.ColumnStats;
import org.teiid.metadata.Table;
import org.teiid.metadata.TableStats;
@@ -45,6 +46,7 @@
* @param tuple
* @param delete
*/
+ @Replicated(remoteOnly=true)
void updateMatViewRow(String vdbName, int vdbVersion, String schema, String viewName, List<?> tuple, boolean delete);
/**
@@ -54,6 +56,7 @@
* @param schema
* @param tableNames
*/
+ @Replicated(remoteOnly=true)
void dataModification(String vdbName, int vdbVersion, String schema, String... tableNames);
/**
@@ -65,6 +68,7 @@
* @param columnName
* @param stats
*/
+ @Replicated(remoteOnly=true)
void setColumnStats(String vdbName, int vdbVersion, String schemaName,
String tableName, String columnName, ColumnStats stats);
@@ -76,6 +80,7 @@
* @param tableName
* @param stats
*/
+ @Replicated(remoteOnly=true)
void setTableStats(String vdbName, int vdbVersion, String schemaName,
String tableName, TableStats stats);
@@ -87,6 +92,7 @@
* @param name
* @param value
*/
+ @Replicated(remoteOnly=true)
void setProperty(String vdbName, int vdbVersion, String uuid, String name, String value);
/**
@@ -99,6 +105,7 @@
* @param triggerDefinition
* @param enabled
*/
+ @Replicated(remoteOnly=true)
void setInsteadOfTriggerDefinition(String vdbName, int vdbVersion, String schema, String viewName, Table.TriggerEvent triggerEvent, String triggerDefinition, Boolean enabled);
/**
@@ -109,6 +116,7 @@
* @param procName
* @param definition
*/
+ @Replicated(remoteOnly=true)
void setProcedureDefinition(String vdbName, int vdbVersion, String schema, String procName, String definition);
/**
@@ -119,13 +127,7 @@
* @param viewName
* @param definition
*/
+ @Replicated(remoteOnly=true)
void setViewDefinition(String vdbName, int vdbVersion, String schema, String viewName, String definition);
- /**
- *
- * @param vdbName
- * @param vdbVersion
- * @param viewName
- */
- void refreshMatView(String vdbName, int vdbVersion, String tableName);
}
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/api/src/main/java/org/teiid/language/visitor/SQLStringVisitor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -927,6 +927,7 @@
buffer.append(WITH);
buffer.append(Tokens.SPACE);
append(obj.getItems());
+ buffer.append(Tokens.SPACE);
}
@Override
@@ -940,6 +941,7 @@
buffer.append(Tokens.SPACE);
}
buffer.append(AS);
+ buffer.append(Tokens.SPACE);
buffer.append(Tokens.LPAREN);
append(obj.getSubquery());
buffer.append(Tokens.RPAREN);
Modified: branches/as7/api/src/main/java/org/teiid/translator/ExecutionFactory.java
===================================================================
--- branches/as7/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -887,6 +887,14 @@
}
/**
+ * @return true if distinct aggregates can be windowed function.
+ * @since 7.6
+ */
+ public boolean supportsWindowDistinctAggregates() {
+ return supportsElementaryOlapOperations();
+ }
+
+ /**
* @return true if array_agg is supported
* @since 7.5
*/
Modified: branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml
===================================================================
--- branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/build/kits/jboss-as7/standalone/configuration/standalone-teiid.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -276,7 +276,7 @@
<async-thread-group>teiid-async</async-thread-group>
<query-engine name = "default">
- <event-distributor-name>teiid/event-distributor</event-distributor-name>
+ <object-replicator-name>teiid/replicator</object-replicator-name>
<security-domain>teiid-security</security-domain>
<jdbc>
<socket-binding>teiid-jdbc</socket-binding>
Modified: branches/as7/build/kits/jboss-container/conf/jboss-teiid-log4j.xml
===================================================================
--- branches/as7/build/kits/jboss-container/conf/jboss-teiid-log4j.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/build/kits/jboss-container/conf/jboss-teiid-log4j.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,3 +1,18 @@
+
+ <!-- un-comment to enable Teiid COMMAND log,
+ NOTE: if there are categories above this appender, this will need to be moved above the categories
+ in order for this appender to work.
+ <appender name="COMMAND" class="org.jboss.logging.appender.RollingFileAppender">
+ <param name="File" value="${jboss.server.log.dir}/teiid-command.log"/>
+ <param name="MaxFileSize" value="1000KB"/>
+ <param name="MaxBackupIndex" value="25"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] (%t:%x) %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+
<!--
This file contains log4j.xml snippets that can be used in your main jboss-log4j.xml to control
Teiid logging in more depth. By default all messages will go to the org.teiid category and
@@ -5,14 +20,14 @@
-->
<!-- Teiid root category snippet. Use this to control all of Teiid logging from a single category -->
- <logger name="org.teiid">
- <level value="INFO" />
- </logger>
+ <category name="org.teiid">
+ <priority value="INFO" />
+ </category>
<!-- this is to avoid the "Unable to remove nodes to reduce region size below 1024. Set expiration for nodes in this region" error -->
- <logger name="org.jboss.cache">
- <level value="ERROR" />
- </logger>
+ <category name="org.jboss.cache">
+ <priority value="ERROR" />
+ </category>
<!-- Other categories:
org.teiid.PROCESSOR - Query processing logs. See also org.teiid.PLANNER for query planning logs.
@@ -49,27 +64,17 @@
-->
<!-- un-comment to enable COMMAND log - also needs the COMMAND appender to be uncommented
- <logger name="org.teiid.COMMAND_LOG" additivity="false">
- <level value="DEBUG"/>
+ <category name="org.teiid.COMMAND_LOG" additivity="false">
+ <priority value="DEBUG"/>
<appender-ref ref="COMMAND"/>
- </logger>
+ </category>
-->
<!-- Un-comment to enable AUDIT log - also needs the AUDIT appender to be uncommented.
JBoss already has an AUDIT appender, or you may create your own - see the COMMAND appender below
- <logger name="org.teiid.AUDIT_LOG" additivity="false">
- <level value="DEBUG"/>
+ <category name="org.teiid.AUDIT_LOG" additivity="false">
+ <priority value="DEBUG"/>
<appender-ref ref="AUDIT"/>
- </logger>
+ </category>
-->
-
- <!-- un-comment to enable Teiid COMMAND log
- <appender name="COMMAND" class="org.jboss.logging.appender.RollingFileAppender">
- <param name="File" value="${jboss.server.log.dir}/teiid-command.log"/>
- <param name="MaxFileSize" value="1000KB"/>
- <param name="MaxBackupIndex" value="25"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c] (%t:%x) %m%n"/>
- </layout>
- </appender>
- -->
+
Modified: branches/as7/build/kits/jboss-container/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml
===================================================================
--- branches/as7/build/kits/jboss-container/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/build/kits/jboss-container/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -138,14 +138,13 @@
</property>
</bean>
- <bean name="EventDistributorFactory" class="org.teiid.events.jboss.JGroupsEventDistributor">
- <property name="jndiName">teiid/event-distributor</property>
+ <bean name="ObjectReplicator" class="org.teiid.replication.jboss.JGroupsObjectReplicator">
+ <property name="jndiName">teiid/replicator</property>
<property name="channelFactory">
<inject bean="JChannelFactory" />
</property>
- <property name="clusterName">${jboss.partition.name:DefaultPartition}-teiid-events</property>
+ <property name="clusterName">${jboss.partition.name:DefaultPartition}-teiid-rep</property>
<property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
- <property name="localEventDistributorName">teiid/engine-deployer</property>
</bean>
</deployment>
\ No newline at end of file
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -131,7 +131,7 @@
<!-- Maximum size of lob allowed through ODBC connection in bytes (default 5MB) -->
<property name="maxODBCLobSizeAllowed">5242880</property>
<!-- The JNDI name of the Teiid Event Distributor -->
- <property name="eventDistributorName">teiid/event-distributor</property>
+ <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>
</bean>
Modified: branches/as7/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- branches/as7/build/kits/jboss-container/teiid-releasenotes.html 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/build/kits/jboss-container/teiid-releasenotes.html 2011-09-05 14:27:44 UTC (rev 3451)
@@ -29,6 +29,7 @@
<LI><B>Procedure language features</B> - Added support for compound/block statements, BEGIN [[NOT] ATOMIC], loop/block labels, and the leave statement. See the reference for more.
<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.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
Modified: branches/as7/build/pom.xml
===================================================================
--- branches/as7/build/pom.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/build/pom.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -119,9 +119,9 @@
<mainClass>net.sf.retrotranslator.transformer.Retrotranslator</mainClass>
<arguments>
<argument>-srcjar</argument>
- <argument>${pom.basedir}/target/teiid-${project.version}-client.jar</argument>
+ <argument>${project.basedir}/target/teiid-${project.version}-client.jar</argument>
<argument>-destjar</argument>
- <argument>${pom.basedir}/target/teiid-${project.version}-client-jdk15.jar</argument>
+ <argument>${project.basedir}/target/teiid-${project.version}-client-jdk15.jar</argument>
<argument>-embed</argument>
<argument>org.teiid.retroruntime</argument>
</arguments>
Modified: branches/as7/cache-jbosscache/pom.xml
===================================================================
--- branches/as7/cache-jbosscache/pom.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/pom.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -25,17 +25,15 @@
<artifactId>teiid-engine</artifactId>
<scope>provided</scope>
</dependency>
- <!--
<dependency>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- <scope>provided</scope>
- </dependency>
- -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ExpirationAwareCache.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -35,6 +35,12 @@
public ExpirationAwareCache(Cache cacheStore, Fqn fqn) {
super(cacheStore, fqn);
}
+
+ @Override
+ protected boolean validateNode(Node node) {
+ Long future = (Long) node.get(ExpirationAlgorithmConfig.EXPIRATION_KEY);
+ return future == null || future > System.currentTimeMillis();
+ }
@Override
public V put(K key, V value) {
Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -52,10 +52,17 @@
Node<K, V> node = getRootNode();
Node child = node.getChild(getFqn(key));
if (child != null) {
- return (V)child.get(key);
+ if (validateNode(child)) {
+ return (V)child.get(key);
+ }
+ remove(key);
}
return null;
}
+
+ protected boolean validateNode(Node node) {
+ return true;
+ }
protected Fqn<String> getFqn(K key) {
if (key.getClass().isPrimitive() || key instanceof String) {
Modified: branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -29,6 +29,7 @@
import org.jboss.cache.Node;
import org.jboss.cache.Region;
import org.jboss.cache.config.EvictionAlgorithmConfig;
+import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
import org.jboss.cache.eviction.LRUAlgorithmConfig;
@@ -71,6 +72,8 @@
Region cacheRegion = this.cacheStore.getRegion(node.getFqn(), true);
cacheRegion.setEvictionRegionConfig(buildEvictionConfig(node.getFqn(), config));
cacheRegion.activate();
+ cacheRegion = this.cacheStore.getRegion(node.getFqn(), true);
+ cacheRegion.setEvictionRegionConfig(buildEvictionConfig(node.getFqn(), config));
JBossCache jc = null;
if (config != null && config.getPolicy().equals(Policy.EXPIRATION)) {
Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,111 +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.replication.jboss;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
-
-public class JGroupsInputStream extends InputStream {
-
- static long TIME_OUT = 15000; //TODO make configurable
-
- private volatile byte[] buf;
- private volatile int index=0;
- private ReentrantLock lock = new ReentrantLock();
- private Condition write = lock.newCondition();
- private Condition doneReading = lock.newCondition();
-
- @Override
- public int read() throws IOException {
- if (index < 0) {
- return -1;
- }
- if (buf == null) {
- lock.lock();
- try {
- write.await(TIME_OUT, TimeUnit.MILLISECONDS);
- if (index < 0) {
- return -1;
- }
- if (buf == null) {
- throw new IOException(new TimeoutException());
- }
- } catch(InterruptedException e) {
- throw new IOException(e);
- } finally {
- lock.unlock();
- }
- }
- if (index == buf.length) {
- lock.lock();
- try {
- buf = null;
- index = 0;
- doneReading.signal();
- } finally {
- lock.unlock();
- }
- return read();
- }
- return buf[index++] & 0xff;
- }
-
- @Override
- public void close() {
- lock.lock();
- try {
- buf = null;
- index = -1;
- doneReading.signal();
- } finally {
- lock.unlock();
- }
- }
-
- public void receive(byte[] bytes) throws InterruptedException {
- lock.lock();
- try {
- if (index == -1) {
- return;
- }
- if (buf != null) {
- doneReading.await();
- }
- if (index == -1) {
- return;
- }
- buf = bytes;
- if (bytes == null) {
- index = -1;
- }
- write.signal();
- } finally {
- lock.unlock();
- }
- }
-
-}
\ No newline at end of file
Copied: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java (from rev 3450, trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java)
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java (rev 0)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsInputStream.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,111 @@
+/*
+ * 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.replication.jboss;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
+
+public class JGroupsInputStream extends InputStream {
+
+ static long TIME_OUT = 15000; //TODO make configurable
+
+ private volatile byte[] buf;
+ private volatile int index=0;
+ private ReentrantLock lock = new ReentrantLock();
+ private Condition write = lock.newCondition();
+ private Condition doneReading = lock.newCondition();
+
+ @Override
+ public int read() throws IOException {
+ if (index < 0) {
+ return -1;
+ }
+ if (buf == null) {
+ lock.lock();
+ try {
+ write.await(TIME_OUT, TimeUnit.MILLISECONDS);
+ if (index < 0) {
+ return -1;
+ }
+ if (buf == null) {
+ throw new IOException(new TimeoutException());
+ }
+ } catch(InterruptedException e) {
+ throw new IOException(e);
+ } finally {
+ lock.unlock();
+ }
+ }
+ if (index == buf.length) {
+ lock.lock();
+ try {
+ buf = null;
+ index = 0;
+ doneReading.signal();
+ } finally {
+ lock.unlock();
+ }
+ return read();
+ }
+ return buf[index++] & 0xff;
+ }
+
+ @Override
+ public void close() {
+ lock.lock();
+ try {
+ buf = null;
+ index = -1;
+ doneReading.signal();
+ } finally {
+ lock.unlock();
+ }
+ }
+
+ public void receive(byte[] bytes) throws InterruptedException {
+ lock.lock();
+ try {
+ if (index == -1) {
+ return;
+ }
+ if (buf != null) {
+ doneReading.await();
+ }
+ if (index == -1) {
+ return;
+ }
+ buf = bytes;
+ if (bytes == null) {
+ index = -1;
+ }
+ write.signal();
+ } finally {
+ lock.unlock();
+ }
+ }
+
+}
\ No newline at end of file
Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,446 +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.replication.jboss;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jgroups.Address;
-import org.jgroups.Channel;
-import org.jgroups.ChannelFactory;
-import org.jgroups.ExtendedReceiverAdapter;
-import org.jgroups.Message;
-import org.jgroups.View;
-import org.jgroups.blocks.GroupRequest;
-import org.jgroups.blocks.MethodCall;
-import org.jgroups.blocks.MethodLookup;
-import org.jgroups.blocks.RpcDispatcher;
-import org.jgroups.util.Promise;
-import org.jgroups.util.RspList;
-import org.jgroups.util.Util;
-import org.teiid.Replicated;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
-import org.teiid.query.ObjectReplicator;
-import org.teiid.query.ReplicatedObject;
-
-public class JGroupsObjectReplicator implements ObjectReplicator, Serializable {
-
- private static final long serialVersionUID = -6851804958313095166L;
- private static final String CREATE_STATE = "createState"; //$NON-NLS-1$
- private static final String BUILD_STATE = "buildState"; //$NON-NLS-1$
- private static final String FINISH_STATE = "finishState"; //$NON-NLS-1$
-
- private final class StreamingRunner implements Runnable {
- private final Object object;
- private final String stateId;
- private final JGroupsInputStream is;
-
- private StreamingRunner(Object object, String stateId, JGroupsInputStream is) {
- this.object = object;
- this.stateId = stateId;
- this.is = is;
- }
-
- @Override
- public void run() {
- try {
- ((ReplicatedObject)object).setState(stateId, is);
- LogManager.logDetail(LogConstants.CTX_RUNTIME, "state set " + stateId); //$NON-NLS-1$
- } catch (Exception e) {
- LogManager.logError(LogConstants.CTX_RUNTIME, e, "error setting state " + stateId); //$NON-NLS-1$
- } finally {
- is.close();
- }
- }
- }
-
- private final static class ReplicatedInvocationHandler<S> extends ExtendedReceiverAdapter implements
- InvocationHandler, Serializable {
-
- private static final long serialVersionUID = -2943462899945966103L;
- private final S object;
- private RpcDispatcher disp;
- private final HashMap<Method, Short> methodMap;
- protected Vector<Address> remoteMembers = new Vector<Address>();
- protected final transient Promise<Boolean> state_promise=new Promise<Boolean>();
-
- private ReplicatedInvocationHandler(S object,
- HashMap<Method, Short> methodMap) {
- this.object = object;
- this.methodMap = methodMap;
- }
-
- public void setDisp(RpcDispatcher disp) {
- this.disp = disp;
- }
-
- @Override
- public Object invoke(Object proxy, Method method, Object[] args)
- throws Throwable {
- Short methodNum = methodMap.get(method);
- if (methodNum == null || remoteMembers.isEmpty()) {
- if (methodNum != null) {
- Replicated annotation = method.getAnnotation(Replicated.class);
- if (annotation != null && annotation.remoteOnly()) {
- return null;
- }
- }
- try {
- return method.invoke(object, args);
- } catch (InvocationTargetException e) {
- throw e.getCause();
- }
- }
- try {
- Replicated annotation = method.getAnnotation(Replicated.class);
- if (annotation.replicateState()) {
- Object result = null;
- try {
- result = method.invoke(object, args);
- } catch (InvocationTargetException e) {
- throw e.getCause();
- }
- Vector<Address> dests = null;
- synchronized (remoteMembers) {
- dests = new Vector<Address>(remoteMembers);
- }
- ReplicatedObject ro = (ReplicatedObject)object;
- String stateId = (String)args[0];
- LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "replicating state", stateId); //$NON-NLS-1$
- JGroupsOutputStream oStream = new JGroupsOutputStream(disp, dests, stateId, (short)(methodMap.size() - 3));
- try {
- ro.getState(stateId, oStream);
- } finally {
- oStream.close();
- }
- LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "sent state", stateId); //$NON-NLS-1$
- return result;
- }
- MethodCall call=new MethodCall(methodNum, args);
- Vector<Address> dests = null;
- if (annotation.remoteOnly()) {
- synchronized (remoteMembers) {
- dests = new Vector<Address>(remoteMembers);
- }
- }
- RspList responses = disp.callRemoteMethods(dests, call, annotation.asynch()?GroupRequest.GET_NONE:GroupRequest.GET_ALL, annotation.timeout());
- if (annotation.asynch()) {
- return null;
- }
- Vector<Object> results = responses.getResults();
- if (method.getReturnType() == boolean.class) {
- for (Object o : results) {
- if (!Boolean.TRUE.equals(o)) {
- return false;
- }
- }
- return true;
- } else if (method.getReturnType() == Collection.class) {
- ArrayList<Object> result = new ArrayList<Object>();
- for (Object o : results) {
- result.addAll((Collection)o);
- }
- return results;
- }
- return null;
- } catch(Exception e) {
- throw new RuntimeException(method + " " + args + " failed"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- @Override
- public void viewAccepted(View newView) {
- if (newView.getMembers() != null) {
- synchronized (remoteMembers) {
- remoteMembers.removeAll(newView.getMembers());
- if (object instanceof ReplicatedObject && !remoteMembers.isEmpty()) {
- ((ReplicatedObject)object).droppedMembers(new HashSet<Serializable>(remoteMembers));
- }
- remoteMembers.clear();
- remoteMembers.addAll(newView.getMembers());
- remoteMembers.remove(this.disp.getChannel().getLocalAddress());
- }
- }
- }
-
- @Override
- public void setState(InputStream istream) {
- LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "loading initial state"); //$NON-NLS-1$
- try {
- ((ReplicatedObject)object).setState(istream);
- state_promise.setResult(Boolean.TRUE);
- } catch (Exception e) {
- state_promise.setResult(Boolean.FALSE);
- LogManager.logError(LogConstants.CTX_RUNTIME, e, "error loading initial state"); //$NON-NLS-1$
- } finally {
- Util.close(istream);
- }
- }
-
- @Override
- public void getState(OutputStream ostream) {
- LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "getting initial state"); //$NON-NLS-1$
- try {
- ((ReplicatedObject)object).getState(ostream);
- } catch (Exception e) {
- LogManager.logError(LogConstants.CTX_RUNTIME, e, "error gettting initial state"); //$NON-NLS-1$
- } finally {
- Util.close(ostream);
- }
- }
- }
-
- private interface Streaming {
- void createState(String id);
- void buildState(String id, byte[] bytes);
- void finishState(String id);
- }
-
- private transient ChannelFactory channelFactory;
- private String multiplexerStack;
- private String clusterName;
- private String jndiName;
- //TODO: this should be configurable, or use a common executor
- private transient Executor executor = Executors.newCachedThreadPool();
-
- public ChannelFactory getChannelFactory() {
- return channelFactory;
- }
-
- public void setJndiName(String jndiName) {
- this.jndiName = jndiName;
- }
-
- public String getJndiName() {
- return jndiName;
- }
-
- public String getMultiplexerStack() {
- return multiplexerStack;
- }
-
- public String getClusterName() {
- return clusterName;
- }
-
- public void setChannelFactory(ChannelFactory channelFactory) {
- this.channelFactory = channelFactory;
- }
-
- public void setClusterName(String clusterName) {
- this.clusterName = clusterName;
- }
-
- public void setMultiplexerStack(String multiplexerStack) {
- this.multiplexerStack = multiplexerStack;
- }
-
- public void start() throws Exception {
- if (this.channelFactory == null) {
- return; //no need to distribute events
- }
- if (jndiName != null) {
- final InitialContext ic = new InitialContext();
- org.jboss.util.naming.Util.bind(ic, jndiName, this);
- }
- }
-
- public void stop() {
- if (jndiName != null) {
- final InitialContext ic ;
- try {
- ic = new InitialContext() ;
- org.jboss.util.naming.Util.unbind(ic, jndiName) ;
- } catch (final NamingException ne) {
- }
- }
- }
-
- public void stop(Object object) {
- ReplicatedInvocationHandler<?> handler = (ReplicatedInvocationHandler<?>) Proxy.getInvocationHandler(object);
- Channel c = handler.disp.getChannel();
- handler.disp.stop();
- c.close();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T, S> T replicate(String mux_id,
- Class<T> iface, final S object, long startTimeout) throws Exception {
- Channel channel = this.channelFactory.createMultiplexerChannel(this.multiplexerStack, mux_id);
- Method[] methods = iface.getMethods();
-
- final HashMap<Method, Short> methodMap = new HashMap<Method, Short>();
- final ArrayList<Method> methodList = new ArrayList<Method>();
-
- for (Method method : methods) {
- if (method.getAnnotation(Replicated.class) == null) {
- continue;
- }
- methodList.add(method);
- methodMap.put(method, (short)(methodList.size() - 1));
- }
-
- //add in streaming methods
- Method createState = JGroupsObjectReplicator.Streaming.class.getMethod(CREATE_STATE, new Class<?>[] {String.class});
- methodList.add(createState);
- methodMap.put(createState, (short)(methodList.size() - 1));
- Method buildState = JGroupsObjectReplicator.Streaming.class.getMethod(BUILD_STATE, new Class<?>[] {String.class, byte[].class});
- methodList.add(buildState);
- methodMap.put(buildState, (short)(methodList.size() - 1));
- Method finishState = JGroupsObjectReplicator.Streaming.class.getMethod(FINISH_STATE, new Class<?>[] {String.class});
- methodList.add(finishState);
- methodMap.put(finishState, (short)(methodList.size() - 1));
-
- ReplicatedInvocationHandler<S> proxy = new ReplicatedInvocationHandler<S>(object, methodMap);
- /*
- * TODO: could have an object implement streaming
- * Override the normal handle method to support streaming
- */
- RpcDispatcher disp = new RpcDispatcher(channel, proxy, proxy, object) {
- Map<List<?>, JGroupsInputStream> inputStreams = new ConcurrentHashMap<List<?>, JGroupsInputStream>();
- @Override
- public Object handle(Message req) {
- Object body=null;
-
- if(req == null || req.getLength() == 0) {
- if(log.isErrorEnabled()) log.error("message or message buffer is null"); //$NON-NLS-1$
- return null;
- }
-
- try {
- body=req_marshaller != null?
- req_marshaller.objectFromByteBuffer(req.getBuffer(), req.getOffset(), req.getLength())
- : req.getObject();
- }
- catch(Throwable e) {
- if(log.isErrorEnabled()) log.error("exception marshalling object", e); //$NON-NLS-1$
- return e;
- }
-
- if(!(body instanceof MethodCall)) {
- if(log.isErrorEnabled()) log.error("message does not contain a MethodCall object"); //$NON-NLS-1$
-
- // create an exception to represent this and return it
- return new IllegalArgumentException("message does not contain a MethodCall object") ; //$NON-NLS-1$
- }
-
- final MethodCall method_call=(MethodCall)body;
-
- try {
- if(log.isTraceEnabled())
- log.trace("[sender=" + req.getSrc() + "], method_call: " + method_call); //$NON-NLS-1$ //$NON-NLS-2$
-
- if(method_lookup == null)
- throw new Exception("MethodCall uses ID=" + method_call.getId() + ", but method_lookup has not been set"); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (method_call.getId() >= methodList.size() - 3) {
- Serializable address = req.getSrc();
- String stateId = (String)method_call.getArgs()[0];
- List<?> key = Arrays.asList(stateId, address);
- JGroupsInputStream is = inputStreams.get(key);
- if (method_call.getId() == methodList.size() - 3) {
- LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "create state", stateId); //$NON-NLS-1$
- if (is != null) {
- is.receive(null);
- }
- is = new JGroupsInputStream();
- this.inputStreams.put(key, is);
- executor.execute(new StreamingRunner(object, stateId, is));
- } else if (method_call.getId() == methodList.size() - 2) {
- LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "building state", stateId); //$NON-NLS-1$
- if (is != null) {
- is.receive((byte[])method_call.getArgs()[1]);
- }
- } else if (method_call.getId() == methodList.size() - 1) {
- LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "finished state", stateId); //$NON-NLS-1$
- if (is != null) {
- is.receive(null);
- }
- this.inputStreams.remove(key);
- }
- return null;
- }
-
- Method m=method_lookup.findMethod(method_call.getId());
- if(m == null)
- throw new Exception("no method found for " + method_call.getId()); //$NON-NLS-1$
- method_call.setMethod(m);
-
- return method_call.invoke(server_obj);
- }
- catch(Throwable x) {
- return x;
- }
- }
- };
-
- proxy.setDisp(disp);
- disp.setMethodLookup(new MethodLookup() {
- public Method findMethod(short id) {
- return methodList.get(id);
- }
- });
-
- T replicatedProxy = (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {iface}, proxy);
-
- channel.connect(clusterName);
- if (object instanceof ReplicatedObject) {
- ((ReplicatedObject)object).setLocalAddress(channel.getLocalAddress());
- boolean getState = channel.getState(null, startTimeout);
- if (getState) {
- boolean loaded = proxy.state_promise.getResult(startTimeout);
- if (loaded) {
- LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "loaded"); //$NON-NLS-1$
- } else {
- LogManager.logWarning(LogConstants.CTX_RUNTIME, object + " load timeout"); //$NON-NLS-1$
- }
- } else {
- LogManager.logInfo(LogConstants.CTX_RUNTIME, object + " first member or timeout exceeded"); //$NON-NLS-1$
- }
- }
-
- return replicatedProxy;
- }
-
-}
Copied: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java (from rev 3450, trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java)
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java (rev 0)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,419 @@
+/*
+ * 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.replication.jboss;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+
+import org.jgroups.*;
+import org.jgroups.blocks.GroupRequest;
+import org.jgroups.blocks.MethodCall;
+import org.jgroups.blocks.MethodLookup;
+import org.jgroups.blocks.RpcDispatcher;
+import org.jgroups.util.Promise;
+import org.jgroups.util.RspList;
+import org.jgroups.util.Util;
+import org.teiid.Replicated;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.query.ObjectReplicator;
+import org.teiid.query.ReplicatedObject;
+
+public class JGroupsObjectReplicator implements ObjectReplicator, Serializable {
+
+ private static final long serialVersionUID = -6851804958313095166L;
+ private static final String CREATE_STATE = "createState"; //$NON-NLS-1$
+ private static final String BUILD_STATE = "buildState"; //$NON-NLS-1$
+ private static final String FINISH_STATE = "finishState"; //$NON-NLS-1$
+
+ private final class StreamingRunner implements Runnable {
+ private final Object object;
+ private final String stateId;
+ private final JGroupsInputStream is;
+
+ private StreamingRunner(Object object, String stateId, JGroupsInputStream is) {
+ this.object = object;
+ this.stateId = stateId;
+ this.is = is;
+ }
+
+ @Override
+ public void run() {
+ try {
+ ((ReplicatedObject)object).setState(stateId, is);
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, "state set " + stateId); //$NON-NLS-1$
+ } catch (Exception e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, "error setting state " + stateId); //$NON-NLS-1$
+ } finally {
+ is.close();
+ }
+ }
+ }
+
+ private final static class ReplicatedInvocationHandler<S> extends ExtendedReceiverAdapter implements
+ InvocationHandler, Serializable {
+
+ private static final long serialVersionUID = -2943462899945966103L;
+ private final S object;
+ private RpcDispatcher disp;
+ private final HashMap<Method, Short> methodMap;
+ protected Vector<Address> remoteMembers = new Vector<Address>();
+ protected final transient Promise<Boolean> state_promise=new Promise<Boolean>();
+
+ private ReplicatedInvocationHandler(S object,
+ HashMap<Method, Short> methodMap) {
+ this.object = object;
+ this.methodMap = methodMap;
+ }
+
+ public void setDisp(RpcDispatcher disp) {
+ this.disp = disp;
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+ Short methodNum = methodMap.get(method);
+ if (methodNum == null || remoteMembers.isEmpty()) {
+ if (methodNum != null) {
+ Replicated annotation = method.getAnnotation(Replicated.class);
+ if (annotation != null && annotation.remoteOnly()) {
+ return null;
+ }
+ }
+ try {
+ return method.invoke(object, args);
+ } catch (InvocationTargetException e) {
+ throw e.getCause();
+ }
+ }
+ try {
+ Replicated annotation = method.getAnnotation(Replicated.class);
+ if (annotation.replicateState()) {
+ Object result = null;
+ try {
+ result = method.invoke(object, args);
+ } catch (InvocationTargetException e) {
+ throw e.getCause();
+ }
+ Vector<Address> dests = null;
+ synchronized (remoteMembers) {
+ dests = new Vector<Address>(remoteMembers);
+ }
+ ReplicatedObject ro = (ReplicatedObject)object;
+ String stateId = (String)args[0];
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "replicating state", stateId); //$NON-NLS-1$
+ JGroupsOutputStream oStream = new JGroupsOutputStream(disp, dests, stateId, (short)(methodMap.size() - 3));
+ try {
+ ro.getState(stateId, oStream);
+ } finally {
+ oStream.close();
+ }
+ LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "sent state", stateId); //$NON-NLS-1$
+ return result;
+ }
+ MethodCall call=new MethodCall(methodNum, args);
+ Vector<Address> dests = null;
+ if (annotation.remoteOnly()) {
+ synchronized (remoteMembers) {
+ dests = new Vector<Address>(remoteMembers);
+ }
+ }
+ RspList responses = disp.callRemoteMethods(dests, call, annotation.asynch()?GroupRequest.GET_NONE:GroupRequest.GET_ALL, annotation.timeout());
+ if (annotation.asynch()) {
+ return null;
+ }
+ Vector<Object> results = responses.getResults();
+ if (method.getReturnType() == boolean.class) {
+ for (Object o : results) {
+ if (!Boolean.TRUE.equals(o)) {
+ return false;
+ }
+ }
+ return true;
+ } else if (method.getReturnType() == Collection.class) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ for (Object o : results) {
+ result.addAll((Collection)o);
+ }
+ return results;
+ }
+ return null;
+ } catch(Exception e) {
+ throw new RuntimeException(method + " " + args + " failed"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ @Override
+ public void viewAccepted(View newView) {
+ if (newView.getMembers() != null) {
+ synchronized (remoteMembers) {
+ remoteMembers.removeAll(newView.getMembers());
+ if (object instanceof ReplicatedObject && !remoteMembers.isEmpty()) {
+ ((ReplicatedObject)object).droppedMembers(new HashSet<Serializable>(remoteMembers));
+ }
+ remoteMembers.clear();
+ remoteMembers.addAll(newView.getMembers());
+ remoteMembers.remove(this.disp.getChannel().getLocalAddress());
+ }
+ }
+ }
+
+ @Override
+ public void setState(InputStream istream) {
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "loading initial state"); //$NON-NLS-1$
+ try {
+ ((ReplicatedObject)object).setState(istream);
+ state_promise.setResult(Boolean.TRUE);
+ } catch (Exception e) {
+ state_promise.setResult(Boolean.FALSE);
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, "error loading initial state"); //$NON-NLS-1$
+ } finally {
+ Util.close(istream);
+ }
+ }
+
+ @Override
+ public void getState(OutputStream ostream) {
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "getting initial state"); //$NON-NLS-1$
+ try {
+ ((ReplicatedObject)object).getState(ostream);
+ } catch (Exception e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, "error gettting initial state"); //$NON-NLS-1$
+ } finally {
+ Util.close(ostream);
+ }
+ }
+ }
+
+ private interface Streaming {
+ void createState(String id);
+ void buildState(String id, byte[] bytes);
+ void finishState(String id);
+ }
+
+ private transient ChannelFactory channelFactory;
+ private String multiplexerStack;
+ private String clusterName;
+ private String jndiName;
+ //TODO: this should be configurable, or use a common executor
+ private transient Executor executor = Executors.newCachedThreadPool();
+
+ public ChannelFactory getChannelFactory() {
+ return channelFactory;
+ }
+
+ public void setJndiName(String jndiName) {
+ this.jndiName = jndiName;
+ }
+
+ public String getJndiName() {
+ return jndiName;
+ }
+
+ public String getMultiplexerStack() {
+ return multiplexerStack;
+ }
+
+ public String getClusterName() {
+ return clusterName;
+ }
+
+ public void setChannelFactory(ChannelFactory channelFactory) {
+ this.channelFactory = channelFactory;
+ }
+
+ public void setClusterName(String clusterName) {
+ this.clusterName = clusterName;
+ }
+
+ public void setMultiplexerStack(String multiplexerStack) {
+ this.multiplexerStack = multiplexerStack;
+ }
+
+ public void start() throws Exception {
+ if (this.channelFactory == null) {
+ return; //no need to distribute events
+ }
+ }
+
+ public void stop() {
+ }
+
+ public void stop(Object object) {
+ ReplicatedInvocationHandler<?> handler = (ReplicatedInvocationHandler<?>) Proxy.getInvocationHandler(object);
+ Channel c = handler.disp.getChannel();
+ handler.disp.stop();
+ c.close();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T, S> T replicate(String mux_id,
+ Class<T> iface, final S object, long startTimeout) throws Exception {
+ Channel channel = this.channelFactory.createMultiplexerChannel(this.multiplexerStack, mux_id);
+ Method[] methods = iface.getMethods();
+
+ final HashMap<Method, Short> methodMap = new HashMap<Method, Short>();
+ final ArrayList<Method> methodList = new ArrayList<Method>();
+
+ for (Method method : methods) {
+ if (method.getAnnotation(Replicated.class) == null) {
+ continue;
+ }
+ methodList.add(method);
+ methodMap.put(method, (short)(methodList.size() - 1));
+ }
+
+ //add in streaming methods
+ Method createState = JGroupsObjectReplicator.Streaming.class.getMethod(CREATE_STATE, new Class<?>[] {String.class});
+ methodList.add(createState);
+ methodMap.put(createState, (short)(methodList.size() - 1));
+ Method buildState = JGroupsObjectReplicator.Streaming.class.getMethod(BUILD_STATE, new Class<?>[] {String.class, byte[].class});
+ methodList.add(buildState);
+ methodMap.put(buildState, (short)(methodList.size() - 1));
+ Method finishState = JGroupsObjectReplicator.Streaming.class.getMethod(FINISH_STATE, new Class<?>[] {String.class});
+ methodList.add(finishState);
+ methodMap.put(finishState, (short)(methodList.size() - 1));
+
+ ReplicatedInvocationHandler<S> proxy = new ReplicatedInvocationHandler<S>(object, methodMap);
+ /*
+ * TODO: could have an object implement streaming
+ * Override the normal handle method to support streaming
+ */
+ RpcDispatcher disp = new RpcDispatcher(channel, proxy, proxy, object) {
+ Map<List<?>, JGroupsInputStream> inputStreams = new ConcurrentHashMap<List<?>, JGroupsInputStream>();
+ @Override
+ public Object handle(Message req) {
+ Object body=null;
+
+ if(req == null || req.getLength() == 0) {
+ if(log.isErrorEnabled()) log.error("message or message buffer is null"); //$NON-NLS-1$
+ return null;
+ }
+
+ try {
+ body=req_marshaller != null?
+ req_marshaller.objectFromByteBuffer(req.getBuffer(), req.getOffset(), req.getLength())
+ : req.getObject();
+ }
+ catch(Throwable e) {
+ if(log.isErrorEnabled()) log.error("exception marshalling object", e); //$NON-NLS-1$
+ return e;
+ }
+
+ if(!(body instanceof MethodCall)) {
+ if(log.isErrorEnabled()) log.error("message does not contain a MethodCall object"); //$NON-NLS-1$
+
+ // create an exception to represent this and return it
+ return new IllegalArgumentException("message does not contain a MethodCall object") ; //$NON-NLS-1$
+ }
+
+ final MethodCall method_call=(MethodCall)body;
+
+ try {
+ if(log.isTraceEnabled())
+ log.trace("[sender=" + req.getSrc() + "], method_call: " + method_call); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if(method_lookup == null)
+ throw new Exception("MethodCall uses ID=" + method_call.getId() + ", but method_lookup has not been set"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (method_call.getId() >= methodList.size() - 3) {
+ Serializable address = req.getSrc();
+ String stateId = (String)method_call.getArgs()[0];
+ List<?> key = Arrays.asList(stateId, address);
+ JGroupsInputStream is = inputStreams.get(key);
+ if (method_call.getId() == methodList.size() - 3) {
+ LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "create state", stateId); //$NON-NLS-1$
+ if (is != null) {
+ is.receive(null);
+ }
+ is = new JGroupsInputStream();
+ this.inputStreams.put(key, is);
+ executor.execute(new StreamingRunner(object, stateId, is));
+ } else if (method_call.getId() == methodList.size() - 2) {
+ LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "building state", stateId); //$NON-NLS-1$
+ if (is != null) {
+ is.receive((byte[])method_call.getArgs()[1]);
+ }
+ } else if (method_call.getId() == methodList.size() - 1) {
+ LogManager.logTrace(LogConstants.CTX_RUNTIME, object, "finished state", stateId); //$NON-NLS-1$
+ if (is != null) {
+ is.receive(null);
+ }
+ this.inputStreams.remove(key);
+ }
+ return null;
+ }
+
+ Method m=method_lookup.findMethod(method_call.getId());
+ if(m == null)
+ throw new Exception("no method found for " + method_call.getId()); //$NON-NLS-1$
+ method_call.setMethod(m);
+
+ return method_call.invoke(server_obj);
+ }
+ catch(Throwable x) {
+ return x;
+ }
+ }
+ };
+
+ proxy.setDisp(disp);
+ disp.setMethodLookup(new MethodLookup() {
+ public Method findMethod(short id) {
+ return methodList.get(id);
+ }
+ });
+
+ T replicatedProxy = (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {iface}, proxy);
+
+ channel.connect(clusterName);
+ if (object instanceof ReplicatedObject) {
+ ((ReplicatedObject)object).setLocalAddress(channel.getLocalAddress());
+ boolean getState = channel.getState(null, startTimeout);
+ if (getState) {
+ boolean loaded = proxy.state_promise.getResult(startTimeout);
+ if (loaded) {
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, object, "loaded"); //$NON-NLS-1$
+ } else {
+ LogManager.logWarning(LogConstants.CTX_RUNTIME, object + " load timeout"); //$NON-NLS-1$
+ }
+ } else {
+ LogManager.logInfo(LogConstants.CTX_RUNTIME, object + " first member or timeout exceeded"); //$NON-NLS-1$
+ }
+ }
+
+ return replicatedProxy;
+ }
+
+}
Deleted: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,96 +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.replication.jboss;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.jgroups.Address;
-import org.jgroups.blocks.GroupRequest;
-import org.jgroups.blocks.MethodCall;
-import org.jgroups.blocks.RpcDispatcher;
-import org.teiid.core.types.Streamable;
-
-public class JGroupsOutputStream extends OutputStream {
-
- static final int CHUNK_SIZE=Streamable.STREAMING_BATCH_SIZE_IN_BYTES;
-
- protected final RpcDispatcher disp;
- protected final Vector<Address> dests;
- protected final String stateId;
- protected final short methodOffset;
-
- private volatile boolean closed=false;
- private final byte[] buffer=new byte[CHUNK_SIZE];
- private int index=0;
-
- public JGroupsOutputStream(RpcDispatcher disp, Vector<Address> dests, String stateId, short methodOffset) {
- this.disp=disp;
- this.dests=dests;
- this.stateId=stateId;
- this.methodOffset = methodOffset;
- disp.callRemoteMethods(this.dests, new MethodCall(methodOffset, new Object[] {stateId}), GroupRequest.GET_NONE, 0);
- }
-
- public void close() throws IOException {
- if(closed) {
- return;
- }
- flush();
- try {
- disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 2), new Object[] {stateId}), GroupRequest.GET_NONE, 0);
- } catch(Exception e) {
- }
- closed=true;
- }
-
- public void flush() throws IOException {
- checkClosed();
- try {
- if(index == 0) {
- return;
- }
- disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 1), new Object[] {stateId, Arrays.copyOf(buffer, index)}), GroupRequest.GET_NONE, 0);
- index=0;
- } catch(Exception e) {
- throw new IOException(e);
- }
- }
-
- private void checkClosed() throws IOException {
- if(closed) {
- throw new IOException("output stream is closed"); //$NON-NLS-1$
- }
- }
-
- public void write(int b) throws IOException {
- checkClosed();
- if(index >= buffer.length) {
- flush();
- }
- buffer[index++]=(byte)b;
- }
-
-}
\ No newline at end of file
Copied: branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java (from rev 3450, trunk/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java)
===================================================================
--- branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java (rev 0)
+++ branches/as7/cache-jbosscache/src/main/java/org/teiid/replication/jboss/JGroupsOutputStream.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,96 @@
+/*
+ * 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.replication.jboss;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.jgroups.Address;
+import org.jgroups.blocks.GroupRequest;
+import org.jgroups.blocks.MethodCall;
+import org.jgroups.blocks.RpcDispatcher;
+import org.teiid.core.types.Streamable;
+
+public class JGroupsOutputStream extends OutputStream {
+
+ static final int CHUNK_SIZE=Streamable.STREAMING_BATCH_SIZE_IN_BYTES;
+
+ protected final RpcDispatcher disp;
+ protected final Vector<Address> dests;
+ protected final String stateId;
+ protected final short methodOffset;
+
+ private volatile boolean closed=false;
+ private final byte[] buffer=new byte[CHUNK_SIZE];
+ private int index=0;
+
+ public JGroupsOutputStream(RpcDispatcher disp, Vector<Address> dests, String stateId, short methodOffset) {
+ this.disp=disp;
+ this.dests=dests;
+ this.stateId=stateId;
+ this.methodOffset = methodOffset;
+ disp.callRemoteMethods(this.dests, new MethodCall(methodOffset, new Object[] {stateId}), GroupRequest.GET_NONE, 0);
+ }
+
+ public void close() throws IOException {
+ if(closed) {
+ return;
+ }
+ flush();
+ try {
+ disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 2), new Object[] {stateId}), GroupRequest.GET_NONE, 0);
+ } catch(Exception e) {
+ }
+ closed=true;
+ }
+
+ public void flush() throws IOException {
+ checkClosed();
+ try {
+ if(index == 0) {
+ return;
+ }
+ disp.callRemoteMethods(dests, new MethodCall((short)(methodOffset + 1), new Object[] {stateId, Arrays.copyOf(buffer, index)}), GroupRequest.GET_NONE, 0);
+ index=0;
+ } catch(Exception e) {
+ throw new IOException(e);
+ }
+ }
+
+ private void checkClosed() throws IOException {
+ if(closed) {
+ throw new IOException("output stream is closed"); //$NON-NLS-1$
+ }
+ }
+
+ public void write(int b) throws IOException {
+ checkClosed();
+ if(index >= buffer.length) {
+ flush();
+ }
+ buffer[index++]=(byte)b;
+ }
+
+}
\ No newline at end of file
Modified: branches/as7/client/src/main/java/org/teiid/client/security/LogonResult.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/client/security/LogonResult.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/main/java/org/teiid/client/security/LogonResult.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -26,6 +26,7 @@
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.OptionalDataException;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
@@ -116,7 +117,11 @@
timeZone = (TimeZone)in.readObject();
clusterName = (String)in.readObject();
vdbVersion = in.readInt();
- addtionalProperties = ExternalizeUtil.readMap(in);
+ try {
+ addtionalProperties = ExternalizeUtil.readMap(in);
+ } catch (OptionalDataException e) {
+
+ }
}
@Override
Modified: branches/as7/client/src/main/java/org/teiid/jdbc/BatchResults.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/BatchResults.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/BatchResults.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -187,11 +187,11 @@
}
if (row > 0) {
- //row is greater than highest, but the last row is not known
- while (row + offset > highestRowNumber && lastRowNumber == -1) {
- requestNextBatch();
+
+ if (row + offset > highestRowNumber && lastRowNumber == -1) {
+ requestBatchAndWait(row + offset);
}
-
+
if (row + offset <= highestRowNumber) {
setCurrentRowNumber(row);
return true;
@@ -203,9 +203,9 @@
row -= offset;
- while (lastRowNumber == -1) {
- requestNextBatch();
- }
+ if (lastRowNumber == -1) {
+ requestBatchAndWait(Integer.MAX_VALUE);
+ }
int positiveRow = lastRowNumber + row + 1;
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/PreparedStatementImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -191,8 +191,8 @@
throw new TeiidSQLException(msg);
}
- public ResultsFuture<Boolean> submitExecute() throws SQLException {
- return executeSql(new String[] {this.prepareSql}, false, ResultsMode.EITHER, false);
+ public ResultsFuture<Boolean> submitExecute(ResultsMode mode) throws SQLException {
+ return executeSql(new String[] {this.prepareSql}, false, mode, false);
}
@Override
@@ -236,14 +236,6 @@
return message;
}
- /**
- * <p>Retreives a ResultSetMetaData object with information about the numbers,
- * types, and properties of columns in the ResultSet object that will be returned
- * when this preparedstatement object is executed.
- * @return ResultSetMetaData object
- * @throws SQLException, currently there is no means of getting results
- * metadata before getting results.
- */
public ResultSetMetaData getMetaData() throws SQLException {
// check if the statement is open
Modified: branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -245,6 +245,7 @@
public void onCompletion(ResultsFuture<ResultsMessage> future) {
try {
batchResults.setBatch(processBatch(future.get()));
+ result.getResultsReceiver().receiveResults(next());
} catch (Throwable t) {
result.getResultsReceiver().exceptionOccurred(t);
}
@@ -253,13 +254,6 @@
return result;
}
- /**
- * Move row pointer forward one row. This may cause the cursor
- * to fetch more rows.
- * @return True if the current index is on a valid row, false if
- * the pointer is past the end of the rows
- * @throws SQLException if this result set has an exception
- */
public boolean next() throws SQLException {
checkClosed();
if (hasNext()) {
@@ -269,24 +263,12 @@
return false;
}
- /**
- * Move row pointer backward one row. This may cause the cursor
- * to fetch more rows.
- * @return True if the current index is on a valid row, false if
- * the pointer is before the beginning of the rows
- * @throws SQLException if this result set has an exception
- */
public boolean previous() throws SQLException {
checkClosed();
checkNotForwardOnly();
return batchResults.previous();
}
- /**
- * Get current row pointer.
- * @return Index of current row
- * @throws SQLException if this result set has an exception
- */
public int getRow() throws SQLException {
checkClosed();
if (isAfterLast()) {
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -423,7 +423,7 @@
JDBCURL.addNormalizedProperty(key, value, this.driverConnection.getExecutionProperties());
}
this.updateCounts = new int[] {0};
- return booleanFuture(true);
+ return booleanFuture(false);
}
match = TRANSACTION_STATEMENT.matcher(commands[0]);
if (match.matches()) {
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/test/java/org/teiid/jdbc/TestAllResultsImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -34,14 +34,13 @@
import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
import org.teiid.client.DQP;
import org.teiid.client.RequestMessage;
import org.teiid.client.ResultsMessage;
@@ -709,30 +708,27 @@
cs.next();
}
- static ResultSetImpl helpTestBatching(StatementImpl statement, int fetchSize, int batchLength,
- int totalLength) throws InterruptedException, ExecutionException,
- TeiidProcessingException, SQLException, TimeoutException {
+ static ResultSetImpl helpTestBatching(StatementImpl statement, final int fetchSize, final int batchLength,
+ final int totalLength) throws TeiidProcessingException, SQLException {
DQP dqp = statement.getDQP();
if (dqp == null) {
dqp = mock(DQP.class);
stub(statement.getDQP()).toReturn(dqp);
}
stub(statement.getFetchSize()).toReturn(fetchSize);
- for (int i = batchLength; i < totalLength; i += batchLength) {
- //forward requests
- ResultsFuture<ResultsMessage> nextBatch = mock(ResultsFuture.class);
- stub(nextBatch.get(Matchers.anyLong(), (TimeUnit)Matchers.anyObject())).toReturn(exampleResultsMsg4(i + 1, Math.min(batchLength, totalLength - i), fetchSize, i + batchLength >= totalLength));
- stub(dqp.processCursorRequest(REQUEST_ID, i + 1, fetchSize)).toReturn(nextBatch);
-
- if (i + batchLength < totalLength) {
- //backward requests
- ResultsFuture<ResultsMessage> previousBatch = mock(ResultsFuture.class);
- stub(previousBatch.get(Matchers.anyLong(), (TimeUnit)Matchers.anyObject())).toReturn(exampleResultsMsg4(i - batchLength + 1, i, fetchSize, false));
- stub(dqp.processCursorRequest(REQUEST_ID, i, fetchSize)).toReturn(previousBatch);
+ stub(dqp.processCursorRequest(Matchers.eq(REQUEST_ID), Matchers.anyInt(), Matchers.eq(fetchSize))).toAnswer(new Answer<ResultsFuture<ResultsMessage>>() {
+ @Override
+ public ResultsFuture<ResultsMessage> answer(
+ InvocationOnMock invocation) throws Throwable {
+ ResultsFuture<ResultsMessage> nextBatch = new ResultsFuture<ResultsMessage>();
+ int begin = Math.min(totalLength, (Integer)invocation.getArguments()[1]);
+ int length = Math.min(totalLength - begin + 1, batchLength);
+ nextBatch.getResultsReceiver().receiveResults(exampleResultsMsg4(begin, length, begin + length - 1>= totalLength));
+ return nextBatch;
}
- }
+ });
- ResultsMessage msg = exampleResultsMsg4(1, batchLength, fetchSize, batchLength == totalLength);
+ ResultsMessage msg = exampleResultsMsg4(1, batchLength, batchLength == totalLength);
return new ResultSetImpl(msg, statement, new ResultSetMetaDataImpl(new MetadataProvider(DeferredMetadataProvider.loadPartialMetadata(msg.getColumnNames(), msg.getDataTypes())), null), 0);
}
@@ -835,7 +831,7 @@
return exampleMessage(new List[0], new String[] { "IntNum", "StringNum" }, new String[] { JDBCSQLTypeInfo.INTEGER, JDBCSQLTypeInfo.STRING }); //$NON-NLS-1$ //$NON-NLS-2$
}
- private static ResultsMessage exampleResultsMsg4(int begin, int length, int fetchSize, boolean lastBatch) {
+ private static ResultsMessage exampleResultsMsg4(int begin, int length, boolean lastBatch) {
RequestMessage request = new RequestMessage();
request.setExecutionId(REQUEST_ID);
ResultsMessage resultsMsg = new ResultsMessage(request);
Modified: branches/as7/client/src/test/java/org/teiid/jdbc/TestBatchResults.java
===================================================================
--- branches/as7/client/src/test/java/org/teiid/jdbc/TestBatchResults.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/client/src/test/java/org/teiid/jdbc/TestBatchResults.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -41,13 +41,13 @@
static class MockBatchFetcher implements BatchFetcher {
- private int totalRows = 50;
+ private int totalRows;
private boolean throwException;
private boolean useLastRow;
List<Integer> batchCalls = new ArrayList<Integer>();
public MockBatchFetcher() {
-
+ this(50);
}
public MockBatchFetcher(int totalRows) {
@@ -68,7 +68,11 @@
if (beginRow%10==0) {
endRow = beginRow - 9;
}
- if(beginRow > endRow) {
+ if (beginRow > totalRows) {
+ beginRow = totalRows + 1;
+ endRow = totalRows;
+ isLast = true;
+ } else if(beginRow > endRow) {
if(endRow < 1) {
endRow = 1;
}
@@ -76,7 +80,7 @@
beginRow = endRow;
endRow = i;
} else if(endRow > totalRows) {
- endRow = totalRows;
+ endRow = totalRows;
isLast = true;
}
Batch batch = new Batch(createBatch(beginRow, endRow), beginRow, endRow, isLast);
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java
===================================================================
--- branches/as7/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -118,6 +118,7 @@
while ((l_nbytes = is.read(l_buffer, 0, readLength)) != -1) {
if (length != -1 && writen > length - l_nbytes) {
out.write(l_buffer, 0, writen + l_nbytes - length);
+ writen = length;
break;
}
out.write(l_buffer,0,l_nbytes);
@@ -143,7 +144,7 @@
return write(out, is, new byte[DEFAULT_READING_SIZE], length, close); // buffer holding bytes to be transferred
}
- public static void write(final Writer out, final Reader is, int length) throws IOException {
+ public static int write(final Writer out, final Reader is, int length, boolean close) throws IOException {
int writen = 0;
try {
char[] l_buffer = new char[DEFAULT_READING_SIZE]; // buffer holding bytes to be transferred
@@ -151,16 +152,20 @@
while ((l_nbytes = is.read(l_buffer)) != -1) {
if (length != -1 && writen > length - l_nbytes) {
out.write(l_buffer, 0, writen + l_nbytes - length);
+ writen = length;
break;
}
out.write(l_buffer,0,l_nbytes);
writen += l_nbytes;
}
+ return writen;
} finally {
- try {
- is.close();
- } finally {
- out.close();
+ if (close) {
+ try {
+ is.close();
+ } finally {
+ out.close();
+ }
}
}
}
@@ -192,7 +197,7 @@
public static void write(final Reader reader, final File f) throws IOException {
f.getParentFile().mkdirs();
FileWriter fw = new FileWriter(f);
- write(fw, reader, -1);
+ write(fw, reader, -1, true);
}
public static void write(final InputStream is, final File f) throws IOException {
@@ -290,7 +295,7 @@
public static char[] convertToCharArray(Reader reader, int length) throws IOException {
StringWriter sb = new StringWriter();
- write(sb, reader, length);
+ write(sb, reader, length, true);
return sb.toString().toCharArray();
}
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-3382
+ /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
Modified: branches/as7/connectors/connector-file/src/main/rar/META-INF/ra.xml
===================================================================
--- branches/as7/connectors/connector-file/src/main/rar/META-INF/ra.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/connectors/connector-file/src/main/rar/META-INF/ra.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<connector xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
- version="1.5">
+<connector version="1.5">
<vendor-name>Red Hat Middleware LLC</vendor-name>
<eis-type>Teiid Text Connector</eis-type>
@@ -55,7 +51,7 @@
<config-property>
<description>{$display:"Allow Parent Paths"}</description>
<config-property-name>AllowParentPaths</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-type>boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -506,6 +506,11 @@
}
@Override
+ public boolean supportsWindowDistinctAggregates() {
+ return false;
+ }
+
+ @Override
public boolean supportsSimilarTo() {
return true;
}
Modified: branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -233,6 +233,11 @@
}
@Override
+ public boolean supportsWindowDistinctAggregates() {
+ return false;
+ }
+
+ @Override
public boolean supportsWindowOrderByWithAggregates() {
return false;
}
Modified: branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java
===================================================================
--- branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -200,5 +200,14 @@
Command obj = commandBuilder.getCommand(input, true, true);
TranslationHelper.helpTestVisitor(output, trans, obj);
}
+
+ @Test public void testWith() throws Exception {
+ String input = "with x as (select intkey from bqt1.smalla) select intkey from x limit 100"; //$NON-NLS-1$
+ String output = "WITH x AS (SELECT SmallA.IntKey FROM SmallA) SELECT TOP 100 g_0.intkey AS c_0 FROM x g_0"; //$NON-NLS-1$
+
+ CommandBuilder commandBuilder = new CommandBuilder(RealMetadataFactory.exampleBQTCached());
+ Command obj = commandBuilder.getCommand(input, true, true);
+ TranslationHelper.helpTestVisitor(output, trans, obj);
+ }
}
Modified: branches/as7/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/ProcedureExecutionParentImpl.java
===================================================================
--- branches/as7/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/ProcedureExecutionParentImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/ProcedureExecutionParentImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -71,14 +71,18 @@
@Override
public void execute() throws TranslatorException {
- if(getCommand().getProcedureName().endsWith("getUpdated")) {
+ String name = getCommand().getMetadataObject().getNameInSource();
+ if (name == null) {
+ name = getCommand().getProcedureName();
+ }
+ if("GetUpdated".equalsIgnoreCase(name)) { //$NON-NLS-1$
execution = new GetUpdatedExecutionImpl(this);
- execution.execute(this);
- }
- else if(getCommand().getProcedureName().endsWith("getDeleted")) {
+ } else if("GetDeleted".equalsIgnoreCase(name)) { //$NON-NLS-1$
execution = new GetDeletedExecutionImpl(this);
- execution.execute(this);
+ } else {
+ throw new AssertionError("Unknown procedure " + getCommand().getProcedureName() + " with name in source " + getCommand().getMetadataObject().getNameInSource()); //$NON-NLS-1$ //$NON-NLS-2$
}
+ execution.execute(this);
}
public void setCommand(Call command) {
Copied: branches/as7/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestProcedureExecution.java (from rev 3450, trunk/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestProcedureExecution.java)
===================================================================
--- branches/as7/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestProcedureExecution.java (rev 0)
+++ branches/as7/connectors/translator-salesforce/src/test/java/org/teiid/translator/salesforce/execution/TestProcedureExecution.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,59 @@
+/*
+ * 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.salesforce.execution;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.teiid.cdk.api.TranslationUtility;
+import org.teiid.language.Call;
+import org.teiid.metadata.RuntimeMetadata;
+import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.salesforce.SalesforceConnection;
+import org.teiid.translator.salesforce.execution.visitors.TestVisitors;
+
+@SuppressWarnings("nls")
+public class TestProcedureExecution {
+
+ private static TranslationUtility translationUtility = new TranslationUtility(TestVisitors.exampleSalesforce());
+
+ @Test public void testProcedureName() throws Exception {
+ Call command = (Call)translationUtility.parseCommand("exec getupdated('foo', {d '1970-01-01'}, {d '1990-01-01'})"); //$NON-NLS-1$
+ SalesforceConnection sfc = Mockito.mock(SalesforceConnection.class);
+ UpdatedResult ur = new UpdatedResult();
+ ur.setIDs(Arrays.asList("1", "2"));
+ Mockito.stub(sfc.getUpdated(Mockito.eq("foo"), (XMLGregorianCalendar)Mockito.anyObject(), (XMLGregorianCalendar)Mockito.anyObject())).toReturn(ur);
+ ProcedureExecutionParentImpl pepi = new ProcedureExecutionParentImpl(command, sfc, Mockito.mock(RuntimeMetadata.class), Mockito.mock(ExecutionContext.class));
+ pepi.execute();
+ assertNotNull(pepi.next());
+ assertNotNull(pepi.next());
+ assertNull(pepi.next());
+ pepi.close();
+ }
+
+}
Modified: branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml
===================================================================
--- branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -30,5 +30,10 @@
If a traditional join is not possible (such as with NOT IN) a merge join version of the semijoin or antijoin will be considered by upon the costing information available.
</para>
</listitem>
+ <listitem>
+ <para><emphasis>org.teiid.ODBCPacketSize</emphasis> - defaults to 307200.
+ Target size in bytes of the ODBC results buffer. This is not a hard maximum, lobs and wide rows may use larger buffers.
+ </para>
+ </listitem>
</itemizedlist>
</appendix>
\ No newline at end of file
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/admin-guide/src/main/docbook/en-US/content/security.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,5 +1,8 @@
<?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">
+<!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="custom_security">
<title>Teiid Security</title>
<para>The Teiid system provides a range of built-in and extensible security features to enable the
@@ -106,23 +109,21 @@
<section>
<title>Kerberos support through GSSAPI</title>
<para>Teiid supports kerberos authentication using GSSAPI, to be used with single sign-on applications.
- This service ticket negotiation based authentication is supported through remote JDBC and ODBC drivers and as
- well as in LocalConnections. However, configuration is varies for local connections vs remote connections</para>
+ This service ticket negotiation based authentication is supported through remote JDBC and ODBC drivers and LocalConnections.
+ Client configuration is different for all connection types.</para>
<section>
<title>LocalConnection</title>
- <para>For supporting kerberos through local connections, provide JDBC URL property <emphasis>PassthroughAuthentication</emphasis>
- as true and use the <ulink url="http://community.jboss.org/docs/DOC-10680">JBoss Negotiation</ulink> as
- authentication configure your web-application for kerberos. When the web application authenticates with the provided
+ <para>Set the JDBC URL property <emphasis>PassthroughAuthentication</emphasis>
+ as true and use <ulink url="http://community.jboss.org/docs/DOC-10680">JBoss Negotiation</ulink> for
+ authentication of your web-application with kerberos. When the web application authenticates with the provided
kerberos token, the same subject authenticated will be used in Teiid. For details about configuration, check the
JBoss Negotiation documentation.</para>
</section>
<section>
- <title>Remote JDBC Connection</title>
- <para>Server: For supporting the kerberos through jdbc from a remote client application, follow the below configuration.
- On the server, edit "{jboss-as}/server/{profile}/deploy/teiid/teiid-jboss-beans.xml" file, and make sure under
- "SessionService" bean definition the following properties are set.
+ <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>
@@ -130,12 +131,11 @@
<property name="krb5SecurityDomain">teiid-krb5</property>
]]></programlisting>
- Now we need to define security domain context for kerberos with name mentioned in above, and since the kerberos
- authorization can not define authorization roles, we need devise a way to define them using another login context.
- Given below is sample configuration to define roles using UserRolesLoginModule.
- Note that the below configuration replaces the default Teiid login configuration. Note to change the principal
- and key tab locations accordingly.
-
+ 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">
@@ -166,51 +166,59 @@
</authentication>
</application-policy>
]]></programlisting>
- Edit "run.conf" or "run.conf.bat"file depending upon the environment in "${jboss-as}/bin" directory
- and add the following JVM options to startup script (note to change the realm and KDC settings according to your environment)
+ 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>
This finishes the configuration on the server side, restart the server and make sure that there were no errors during startup.
</para>
- <para>Client: The following configuration needs to be done on the Teiid client application VM. For client VM, 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>
-
- Add the following JVM options to your client's startup script, note the 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>
-
- Add the following URL connection properties to Teiid JDBC connection string
- <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.
- </para>
- </section>
-
- </section>
+ <section>
+ <title>JDBC Client Configuration</title>
+ <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>
+
+ 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>
+
+ Add the following URL connection properties to Teiid JDBC connection string
+ <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.
+ </para>
+ </section>
+
+ </section>
+ </section>
+
+ <section>
+ <title>ODBC Client Configuration</title>
+ <para>Consult the PostgreSQL ODBC client documentation.</para>
+ </section>
<section>
<title>Security at Data Source level</title>
Modified: branches/as7/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml
===================================================================
--- branches/as7/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -104,6 +104,7 @@
Internal materialization also provides more built-in facilities for refreshing and monitoring.</para>
<para>The cache hint, when used in the context of an internal materialized view transformation query, provides the ability to fine tune the materialized table.
The pref_mem option also applies to internal materialized views. Internal table index pages already have a memory preference, so the perf_mem option indicates that the data pages should prefer memory as well.</para>
+ <para>All internal materialized view refresh and updates happen atomically. Internal materialized views support READ_COMMITTED (used also for READ_UNCOMMITED) and SERIALIZABLE (used also for REPEATABLE_READ) transaction isolation levels.</para>
<section>
<title>Loading And Refreshing</title>
<para>An internal materialized view table is initially in an invalid state (there is no data). The first user query will trigger an implicit loading of the data.
@@ -120,22 +121,6 @@
subsequent refreshes performed with <code>refreshMatView</code> will use dependent materialized view tables if they exist. Only one load may occur at a time. If a load is already in progress when
the <code>SYSADMIN.refreshMatView</code> procedure is called, it will return -1 immediately rather than preempting the current load.
</para>
- <para>
- When Teiid is running clustered mode, after of loading of internal materialized view contents, an event will be sent to all
- the other participating nodes in the cluster to refresh the contents from the original node in asynchronus fashion.
- During this remote node loading process, if the node that is reading the contents gets a request from user to serve the
- results of that view, then the current results in cache will be served. If no results were available at that node, then
- request will be blocked until load process is finished.
- </para>
- <para>
- When a Teiid node joins the cluster, at the end of start-up cycle, an asynchronus job
- will be started to fetch all the previously cached internal materialized views at other nodes
- for the deployed VDBs. The query request behaviour during this load process is same as above.
- </para>
- <note><para>In the clustered mode, the "invalidate=true" flag in the "SYSADMIN.refreshMatView" procedure
- will only apply to the node that is refreshing the contents from source. All other nodes, will still serve the
- old contents during the refresh process.</para>
- </note>
<section>
<title>TTL Snapshot Refresh</title>
<para>The <link linkend="cache-hint">cache hint</link> may be used to automatically trigger a full snapshot refresh after a specified time to live (ttl).
@@ -198,12 +183,9 @@
<section>
<title>Clustering Considerations</title>
<para>Each member in a cluster maintains its own copy of each materialized table and associated indexes.
- With cache clustering enabled, an additional snapshot copy of the table is maintained for loading by other members.
An attempt is made to ensure each member receives the same full refresh events as the others.
Full consistency for updatable materialized views however is not guaranteed.
Periodic full refreshes of updatable materialized view tables helps ensure consistency among members.
- <note><para>Loads of materialized tables are not coordinated across the cluster. It is possible for the same ttl expiration to trigger a load at each member.</para></note>
- In many clustered scenarios using external materialization is advantageous to fully control the loading of the tables and to have materialized data that is durable.
</para>
</section>
</section>
Modified: branches/as7/documentation/client-developers-guide/src/main/docbook/en-US/content/odbc.xml
===================================================================
--- branches/as7/documentation/client-developers-guide/src/main/docbook/en-US/content/odbc.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/client-developers-guide/src/main/docbook/en-US/content/odbc.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -203,21 +203,21 @@
Description = PostgreSQL Data Source
Servername = <Teiid Host name or ip>
Port = 35432
- Protocol = 7.4
+ Protocol = 7.4-1
UserName = <user-name>
Password = <password>
Database = <vdb-name>
ReadOnly = no
ServerType = Postgres
ConnSettings =
- UseServerSidePrepare=0
+ UseServerSidePrepare=1
ByteaAsLongVarBinary=1
Optimizer=0
Ksqo=0
- Trace = No
- TraceFile = /var/log/trace.log
- Debug = No
- DebugFile = /var/log/debug.log
+ Debug=0
+ Fetch = 10000
+ # enable below when dealing large resultsets
+ #UseDeclareFetch=1
]]></programlisting>
<para>Note that you need "sudo" permissions to edit the "/etc/odbc.ini" file.
Modified: branches/as7/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
===================================================================
--- branches/as7/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1331,7 +1331,7 @@
<para>WindowOrderByWithAggregates</para>
</entry>
<entry>
- <para/>
+ <para>ElementaryOlapOperations</para>
</entry>
<entry>
<para>Translator supports windowed aggregates with a window order by clause.</para>
@@ -1339,10 +1339,21 @@
</row>
<row>
<entry>
+ <para>WindowDistinctAggregates</para>
+ </entry>
+ <entry>
+ <para>ElementaryOlapOperations, AggregatesDistinct</para>
+ </entry>
+ <entry>
+ <para>Translator supports windowed distinct aggregates.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
<para>AdvancedOlapOperations</para>
</entry>
<entry>
- <para/>
+ <para>ElementaryOlapOperations</para>
</entry>
<entry>
<para>Translator supports aggregate conditions.</para>
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/content/ddl_support.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/ddl_support.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/ddl_support.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -77,7 +77,7 @@
</para>
</listitem>
<listitem>
- <para>Only local temporary tables are supported. This implies that the scope of temp table will be either to the sesssion or the block of a virtual procedure that creates it.
+ <para>Only local temporary tables are supported. This implies that the scope of temp table will be either to the session or the block of a virtual procedure that creates it.
</para>
</listitem>
<listitem>
@@ -85,7 +85,9 @@
</para>
</listitem>
<listitem>
- <para>Temp tables are non-transactional.
+ <para>Temp tables support a READ_UNCOMMITED transaction isolation level. There are no locking mechanisms available to support higher isolation levels and the result of a rollback may be inconsistent across multiple transactions.
+ If concurrent transactions are not associated with the same local temporary table or session, then the transaction isolation level is effectively SERIALIZABLE.
+ If you want full constency with local temporary tables, then only use a connection with 1 transaction at a time. This mode of operation is ensured by connection pooling that tracking connections by transaction.
</para>
</listitem>
<listitem>
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -326,7 +326,7 @@
</para>
</listitem>
<listitem>
- <para>Windowed aggregates may not use DISTINCT.
+ <para>Windowed aggregates may not use DISTINCT if the window specification is ordered.
</para>
</listitem>
</itemizedlist>
Modified: branches/as7/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml
===================================================================
--- branches/as7/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -341,11 +341,6 @@
connector, however this isolation level is fixed and cannot be
changed at runtime for specific connections/commands.</para>
</listitem>
- <listitem>
- <para>Temporary tables are not transactional. For example,
- a global temporary table will retain all inserts performed during a
- local transaction that was rolled back.</para>
- </listitem>
<!-- <listitem>
<para>Connectors may be set to immutable to prevent their
participation in transactions. This is useful in situations where
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/BatchManager.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -26,6 +26,12 @@
public interface BatchManager {
+ public interface CleanupHook {
+
+ void cleanup();
+
+ }
+
public interface ManagedBatch {
TupleBatch getBatch(boolean cache, String[] types) throws TeiidComponentException;
@@ -34,6 +40,13 @@
void setPrefersMemory(boolean prefers);
+ /**
+ * Get an object that can cleaup the {@link ManagedBatch}, but does not hold a hard reference to
+ * the {@link ManagedBatch} or the {@link BatchManager}
+ * @return
+ */
+ CleanupHook getCleanupHook();
+
}
ManagedBatch createManagedBatch(TupleBatch batch, boolean softCache) throws TeiidComponentException;
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-3382
+ /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
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/SPage.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,24 +22,34 @@
package org.teiid.common.buffer;
+import java.lang.ref.PhantomReference;
+import java.lang.ref.ReferenceQueue;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.Set;
+import org.teiid.common.buffer.BatchManager.CleanupHook;
import org.teiid.common.buffer.BatchManager.ManagedBatch;
import org.teiid.core.TeiidComponentException;
+import org.teiid.core.TeiidRuntimeException;
/**
* A linked list Page entry in the tree
*
* TODO: return the tuplebatch from getvalues, since that is what we're tracking
*
+ * State cloning allows a single storage reference to be shared in many trees.
+ * A phantom reference is used for proper cleanup once cloned.
+ *
+ * TODO: a better purging strategy for managedbatchs.
+ *
*/
@SuppressWarnings("unchecked")
-class SPage {
+class SPage implements Cloneable {
static final int MIN_PERSISTENT_SIZE = 16;
@@ -54,24 +64,75 @@
}
}
- private static AtomicInteger counter = new AtomicInteger();
-
+ private static final Set<PhantomReference<Object>> REFERENCES = Collections.newSetFromMap(new IdentityHashMap<PhantomReference<Object>, Boolean>());
+ private static ReferenceQueue<Object> QUEUE = new ReferenceQueue<Object>();
+ static class CleanupReference extends PhantomReference<Object> {
+
+ private CleanupHook batch;
+
+ public CleanupReference(Object referent, CleanupHook batch) {
+ super(referent, QUEUE);
+ this.batch = batch;
+ }
+
+ public void cleanup() {
+ try {
+ this.batch.cleanup();
+ } finally {
+ this.clear();
+ }
+ }
+ }
+
STree stree;
+ private int id;
protected SPage next;
protected SPage prev;
protected ManagedBatch managedBatch;
+ private Object trackingObject;
protected TupleBatch values;
protected ArrayList<SPage> children;
+ //TODO: could track cloning more completely, which would allow for earlier batch removal
+ private boolean cloned;
SPage(STree stree, boolean leaf) {
this.stree = stree;
- this.values = new TupleBatch(counter.getAndIncrement(), new ArrayList(stree.pageSize/4));
+ this.id = stree.counter.getAndIncrement();
+ stree.pages.put(this.id, this);
+ //TODO: this counter is a hack. need a better idea of a storage id
+ this.values = new TupleBatch(id, new ArrayList(stree.pageSize/4));
if (!leaf) {
children = new ArrayList<SPage>(stree.pageSize/4);
}
}
+ public SPage clone(STree tree) {
+ try {
+ if (this.managedBatch != null && trackingObject == null) {
+ cloned = true;
+ this.trackingObject = new Object();
+ CleanupReference managedBatchReference = new CleanupReference(trackingObject, managedBatch.getCleanupHook());
+ REFERENCES.add(managedBatchReference);
+ }
+ SPage clone = (SPage) super.clone();
+ clone.stree = tree;
+ if (children != null) {
+ clone.children = new ArrayList<SPage>(children);
+ }
+ if (values != null) {
+ clone.values = new TupleBatch(stree.counter.getAndIncrement(), new ArrayList<List<?>>(values.getTuples()));
+ }
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+
+ public int getId() {
+ return id;
+ }
+
static SearchResult search(SPage page, List k, LinkedList<SearchResult> parent) throws TeiidComponentException {
TupleBatch previousValues = null;
for (;;) {
@@ -121,7 +182,7 @@
}
protected void setValues(TupleBatch values) throws TeiidComponentException {
- if (managedBatch != null) {
+ if (managedBatch != null && !cloned) {
managedBatch.remove();
}
if (values.getTuples().size() < MIN_PERSISTENT_SIZE) {
@@ -134,17 +195,25 @@
} else {
values.setDataTypes(stree.types);
}
+ if (cloned) {
+ values.setRowOffset(stree.counter.getAndIncrement());
+ cloned = false;
+ trackingObject = null;
+ }
if (children != null) {
managedBatch = stree.keyManager.createManagedBatch(values, true);
} else {
managedBatch = stree.leafManager.createManagedBatch(values, stree.preferMemory);
}
}
-
- protected void remove() {
+
+ protected void remove(boolean force) {
if (managedBatch != null) {
- managedBatch.remove();
+ if (force || !cloned) {
+ managedBatch.remove();
+ }
managedBatch = null;
+ trackingObject = null;
}
values = null;
children = null;
@@ -157,6 +226,14 @@
if (managedBatch == null) {
throw new AssertionError("Batch removed"); //$NON-NLS-1$
}
+ for (int i = 0; i < 10; i++) {
+ CleanupReference ref = (CleanupReference)QUEUE.poll();
+ if (ref == null) {
+ break;
+ }
+ REFERENCES.remove(ref);
+ ref.cleanup();
+ }
if (children != null) {
return managedBatch.getBatch(true, stree.keytypes);
}
@@ -173,7 +250,7 @@
if (current.children != null) {
current.children.addAll(current.next.children);
}
- current.next.remove();
+ current.next.remove(false);
current.next = current.next.next;
if (current.next != null) {
current.next.prev = current;
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/STree.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -23,16 +23,22 @@
package org.teiid.common.buffer;
import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Random;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
+import org.teiid.client.BatchSerializer;
import org.teiid.common.buffer.SPage.SearchResult;
import org.teiid.core.TeiidComponentException;
+import org.teiid.core.TeiidRuntimeException;
import org.teiid.query.processor.relational.ListNestedSortComparator;
/**
@@ -41,7 +47,7 @@
* but with fewer updates.
*/
@SuppressWarnings("unchecked")
-public class STree {
+public class STree implements Cloneable {
public enum InsertMode {ORDERED, NEW, UPDATE}
@@ -50,7 +56,9 @@
protected int randomSeed;
private int mask = 1;
private int shift = 1;
-
+
+ protected AtomicInteger counter = new AtomicInteger();
+ protected ConcurrentHashMap<Integer, SPage> pages = new ConcurrentHashMap<Integer, SPage>();
protected volatile SPage[] header = new SPage[] {new SPage(this, true)};
protected BatchManager keyManager;
protected BatchManager leafManager;
@@ -88,6 +96,70 @@
this.keytypes = Arrays.copyOf(types, keyLength);
}
+ public STree clone() {
+ updateLock.lock();
+ try {
+ STree clone = (STree) super.clone();
+ clone.updateLock = new ReentrantLock();
+ clone.rowCount = new AtomicInteger(rowCount.get());
+ //clone the pages
+ clone.pages = new ConcurrentHashMap<Integer, SPage>(pages);
+ for (Map.Entry<Integer, SPage> entry : clone.pages.entrySet()) {
+ entry.setValue(entry.getValue().clone(clone));
+ }
+ //reset the pointers
+ for (Map.Entry<Integer, SPage> entry : clone.pages.entrySet()) {
+ SPage clonePage = entry.getValue();
+ clonePage.next = clone.getPage(clonePage.next);
+ clonePage.prev = clone.getPage(clonePage.prev);
+ if (clonePage.children != null) {
+ for (int i = 0; i < clonePage.children.size(); i++) {
+ clonePage.children.set(i, clone.getPage(clonePage.children.get(i)));
+ }
+ }
+ }
+ clone.header = Arrays.copyOf(header, header.length);
+ for (int i = 0; i < header.length; i++) {
+ clone.header[i] = clone.pages.get(header[i].getId());
+ }
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ throw new TeiidRuntimeException(e);
+ } finally {
+ updateLock.unlock();
+ }
+ }
+
+ private SPage getPage(SPage page) {
+ if (page == null) {
+ return page;
+ }
+ return pages.get(page.getId());
+ }
+
+ public void writeValuesTo(ObjectOutputStream oos) throws TeiidComponentException, IOException {
+ SPage page = header[0];
+ oos.writeInt(this.rowCount.get());
+ while (true) {
+ TupleBatch batch = page.getValues();
+ BatchSerializer.writeBatch(oos, types, batch.getAllTuples());
+ if (page.next == null) {
+ break;
+ }
+ }
+ }
+
+ public void readValuesFrom(ObjectInputStream ois) throws IOException, ClassNotFoundException, TeiidComponentException {
+ int size = ois.readInt();
+ int sizeHint = this.getExpectedHeight(size);
+ while (this.getRowCount() < size) {
+ List[] batch = BatchSerializer.readBatch(ois, types);
+ for (List list : batch) {
+ this.insert(list, InsertMode.ORDERED, sizeHint);
+ }
+ }
+ }
+
protected SPage findChildTail(SPage page) {
if (page == null) {
page = header[header.length - 1];
@@ -331,7 +403,7 @@
int size = searchResult.values.getTuples().size();
if (size == 0) {
if (header[i] != searchResult.page) {
- searchResult.page.remove();
+ searchResult.page.remove(false);
if (searchResult.page.next != null) {
searchResult.page.next.prev = searchResult.page.prev;
}
@@ -340,7 +412,7 @@
searchResult.page.prev = null;
continue;
}
- header[i].remove();
+ header[i].remove(false);
if (header[i].next != null) {
header[i] = header[i].next;
header[i].prev = null;
@@ -375,7 +447,7 @@
}
public void remove() {
- truncate();
+ truncate(false);
this.keyManager.remove();
this.leafManager.remove();
}
@@ -384,12 +456,12 @@
return this.rowCount.get();
}
- public int truncate() {
+ public int truncate(boolean force) {
int oldSize = rowCount.getAndSet(0);
for (int i = 0; i < header.length; i++) {
SPage page = header[i];
while (page != null) {
- page.remove();
+ page.remove(force);
page = page.next;
}
}
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-3382
+ /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
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -92,6 +92,28 @@
private static final int IO_BUFFER_SIZE = 1 << 14;
private static final int COMPACTION_THRESHOLD = 1 << 25; //start checking at 32 megs
+ private final class CleanupHook implements org.teiid.common.buffer.BatchManager.CleanupHook {
+
+ private long id;
+ private int beginRow;
+ private WeakReference<BatchManagerImpl> ref;
+
+ CleanupHook(long id, int beginRow, BatchManagerImpl batchManager) {
+ this.id = id;
+ this.beginRow = beginRow;
+ this.ref = new WeakReference<BatchManagerImpl>(batchManager);
+ }
+
+ public void cleanup() {
+ BatchManagerImpl batchManager = ref.get();
+ if (batchManager == null) {
+ return;
+ }
+ cleanupManagedBatch(batchManager, beginRow, id);
+ }
+
+ }
+
private final class BatchManagerImpl implements BatchManager {
private final String id;
private volatile FileStore store;
@@ -163,7 +185,9 @@
store = newStore;
long oldOffset = offset;
offset = store.getLength();
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Compacted store", id, "pre-size", oldOffset, "post-size", offset); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Compacted store", id, "pre-size", oldOffset, "post-size", offset); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
return offset;
} finally {
this.compactionLock.writeLock().unlock();
@@ -213,7 +237,9 @@
this.lobManager = new LobManager();
}
sizeEstimate = (int) Math.max(1, manager.sizeUtility.getBatchSize(batch) / 1024);
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", id, "with size estimate", sizeEstimate); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", id, "with size estimate", sizeEstimate); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
@Override
@@ -249,7 +275,9 @@
@Override
public TupleBatch getBatch(boolean cache, String[] types) throws TeiidComponentException {
long reads = readAttempts.incrementAndGet();
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, "getting batch", reads, "reference hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, "getting batch", reads, "reference hits", referenceHit.get()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
synchronized (activeBatches) {
TupleBufferInfo tbi = activeBatches.remove(batchManager.id);
if (tbi != null) {
@@ -286,7 +314,9 @@
}
}
long count = readCount.incrementAndGet();
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "reading batch from disk, total reads:", count); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "reading batch from disk, total reads:", count); //$NON-NLS-1$
+ }
try {
this.batchManager.compactionLock.readLock().lock();
long[] info = batchManager.physicalMapping.get(this.id);
@@ -324,7 +354,9 @@
if (batch != null) {
if (!persistent) {
long count = writeCount.incrementAndGet();
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "writing batch to disk, total writes: ", count); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "writing batch to disk, total writes: ", count); //$NON-NLS-1$
+ }
long offset = 0;
if (lobManager != null) {
for (List<?> tuple : batch.getTuples()) {
@@ -341,7 +373,9 @@
long[] info = new long[] {offset, size};
batchManager.physicalMapping.put(this.id, info);
}
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "batch written starting at:", offset); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, batchManager.id, id, "batch written starting at:", offset); //$NON-NLS-1$
+ }
}
if (softCache) {
this.batchReference = new SoftReference<TupleBatch>(batch);
@@ -363,25 +397,17 @@
}
public void remove() {
- synchronized (activeBatches) {
- TupleBufferInfo tbi = activeBatches.get(batchManager.id);
- if (tbi != null && tbi.removeBatch(this.beginRow) != null) {
- if (tbi.batches.isEmpty()) {
- activeBatches.remove(batchManager.id);
- }
- }
- }
- long[] info = batchManager.physicalMapping.remove(id);
- if (info != null) {
- batchManager.unusedSpace.addAndGet(info[1]);
- }
- activeBatch = null;
- batchReference = null;
+ cleanupManagedBatch(batchManager, beginRow, id);
}
+
+ @Override
+ public CleanupHook getCleanupHook() {
+ return new CleanupHook(id, beginRow, batchManager);
+ }
@Override
public String toString() {
- return "ManagedBatch " + batchManager.id + " " + activeBatch; //$NON-NLS-1$ //$NON-NLS-2$
+ return "ManagedBatch " + batchManager.id + " " + this.beginRow + " " + activeBatch; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -487,6 +513,21 @@
return tupleBuffer;
}
+ private void cleanupManagedBatch(BatchManagerImpl batchManager, int beginRow, long id) {
+ synchronized (activeBatches) {
+ TupleBufferInfo tbi = activeBatches.get(batchManager.id);
+ if (tbi != null && tbi.removeBatch(beginRow) != null) {
+ if (tbi.batches.isEmpty()) {
+ activeBatches.remove(batchManager.id);
+ }
+ }
+ }
+ long[] info = batchManager.physicalMapping.remove(id);
+ if (info != null) {
+ batchManager.unusedSpace.addAndGet(info[1]);
+ }
+ }
+
public STree createSTree(final List elements, String groupName, int keyLength) {
String newID = String.valueOf(this.tsId.getAndIncrement());
int[] lobIndexes = LobManager.getLobIndexes(elements);
@@ -496,13 +537,17 @@
for (int i = 1; i < compareIndexes.length; i++) {
compareIndexes[i] = i;
}
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating STree:", newID); //$NON-NLS-1$
+ 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(), keyLength, TupleBuffer.getTypeNames(elements));
}
@Override
public FileStore createFileStore(String name) {
- LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$
+ }
return this.diskMgr.createFileStore(name);
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/CapabilitiesConverter.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -25,7 +25,10 @@
import java.util.Iterator;
import java.util.List;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
import org.teiid.metadata.FunctionMethod;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
import org.teiid.query.optimizer.capabilities.SourceCapabilities;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
@@ -52,14 +55,14 @@
tgtCaps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, srcCaps.supportsSelectDistinct());
tgtCaps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, srcCaps.supportsAliasedTable());
tgtCaps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, srcCaps.supportsInnerJoins());
- tgtCaps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_SELFJOIN, srcCaps.supportsSelfJoins());
+ setSupports(connectorID, tgtCaps, Capability.QUERY_FROM_JOIN_SELFJOIN, srcCaps.supportsSelfJoins(), Capability.QUERY_FROM_GROUP_ALIAS);
tgtCaps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_OUTER, srcCaps.supportsOuterJoins());
tgtCaps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_OUTER_FULL, srcCaps.supportsFullOuterJoins());
- tgtCaps.setCapabilitySupport(Capability.QUERY_FROM_INLINE_VIEWS, srcCaps.supportsInlineViews());
+ setSupports(connectorID, tgtCaps, Capability.QUERY_FROM_INLINE_VIEWS, srcCaps.supportsInlineViews(), Capability.QUERY_FROM_GROUP_ALIAS);
tgtCaps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, srcCaps.supportsCompareCriteriaEquals());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_COMPARE_ORDERED, srcCaps.supportsCompareCriteriaOrdered());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_LIKE, srcCaps.supportsLikeCriteria());
- tgtCaps.setCapabilitySupport(Capability.CRITERIA_LIKE_ESCAPE, srcCaps.supportsLikeCriteriaEscapeCharacter());
+ setSupports(connectorID, tgtCaps, Capability.CRITERIA_LIKE_ESCAPE, srcCaps.supportsLikeCriteriaEscapeCharacter(), Capability.CRITERIA_LIKE);
tgtCaps.setCapabilitySupport(Capability.CRITERIA_IN, srcCaps.supportsInCriteria());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, srcCaps.supportsInCriteriaSubquery());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_ISNULL, srcCaps.supportsIsNullCriteria());
@@ -99,12 +102,13 @@
tgtCaps.setCapabilitySupport(Capability.QUERY_ORDERBY_NULL_ORDERING, srcCaps.supportsOrderByNullOrdering());
tgtCaps.setCapabilitySupport(Capability.INSERT_WITH_ITERATOR, srcCaps.supportsInsertWithIterator());
tgtCaps.setCapabilitySupport(Capability.COMMON_TABLE_EXPRESSIONS, srcCaps.supportsCommonTableExpressions());
- tgtCaps.setCapabilitySupport(Capability.ADVANCED_OLAP, srcCaps.supportsAdvancedOlapOperations());
- tgtCaps.setCapabilitySupport(Capability.ELEMENTARY_OLAP, srcCaps.supportsAdvancedOlapOperations());
- tgtCaps.setCapabilitySupport(Capability.WINDOW_FUNCTION_ORDER_BY_AGGREGATES, srcCaps.supportsWindowOrderByWithAggregates());
+ tgtCaps.setCapabilitySupport(Capability.ELEMENTARY_OLAP, srcCaps.supportsElementaryOlapOperations());
+ setSupports(connectorID, tgtCaps, Capability.ADVANCED_OLAP, srcCaps.supportsAdvancedOlapOperations(), Capability.ELEMENTARY_OLAP);
+ setSupports(connectorID, tgtCaps, Capability.WINDOW_FUNCTION_ORDER_BY_AGGREGATES, srcCaps.supportsWindowOrderByWithAggregates(), Capability.ELEMENTARY_OLAP);
tgtCaps.setCapabilitySupport(Capability.QUERY_AGGREGATES_ARRAY, srcCaps.supportsArrayAgg());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_SIMILAR, srcCaps.supportsSimilarTo());
tgtCaps.setCapabilitySupport(Capability.CRITERIA_LIKE_REGEX, srcCaps.supportsLikeRegex());
+ setSupports(connectorID, tgtCaps, Capability.WINDOW_FUNCTION_DISTINCT_AGGREGATES, srcCaps.supportsWindowDistinctAggregates(), Capability.ELEMENTARY_OLAP, Capability.QUERY_AGGREGATES_DISTINCT);
List<String> functions = srcCaps.getSupportedFunctions();
if(functions != null && functions.size() > 0) {
@@ -130,4 +134,17 @@
return tgtCaps;
}
+ private static void setSupports(Object connectorID, BasicSourceCapabilities tgtCaps, Capability cap, boolean supports, Capability... required) {
+ if (!supports) {
+ return;
+ }
+ for (Capability capability : required) {
+ if (!tgtCaps.supportsCapability(capability)) {
+ LogManager.logWarning(LogConstants.CTX_CONNECTOR, QueryPlugin.Util.getString("support_required", cap, capability, connectorID)); //$NON-NLS-1$
+ supports = false;
+ }
+ }
+ tgtCaps.setCapabilitySupport(cap, supports);
+ }
+
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -230,6 +230,7 @@
}
}
item.setSubquery(translate(withQueryCommand.getCommand()));
+ items.add(item);
}
result.setItems(items);
return result;
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/AccessInfo.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -41,7 +41,7 @@
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.optimizer.relational.RelationalPlanner;
-import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.GlobalTableStore;
import org.teiid.query.util.CommandContext;
/**
@@ -117,17 +117,17 @@
}
VDBMetaData vdb = DQPWorkContext.getWorkContext().getVDB();
TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
- TempTableStore globalStore = vdb.getAttachment(TempTableStore.class);
+ GlobalTableStore globalStore = vdb.getAttachment(GlobalTableStore.class);
if (!externalNames.isEmpty()) {
this.objectsAccessed = new HashSet<Object>(externalNames.size());
for (List<String> key : this.externalNames) {
if (key.size() == 1) {
String matTableName = key.get(0);
- TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
+ TempMetadataID id = globalStore.getTempTableStore().getMetadataStore().getTempGroupID(matTableName);
if (id == null) {
//if the id is null, then create a local instance
String viewFullName = matTableName.substring(RelationalPlanner.MAT_PREFIX.length());
- id = globalStore.getGlobalTempTableMetadataId(tm.getGroupID(viewFullName), tm);
+ id = globalStore.getGlobalTempTableMetadataId(tm.getGroupID(viewFullName));
}
this.objectsAccessed.add(id);
} else {
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -28,7 +28,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.FutureTask;
@@ -44,10 +43,8 @@
import org.teiid.adminapi.impl.CacheStatisticsMetadata;
import org.teiid.adminapi.impl.RequestMetadata;
import org.teiid.adminapi.impl.TransactionMetadata;
-import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.WorkerPoolStatisticsMetadata;
import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.cache.CacheFactory;
import org.teiid.client.DQP;
import org.teiid.client.RequestMessage;
@@ -60,33 +57,28 @@
import org.teiid.client.xa.XidImpl;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.TeiidComponentException;
-import org.teiid.core.TeiidException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.Streamable;
-import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
import org.teiid.dqp.internal.process.ThreadReuseExecutor.PrioritizedRunnable;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.RequestID;
import org.teiid.dqp.service.BufferService;
import org.teiid.dqp.service.TransactionContext;
-import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.dqp.service.TransactionService;
+import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.events.EventDistributor;
import org.teiid.logging.CommandLogMessage;
-import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.metadata.MetadataRepository;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.metadata.QueryMetadataInterface;
-import org.teiid.query.metadata.TempMetadataAdapter;
-import org.teiid.query.optimizer.relational.RelationalPlanner;
import org.teiid.query.tempdata.TempTableDataManager;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
-
/**
* Implements the core DQP processing.
*/
@@ -212,8 +204,6 @@
private LinkedList<RequestWorkItem> waitingPlans = new LinkedList<RequestWorkItem>();
private CacheFactory cacheFactory;
- private SessionAwareCache<CachedResults> matTables;
-
private AuthorizationValidator authorizationValidator;
/**
@@ -246,7 +236,7 @@
}
ClientState state = clientState.get(key);
if (state == null && create) {
- state = new ClientState(new TempTableStore(key));
+ state = new ClientState(new TempTableStore(key, TransactionMode.ISOLATE_WRITES));
clientState.put(key, state);
}
return state;
@@ -629,9 +619,6 @@
clearResultSetCache(vdbName, version);
break;
}
- if (this.matTables != null) {
- this.matTables.clearForVDB(vdbName, version);
- }
}
public Collection<TransactionMetadata> getTransactions() {
@@ -731,102 +718,15 @@
this.userRequestSourceConcurrency = Math.min(config.getMaxThreads(), 2*config.getMaxThreads()/this.maxActivePlans);
}
- if (cacheFactory.isReplicated()) {
- matTables = new SessionAwareCache<CachedResults>(this.cacheFactory, SessionAwareCache.Type.RESULTSET, new CacheConfiguration(Policy.EXPIRATION, -1, -1, "MaterilizationTables")); //$NON-NLS-1$
- matTables.setBufferManager(this.bufferManager);
- }
-
DataTierManagerImpl processorDataManager = new DataTierManagerImpl(this,this.bufferService, this.config.isDetectingChangeEvents());
processorDataManager.setEventDistributor(eventDistributor);
processorDataManager.setMetadataRepository(metadataRepository);
- dataTierMgr = new TempTableDataManager(processorDataManager, this.bufferManager, this.processWorkerPool, this.rsCache, this.matTables, this.cacheFactory);
+ dataTierMgr = new TempTableDataManager(processorDataManager, this.bufferManager, this.processWorkerPool, this.rsCache);
dataTierMgr.setEventDistributor(eventDistributor);
LogManager.logDetail(LogConstants.CTX_DQP, "DQPCore started maxThreads", this.config.getMaxThreads(), "maxActivePlans", this.maxActivePlans, "source concurrency", this.userRequestSourceConcurrency); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- public void synchronizeInternalMaterializedViews(final ContextProvider contextProvider) {
- if (!cacheFactory.isReplicated() || matTables == null) {
- return;
- }
- Set<CacheID> keys = this.matTables.replicatableKeys();
- for (final CacheID key:keys) {
- refreshMatView(contextProvider, key.getVDBKey().getName(), key.getVDBKey().getVersion(), key.getSql());
- }
- }
-
- public void refreshMatView(final ContextProvider contextProvider, final String vdbName, final int vdbVersion, final String viewName) {
- if (!cacheFactory.isReplicated() || matTables == null) {
- return;
- }
-
- final DQPWorkContext context = contextProvider.getContext(vdbName, vdbVersion);
-
- final VDBMetaData vdb = context.getVDB();
- if (vdb == null) {
- return;
- }
-
- final TempTableStore globalStore = vdb.getAttachment(TempTableStore.class);
- if (globalStore == null) {
- return;
- }
- DQPWorkContext.setWorkContext(context);
-
- Runnable work = new Runnable() {
- @Override
- public void run() {
- QueryMetadataInterface metadata = vdb.getAttachment(QueryMetadataInterface.class);
- TempTableStore tempStore = new TempTableStore("internal"); //$NON-NLS-1$
- TempMetadataAdapter tma = new TempMetadataAdapter(metadata, tempStore.getMetadataStore());
- try {
- dataTierMgr.refreshMatView(vdb.getName(), vdb.getVersion(), viewName, tma, globalStore);
- } catch (TeiidException e) {
- LogManager.logError(LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("error_refresh", viewName )); //$NON-NLS-1$
- }
- }
- };
- addWork(work);
- }
-
- public void updateMatViewRow(final ContextProvider contextProvider, final String vdbName, final int vdbVersion, final String schema,
- final String viewName, final List<?> tuple, final boolean delete) {
-
- if (!cacheFactory.isReplicated() || matTables == null) {
- return;
- }
-
- final DQPWorkContext context = contextProvider.getContext(vdbName, vdbVersion);
-
- final VDBMetaData vdb = context.getVDB();
- if (vdb == null) {
- return;
- }
-
- final TempTableStore globalStore = vdb.getAttachment(TempTableStore.class);
- if (globalStore == null) {
- return;
- }
-
- Runnable work = new Runnable() {
- @Override
- public void run() {
- context.runInContext(new Runnable() {
- @Override
- public void run() {
- try {
- dataTierMgr.updateMatViewRow(globalStore, RelationalPlanner.MAT_PREFIX + (schema + '.' + viewName).toUpperCase(), tuple, delete);
- } catch (TeiidException e) {
- LogManager.logError(LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("DQPCore.unable_to_process_event")); //$NON-NLS-1$
- }
- }
- });
- }
- };
- addWork(work);
-
- }
-
public void setBufferService(BufferService service) {
this.bufferService = 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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -207,7 +207,7 @@
DQPWorkContext.setWorkContext(this);
boolean associated = false;
if (securityHelper != null && this.getSubject() != null) {
- associated = securityHelper.assosiateSecurityContext(this.getSecurityDomain(), this.getSecurityContext());
+ associated = securityHelper.associateSecurityContext(this.getSecurityDomain(), this.getSecurityContext());
}
return associated;
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataRolePolicyDecider.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataRolePolicyDecider.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataRolePolicyDecider.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
package org.teiid.dqp.internal.process;
import java.util.Collections;
@@ -49,13 +71,20 @@
@Override
public boolean isTempAccessable(PermissionType action, String resource,
Context context, CommandContext commandContext) {
+ Boolean result = null;
for(DataPolicy p:commandContext.getAllowedDataPolicies().values()) {
DataPolicyMetadata policy = (DataPolicyMetadata)p;
if (policy.isAllowCreateTemporaryTables() != null) {
- return policy.isAllowCreateTemporaryTables();
+ if (policy.isAllowCreateTemporaryTables()) {
+ return true;
+ }
+ result = policy.isAllowCreateTemporaryTables();
}
}
+ if (result != null) {
+ return result;
+ }
return allowCreateTemporaryTablesByDefault;
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -89,8 +89,8 @@
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
-import org.teiid.query.tempdata.TempTableStore;
-import org.teiid.query.tempdata.TempTableStore.MatTableInfo;
+import org.teiid.query.tempdata.GlobalTableStore;
+import org.teiid.query.tempdata.GlobalTableStoreImpl.MatTableInfo;
import org.teiid.query.util.CommandContext;
/**
@@ -243,13 +243,13 @@
Integer cardinaltity = null;
Boolean valid = null;
if (table.getMaterializedTable() == null) {
- TempTableStore globalStore = context.getGlobalTableStore();
+ GlobalTableStore globalStore = context.getGlobalTableStore();
matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
MatTableInfo info = globalStore.getMatTableInfo(matTableName);
valid = info.isValid();
state = info.getState().name();
updated = info.getUpdateTime()==-1?null:new Timestamp(info.getUpdateTime());
- TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
+ TempMetadataID id = globalStore.getTempTableStore().getMetadataStore().getTempGroupID(matTableName);
if (id != null) {
cardinaltity = id.getCardinality();
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -116,11 +116,9 @@
TempTableStore tempTableStore = null;
if(requestManager != null) {
- if (workItem != null) {
- ClientState state = requestManager.getClientState(workContext.getSessionId(), false);
- if (state != null) {
- tempTableStore = state.sessionTables;
- }
+ ClientState state = requestManager.getClientState(workContext.getSessionId(), false);
+ if (state != null) {
+ tempTableStore = state.sessionTables;
}
}
if(tempTableStore != null) {
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -83,6 +83,7 @@
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
import org.teiid.query.sql.visitor.ReferenceCollectorVisitor;
+import org.teiid.query.tempdata.GlobalTableStore;
import org.teiid.query.tempdata.TempTableStore;
import org.teiid.query.util.CommandContext;
import org.teiid.query.util.ContextProperties;
@@ -128,7 +129,7 @@
protected Command userCommand;
protected boolean returnsUpdateCount;
- private TempTableStore globalTables;
+ private GlobalTableStore globalTables;
private SessionAwareCache<PreparedPlan> planCache;
private boolean resultSetCacheEnabled = true;
private int userRequestConcurrency;
@@ -185,7 +186,7 @@
VDBMetaData vdbMetadata = workContext.getVDB();
metadata = vdbMetadata.getAttachment(QueryMetadataInterface.class);
- globalTables = vdbMetadata.getAttachment(TempTableStore.class);
+ globalTables = vdbMetadata.getAttachment(GlobalTableStore.class);
if (metadata == null) {
throw new TeiidComponentException(QueryPlugin.Util.getString("DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}", this.vdbName, this.vdbVersion)); //$NON-NLS-1$
@@ -355,13 +356,14 @@
if (startAutoWrapTxn) {
try {
- tc = transactionService.begin(tc);
+ transactionService.begin(tc);
} catch (XATransactionException err) {
throw new TeiidComponentException(err);
}
}
}
+ tc.setIsolationLevel(requestMsg.getTransactionIsolation());
this.transactionContext = tc;
this.processor = new QueryProcessor(processPlan, context, bufferManager, processorDataManager);
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -38,6 +38,7 @@
import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.Assertion;
import org.teiid.core.util.EquivalenceUtil;
import org.teiid.core.util.HashCodeUtil;
import org.teiid.logging.LogConstants;
@@ -238,6 +239,7 @@
}
public CacheID(ParseInfo pi, String sql, String vdbName, int vdbVersion, String sessionId, String userName){
+ Assertion.isNotNull(sql);
this.sql = sql;
this.vdbInfo = new VDBKey(vdbName, vdbVersion);
this.pi = pi;
@@ -285,10 +287,6 @@
return true;
}
- public String getSql() {
- return sql;
- }
-
void setUserName(String name) {
this.userName = name;
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -462,31 +462,28 @@
/**
* Request level transaction
*/
- public TransactionContext begin(TransactionContext context) throws XATransactionException{
+ public void begin(TransactionContext context) throws XATransactionException{
if (context.getTransactionType() != TransactionContext.Scope.NONE) {
throw new XATransactionException(QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
}
beginDirect(context);
context.setTransactionType(TransactionContext.Scope.REQUEST);
- return context;
}
/**
* Request level transaction
*/
- public TransactionContext commit(TransactionContext context) throws XATransactionException {
+ public void commit(TransactionContext context) throws XATransactionException {
Assertion.assertTrue(context.getTransactionType() == TransactionContext.Scope.REQUEST);
commitDirect(context);
- return context;
}
/**
* Request level transaction
*/
- public TransactionContext rollback(TransactionContext context) throws XATransactionException {
+ public void rollback(TransactionContext context) throws XATransactionException {
Assertion.assertTrue(context.getTransactionType() == TransactionContext.Scope.REQUEST);
rollbackDirect(context);
- return context;
}
public void cancelTransactions(String threadId, boolean requestOnly) throws XATransactionException {
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/service/SessionService.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/service/SessionService.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/service/SessionService.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -23,7 +23,6 @@
package org.teiid.dqp.service;
import java.util.Collection;
-import java.util.List;
import java.util.Properties;
import javax.security.auth.Subject;
@@ -149,5 +148,5 @@
String getKrb5SecurityDomain();
- void assosiateSubjectInContext(String securityDomain, Subject subject);
+ void associateSubjectInContext(String securityDomain, Subject subject);
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionContext.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionContext.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionContext.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -46,7 +46,16 @@
private long creationTime;
private Transaction transaction;
private Set<String> suspendedBy = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
+ private int isolationLevel;
+
+ public int getIsolationLevel() {
+ return isolationLevel;
+ }
+ public void setIsolationLevel(int isolationLevel) {
+ this.isolationLevel = isolationLevel;
+ }
+
public long getCreationTime() {
return creationTime;
}
Modified: branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionService.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionService.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/dqp/service/TransactionService.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -40,11 +40,11 @@
public interface TransactionService {
// processor level methods
- TransactionContext begin(TransactionContext context) throws XATransactionException;
+ void begin(TransactionContext context) throws XATransactionException;
- TransactionContext commit(TransactionContext context) throws XATransactionException;
+ void commit(TransactionContext context) throws XATransactionException;
- TransactionContext rollback(TransactionContext context) throws XATransactionException;
+ void rollback(TransactionContext context) throws XATransactionException;
TransactionContext getOrCreateTransactionContext(String threadId);
Copied: branches/as7/engine/src/main/java/org/teiid/query/ObjectReplicator.java (from rev 3450, trunk/engine/src/main/java/org/teiid/query/ObjectReplicator.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/ObjectReplicator.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/query/ObjectReplicator.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+public interface ObjectReplicator {
+
+ public <T, S> T replicate(String id, Class<T> iface, S object, long startTimeout) throws Exception;
+
+ public void stop(Object o);
+
+}
Copied: branches/as7/engine/src/main/java/org/teiid/query/ReplicatedObject.java (from rev 3450, trunk/engine/src/main/java/org/teiid/query/ReplicatedObject.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/ReplicatedObject.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/query/ReplicatedObject.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,78 @@
+/*
+ * 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;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.util.Collection;
+
+/**
+ * Optional interface to be implemented by a replicated object to support full and partial state transfer.
+ *
+ */
+public interface ReplicatedObject {
+
+ /**
+ * Allows an application to write a state through a provided OutputStream.
+ *
+ * @param ostream the OutputStream
+ */
+ void getState(OutputStream ostream);
+
+ /**
+ * Allows an application to write a partial state through a provided OutputStream.
+ *
+ * @param state_id id of the partial state requested
+ * @param ostream the OutputStream
+ */
+ void getState(String state_id, OutputStream ostream);
+
+ /**
+ * Allows an application to read a state through a provided InputStream.
+ *
+ * @param istream the InputStream
+ */
+ void setState(InputStream istream);
+
+ /**
+ * Allows an application to read a partial state through a provided InputStream.
+ *
+ * @param state_id id of the partial state requested
+ * @param istream the InputStream
+ */
+ void setState(String state_id, InputStream istream);
+
+ /**
+ * Allows the replicator to set the local address from the channel
+ * @param address
+ */
+ void setLocalAddress(Serializable address);
+
+ /**
+ * Called when members are dropped
+ * @param addresses
+ */
+ void droppedMembers(Collection<Serializable> addresses);
+
+}
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/capabilities/SourceCapabilities.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -25,6 +25,7 @@
public interface SourceCapabilities {
public enum Capability {
+
/**
* Support indicates connector can accept queries with SELECT DISTINCT
*/
@@ -38,7 +39,7 @@
*
* @since 3.1 SP2
*/
- QUERY_FROM_GROUP_ALIAS,
+ QUERY_FROM_GROUP_ALIAS("TableAlias"), //$NON-NLS-1$
/**
* Max number of groups appearing in a from clause
*/
@@ -64,7 +65,7 @@
*
* @since 3.1 SP2
*/
- QUERY_FROM_JOIN_SELFJOIN,
+ QUERY_FROM_JOIN_SELFJOIN("SelfJoins"), //$NON-NLS-1$
/**
* Support indicates connector can accept right or left outer joins
*
@@ -76,7 +77,7 @@
*
* @since 4.1
*/
- QUERY_FROM_INLINE_VIEWS,
+ QUERY_FROM_INLINE_VIEWS("InlineViews"), //$NON-NLS-1$
/**
* Support indicates connector can accept full outer joins
*
@@ -101,13 +102,13 @@
*
* @since 3.1 SP2
*/
- CRITERIA_LIKE,
+ CRITERIA_LIKE("LikeCriteria"), //$NON-NLS-1$
/**
* Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char) - CURRENTLY NOT USED
*
* @since 3.1 SP2
*/
- CRITERIA_LIKE_ESCAPE,
+ CRITERIA_LIKE_ESCAPE("LikeCriteriaEscapeCharacter"), //$NON-NLS-1$
/**
* Support indicates connector accepts criteria of form (element IN set)
*
@@ -226,7 +227,7 @@
*
* @since 3.1 SP2
*/
- QUERY_AGGREGATES_DISTINCT,
+ QUERY_AGGREGATES_DISTINCT("AggregatesDistinct"),
/**
* Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clauses
*
@@ -321,12 +322,29 @@
INSERT_WITH_ITERATOR,
COMMON_TABLE_EXPRESSIONS,
MAX_DEPENDENT_PREDICATES,
- ADVANCED_OLAP,
+ ADVANCED_OLAP("AdvancedOLAP"), //$NON-NLS-1$
QUERY_AGGREGATES_ARRAY,
- ELEMENTARY_OLAP,
- WINDOW_FUNCTION_ORDER_BY_AGGREGATES,
+ ELEMENTARY_OLAP("ElementaryOLAP"), //$NON-NLS-1$
+ WINDOW_FUNCTION_ORDER_BY_AGGREGATES("WindowOrderByAggregates"), //$NON-NLS-1$
CRITERIA_SIMILAR,
- CRITERIA_LIKE_REGEX
+ CRITERIA_LIKE_REGEX,
+ WINDOW_FUNCTION_DISTINCT_AGGREGATES("WindowDistinctAggregates"); //$NON-NLS-1$
+
+
+ private final String toString;
+
+ Capability(String toString) {
+ this.toString = toString;
+ }
+
+ Capability() {
+ this.toString = name();
+ }
+
+ public String toString() {
+ return toString;
+ }
+
}
public enum Scope {
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1216,7 +1216,7 @@
CacheHint hint = null;
boolean isImplicitGlobal = matMetadataId == null;
if (isImplicitGlobal) {
- TempMetadataID tid = context.getGlobalTableStore().getGlobalTempTableMetadataId(metadataID, metadata);
+ TempMetadataID tid = context.getGlobalTableStore().getGlobalTempTableMetadataId(metadataID);
matTableName = tid.getID();
hint = tid.getCacheHint();
if (hint != null) {
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-3382
+ /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
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeEditor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeEditor.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/NodeEditor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -54,6 +54,9 @@
}
public static final PlanNode findNodePreOrder(PlanNode root, int types, int stopTypes) {
+ if (root == null) {
+ return null;
+ }
if((types & root.getType()) == root.getType()) {
return root;
} else if((stopTypes & root.getType()) == root.getType()) {
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -30,6 +30,7 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.language.SortSpecification.NullOrdering;
import org.teiid.metadata.Schema;
import org.teiid.query.function.FunctionLibrary;
import org.teiid.query.metadata.QueryMetadataInterface;
@@ -38,6 +39,7 @@
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
import org.teiid.query.sql.LanguageObject;
import org.teiid.query.sql.lang.JoinType;
+import org.teiid.query.sql.lang.OrderByItem;
import org.teiid.query.sql.lang.SetQuery.Operation;
import org.teiid.query.sql.symbol.AggregateSymbol;
import org.teiid.query.sql.symbol.Constant;
@@ -462,4 +464,35 @@
}
return true;
}
+
+ static boolean supportsNullOrdering(QueryMetadataInterface metadata,
+ CapabilitiesFinder capFinder, Object modelID, OrderByItem symbol)
+ throws QueryMetadataException, TeiidComponentException {
+ boolean supportsNullOrdering = CapabilitiesUtil.supports(Capability.QUERY_ORDERBY_NULL_ORDERING, modelID, metadata, capFinder);
+ NullOrder defaultNullOrder = CapabilitiesUtil.getDefaultNullOrder(modelID, metadata, capFinder);
+ if (symbol.getNullOrdering() != null) {
+ if (!supportsNullOrdering) {
+ if (symbol.getNullOrdering() == NullOrdering.FIRST) {
+ if (defaultNullOrder != NullOrder.FIRST && !(symbol.isAscending() && defaultNullOrder == NullOrder.LOW)
+ && !(!symbol.isAscending() && defaultNullOrder == NullOrder.HIGH)) {
+ return false;
+ }
+ } else if (defaultNullOrder != NullOrder.LAST && !(symbol.isAscending() && defaultNullOrder == NullOrder.HIGH)
+ && !(!symbol.isAscending() && defaultNullOrder == NullOrder.LOW)) {
+ return false;
+ }
+ symbol.setNullOrdering(null);
+ }
+ } else if (supportsNullOrdering && defaultNullOrder != NullOrder.LOW) {
+ //try to match the expected default of low
+ if (symbol.isAscending()) {
+ if (defaultNullOrder != NullOrder.FIRST) {
+ symbol.setNullOrdering(NullOrdering.FIRST);
+ }
+ } else if (defaultNullOrder != NullOrder.LAST) {
+ symbol.setNullOrdering(NullOrdering.LAST);
+ }
+ }
+ return true;
+ }
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -51,6 +51,7 @@
import org.teiid.query.sql.lang.IsNullCriteria;
import org.teiid.query.sql.lang.MatchCriteria;
import org.teiid.query.sql.lang.NotCriteria;
+import org.teiid.query.sql.lang.OrderByItem;
import org.teiid.query.sql.lang.Query;
import org.teiid.query.sql.lang.QueryCommand;
import org.teiid.query.sql.lang.SetCriteria;
@@ -176,8 +177,36 @@
markInvalid(windowFunction, "Window function order by with aggregate not supported by source"); //$NON-NLS-1$
return;
}
+ if (!this.caps.supportsCapability(Capability.WINDOW_FUNCTION_DISTINCT_AGGREGATES)
+ && windowFunction.getFunction().isDistinct()) {
+ markInvalid(windowFunction, "Window function distinct aggregate not supported by source"); //$NON-NLS-1$
+ return;
+ }
+ try {
+ if (!CapabilitiesUtil.checkElementsAreSearchable(windowFunction.getWindowSpecification().getPartition(), metadata, SupportConstants.Element.SEARCHABLE_COMPARE)) {
+ markInvalid(windowFunction, "not all source columns support search type"); //$NON-NLS-1$
+ }
+ } catch(QueryMetadataException e) {
+ handleException(new TeiidComponentException(e));
+ } catch(TeiidComponentException e) {
+ handleException(e);
+ }
}
+ @Override
+ public void visit(OrderByItem obj) {
+ try {
+ checkElementsAreSearchable(obj.getSymbol(), SupportConstants.Element.SEARCHABLE_COMPARE);
+ if (!CapabilitiesUtil.supportsNullOrdering(this.metadata, this.capFinder, this.modelID, obj)) {
+ markInvalid(obj, "Desired null ordering is not supported by source"); //$NON-NLS-1$
+ }
+ } catch(QueryMetadataException e) {
+ handleException(new TeiidComponentException(e));
+ } catch(TeiidComponentException e) {
+ handleException(e);
+ }
+ }
+
public void visit(CaseExpression obj) {
if(! this.caps.supportsCapability(Capability.QUERY_CASE)) {
markInvalid(obj, "CaseExpression pushdown not supported by source"); //$NON-NLS-1$
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -223,7 +223,7 @@
PlanNode sortNode = createSortNode(new ArrayList<SingleElementSymbol>(orderSymbols), outputSymbols);
boolean distinct = false;
- if (sourceNode.getType() == NodeConstants.Types.SOURCE && outputSymbols.size() == expressions.size() && outputSymbols.containsAll(expressions)) {
+ if (sourceNode.getFirstChild() != null && sourceNode.getType() == NodeConstants.Types.SOURCE && outputSymbols.size() == expressions.size() && outputSymbols.containsAll(expressions)) {
PlanNode setOp = NodeEditor.findNodePreOrder(sourceNode.getFirstChild(), NodeConstants.Types.SET_OP, NodeConstants.Types.SOURCE);
if (setOp != null) {
if (setOp.hasBooleanProperty(NodeConstants.Info.USE_ALL)) {
Modified: branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -466,7 +466,9 @@
}
JoinType jt = (JoinType)root.getProperty(NodeConstants.Info.JOIN_TYPE);
- boolean treatJoinAsSource = jt.isOuter() || root.getProperty(NodeConstants.Info.ACCESS_PATTERNS) != null || root.hasProperty(NodeConstants.Info.MAKE_DEP) || root.hasProperty(NodeConstants.Info.MAKE_IND);
+ boolean treatJoinAsSource = jt.isOuter() || root.getProperty(NodeConstants.Info.ACCESS_PATTERNS) != null
+ || root.hasProperty(NodeConstants.Info.MAKE_DEP) || root.hasProperty(NodeConstants.Info.MAKE_IND)
+ || !root.getExportedCorrelatedReferences().isEmpty();
if (treatJoinAsSource) {
currentRegion.addJoinSourceNode(root);
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -32,7 +32,6 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
-import org.teiid.language.SortSpecification.NullOrdering;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
@@ -58,7 +57,6 @@
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.util.CommandContext;
-import org.teiid.translator.ExecutionFactory.NullOrder;
import org.teiid.translator.ExecutionFactory.SupportedJoinCriteria;
@@ -356,30 +354,8 @@
if(! canPushSymbol(symbol.getSymbol(), true, modelID, metadata, capFinder, record)) {
return false;
}
- boolean supportsNullOrdering = CapabilitiesUtil.supports(Capability.QUERY_ORDERBY_NULL_ORDERING, modelID, metadata, capFinder);
- NullOrder defaultNullOrder = CapabilitiesUtil.getDefaultNullOrder(modelID, metadata, capFinder);
- if (symbol.getNullOrdering() != null) {
- if (!supportsNullOrdering) {
- if (symbol.getNullOrdering() == NullOrdering.FIRST) {
- if (defaultNullOrder != NullOrder.FIRST && !(symbol.isAscending() && defaultNullOrder == NullOrder.LOW)
- && !(!symbol.isAscending() && defaultNullOrder == NullOrder.HIGH)) {
- return false;
- }
- } else if (defaultNullOrder != NullOrder.LAST && !(symbol.isAscending() && defaultNullOrder == NullOrder.HIGH)
- && !(!symbol.isAscending() && defaultNullOrder == NullOrder.LOW)) {
- return false;
- }
- symbol.setNullOrdering(null);
- }
- } else if (supportsNullOrdering && defaultNullOrder != NullOrder.LOW) {
- //try to match the expected default of low
- if (symbol.isAscending()) {
- if (defaultNullOrder != NullOrder.FIRST) {
- symbol.setNullOrdering(NullOrdering.FIRST);
- }
- } else if (defaultNullOrder != NullOrder.LAST) {
- symbol.setNullOrdering(NullOrdering.LAST);
- }
+ if (!CapabilitiesUtil.supportsNullOrdering(metadata, capFinder, modelID, symbol)) {
+ return false;
}
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/BatchCollector.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/BatchCollector.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/BatchCollector.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -120,11 +120,12 @@
private TupleBuffer buffer;
private boolean forwardOnly;
- public BatchCollector(BatchProducer sourceNode, BufferManager bm, CommandContext context, boolean fowardOnly) throws TeiidComponentException {
+ public BatchCollector(BatchProducer sourceNode, BufferManager bm, CommandContext context, boolean forwardOnly) throws TeiidComponentException {
this.sourceNode = sourceNode;
+ this.forwardOnly = forwardOnly;
if (!this.sourceNode.hasFinalBuffer()) {
this.buffer = bm.createTupleBuffer(sourceNode.getOutputElements(), context.getConnectionID(), TupleSourceType.PROCESSOR);
- this.buffer.setForwardOnly(fowardOnly);
+ this.buffer.setForwardOnly(forwardOnly);
}
}
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-3382
+ /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
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/proc/Program.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/proc/Program.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/proc/Program.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -29,6 +29,7 @@
import org.teiid.query.processor.ProcessorPlan;
import org.teiid.query.sql.proc.Statement.Labeled;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
/**
@@ -113,7 +114,7 @@
*/
public void reset(String sessionId){
counter = 0;
- this.tempTables = new TempTableStore(sessionId);
+ this.tempTables = new TempTableStore(sessionId, TransactionMode.ISOLATE_WRITES);
this.startedTxn = false;
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/GroupingNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -39,7 +39,6 @@
import org.teiid.common.buffer.TupleSource;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
-import org.teiid.language.SQLConstants.NonReserved;
import org.teiid.language.SortSpecification.NullOrdering;
import org.teiid.query.eval.Evaluator;
import org.teiid.query.function.aggregate.AggregateFunction;
@@ -235,12 +234,8 @@
functions[i] = new StatsFunction(function);
}
- if(aggSymbol.isDistinct() && !function.equals(NonReserved.MIN) && !function.equals(NonReserved.MAX)) {
- SortingFilter filter = new SortingFilter(functions[i], getBufferManager(), getConnectionID(), true);
- ElementSymbol element = new ElementSymbol("val"); //$NON-NLS-1$
- element.setType(inputType);
- filter.setElements(Arrays.asList(element));
- functions[i] = filter;
+ if(aggSymbol.isDistinct()) {
+ functions[i] = handleDistinct(functions[i], inputType, getBufferManager(), getConnectionID());
} else if (aggSymbol.getOrderBy() != null) { //handle the xmlagg case
int[] orderIndecies = new int[aggSymbol.getOrderBy().getOrderByItems().size()];
List<OrderByItem> orderByItems = new ArrayList<OrderByItem>(orderIndecies.length);
@@ -277,6 +272,14 @@
}
}
+ static SortingFilter handleDistinct(AggregateFunction af, Class<?> inputType, BufferManager bm, String cid) {
+ SortingFilter filter = new SortingFilter(af, bm, cid, true);
+ ElementSymbol element = new ElementSymbol("val"); //$NON-NLS-1$
+ element.setType(inputType);
+ filter.setElements(Arrays.asList(element));
+ return filter;
+ }
+
private int collectExpression(Expression ex) {
int index = this.collectedExpressions.indexOf(ex);
if(index == -1) {
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -46,7 +46,6 @@
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;
@@ -358,7 +357,7 @@
/**
* Helper method for all the node that will filter the elements needed for the next node.
*/
- public static int[] getProjectionIndexes(Map<SingleElementSymbol, Integer> tupleElements, List<? extends Expression> projectElements) {
+ public static int[] getProjectionIndexes(Map<? extends Expression, Integer> tupleElements, List<? extends Expression> projectElements) {
int[] result = new int[projectElements.size()];
int i = 0;
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNodeUtil.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNodeUtil.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalNodeUtil.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -108,6 +108,11 @@
}
return true;
}
+
+ if (query.hasAggregates() && query.getGroupBy() == null) {
+ return true;
+ }
+
break;
case Command.TYPE_INSERT:
Insert insert = (Insert) command;
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalPlan.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalPlan.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/RelationalPlan.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -46,6 +46,7 @@
import org.teiid.query.sql.lang.QueryCommand;
import org.teiid.query.sql.lang.WithQueryCommand;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
import org.teiid.query.util.CommandContext;
/**
@@ -87,7 +88,7 @@
public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) {
if (this.with != null) {
context = context.clone();
- tempTableStore = new TempTableStore(context.getConnectionID());
+ tempTableStore = new TempTableStore(context.getConnectionID(), TransactionMode.NONE);
tempTableStore.setParentTempTableStore(context.getTempTableStore());
context.setTempTableStore(tempTableStore);
for (WithQueryCommand withCommand : this.with) {
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortNode.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -133,7 +133,9 @@
public void closeDirect() {
if(this.output != null) {
- this.output.remove();
+ if (!usingOutput) {
+ this.output.remove();
+ }
this.output = null;
}
this.outputTs = null;
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -50,6 +50,8 @@
/**
* Implements several modes of a multi-pass sort.
+ *
+ * TODO: could consider using an index for dup_removal and maintaining a separate output buffer
*/
public class SortUtility {
@@ -324,7 +326,7 @@
while (sublists.size() > 0) {
SortedSublist sortedSublist = sublists.remove(sublists.size() - 1);
merged.addTuple(sortedSublist.tuple);
- if (this.output != null && sortedSublist.index > masterSortIndex) {
+ if (this.output != null && masterSortIndex < maxSortIndex && sortedSublist.index != masterSortIndex) {
this.output.addTuple(sortedSublist.tuple); //a new distinct row
}
incrementWorkingTuple(sublists, sortedSublist);
@@ -339,7 +341,7 @@
}
merged.saveBatch();
this.activeTupleBuffers.add(merged);
- masterSortIndex = masterSortIndex - maxSortIndex + 1;
+ masterSortIndex = masterSortIndex - maxSortIndex;
if (masterSortIndex < 0) {
masterSortIndex = this.activeTupleBuffers.size() - 1;
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -181,14 +181,16 @@
index = nameIndexes.get(col.getName());
}
if (index >= vals.size()) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.no_value", col.getName(), textLine, systemId)); //$NON-NLS-1$
+ //throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.no_value", col.getName(), textLine, systemId)); //$NON-NLS-1$
+ tuple.add(null);
+ } else {
+ val = vals.get(index);
+ try {
+ tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
+ } catch (TransformationException e) {
+ throw new TeiidProcessingException(e, QueryPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
+ }
}
- val = vals.get(index);
- try {
- tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
- } catch (TransformationException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
- }
}
addBatchRow(tuple);
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/WindowFunctionProjectNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/WindowFunctionProjectNode.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/WindowFunctionProjectNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -462,6 +462,10 @@
af = new StatsFunction(function);
}
+ if(aggSymbol.isDistinct()) {
+ af = GroupingNode.handleDistinct(af, inputType, getBufferManager(), getConnectionID());
+ }
+
af.setExpressionIndex(wfi.expressionIndex);
af.setConditionIndex(wfi.conditionIndex);
af.initialize(outputType, inputType);
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -95,7 +95,9 @@
public void closeDirect() {
super.closeDirect();
if(this.buffer != null) {
- this.buffer.remove();
+ if (!usingOutput) {
+ this.buffer.remove();
+ }
this.buffer = null;
}
reset();
Modified: branches/as7/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -60,6 +60,7 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
import org.teiid.query.util.CommandContext;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
@@ -110,7 +111,7 @@
public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) {
context = context.clone();
setContext(context);
- TempTableStore tempTableStore = new TempTableStore(context.getConnectionID());
+ TempTableStore tempTableStore = new TempTableStore(context.getConnectionID(), TransactionMode.NONE);
tempTableStore.setParentTempTableStore(context.getTempTableStore());
context.setTempTableStore(tempTableStore);
this.dataMgr = dataMgr;
Modified: branches/as7/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -2256,9 +2256,13 @@
expression.setAggregateFunction(Type.MAX);
}
}
- if ((expression.getAggregateFunction() == Type.MAX || expression.getAggregateFunction() == Type.MIN)
- && rewriteAggs && expression.getExpression() != null && EvaluatableVisitor.willBecomeConstant(expression.getExpression())) {
- return expression.getExpression();
+ if ((expression.getAggregateFunction() == Type.MAX || expression.getAggregateFunction() == Type.MIN)) {
+ if (expression.isDistinct()) {
+ expression.setDistinct(false);
+ }
+ if (rewriteAggs && expression.getExpression() != null && EvaluatableVisitor.willBecomeConstant(expression.getExpression())) {
+ return expression.getExpression();
+ }
}
if (expression.getExpression() != null && expression.getCondition() != null && !expression.respectsNulls()) {
Expression cond = expression.getCondition();
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-3382
+ /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
Modified: branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/AggregateSymbol.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/AggregateSymbol.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/sql/symbol/AggregateSymbol.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -156,6 +156,10 @@
public boolean isDistinct() {
return this.distinct;
}
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
/**
* Get the type of the symbol, which depends on the aggregate function and the
Modified: branches/as7/engine/src/main/java/org/teiid/query/tempdata/AlterTempTable.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/tempdata/AlterTempTable.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/AlterTempTable.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,12 +1,3 @@
-package org.teiid.query.tempdata;
-
-import java.util.List;
-
-import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.sql.lang.Command;
-import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.sql.symbol.SingleElementSymbol;
-
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
@@ -29,6 +20,15 @@
* 02110-1301 USA.
*/
+package org.teiid.query.tempdata;
+
+import java.util.List;
+
+import org.teiid.query.sql.LanguageVisitor;
+import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.SingleElementSymbol;
+
public class AlterTempTable extends Command {
private String tempTable;
Copied: branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStore.java (from rev 3450, trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStore.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStore.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStore.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,68 @@
+/*
+ * 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.tempdata;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.teiid.Replicated;
+import org.teiid.api.exception.query.QueryMetadataException;
+import org.teiid.api.exception.query.QueryResolverException;
+import org.teiid.api.exception.query.QueryValidatorException;
+import org.teiid.core.TeiidComponentException;
+import org.teiid.core.TeiidProcessingException;
+import org.teiid.query.metadata.TempMetadataID;
+import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.tempdata.GlobalTableStoreImpl.MatTableInfo;
+
+public interface GlobalTableStore {
+
+ TempMetadataID getGlobalTempTableMetadataId(Object groupID) throws QueryMetadataException, TeiidComponentException, QueryResolverException, QueryValidatorException;
+
+ TempMetadataID getCodeTableMetadataId(String codeTableName,
+ String returnElementName, String keyElementName,
+ String matTableName) throws TeiidComponentException,
+ QueryMetadataException;
+
+ MatTableInfo getMatTableInfo(String matTableName);
+
+ TempTableStore getTempTableStore();
+
+ Serializable getLocalAddress();
+
+ List<?> updateMatViewRow(String matTableName, List<?> tuple, boolean delete) throws TeiidComponentException;
+
+ TempTable createMatTable(String tableName, GroupSymbol group)
+ throws TeiidComponentException, QueryMetadataException, TeiidProcessingException;
+
+ @Replicated
+ void failedLoad(String matTableName);
+
+ @Replicated(asynch=false, timeout=5000)
+ boolean needsLoading(String matTableName, Serializable loadingAddress,
+ boolean firstPass, boolean refresh, boolean invalidate);
+
+ @Replicated(replicateState=true)
+ void loaded(String matTableName, TempTable table);
+
+}
Copied: branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java (from rev 3450, trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java)
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java (rev 0)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,488 @@
+/*
+ * 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.tempdata;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.teiid.api.exception.query.QueryMetadataException;
+import org.teiid.api.exception.query.QueryResolverException;
+import org.teiid.api.exception.query.QueryValidatorException;
+import org.teiid.common.buffer.BufferManager;
+import org.teiid.core.TeiidComponentException;
+import org.teiid.core.TeiidProcessingException;
+import org.teiid.core.TeiidRuntimeException;
+import org.teiid.core.types.DataTypeManager;
+import org.teiid.language.SQLConstants;
+import org.teiid.language.SQLConstants.Reserved;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.query.ReplicatedObject;
+import org.teiid.query.mapping.relational.QueryNode;
+import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.metadata.TempMetadataAdapter;
+import org.teiid.query.metadata.TempMetadataID;
+import org.teiid.query.metadata.TempMetadataStore;
+import org.teiid.query.optimizer.relational.RelationalPlanner;
+import org.teiid.query.resolver.QueryResolver;
+import org.teiid.query.resolver.util.ResolverUtil;
+import org.teiid.query.sql.lang.CacheHint;
+import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.lang.Create;
+import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
+
+public class GlobalTableStoreImpl implements GlobalTableStore, ReplicatedObject {
+
+ public enum MatState {
+ NEEDS_LOADING,
+ LOADING,
+ FAILED_LOAD,
+ LOADED
+ }
+
+ public class MatTableInfo {
+ private long updateTime = -1;
+ private MatState state = MatState.NEEDS_LOADING;
+ private Serializable loadingAddress;
+ private long ttl = -1;
+ private boolean valid;
+
+ protected MatTableInfo() {}
+
+ private synchronized boolean shouldLoad(Serializable possibleLoadingAddress, boolean firstPass, boolean refresh, boolean invalidate) {
+ if (invalidate) {
+ LogManager.logDetail(LogConstants.CTX_MATVIEWS, this, "invalidating"); //$NON-NLS-1$
+ valid = false;
+ }
+ switch (state) {
+ case NEEDS_LOADING:
+ case FAILED_LOAD:
+ if (!firstPass) {
+ this.loadingAddress = possibleLoadingAddress;
+ setState(MatState.LOADING, null);
+ }
+ return true;
+ case LOADING:
+ if (!firstPass && localAddress instanceof Comparable<?> && ((Comparable)localAddress).compareTo(possibleLoadingAddress) < 0) {
+ this.loadingAddress = possibleLoadingAddress; //ties go to the lowest address
+ return true;
+ }
+ return false;
+ case LOADED:
+ if (!firstPass
+ || refresh
+ || ttl >= 0 && System.currentTimeMillis() - updateTime - ttl > 0) {
+ if (firstPass) {
+ setState(MatState.NEEDS_LOADING, null);
+ } else {
+ this.loadingAddress = possibleLoadingAddress;
+ setState(MatState.LOADING, null);
+ }
+ return true;
+ }
+ return false;
+ }
+ throw new AssertionError();
+ }
+
+ private synchronized void setState(MatState state, Boolean valid) {
+ MatState oldState = this.state;
+ long timestamp = System.currentTimeMillis();
+ LogManager.logDetail(LogConstants.CTX_MATVIEWS, this, "setting matState to", state, valid, timestamp, "old values", oldState, this.valid); //$NON-NLS-1$ //$NON-NLS-2$
+ if (valid != null) {
+ this.valid = valid;
+ }
+ this.state = state;
+ this.updateTime = System.currentTimeMillis();
+ notifyAll();
+ }
+
+ public synchronized void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public synchronized long getUpdateTime() {
+ return updateTime;
+ }
+
+ public synchronized MatState getState() {
+ return state;
+ }
+
+ public synchronized boolean isUpToDate() {
+ return isValid() && (ttl < 0 || System.currentTimeMillis() - updateTime - ttl <= 0);
+ }
+
+ public synchronized boolean isValid() {
+ return valid;
+ }
+
+ public synchronized long getTtl() {
+ return ttl;
+ }
+
+ }
+
+ private ConcurrentHashMap<String, MatTableInfo> matTables = new ConcurrentHashMap<String, MatTableInfo>();
+ private TempTableStore tableStore = new TempTableStore("SYSTEM", TransactionMode.ISOLATE_READS); //$NON-NLS-1$
+ private BufferManager bufferManager;
+ private QueryMetadataInterface metadata;
+ private Serializable localAddress;
+
+ public GlobalTableStoreImpl(BufferManager bufferManager, QueryMetadataInterface metadata) {
+ this.bufferManager = bufferManager;
+ this.metadata = new TempMetadataAdapter(metadata, new TempMetadataStore());
+ }
+
+ public synchronized MatTableInfo getMatTableInfo(final String tableName) {
+ MatTableInfo info = matTables.get(tableName);
+ if (info == null) {
+ info = new MatTableInfo();
+ matTables.put(tableName, info);
+ }
+ return info;
+ }
+
+ @Override
+ public void failedLoad(String matTableName) {
+ MatTableInfo info = getMatTableInfo(matTableName);
+ synchronized (info) {
+ if (info.state != MatState.LOADED) {
+ info.setState(MatState.FAILED_LOAD, null);
+ }
+ }
+ }
+
+ @Override
+ public boolean needsLoading(String matTableName, Serializable loadingAddress, boolean firstPass, boolean refresh, boolean invalidate) {
+ MatTableInfo info = getMatTableInfo(matTableName);
+ return info.shouldLoad(loadingAddress, firstPass, refresh, invalidate);
+ }
+
+ @Override
+ public TempMetadataID getGlobalTempTableMetadataId(Object viewId)
+ throws QueryMetadataException, TeiidComponentException, QueryResolverException, QueryValidatorException {
+ String matViewName = metadata.getFullName(viewId);
+ String matTableName = RelationalPlanner.MAT_PREFIX+matViewName.toUpperCase();
+ GroupSymbol group = new GroupSymbol(matViewName);
+ group.setMetadataID(viewId);
+ TempMetadataID id = tableStore.getMetadataStore().getTempGroupID(matTableName);
+ //define the table preserving the key/index information and ensure that only a single instance exists
+ if (id == null) {
+ synchronized (viewId) {
+ id = tableStore.getMetadataStore().getTempGroupID(matTableName);
+ if (id == null) {
+ id = tableStore.getMetadataStore().addTempGroup(matTableName, ResolverUtil.resolveElementsInGroup(group, metadata), false, true);
+ id.setQueryNode(metadata.getVirtualPlan(viewId));
+ id.setCardinality(metadata.getCardinality(viewId));
+ id.setOriginalMetadataID(viewId);
+
+ Object pk = metadata.getPrimaryKey(viewId);
+ if (pk != null) {
+ ArrayList<TempMetadataID> primaryKey = resolveIndex(metadata, id, pk);
+ id.setPrimaryKey(primaryKey);
+ }
+ Collection keys = metadata.getUniqueKeysInGroup(viewId);
+ for (Object key : keys) {
+ id.addUniqueKey(resolveIndex(metadata, id, key));
+ }
+ Collection indexes = metadata.getIndexesInGroup(viewId);
+ for (Object index : indexes) {
+ id.addIndex(resolveIndex(metadata, id, index));
+ }
+ }
+ }
+ }
+ updateCacheHint(viewId, group, id);
+ return id;
+ }
+
+ @Override
+ public TempMetadataID getCodeTableMetadataId(
+ String codeTableName, String returnElementName,
+ String keyElementName, String matTableName) throws TeiidComponentException,
+ QueryMetadataException {
+ ElementSymbol keyElement = new ElementSymbol(matTableName + ElementSymbol.SEPARATOR + keyElementName);
+ ElementSymbol returnElement = new ElementSymbol(matTableName + ElementSymbol.SEPARATOR + returnElementName);
+ keyElement.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(metadata.getElementID(codeTableName + ElementSymbol.SEPARATOR + keyElementName))));
+ returnElement.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(metadata.getElementID(codeTableName + ElementSymbol.SEPARATOR + returnElementName))));
+ TempMetadataID id = this.getTempTableStore().getMetadataStore().getTempGroupID(matTableName);
+ if (id == null) {
+ synchronized (this) {
+ id = this.getTempTableStore().getMetadataStore().addTempGroup(matTableName, Arrays.asList(keyElement, returnElement), false, true);
+ String queryString = Reserved.SELECT + ' ' + keyElementName + " ," + returnElementName + ' ' + Reserved.FROM + ' ' + codeTableName; //$NON-NLS-1$
+ id.setQueryNode(new QueryNode(queryString));
+ id.setPrimaryKey(id.getElements().subList(0, 1));
+ CacheHint hint = new CacheHint(true, null);
+ id.setCacheHint(hint);
+ }
+ }
+ return id;
+ }
+
+ private void updateCacheHint(Object viewId, GroupSymbol group,
+ TempMetadataID id) throws TeiidComponentException,
+ QueryMetadataException, QueryResolverException,
+ QueryValidatorException {
+ Command c = QueryResolver.resolveView(group, metadata.getVirtualPlan(viewId), SQLConstants.Reserved.SELECT, metadata).getCommand();
+ CacheHint hint = c.getCacheHint();
+ id.setCacheHint(hint);
+ }
+
+ static ArrayList<TempMetadataID> resolveIndex(
+ QueryMetadataInterface metadata, TempMetadataID id, Object pk)
+ throws TeiidComponentException, QueryMetadataException {
+ List cols = metadata.getElementIDsInKey(pk);
+ ArrayList<TempMetadataID> primaryKey = new ArrayList<TempMetadataID>(cols.size());
+ for (Object coldId : cols) {
+ int pos = metadata.getPosition(coldId) - 1;
+ primaryKey.add(id.getElements().get(pos));
+ }
+ return primaryKey;
+ }
+
+ @Override
+ public void loaded(String matTableName, TempTable table) {
+ swapTempTable(matTableName, table);
+ this.getMatTableInfo(matTableName).setState(MatState.LOADED, true);
+ }
+
+ private void swapTempTable(String tempTableName, TempTable tempTable) {
+ this.tableStore.getTempTables().put(tempTableName, tempTable);
+ }
+
+ @Override
+ public List<?> updateMatViewRow(String matTableName, List<?> tuple,
+ boolean delete) throws TeiidComponentException {
+ TempTable tempTable = tableStore.getTempTable(matTableName);
+ if (tempTable != null) {
+ TempMetadataID id = tableStore.getMetadataStore().getTempGroupID(matTableName);
+ synchronized (id) {
+ boolean clone = tempTable.getActiveReaders().get() != 0;
+ if (clone) {
+ tempTable = tempTable.clone();
+ }
+ List<?> result = tempTable.updateTuple(tuple, delete);
+ if (clone) {
+ swapTempTable(matTableName, tempTable);
+ }
+ return result;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public TempTableStore getTempTableStore() {
+ return this.tableStore;
+ }
+
+ @Override
+ public TempTable createMatTable(final String tableName, GroupSymbol group) throws TeiidComponentException,
+ QueryMetadataException, TeiidProcessingException {
+ Create create = new Create();
+ create.setTable(group);
+ List<ElementSymbol> allColumns = ResolverUtil.resolveElementsInGroup(group, metadata);
+ create.setElementSymbolsAsColumns(allColumns);
+ Object pk = metadata.getPrimaryKey(group.getMetadataID());
+ if (pk != null) {
+ List<ElementSymbol> pkColumns = resolveIndex(metadata, allColumns, pk);
+ create.getPrimaryKey().addAll(pkColumns);
+ }
+ TempTable table = getTempTableStore().addTempTable(tableName, create, bufferManager, false, null);
+ table.setUpdatable(false);
+ CacheHint hint = table.getCacheHint();
+ if (hint != null) {
+ table.setPreferMemory(hint.getPrefersMemory());
+ if (hint.getTtl() != null) {
+ getMatTableInfo(tableName).setTtl(hint.getTtl());
+ }
+ if (pk != null) {
+ table.setUpdatable(hint.isUpdatable());
+ }
+ }
+ return table;
+ }
+
+ /**
+ * Return a list of ElementSymbols for the given index/key object
+ */
+ public static List<ElementSymbol> resolveIndex(QueryMetadataInterface metadata, List<ElementSymbol> allColumns, Object pk)
+ throws TeiidComponentException, QueryMetadataException {
+ Collection<?> pkIds = metadata.getElementIDsInKey(pk);
+ List<ElementSymbol> pkColumns = new ArrayList<ElementSymbol>(pkIds.size());
+ for (Object col : pkIds) {
+ pkColumns.add(allColumns.get(metadata.getPosition(col)-1));
+ }
+ return pkColumns;
+ }
+
+ //begin replication methods
+
+ @Override
+ public void setLocalAddress(Serializable address) {
+ this.localAddress = address;
+ }
+
+ @Override
+ public Serializable getLocalAddress() {
+ return localAddress;
+ }
+
+ @Override
+ public void getState(OutputStream ostream) {
+ try {
+ ObjectOutputStream oos = new ObjectOutputStream(ostream);
+ for (Map.Entry<String, TempTable> entry : tableStore.getTempTables().entrySet()) {
+ sendTable(entry.getKey(), oos, true);
+ }
+ oos.writeObject(null);
+ oos.close();
+ } catch (IOException e) {
+ throw new TeiidRuntimeException(e);
+ } catch (TeiidComponentException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+
+ @Override
+ public void setState(InputStream istream) {
+ try {
+ ObjectInputStream ois = new ObjectInputStream(istream);
+ while (true) {
+ String tableName = (String)ois.readObject();
+ if (tableName == null) {
+ break;
+ }
+ loadTable(tableName, ois);
+ }
+ ois.close();
+ } catch (Exception e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+
+ @Override
+ public void getState(String stateId, OutputStream ostream) {
+ try {
+ ObjectOutputStream oos = new ObjectOutputStream(ostream);
+ sendTable(stateId, oos, false);
+ oos.close();
+ } catch (IOException e) {
+ throw new TeiidRuntimeException(e);
+ } catch (TeiidComponentException e) {
+ throw new TeiidRuntimeException(e);
+ }
+ }
+
+ private void sendTable(String stateId, ObjectOutputStream oos, boolean writeName)
+ throws IOException, TeiidComponentException {
+ TempTable tempTable = this.tableStore.getTempTable(stateId);
+ if (tempTable == null) {
+ return;
+ }
+ MatTableInfo info = getMatTableInfo(stateId);
+ if (!info.isValid()) {
+ return;
+ }
+ if (writeName) {
+ oos.writeObject(stateId);
+ }
+ oos.writeLong(info.updateTime);
+ oos.writeObject(info.loadingAddress);
+ oos.writeObject(info.state);
+ tempTable.writeTo(oos);
+ }
+
+ @Override
+ public void setState(String stateId, InputStream istream) {
+ try {
+ ObjectInputStream ois = new ObjectInputStream(istream);
+ loadTable(stateId, ois);
+ ois.close();
+ } catch (Exception e) {
+ MatTableInfo info = this.getMatTableInfo(stateId);
+ info.setState(MatState.FAILED_LOAD, null);
+ throw new TeiidRuntimeException(e);
+ }
+ }
+
+ private void loadTable(String stateId, ObjectInputStream ois)
+ throws TeiidComponentException, QueryMetadataException,
+ IOException,
+ ClassNotFoundException, TeiidProcessingException {
+ LogManager.logDetail(LogConstants.CTX_DQP, "loading table from remote stream", stateId); //$NON-NLS-1$
+ long updateTime = ois.readLong();
+ Serializable loadingAddress = (Serializable) ois.readObject();
+ MatState state = (MatState)ois.readObject();
+ GroupSymbol group = new GroupSymbol(stateId);
+ if (stateId.startsWith(RelationalPlanner.MAT_PREFIX)) {
+ String viewName = stateId.substring(RelationalPlanner.MAT_PREFIX.length());
+ Object viewId = this.metadata.getGroupID(viewName);
+ group.setMetadataID(getGlobalTempTableMetadataId(viewId));
+ } else {
+ String viewName = stateId.substring(TempTableDataManager.CODE_PREFIX.length());
+ int index = viewName.lastIndexOf('.');
+ String returnElementName = viewName.substring(index + 1);
+ viewName = viewName.substring(0, index);
+ index = viewName.lastIndexOf('.');
+ String keyElementName = viewName.substring(index + 1);
+ viewName = viewName.substring(0, index);
+ group.setMetadataID(getCodeTableMetadataId(viewName, returnElementName, keyElementName, stateId));
+ }
+ TempTable tempTable = this.createMatTable(stateId, group);
+ tempTable.readFrom(ois);
+ MatTableInfo info = this.getMatTableInfo(stateId);
+ synchronized (info) {
+ swapTempTable(stateId, tempTable);
+ info.setState(state, true);
+ info.updateTime = updateTime;
+ info.loadingAddress = loadingAddress;
+ }
+ }
+
+ @Override
+ public void droppedMembers(Collection<Serializable> addresses) {
+ for (MatTableInfo info : this.matTables.values()) {
+ synchronized (info) {
+ if (info.getState() == MatState.LOADING
+ && addresses.contains(info.loadingAddress)) {
+ info.setState(MatState.FAILED_LOAD, null);
+ }
+ }
+ }
+ }
+
+}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,6 +22,9 @@
package org.teiid.query.tempdata;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -48,6 +51,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
@@ -72,16 +76,16 @@
* TODO: in this implementation blocked exceptions will not happen
* allowing for subquery evaluation though would cause pauses
*/
-class TempTable {
+public class TempTable implements Cloneable {
private final class InsertUpdateProcessor extends UpdateProcessor {
private boolean addRowId;
private int[] indexes;
- private InsertUpdateProcessor(TupleSource ts, boolean addRowId, int[] indexes)
+ private InsertUpdateProcessor(TupleSource ts, boolean addRowId, int[] indexes, boolean canUndo)
throws TeiidComponentException {
- super(null, ts);
+ super(null, ts, canUndo);
this.addRowId = addRowId;
this.indexes = indexes;
}
@@ -114,14 +118,14 @@
currentTuple = tuple;
for (int i : notNull) {
if (tuple.get(i) == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTable.not_null", columns.get(i)));
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTable.not_null", columns.get(i))); //$NON-NLS-1$
}
}
insertTuple(tuple, addRowId);
}
@Override
- protected void undo(List tuple) throws TeiidComponentException,
+ protected void undo(List<?> tuple) throws TeiidComponentException,
TeiidProcessingException {
deleteTuple(tuple);
}
@@ -194,18 +198,20 @@
private abstract class UpdateProcessor {
private TupleSource ts;
- protected final Evaluator eval;
- private final Criteria crit;
+ protected Evaluator eval;
+ private Criteria crit;
protected int updateCount = 0;
protected List currentTuple;
protected TupleBuffer undoLog;
- UpdateProcessor(Criteria crit, TupleSource ts) throws TeiidComponentException {
+ UpdateProcessor(Criteria crit, TupleSource ts, boolean canUndo) throws TeiidComponentException {
this.ts = ts;
this.eval = new Evaluator(columnMap, null, null);
this.crit = crit;
- this.undoLog = bm.createTupleBuffer(columns, sessionID, TupleSourceType.PROCESSOR);
+ if (canUndo) {
+ this.undoLog = bm.createTupleBuffer(columns, sessionID, TupleSourceType.PROCESSOR);
+ }
}
int process() throws ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException {
@@ -218,7 +224,9 @@
if (crit == null || eval.evaluate(crit, currentTuple)) {
tuplePassed(currentTuple);
updateCount++;
- undoLog.addTuple(currentTuple);
+ if (undoLog != null) {
+ undoLog.addTuple(currentTuple);
+ }
}
currentTuple = null;
}
@@ -227,19 +235,21 @@
success();
success = true;
} finally {
- bm.releaseBuffers(reserved);
try {
- if (!success) {
+ if (!success && undoLog != null) {
undoLog.setFinal(true);
TupleSource undoTs = undoLog.createIndexedTupleSource();
List<?> tuple = null;
while ((tuple = undoTs.nextTuple()) != null) {
- undo(tuple);
+ try {
+ undo(tuple);
+ } catch (TeiidException e) {
+ LogManager.logError(LogConstants.CTX_DQP, e, e.getMessage());
+ }
}
}
- } catch (TeiidException e) {
- LogManager.logError(LogConstants.CTX_DQP, e, e.getMessage());
} finally {
+ bm.releaseBuffers(reserved);
if (!held) {
lock.writeLock().unlock();
}
@@ -254,15 +264,20 @@
protected abstract void tuplePassed(List tuple) throws BlockedException, TeiidComponentException, TeiidProcessingException;
- protected abstract void undo(List tuple) throws TeiidComponentException, TeiidProcessingException;
+ protected abstract void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException;
public void close() {
ts.closeSource();
- undoLog.remove();
+ ts = null;
+ if (undoLog != null) {
+ undoLog.remove();
+ }
}
}
+ private static AtomicInteger ID_GENERATOR = new AtomicInteger();
+ private int id = ID_GENERATOR.getAndIncrement();
private STree tree;
private AtomicInteger rowId;
private List<ElementSymbol> columns;
@@ -275,11 +290,13 @@
private int keyBatchSize;
private int leafBatchSize;
- private Map columnMap;
+ private Map<ElementSymbol, Integer> columnMap;
private List<Integer> notNull = new LinkedList<Integer>();
private Map<Integer, AtomicInteger> sequences;
private int uniqueColIndex;
+
+ private AtomicInteger activeReaders = new AtomicInteger();
TempTable(TempMetadataID tid, BufferManager bm, List<ElementSymbol> columns, int primaryKeyLength, String sessionID) {
this.tid = tid;
@@ -321,13 +338,49 @@
this.leafBatchSize = bm.getSchemaSize(columns.subList(0, primaryKeyLength));
}
+ public TempTable clone() {
+ lock.readLock().lock();
+ try {
+ TempTable clone = (TempTable) super.clone();
+ clone.lock = new ReentrantReadWriteLock();
+ if (clone.indexTables != null) {
+ clone.indexTables = new LinkedHashMap<List<ElementSymbol>, TempTable>(clone.indexTables);
+ for (Map.Entry<List<ElementSymbol>, TempTable> entry : clone.indexTables.entrySet()) {
+ TempTable indexClone = entry.getValue().clone();
+ indexClone.lock = clone.lock;
+ entry.setValue(indexClone);
+ }
+ }
+ clone.tree = tree.clone();
+ clone.activeReaders = new AtomicInteger();
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ throw new TeiidRuntimeException();
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ public AtomicInteger getActiveReaders() {
+ return activeReaders;
+ }
+
void addIndex(List<ElementSymbol> indexColumns, boolean unique) throws TeiidComponentException, TeiidProcessingException {
List<ElementSymbol> keyColumns = columns.subList(0, tree.getKeyLength());
if (keyColumns.equals(indexColumns) || (indexTables != null && indexTables.containsKey(indexColumns))) {
return;
}
+ TempTable indexTable = createIndexTable(indexColumns, unique);
+ //TODO: ordered insert optimization
+ TupleSource ts = createTupleSource(indexTable.getColumns(), null, null);
+ indexTable.insert(ts, indexTable.getColumns(), false);
+ indexTable.getTree().compact();
+ }
+
+ private TempTable createIndexTable(List<ElementSymbol> indexColumns,
+ boolean unique) {
List<ElementSymbol> allColumns = new ArrayList<ElementSymbol>(indexColumns);
- for (ElementSymbol elementSymbol : keyColumns) {
+ for (ElementSymbol elementSymbol : columns.subList(0, tree.getKeyLength())) {
if (allColumns.indexOf(elementSymbol) < 0) {
allColumns.add(elementSymbol);
}
@@ -342,10 +395,8 @@
indexTables = new LinkedHashMap<List<ElementSymbol>, TempTable>();
indexTables.put(indexColumns, indexTable);
}
- //TODO: ordered insert optimization
- TupleSource ts = createTupleSource(allColumns, null, null);
- indexTable.insert(ts, allColumns);
- indexTable.getTree().compact();
+ indexTable.setUpdatable(this.updatable);
+ return indexTable;
}
private int reserveBuffers() {
@@ -481,17 +532,22 @@
return tree.getRowCount();
}
- public int truncate() {
+ public int truncate(boolean force) {
this.tid.getTableData().dataModified(tree.getRowCount());
- return tree.truncate();
+ return tree.truncate(force);
}
public void remove() {
- tree.remove();
- if (this.indexTables != null) {
- for (TempTable indexTable : this.indexTables.values()) {
- indexTable.remove();
+ lock.writeLock().lock();
+ try {
+ tree.remove();
+ if (this.indexTables != null) {
+ for (TempTable indexTable : this.indexTables.values()) {
+ indexTable.remove();
+ }
}
+ } finally {
+ lock.writeLock().unlock();
}
}
@@ -502,7 +558,7 @@
return columns;
}
- public TupleSource insert(TupleSource tuples, final List<ElementSymbol> variables) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException {
+ public TupleSource insert(TupleSource tuples, final List<ElementSymbol> variables, boolean canUndo) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException {
List<ElementSymbol> cols = getColumns();
final int[] indexes = new int[cols.size()];
boolean shouldProject = false;
@@ -510,7 +566,7 @@
indexes[i] = variables.indexOf(cols.get(i));
shouldProject |= (indexes[i] != i);
}
- UpdateProcessor up = new InsertUpdateProcessor(tuples, rowId != null, shouldProject?indexes:null);
+ UpdateProcessor up = new InsertUpdateProcessor(tuples, rowId != null, shouldProject?indexes:null, canUndo);
int updateCount = up.process();
tid.setCardinality(tree.getRowCount());
tid.getTableData().dataModified(updateCount);
@@ -520,7 +576,7 @@
public TupleSource update(Criteria crit, final SetClauseList update) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException {
final boolean primaryKeyChangePossible = canChangePrimaryKey(update);
final TupleBrowser browser = createTupleBrower(crit, OrderBy.ASC);
- UpdateProcessor up = new UpdateProcessor(crit, browser) {
+ UpdateProcessor up = new UpdateProcessor(crit, browser, true) {
protected TupleBuffer changeSet;
protected UpdateProcessor changeSetProcessor;
@@ -531,7 +587,7 @@
BlockedException, TeiidComponentException {
List<Object> newTuple = new ArrayList<Object>(tuple);
for (Map.Entry<ElementSymbol, Expression> entry : update.getClauseMap().entrySet()) {
- newTuple.set((Integer)columnMap.get(entry.getKey()), eval.evaluate(entry.getValue(), tuple));
+ newTuple.set(columnMap.get(entry.getKey()), eval.evaluate(entry.getValue(), tuple));
}
if (primaryKeyChangePossible) {
browser.removed();
@@ -546,7 +602,7 @@
}
@Override
- protected void undo(List tuple) throws TeiidComponentException, TeiidProcessingException {
+ protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException {
if (primaryKeyChangePossible) {
insertTuple(tuple, false);
} else {
@@ -560,7 +616,7 @@
//changeSet contains possible updates
if (primaryKeyChangePossible) {
if (changeSetProcessor == null) {
- changeSetProcessor = new InsertUpdateProcessor(changeSet.createIndexedTupleSource(true), false, null);
+ changeSetProcessor = new InsertUpdateProcessor(changeSet.createIndexedTupleSource(true), false, null, true);
}
changeSetProcessor.process(); //when this returns, we're up to date
}
@@ -569,11 +625,10 @@
@Override
public void close() {
super.close();
- if (changeSetProcessor != null) {
- changeSetProcessor.close(); // causes a revert of the change set
- }
+ changeSetProcessor = null;
if (changeSet != null) {
changeSet.remove();
+ changeSet = null;
}
}
@@ -596,7 +651,7 @@
public TupleSource delete(Criteria crit) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException {
final TupleBrowser browser = createTupleBrower(crit, OrderBy.ASC);
- UpdateProcessor up = new UpdateProcessor(crit, browser) {
+ UpdateProcessor up = new UpdateProcessor(crit, browser, true) {
@Override
protected void tuplePassed(List tuple)
throws ExpressionEvaluationException,
@@ -606,7 +661,7 @@
}
@Override
- protected void undo(List tuple) throws TeiidComponentException, TeiidProcessingException {
+ protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException {
insertTuple(tuple, false);
}
};
@@ -628,6 +683,44 @@
}
}
+ void writeTo(ObjectOutputStream oos) throws TeiidComponentException, IOException {
+ this.lock.readLock().lock();
+ try {
+ this.tree.writeValuesTo(oos);
+ if (this.indexTables == null) {
+ oos.writeInt(0);
+ } else {
+ oos.writeInt(this.indexTables.size());
+ for (Map.Entry<List<ElementSymbol>, TempTable> entry : this.indexTables.entrySet()) {
+ oos.writeBoolean(entry.getValue().uniqueColIndex > 0);
+ oos.writeInt(entry.getKey().size());
+ for (ElementSymbol es : entry.getKey()) {
+ oos.writeInt(this.columnMap.get(es));
+ }
+ entry.getValue().writeTo(oos);
+ }
+ }
+ } finally {
+ this.lock.readLock().unlock();
+ }
+ }
+
+ void readFrom(ObjectInputStream ois) throws TeiidComponentException, IOException, ClassNotFoundException {
+ this.tree.readValuesFrom(ois);
+ int numIdx = ois.readInt();
+ for (int i = 0; i < numIdx; i++) {
+ boolean unique = ois.readBoolean();
+ int numCols = ois.readInt();
+ ArrayList<ElementSymbol> indexColumns = new ArrayList<ElementSymbol>(numCols);
+ for (int j = 0; j < numCols; j++) {
+ int colIndex = ois.readInt();
+ indexColumns.add(this.columns.get(colIndex));
+ }
+ TempTable tt = this.createIndexTable(indexColumns, unique);
+ tt.readFrom(ois);
+ }
+ }
+
List<?> updateTuple(List<?> tuple, boolean remove) throws TeiidComponentException {
try {
lock.writeLock().lock();
@@ -698,7 +791,7 @@
return tid.getID() + " (" + columns + ")\n"; //$NON-NLS-1$ //$NON-NLS-2$
}
- Map getColumnMap() {
+ Map<ElementSymbol, Integer> getColumnMap() {
return this.columnMap;
}
@@ -709,5 +802,26 @@
public TempMetadataID getMetadataId() {
return tid;
}
+
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public int hashCode() {
+ return id;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof TempTable)) {
+ return false;
+ }
+ TempTable other = (TempTable)obj;
+ return id == other.id;
+ }
}
\ No newline at end of file
Modified: branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,10 +22,8 @@
package org.teiid.query.tempdata;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
@@ -37,10 +35,6 @@
import org.teiid.api.exception.query.QueryProcessingException;
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.api.exception.query.QueryValidatorException;
-import org.teiid.cache.Cache;
-import org.teiid.cache.CacheConfiguration;
-import org.teiid.cache.CacheFactory;
-import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.common.buffer.BlockedException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.TupleBuffer;
@@ -49,7 +43,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
-import org.teiid.core.util.HashCodeUtil;
+import org.teiid.core.util.Assertion;
import org.teiid.core.util.StringUtil;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.SessionAwareCache;
@@ -62,8 +56,8 @@
import org.teiid.metadata.FunctionMethod.Determinism;
import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.Evaluator;
-import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.metadata.TempMetadataAdapter;
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.optimizer.relational.RelationalPlanner;
import org.teiid.query.parser.ParseInfo;
@@ -92,10 +86,8 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
-import org.teiid.query.tempdata.TempTableStore.MatState;
-import org.teiid.query.tempdata.TempTableStore.MatTableInfo;
+import org.teiid.query.tempdata.GlobalTableStoreImpl.MatTableInfo;
import org.teiid.query.util.CommandContext;
-import org.teiid.vdb.runtime.VDBKey;
/**
* This proxy ProcessorDataManager is used to handle temporary tables.
@@ -107,57 +99,21 @@
private static final String REFRESHMATVIEWROW = ".refreshmatviewrow"; //$NON-NLS-1$
private static final String REFRESHMATVIEW = ".refreshmatview"; //$NON-NLS-1$
- private static final String CODE_PREFIX = "#CODE_"; //$NON-NLS-1$
+ public static final String CODE_PREFIX = "#CODE_"; //$NON-NLS-1$
private ProcessorDataManager processorDataManager;
private BufferManager bufferManager;
private SessionAwareCache<CachedResults> cache;
private Executor executor;
- private static class MatTableKey implements Serializable {
- private static final long serialVersionUID = 5481692896572663992L;
- String name;
- VDBKey vdb;
-
- @Override
- public int hashCode() {
- return HashCodeUtil.hashCode(name.hashCode(), vdb);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof MatTableKey)) {
- return false;
- }
- MatTableKey other = (MatTableKey)obj;
- return this.name.equals(other.name) && this.vdb.equals(other.vdb);
- }
- }
-
- private static class MatTableEntry implements Serializable {
- private static final long serialVersionUID = 8559613701442751579L;
- long lastUpdate = System.currentTimeMillis();
- boolean valid;
- }
-
- private Cache<MatTableKey, MatTableEntry> tables;
- private SessionAwareCache<CachedResults> distributedCache;
private EventDistributor eventDistributor;
public TempTableDataManager(ProcessorDataManager processorDataManager, BufferManager bufferManager,
- Executor executor, SessionAwareCache<CachedResults> cache, SessionAwareCache<CachedResults> distibutedCache, CacheFactory cacheFactory){
+ Executor executor, SessionAwareCache<CachedResults> cache){
this.processorDataManager = processorDataManager;
this.bufferManager = bufferManager;
this.executor = executor;
this.cache = cache;
- this.distributedCache = distibutedCache;
- if (distibutedCache != null) {
- CacheConfiguration cc = new CacheConfiguration(Policy.LRU, -1, -1, "MaterializationUpdates"); //$NON-NLS-1$
- tables = cacheFactory.get(cc.getLocation(), cc);
- }
}
public void setEventDistributor(EventDistributor eventDistributor) {
@@ -185,6 +141,9 @@
TempTableStore contextStore = context.getTempTableStore();
if (command instanceof Query) {
Query query = (Query)command;
+ if (modelName != null && !modelName.equals(TempMetadataAdapter.TEMP_MODEL.getID())) {
+ return null;
+ }
return registerQuery(context, contextStore, query);
}
if (command instanceof ProcedureContainer) {
@@ -206,7 +165,7 @@
return null;
}
final String groupKey = group.getNonCorrelationName().toUpperCase();
- final TempTable table = contextStore.getOrCreateTempTable(groupKey, command, bufferManager, true);
+ final TempTable table = contextStore.getOrCreateTempTable(groupKey, command, bufferManager, true, true, context);
if (command instanceof Insert) {
Insert insert = (Insert)command;
TupleSource ts = insert.getTupleSource();
@@ -217,7 +176,7 @@
}
ts = new CollectionTupleSource(Arrays.asList(values).iterator());
}
- return table.insert(ts, insert.getVariables());
+ return table.insert(ts, insert.getVariables(), true);
}
if (command instanceof Update) {
final Update update = (Update)command;
@@ -228,8 +187,8 @@
final Delete delete = (Delete)command;
final Criteria crit = delete.getCriteria();
if (crit == null) {
- //because we are non-transactional, just use a truncate
- int rows = table.truncate();
+ //TODO: we'll add a real truncate later
+ int rows = table.truncate(false);
return CollectionTupleSource.createUpdateCountTupleSource(rows);
}
return table.delete(crit);
@@ -241,17 +200,18 @@
if (contextStore.hasTempTable(tempTableName)) {
throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableStore.table_exist_error", tempTableName));//$NON-NLS-1$
}
- contextStore.addTempTable(tempTableName, create, bufferManager, true);
+ contextStore.addTempTable(tempTableName, create, bufferManager, true, context);
return CollectionTupleSource.createUpdateCountTupleSource(0);
}
if (command instanceof Drop) {
String tempTableName = ((Drop)command).getTable().getCanonicalName();
- contextStore.removeTempTableByName(tempTableName);
+ contextStore.removeTempTableByName(tempTableName, context);
return CollectionTupleSource.createUpdateCountTupleSource(0);
}
if (command instanceof AlterTempTable) {
AlterTempTable att = (AlterTempTable)command;
- TempTable tt = contextStore.getOrCreateTempTable(att.getTempTable().toUpperCase(), command, bufferManager, true);
+ TempTable tt = contextStore.getTempTable(att.getTempTable().toUpperCase());
+ Assertion.isNotNull(tt, "Table doesn't exist"); //$NON-NLS-1$
tt.setUpdatable(false);
if (att.getIndexColumns() != null) {
tt.addIndex(att.getIndexColumns(), false);
@@ -316,37 +276,21 @@
QueryValidatorException, TeiidProcessingException,
ExpressionEvaluationException {
QueryMetadataInterface metadata = context.getMetadata();
- TempTableStore globalStore = context.getGlobalTableStore();
+ GlobalTableStore globalStore = context.getGlobalTableStore();
if (StringUtil.endsWithIgnoreCase(proc.getProcedureCallableName(), REFRESHMATVIEW)) {
Object groupID = validateMatView(metadata, (String)((Constant)proc.getParameter(1).getExpression()).getValue());
- Object matTableId = context.getGlobalTableStore().getGlobalTempTableMetadataId(groupID, metadata);
+ Object matTableId = globalStore.getGlobalTempTableMetadataId(groupID);
String matViewName = metadata.getFullName(groupID);
String matTableName = metadata.getFullName(matTableId);
LogManager.logDetail(LogConstants.CTX_MATVIEWS, "processing refreshmatview for", matViewName); //$NON-NLS-1$
- MatTableInfo info = globalStore.getMatTableInfo(matTableName);
- Long loadTime = null;
- boolean useCache = false;
- if (this.distributedCache != null) {
- MatTableKey key = new MatTableKey();
- key.name = matTableName;
- key.vdb = new VDBKey(context.getVdbName(),context.getVdbVersion());
- MatTableEntry entry = this.tables.get(key);
- useCache = (entry != null && entry.valid && entry.lastUpdate > info.getUpdateTime());
- if (useCache) {
- loadTime = entry.lastUpdate;
- }
- }
boolean invalidate = Boolean.TRUE.equals(((Constant)proc.getParameter(2).getExpression()).getValue());
- if (invalidate) {
- touchTable(context, matTableName, false, System.currentTimeMillis());
- }
- MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null, null);
- if (oldState == MatState.LOADING) {
+ boolean needsLoading = globalStore.needsLoading(matTableName, globalStore.getLocalAddress(), true, true, invalidate);
+ if (!needsLoading) {
return CollectionTupleSource.createUpdateCountTupleSource(-1);
}
GroupSymbol matTable = new GroupSymbol(matTableName);
matTable.setMetadataID(matTableId);
- int rowCount = loadGlobalTable(context, matTable, matTableName, matViewName, globalStore, info, invalidate?null:loadTime, !invalidate && useCache);
+ int rowCount = loadGlobalTable(context, matTable, matTableName, globalStore);
return CollectionTupleSource.createUpdateCountTupleSource(rowCount);
} else if (StringUtil.endsWithIgnoreCase(proc.getProcedureCallableName(), REFRESHMATVIEWROW)) {
Object groupID = validateMatView(metadata, (String)((Constant)proc.getParameter(1).getExpression()).getValue());
@@ -364,7 +308,7 @@
if (!info.isValid()) {
return CollectionTupleSource.createUpdateCountTupleSource(-1);
}
- TempTable tempTable = globalStore.getOrCreateTempTable(matTableName, new Query(), bufferManager, false);
+ TempTable tempTable = globalStore.getTempTableStore().getTempTable(matTableName);
if (!tempTable.isUpdatable()) {
throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_updatable", matViewName)); //$NON-NLS-1$
}
@@ -381,10 +325,11 @@
if (tuple == null) {
delete = true;
tuple = Arrays.asList(key.getValue());
+ } else {
+ tuple = new ArrayList<Object>(tuple); //ensure the list is serializable
}
- List<?> result = updateMatViewRow(globalStore, matTableName, tuple, delete);
- if (result != null && eventDistributor != null) {
- result = new ArrayList<Object>(result); //ensure the list is serializable
+ List<?> result = globalStore.updateMatViewRow(matTableName, tuple, delete);
+ if (eventDistributor != null) {
this.eventDistributor.updateMatViewRow(context.getVdbName(), context.getVdbVersion(), metadata.getName(metadata.getModelID(groupID)), metadata.getName(groupID), tuple, delete);
}
return CollectionTupleSource.createUpdateCountTupleSource(result != null ? 1 : 0);
@@ -392,36 +337,6 @@
return null;
}
- public List<?> updateMatViewRow(TempTableStore globalStore,
- String matTableName, List<?> tuple, boolean delete)
- throws QueryProcessingException, TeiidComponentException {
- TempTable tempTable = globalStore.getOrCreateTempTable(matTableName, new Query(), bufferManager, false);
- return tempTable.updateTuple(tuple, delete);
- }
-
- public void refreshMatView(String vdbName, int vdbVersion, String viewName,
- QueryMetadataInterface metadata, TempTableStore globalStore)
- throws QueryProcessingException, TeiidComponentException, TeiidProcessingException {
-
- Object groupID = validateMatView(metadata, viewName);
- Object matTableId = globalStore.getGlobalTempTableMetadataId(groupID, metadata);
- String matViewName = metadata.getFullName(groupID);
- String matTableName = metadata.getFullName(matTableId);
- LogManager.logDetail(LogConstants.CTX_MATVIEWS, "processing refreshmatview for", matViewName); //$NON-NLS-1$
- MatTableInfo info = globalStore.getMatTableInfo(matTableName);
-
- MatState oldState = info.setState(MatState.NEEDS_LOADING, Boolean.FALSE, null);
- if (oldState == MatState.LOADING) {
- return;
- }
- GroupSymbol matTable = new GroupSymbol(matTableName);
- matTable.setMetadataID(matTableId);
- CommandContext context = new CommandContext(new Object(), "internal", "internal", vdbName, vdbVersion); //$NON-NLS-1$ //$NON-NLS-2$
- context.setMetadata(metadata);
- context.setGlobalTableStore(globalStore);
- loadGlobalTable(context, matTable, matTableName, matViewName, globalStore, info, null, true);
- }
-
private Object validateMatView(QueryMetadataInterface metadata, String viewName) throws TeiidComponentException,
TeiidProcessingException {
try {
@@ -444,47 +359,41 @@
if (!group.isTempGroupSymbol()) {
return null;
}
- String viewName = null;
final String tableName = group.getNonCorrelationName().toUpperCase();
boolean remapColumns = !tableName.equalsIgnoreCase(group.getName());
- TempMetadataID groupID = (TempMetadataID)group.getMetadataID();
- if (groupID.getOriginalMetadataID() != null) {
- viewName = context.getMetadata().getFullName(groupID.getOriginalMetadataID());
- }
TempTable table = null;
if (group.isGlobalTable()) {
- final TempTableStore globalStore = context.getGlobalTableStore();
+ final GlobalTableStore globalStore = context.getGlobalTableStore();
final MatTableInfo info = globalStore.getMatTableInfo(tableName);
- Long loadTime = null;
- if (this.distributedCache != null) {
- MatTableKey key = new MatTableKey();
- key.name = tableName;
- key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
-
- MatTableEntry entry = this.tables.get(key);
- boolean notValid = !info.isValid();
- if (entry != null && entry.lastUpdate > info.getUpdateTime()
- && info.getState() != MatState.LOADING
- //TODO: use extension metadata or a config parameter to make this skew configurable
- && !(!notValid && entry.valid && info.getState() == MatState.LOADED && entry.lastUpdate < info.getUpdateTime() + 30000)) {
- //trigger a remote load due to the cache being more up to date than the local copy
- info.setState(MatState.NEEDS_LOADING, notValid?false:entry.valid, null);
- loadTime = entry.lastUpdate;
+ boolean load = false;
+ while (!info.isUpToDate()) {
+ load = globalStore.needsLoading(tableName, globalStore.getLocalAddress(), true, false, false);
+ if (load) {
+ load = globalStore.needsLoading(tableName, globalStore.getLocalAddress(), false, false, false);
+ if (load) {
+ break;
+ }
}
+ synchronized (info) {
+ try {
+ info.wait(30000);
+ } catch (InterruptedException e) {
+ throw new TeiidComponentException(e);
+ }
+ }
}
- boolean load = info.shouldLoad();
if (load) {
if (!info.isValid()) {
//blocking load
- loadGlobalTable(context, group, tableName, viewName, globalStore, info, loadTime, true);
+ loadGlobalTable(context, group, tableName, globalStore);
} else {
- loadAsynch(context, group, tableName, viewName, globalStore, info, loadTime);
+ loadAsynch(context, group, tableName, globalStore);
}
}
- table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
+ table = globalStore.getTempTableStore().getOrCreateTempTable(tableName, query, bufferManager, false, false, context);
context.accessedDataObject(group.getMetadataID());
} else {
- table = contextStore.getOrCreateTempTable(tableName, query, bufferManager, true);
+ table = contextStore.getOrCreateTempTable(tableName, query, bufferManager, true, false, context);
if (context.getDataObjects() != null) {
Object id = RelationalPlanner.getTrackableGroup(group, context.getMetadata());
if (id != null) {
@@ -511,13 +420,11 @@
}
private void loadAsynch(final CommandContext context,
- final GroupSymbol group, final String tableName, final String viewName,
- final TempTableStore globalStore, final MatTableInfo info,
- final Long loadTime) {
+ final GroupSymbol group, final String tableName, final GlobalTableStore globalStore) {
Callable<Integer> toCall = new Callable<Integer>() {
@Override
public Integer call() throws Exception {
- return loadGlobalTable(context, group, tableName, viewName, globalStore, info, loadTime, true);
+ return loadGlobalTable(context, group, tableName, globalStore);
}
};
FutureTask<Integer> task = new FutureTask<Integer>(toCall);
@@ -525,89 +432,38 @@
}
private int loadGlobalTable(CommandContext context,
- GroupSymbol group, final String tableName, final String viewName,
- TempTableStore globalStore, MatTableInfo info, Long loadTime, boolean useCache)
+ GroupSymbol group, final String tableName, GlobalTableStore globalStore)
throws TeiidComponentException, TeiidProcessingException {
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.loading", tableName)); //$NON-NLS-1$
QueryMetadataInterface metadata = context.getMetadata();
- Create create = new Create();
- create.setTable(group);
List<ElementSymbol> allColumns = ResolverUtil.resolveElementsInGroup(group, metadata);
- create.setElementSymbolsAsColumns(allColumns);
- Object pk = metadata.getPrimaryKey(group.getMetadataID());
- if (pk != null) {
- List<ElementSymbol> pkColumns = resolveIndex(metadata, allColumns, pk);
- create.getPrimaryKey().addAll(pkColumns);
- }
- TempTable table = globalStore.addTempTable(tableName, create, bufferManager, false);
+ TempTable table = globalStore.createMatTable(tableName, group);
table.setUpdatable(false);
- CacheHint hint = table.getCacheHint();
- boolean updatable = false;
- if (hint != null) {
- table.setPreferMemory(hint.getPrefersMemory());
- if (hint.getTtl() != null) {
- info.setTtl(hint.getTtl());
- }
- if (pk != null) {
- updatable = hint.isUpdatable();
- }
- }
int rowCount = -1;
- boolean viewFetched = false;
try {
String fullName = metadata.getFullName(group.getMetadataID());
- TupleSource ts = null;
- CacheID cid = null;
- if (distributedCache != null) {
- cid = new CacheID(new ParseInfo(), viewName, context.getVdbName(),
- context.getVdbVersion(), context.getConnectionID(), context.getUserName());
- if (useCache) {
- CachedResults cr = this.distributedCache.get(cid);
- if (cr != null) {
- ts = cr.getResults().createIndexedTupleSource();
- LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.cache_load", tableName)); //$NON-NLS-1$
- }
- }
- }
+ String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
+ QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
+ qp.setNonBlocking(true);
+ qp.getContext().setDataObjects(null);
+ TupleSource ts = new BatchCollector.BatchProducerTupleSource(qp);
- List<ElementSymbol> variables = table.getColumns();
-
- if (ts == null) {
- variables = allColumns;
- //TODO: coordinate a distributed load
- //TODO: order by primary key nulls first - then have an insert ordered optimization
- String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
- QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
- qp.setNonBlocking(true);
- qp.getContext().setDataObjects(null);
- if (distributedCache != null) {
- CachedResults cr = new CachedResults();
- BatchCollector bc = qp.createBatchCollector();
- TupleBuffer tb = bc.collectTuples();
- cr.setResults(tb, qp.getProcessorPlan());
- touchTable(context, fullName, true, info.getUpdateTime());
- this.distributedCache.put(cid, Determinism.VDB_DETERMINISTIC, cr, info.getTtl());
- ts = tb.createIndexedTupleSource();
- viewFetched = true;
- } else {
- ts = new BatchCollector.BatchProducerTupleSource(qp);
- }
- }
-
- //TODO: if this insert fails, it's unnecessary to do the undo processing
- table.insert(ts, variables);
+ table.insert(ts, allColumns, false);
table.getTree().compact();
rowCount = table.getRowCount();
//TODO: could pre-process indexes to remove overlap
for (Object index : metadata.getIndexesInGroup(group.getMetadataID())) {
- List<ElementSymbol> columns = resolveIndex(metadata, allColumns, index);
+ List<ElementSymbol> columns = GlobalTableStoreImpl.resolveIndex(metadata, allColumns, index);
table.addIndex(columns, false);
}
for (Object key : metadata.getUniqueKeysInGroup(group.getMetadataID())) {
- List<ElementSymbol> columns = resolveIndex(metadata, allColumns, key);
+ List<ElementSymbol> columns = GlobalTableStoreImpl.resolveIndex(metadata, allColumns, key);
table.addIndex(columns, true);
}
- table.setUpdatable(updatable);
+ CacheHint hint = table.getCacheHint();
+ if (hint != null && table.getPkLength() > 0) {
+ table.setUpdatable(hint.isUpdatable());
+ }
} catch (TeiidComponentException e) {
LogManager.logError(LogConstants.CTX_MATVIEWS, e, QueryPlugin.Util.getString("TempTableDataManager.failed_load", tableName)); //$NON-NLS-1$
throw e;
@@ -616,66 +472,30 @@
throw e;
} finally {
if (rowCount == -1) {
- info.setState(MatState.FAILED_LOAD, null, null);
+ globalStore.failedLoad(tableName);
} else {
- globalStore.swapTempTable(tableName, table);
- info.setState(MatState.LOADED, true, loadTime);
- if (viewFetched & viewName != null && this.eventDistributor != null) {
- this.eventDistributor.refreshMatView(context.getVdbName(), context.getVdbVersion(), viewName);
- }
+ globalStore.loaded(tableName, table);
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.loaded", tableName, rowCount)); //$NON-NLS-1$
}
}
return rowCount;
}
- private void touchTable(CommandContext context, String fullName, boolean valid, long loadtime) {
- MatTableKey key = new MatTableKey();
- key.name = fullName;
- key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
- MatTableEntry matTableEntry = new MatTableEntry();
- matTableEntry.valid = valid;
- matTableEntry.lastUpdate = loadtime;
- tables.put(key, matTableEntry, null);
- }
-
- /**
- * Return a list of ElementSymbols for the given index/key object
- */
- private List<ElementSymbol> resolveIndex(QueryMetadataInterface metadata,
- List<ElementSymbol> allColumns, Object pk)
- throws TeiidComponentException, QueryMetadataException {
- Collection<?> pkIds = metadata.getElementIDsInKey(pk);
- List<ElementSymbol> pkColumns = new ArrayList<ElementSymbol>(pkIds.size());
- for (Object col : pkIds) {
- pkColumns.add(allColumns.get(metadata.getPosition(col)-1));
- }
- return pkColumns;
- }
-
public Object lookupCodeValue(CommandContext context, String codeTableName,
String returnElementName, String keyElementName, Object keyValue)
throws BlockedException, TeiidComponentException,
TeiidProcessingException {
String matTableName = CODE_PREFIX + (codeTableName + ElementSymbol.SEPARATOR + keyElementName + ElementSymbol.SEPARATOR + returnElementName).toUpperCase();
+ QueryMetadataInterface metadata = context.getMetadata();
+ TempMetadataID id = context.getGlobalTableStore().getCodeTableMetadataId(codeTableName,
+ returnElementName, keyElementName, matTableName);
+
ElementSymbol keyElement = new ElementSymbol(matTableName + ElementSymbol.SEPARATOR + keyElementName);
ElementSymbol returnElement = new ElementSymbol(matTableName + ElementSymbol.SEPARATOR + returnElementName);
-
- QueryMetadataInterface metadata = context.getMetadata();
-
keyElement.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(metadata.getElementID(codeTableName + ElementSymbol.SEPARATOR + keyElementName))));
returnElement.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(metadata.getElementID(codeTableName + ElementSymbol.SEPARATOR + returnElementName))));
- TempMetadataID id = context.getGlobalTableStore().getMetadataStore().getTempGroupID(matTableName);
- if (id == null) {
- id = context.getGlobalTableStore().getMetadataStore().addTempGroup(matTableName, Arrays.asList(keyElement, returnElement), false, true);
- String queryString = Reserved.SELECT + ' ' + keyElementName + " ," + returnElementName + ' ' + Reserved.FROM + ' ' + codeTableName; //$NON-NLS-1$
- id.setQueryNode(new QueryNode(queryString));
- id.setPrimaryKey(id.getElements().subList(0, 1));
- CacheHint hint = new CacheHint(true, null);
- id.setCacheHint(hint);
- }
Query query = RelationalPlanner.createMatViewQuery(id, matTableName, Arrays.asList(returnElement), true);
query.setCriteria(new CompareCriteria(keyElement, CompareCriteria.EQ, new Constant(keyValue)));
Modified: branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,152 +22,166 @@
package org.teiid.query.tempdata;
+import java.sql.Connection;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import org.teiid.api.exception.query.QueryMetadataException;
+import javax.transaction.RollbackException;
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+
import org.teiid.api.exception.query.QueryProcessingException;
-import org.teiid.api.exception.query.QueryResolverException;
-import org.teiid.api.exception.query.QueryValidatorException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.TeiidComponentException;
-import org.teiid.language.SQLConstants;
+import org.teiid.core.TeiidProcessingException;
+import org.teiid.dqp.service.TransactionContext;
+import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.metadata.TempMetadataStore;
-import org.teiid.query.optimizer.relational.RelationalPlanner;
-import org.teiid.query.resolver.QueryResolver;
import org.teiid.query.resolver.command.TempTableResolver;
-import org.teiid.query.resolver.util.ResolverUtil;
-import org.teiid.query.sql.lang.CacheHint;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.sql.lang.Create;
import org.teiid.query.sql.lang.Insert;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.util.CommandContext;
+/**
+ * TempTableStores are transactional, but do not act as full resource manager.
+ * This means we are effectively 1PC and don't allow any heuristic exceptions
+ * on commit.
+ *
+ * Table state snapshoting and a {@link Synchronization} are used to
+ * perform the appropriate commit/rollback actions.
+ *
+ * Full row level MVCC would be a good next step as it would remove the
+ * cost of state cloning and would allow for concurrent read/write transactions.
+ */
public class TempTableStore {
- public enum MatState {
- NEEDS_LOADING,
- LOADING,
- FAILED_LOAD,
- LOADED
- }
-
- public static class MatTableInfo {
- private long updateTime = -1;
- private MatState state = MatState.NEEDS_LOADING;
- private long ttl = -1;
- private boolean valid;
-
- synchronized boolean shouldLoad() throws TeiidComponentException {
- for (;;) {
- switch (state) {
- case NEEDS_LOADING:
- case FAILED_LOAD:
- setState(MatState.LOADING);
- return true;
- case LOADING:
- if (valid) {
- return false;
- }
- try {
- wait();
- } catch (InterruptedException e) {
- throw new TeiidComponentException(e);
- }
- continue;
- case LOADED:
- if (ttl >= 0 && System.currentTimeMillis() - updateTime - ttl > 0) {
- setState(MatState.LOADING);
- return true;
- }
- return false;
+ public interface TransactionCallback {
+ void commit();
+ void rollback();
+ }
+
+ public enum TransactionMode {
+ ISOLATE_READS, //for matviews that have atomic updates
+ ISOLATE_WRITES, //for session/procedure stores that need rollback support - this is effectively READ_UNCOMMITTED
+ NONE
+ }
+
+ public class TempTableSynchronization implements Synchronization {
+
+ private String id;
+ Set<Integer> existingTables = new HashSet<Integer>();
+ ConcurrentHashMap<String, TempTable> tables = new ConcurrentHashMap<String, TempTable>();
+ private List<TransactionCallback> callbacks = new LinkedList<TransactionCallback>();
+
+ private boolean completed;
+
+ public TempTableSynchronization(final String id) {
+ this.id = id;
+ for (TempTable tempTable : tempTables.values()) {
+ existingTables.add(tempTable.getId());
+ }
+ if (transactionMode == TransactionMode.ISOLATE_WRITES) {
+ addCallback(new TransactionCallback() {
+ private Map<String, TempMetadataID> clonedMetadata = new ConcurrentHashMap<String, TempMetadataID>(tempMetadataStore.getData());
+ private Map<String, TempTable> clonedTables = new ConcurrentHashMap<String, TempTable>(tempTables);
+
+ @Override
+ public void rollback() {
+ LogManager.logDetail(LogConstants.CTX_DQP, "Rolling back txn", id, "restoring", clonedTables.keySet(), "using rollback tables", tables); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ //remove any tables created in the scope of this txn
+ tempTables.values().removeAll(clonedTables.values());
+ for (TempTable table : tempTables.values()) {
+ table.remove();
+ }
+
+ //restore the state
+ tempMetadataStore.getData().clear();
+ tempMetadataStore.getData().putAll(clonedMetadata);
+ tempTables.clear();
+ tempTables.putAll(clonedTables);
+
+ //overlay the rollback tables
+ tempTables.putAll(tables);
+ }
+
+ @Override
+ public void commit() {
+ //remove any original tables that were removed in this txn
+ clonedTables.values().removeAll(tempTables.values());
+ for (TempTable table : clonedTables.values()) {
+ table.remove();
+ }
+ }
+ });
+ }
+ }
+
+ @Override
+ public synchronized void afterCompletion(int status) {
+ //TODO: cleanup tables
+ completed = true;
+ synchronizations.remove(id);
+ for (TransactionCallback callback : callbacks) {
+ if (status == Status.STATUS_COMMITTED) {
+ callback.commit();
+ } else {
+ callback.rollback();
+ }
}
+ callbacks.clear();
+ }
+
+ @Override
+ public void beforeCompletion() {
+
+ }
+
+ public synchronized boolean addCallback(TransactionCallback callback) {
+ if (!completed) {
+ callbacks.add(0, callback);
}
- }
-
- public synchronized MatState setState(MatState state, Boolean valid, Long timestamp) {
- MatState oldState = this.state;
- LogManager.logDetail(LogConstants.CTX_MATVIEWS, this, "setting matState to", state, valid, timestamp, "old values", oldState, this.valid); //$NON-NLS-1$ //$NON-NLS-2$
- if (valid != null) {
- this.valid = valid;
- }
- setState(state);
- if (timestamp != null) {
- this.updateTime = timestamp;
- }
- notifyAll();
- return oldState;
- }
-
- private void setState(MatState state) {
- this.state = state;
- this.updateTime = System.currentTimeMillis();
- }
-
- public synchronized void setTtl(long ttl) {
- this.ttl = ttl;
- }
-
- public synchronized long getUpdateTime() {
- return updateTime;
- }
-
- public synchronized MatState getState() {
- return state;
- }
-
- public synchronized boolean isValid() {
- return valid;
- }
-
- public synchronized long getTtl() {
- return ttl;
- }
-
- }
+ return !completed;
+ }
+ }
+
+ private Map<String, TempTableSynchronization> synchronizations = new ConcurrentHashMap<String, TempTableSynchronization>();
+ private TransactionMode transactionMode = TransactionMode.NONE;
- private ConcurrentHashMap<String, MatTableInfo> matTables = new ConcurrentHashMap<String, MatTableInfo>();
-
private TempMetadataStore tempMetadataStore = new TempMetadataStore(new ConcurrentHashMap<String, TempMetadataID>());
- private Map<String, TempTable> groupToTupleSourceID = new ConcurrentHashMap<String, TempTable>();
+ private Map<String, TempTable> tempTables = new ConcurrentHashMap<String, TempTable>();
private String sessionID;
private TempTableStore parentTempTableStore;
- public TempTableStore(String sessionID) {
+ public TempTableStore(String sessionID, TransactionMode transactionMode) {
this.sessionID = sessionID;
+ this.transactionMode = transactionMode;
}
- public MatTableInfo getMatTableInfo(final String tableName) {
- MatTableInfo newInfo = new MatTableInfo();
- MatTableInfo info = matTables.putIfAbsent(tableName, newInfo);
- if (info == null) {
- info = newInfo;
- }
- return info;
- }
-
public void setParentTempTableStore(TempTableStore parentTempTableStore) {
this.parentTempTableStore = parentTempTableStore;
}
public boolean hasTempTable(String tempTableName) {
- return groupToTupleSourceID.containsKey(tempTableName);
+ return tempTables.containsKey(tempTableName);
}
- TempTable addTempTable(String tempTableName, Create create, BufferManager buffer, boolean add) {
+ TempTable addTempTable(final String tempTableName, Create create, BufferManager buffer, boolean add, CommandContext context) throws TeiidProcessingException {
List<ElementSymbol> columns = create.getColumnSymbols();
TempMetadataID id = tempMetadataStore.getTempGroupID(tempTableName);
+ getSynchronization(context);
if (id == null) {
//add metadata
id = tempMetadataStore.addTempGroup(tempTableName, columns, false, true);
@@ -180,44 +194,83 @@
columns.removeAll(primaryKey);
columns.addAll(0, primaryKey);
}
- TempTable tempTable = new TempTable(id, buffer, columns, create.getPrimaryKey().size(), sessionID);
+ final TempTable tempTable = new TempTable(id, buffer, columns, create.getPrimaryKey().size(), sessionID);
if (add) {
- groupToTupleSourceID.put(tempTableName, tempTable);
+ tempTables.put(tempTableName, tempTable);
}
return tempTable;
}
- void swapTempTable(String tempTableName, TempTable tempTable) {
- groupToTupleSourceID.put(tempTableName, tempTable);
+ public void removeTempTableByName(final String tempTableName, CommandContext context) throws TeiidProcessingException {
+ TempTableSynchronization synch = getSynchronization(context);
+ tempMetadataStore.removeTempGroup(tempTableName);
+ final TempTable table = this.tempTables.remove(tempTableName);
+ if (table == null) {
+ return;
+ }
+ if (transactionMode != TransactionMode.ISOLATE_WRITES || synch == null || !synch.existingTables.contains(table.getId())) {
+ table.remove();
+ }
}
- public void removeTempTableByName(String tempTableName) {
- tempMetadataStore.removeTempGroup(tempTableName);
- TempTable table = this.groupToTupleSourceID.remove(tempTableName);
- if(table != null) {
- table.remove();
- }
- }
-
+ private TempTableSynchronization getSynchronization(CommandContext context) throws TeiidProcessingException {
+ TempTableSynchronization synch = null;
+ if (context == null || transactionMode == TransactionMode.NONE) {
+ return null;
+ }
+ TransactionContext tc = context.getTransactionContext();
+ if (tc == null || tc.getTransactionType() == Scope.NONE) {
+ return null;
+ }
+ String transactionId = tc.getTransactionId();
+ synch = synchronizations.get(transactionId);
+ if (synch == null) {
+ boolean success = false;
+ try {
+ synch = new TempTableSynchronization(transactionId);
+ synchronizations.put(transactionId, synch);
+ tc.getTransaction().registerSynchronization(synch);
+ success = true;
+ } catch (RollbackException e) {
+ throw new TeiidProcessingException(e);
+ } catch (SystemException e) {
+ throw new TeiidProcessingException(e);
+ } finally {
+ if (!success) {
+ synchronizations.remove(transactionId);
+ }
+ }
+ }
+ return synch;
+ }
+
public TempMetadataStore getMetadataStore() {
return tempMetadataStore;
}
- public void removeTempTables() {
- for (String name : groupToTupleSourceID.keySet()) {
- removeTempTableByName(name);
+ public void removeTempTables() throws TeiidComponentException {
+ for (String name : tempTables.keySet()) {
+ try {
+ removeTempTableByName(name, null);
+ } catch (TeiidProcessingException e) {
+ throw new TeiidComponentException(e);
+ }
}
}
public void setUpdatable(String name, boolean updatable) {
- TempTable table = groupToTupleSourceID.get(name);
+ TempTable table = tempTables.get(name);
if (table != null) {
table.setUpdatable(updatable);
}
}
- TempTable getOrCreateTempTable(String tempTableID, Command command, BufferManager buffer, boolean delegate) throws QueryProcessingException{
- TempTable tempTable = getTempTable(tempTableID, command, buffer, delegate);
+ TempTable getTempTable(String tempTableID) {
+ return this.tempTables.get(tempTableID);
+ }
+
+ TempTable getOrCreateTempTable(String tempTableID, Command command, BufferManager buffer, boolean delegate, boolean forUpdate, CommandContext context) throws TeiidProcessingException{
+ TempTable tempTable = getTempTable(tempTableID, command, buffer, delegate, forUpdate, context);
if (tempTable != null) {
return tempTable;
}
@@ -237,83 +290,73 @@
Create create = new Create();
create.setTable(new GroupSymbol(tempTableID));
create.setElementSymbolsAsColumns(columns);
- return addTempTable(tempTableID, create, buffer, true);
+ return addTempTable(tempTableID, create, buffer, true, context);
}
private TempTable getTempTable(String tempTableID, Command command,
- BufferManager buffer, boolean delegate)
- throws QueryProcessingException {
- TempTable tsID = groupToTupleSourceID.get(tempTableID);
- if(tsID != null) {
- return tsID;
+ BufferManager buffer, boolean delegate, boolean forUpdate, CommandContext context)
+ throws TeiidProcessingException {
+ final TempTable tempTable = tempTables.get(tempTableID);
+ if(tempTable != null) {
+ //isolate if needed
+ if (forUpdate) {
+ if (transactionMode == TransactionMode.ISOLATE_WRITES) {
+ TransactionContext tc = context.getTransactionContext();
+ if (tc != null) {
+ TempTableSynchronization synch = getSynchronization(context);
+ if (synch != null && synch.existingTables.contains(tempTable.getId())) {
+ TempTable result = synch.tables.get(tempTableID);
+ if (result == null) {
+ synch.tables.put(tempTableID, tempTable.clone());
+ }
+ return tempTable;
+ }
+ }
+ }
+ } else if (transactionMode == TransactionMode.ISOLATE_READS) {
+ TransactionContext tc = context.getTransactionContext();
+ if (tc != null && tc.getIsolationLevel() > Connection.TRANSACTION_READ_COMMITTED) {
+ TempTableSynchronization synch = getSynchronization(context);
+ if (synch != null) {
+ TempTable result = synch.tables.get(tempTableID);
+ if (result == null) {
+ synch.tables.put(tempTableID, tempTable);
+ result = tempTable;
+ result.getActiveReaders().getAndIncrement();
+ TransactionCallback callback = new TransactionCallback() {
+
+ @Override
+ public void rollback() {
+ tempTable.getActiveReaders().getAndDecrement();
+ }
+
+ @Override
+ public void commit() {
+ tempTable.getActiveReaders().getAndDecrement();
+ }
+ };
+ if (!synch.addCallback(callback)) {
+ callback.rollback();
+ }
+ }
+ return result;
+ }
+ }
+ }
+ return tempTable;
}
if(delegate && this.parentTempTableStore != null){
- return this.parentTempTableStore.getTempTable(tempTableID, command, buffer, delegate);
+ return this.parentTempTableStore.getTempTable(tempTableID, command, buffer, delegate, forUpdate, context);
}
return null;
}
public Set<String> getAllTempTables() {
- return new HashSet<String>(this.groupToTupleSourceID.keySet());
+ return new HashSet<String>(this.tempTables.keySet());
}
-
- public TempMetadataID getGlobalTempTableMetadataId(Object viewId, QueryMetadataInterface metadata)
- throws QueryMetadataException, TeiidComponentException, QueryResolverException, QueryValidatorException {
- String matViewName = metadata.getFullName(viewId);
- String matTableName = RelationalPlanner.MAT_PREFIX+matViewName.toUpperCase();
- GroupSymbol group = new GroupSymbol(matViewName);
- group.setMetadataID(viewId);
- TempMetadataID id = tempMetadataStore.getTempGroupID(matTableName);
- //define the table preserving the key/index information and ensure that only a single instance exists
- if (id == null) {
- synchronized (viewId) {
- id = tempMetadataStore.getTempGroupID(matTableName);
- if (id == null) {
- id = tempMetadataStore.addTempGroup(matTableName, ResolverUtil.resolveElementsInGroup(group, metadata), false, true);
- id.setQueryNode(metadata.getVirtualPlan(viewId));
- id.setCardinality(metadata.getCardinality(viewId));
- id.setOriginalMetadataID(viewId);
-
- Object pk = metadata.getPrimaryKey(viewId);
- if (pk != null) {
- ArrayList<TempMetadataID> primaryKey = resolveIndex(metadata, id, pk);
- id.setPrimaryKey(primaryKey);
- }
- Collection keys = metadata.getUniqueKeysInGroup(viewId);
- for (Object key : keys) {
- id.addUniqueKey(resolveIndex(metadata, id, key));
- }
- Collection indexes = metadata.getIndexesInGroup(viewId);
- for (Object index : indexes) {
- id.addIndex(resolveIndex(metadata, id, index));
- }
- }
- }
- }
- updateCacheHint(viewId, metadata, group, id);
- return id;
+
+ Map<String, TempTable> getTempTables() {
+ return tempTables;
}
-
- private void updateCacheHint(Object viewId,
- QueryMetadataInterface metadata, GroupSymbol group,
- TempMetadataID id) throws TeiidComponentException,
- QueryMetadataException, QueryResolverException,
- QueryValidatorException {
- Command c = QueryResolver.resolveView(group, metadata.getVirtualPlan(viewId), SQLConstants.Reserved.SELECT, metadata).getCommand();
- CacheHint hint = c.getCacheHint();
- id.setCacheHint(hint);
- }
-
- static ArrayList<TempMetadataID> resolveIndex(
- QueryMetadataInterface metadata, TempMetadataID id, Object pk)
- throws TeiidComponentException, QueryMetadataException {
- List cols = metadata.getElementIDsInKey(pk);
- ArrayList<TempMetadataID> primaryKey = new ArrayList<TempMetadataID>(cols.size());
- for (Object coldId : cols) {
- int pos = metadata.getPosition(coldId) - 1;
- primaryKey.add(id.getElements().get(pos));
- }
- return primaryKey;
- }
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/util/CommandContext.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/util/CommandContext.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/util/CommandContext.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -58,6 +58,7 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.util.VariableContext;
+import org.teiid.query.tempdata.GlobalTableStore;
import org.teiid.query.tempdata.TempTableStore;
/**
@@ -116,7 +117,7 @@
private BufferManager bufferManager;
- private TempTableStore globalTables;
+ private GlobalTableStore globalTables;
private SessionAwareCache<PreparedPlan> planCache;
@@ -484,11 +485,11 @@
globalState.bufferManager = bm;
}
- public TempTableStore getGlobalTableStore() {
+ public GlobalTableStore getGlobalTableStore() {
return globalState.globalTables;
}
- public void setGlobalTableStore(TempTableStore tempTableStore) {
+ public void setGlobalTableStore(GlobalTableStore tempTableStore) {
globalState.globalTables = tempTableStore;
}
Modified: branches/as7/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1234,7 +1234,7 @@
break;
}
validateNoSubqueriesOrOuterReferences(windowFunction);
- if (windowFunction.getFunction().getOrderBy() != null || windowFunction.getFunction().isDistinct()) {
+ if (windowFunction.getFunction().getOrderBy() != null || (windowFunction.getFunction().isDistinct() && windowFunction.getWindowSpecification().getOrderBy() != null)) {
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0042", new Object[] {windowFunction.getFunction(), windowFunction}), windowFunction); //$NON-NLS-1$
}
if (windowFunction.getWindowSpecification().getPartition() != null) {
@@ -1437,6 +1437,8 @@
if (item.getPrefix() != null) {
if (item.getPrefix().equals("xml") || item.getPrefix().equals("xmlns")) { //$NON-NLS-1$ //$NON-NLS-2$
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.xml_namespaces_reserved"), obj); //$NON-NLS-1$
+ } else if (!Name11Checker.getInstance().isValidNCName(item.getPrefix())) {
+ handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.xml_namespaces_invalid", item.getPrefix()), obj); //$NON-NLS-1$
}
if (item.getUri().length() == 0) {
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.xml_namespaces_null_uri"), obj); //$NON-NLS-1$
Modified: branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -90,6 +90,9 @@
@SuppressWarnings("serial")
public class SaxonXQueryExpression {
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ static final String DEFAULT_PREFIX = "-"; //$NON-NLS-1$
+
public static final Properties DEFAULT_OUTPUT_PROPERTIES = new Properties();
{
DEFAULT_OUTPUT_PROPERTIES.setProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
@@ -168,19 +171,19 @@
throws QueryResolverException {
config.setErrorListener(ERROR_LISTENER);
this.xQueryString = xQueryString;
- StaticQueryContext context = new StaticQueryContext(config);
+ StaticQueryContext context = config.newStaticQueryContext();
IndependentContext ic = new IndependentContext(config);
- namespaceMap.put("", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ namespaceMap.put(EMPTY_STRING, EMPTY_STRING);
if (namespaces != null) {
for (NamespaceItem item : namespaces.getNamespaceItems()) {
if (item.getPrefix() == null) {
if (item.getUri() == null) {
- context.setDefaultElementNamespace(""); //$NON-NLS-1$
- ic.setDefaultElementNamespace(""); //$NON-NLS-1$
+ context.setDefaultElementNamespace(EMPTY_STRING);
+ ic.setDefaultElementNamespace(EMPTY_STRING);
} else {
context.setDefaultElementNamespace(item.getUri());
ic.setDefaultElementNamespace(item.getUri());
- namespaceMap.put("", item.getUri()); //$NON-NLS-1$
+ namespaceMap.put(EMPTY_STRING, item.getUri());
}
} else {
context.declareNamespace(item.getPrefix(), item.getUri());
@@ -189,6 +192,7 @@
}
}
}
+ namespaceMap.put(DEFAULT_PREFIX, namespaceMap.get(EMPTY_STRING));
for (DerivedColumn derivedColumn : passing) {
if (derivedColumn.getAlias() == null) {
continue;
@@ -238,7 +242,13 @@
}
}
this.contextRoot = null;
- PathMap map = this.xQuery.getPathMap();
+ //we'll use a new pathmap, since we don't want to modify the one associated with the xquery.
+ PathMap map = null;
+ if (columns == null) {
+ map = this.xQuery.getPathMap();
+ } else {
+ map = new PathMap(this.xQuery.getExpression());
+ }
PathMapRoot parentRoot;
try {
parentRoot = map.getContextRoot();
Modified: branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/StreamingUtils.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/StreamingUtils.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/query/xquery/saxon/StreamingUtils.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -82,7 +82,7 @@
"QName must not contain more than one colon: " //$NON-NLS-1$
+ "qname='" + localNames[i] + "', path='" + path + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (k <= 0) {
- fixedPath += " :"; //$NON-NLS-1$
+ fixedPath += SaxonXQueryExpression.DEFAULT_PREFIX+":"; //$NON-NLS-1$
} else {
String prefix = localNames[i].substring(0, k).trim();
if (k >= localNames[i].length() - 1)
Modified: branches/as7/engine/src/main/java/org/teiid/security/SecurityHelper.java
===================================================================
--- branches/as7/engine/src/main/java/org/teiid/security/SecurityHelper.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/java/org/teiid/security/SecurityHelper.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -28,7 +28,7 @@
public interface SecurityHelper {
- boolean assosiateSecurityContext(String securityDomain, Object context);
+ boolean associateSecurityContext(String securityDomain, Object context);
void clearSecurityContext(String securityDomain);
Modified: branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/main/resources/org/teiid/query/i18n.properties 2011-09-05 14:27:44 UTC (rev 3451)
@@ -210,7 +210,7 @@
ERR.015.012.0037 = {0} cannot be used outside of aggregate functions since they are not present in a GROUP BY clause.
ERR.015.012.0039 = Nested aggregate expressions are not allowed: {0}
ERR.015.012.0041 = The aggregate function {0} cannot be used with non-numeric expressions: {1}
-ERR.015.012.0042 = A windowed aggregate function {0} cannot use its own order by clause or be distinct: {1}
+ERR.015.012.0042 = A windowed aggregate function {0} cannot use its own order by clause or be distinct with an OVER ORDER BY: {1}
AggregateValidationVisitor.non_comparable = The aggregate function {0} cannot be used with non-comparable expressions: {1}
AggregateValidationVisitor.non_xml = The XMLAGG aggregate function {0} requires an expression of type XML: {1}
AggregateValidationVisitor.non_boolean=The boolean aggregate functions ANY, SOME, EVERY require a boolean expression.
@@ -721,6 +721,7 @@
ValidationVisitor.xml_namespaces=At most only one NO DEFAULT or DEFAULT namespace may be specified.
ValidationVisitor.xml_namespaces_reserved=The namespaces xmlns and xml are reserved.
ValidationVisitor.xml_namespaces_null_uri=The null uri, or empty string, is not allowed as the uri value.
+ValidationVisitor.xml_namespaces_invalid=The namespace prefix {0} is not a valid NCName
ValidationVisitor.xml_attributes_reserved=The namespace xmlns is reserved.
ValidationVisitor.xml_content_type=The expression "{0}" is of OBJECT or BLOB type, which cannot be used as an XML or TEXT content value.
ValidationVisitor.xml_invalid_qname=The qname "{0}" is invalid.
@@ -937,4 +938,6 @@
DdlPlan.event_not_exists={0} does not have an INSTEAD OF trigger defined for {1}.
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}
\ No newline at end of file
+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}.
\ No newline at end of file
Modified: branches/as7/engine/src/test/java/org/teiid/common/buffer/TestTupleBuffer.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/common/buffer/TestTupleBuffer.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/common/buffer/TestTupleBuffer.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -65,6 +65,11 @@
public void setPrefersMemory(boolean prefers) {
}
+
+ @Override
+ public CleanupHook getCleanupHook() {
+ return null;
+ }
};
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -170,7 +170,7 @@
return svc;
}
- private void helpTest(DataPolicyMetadata policy, String sql, QueryMetadataInterface metadata, String[] expectedInaccesible, VDBMetaData vdb) throws QueryParserException, QueryResolverException, TeiidComponentException {
+ private void helpTest(String sql, QueryMetadataInterface metadata, String[] expectedInaccesible, VDBMetaData vdb, DataPolicyMetadata... roles) throws QueryParserException, QueryResolverException, TeiidComponentException {
QueryParser parser = QueryParser.getQueryParser();
Command command = parser.parseCommand(sql);
QueryResolver.resolveCommand(command, metadata);
@@ -178,7 +178,9 @@
vdb.addAttchment(QueryMetadataInterface.class, metadata);
HashMap<String, DataPolicy> policies = new HashMap<String, DataPolicy>();
- policies.put(policy.getName(), policy);
+ for (DataPolicyMetadata dataPolicyMetadata : roles) {
+ policies.put(dataPolicyMetadata.getName(), dataPolicyMetadata);
+ }
this.context.getDQPWorkContext().setPolicies(policies);
DataRolePolicyDecider dataRolePolicyDecider = new DataRolePolicyDecider();
dataRolePolicyDecider.setAllowFunctionCallsByDefault(false);
@@ -206,125 +208,127 @@
@Test public void testTemp() throws Exception {
//allowed by default
- helpTest(exampleAuthSvc1(), "create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
//explicitly denied
- helpTest(exampleAuthSvc2(), "create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {"x"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {"x"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
}
@Test public void testFunction() throws Exception {
QueryMetadataInterface metadata = RealMetadataFactory.example1Cached();
- helpTest(exampleAuthSvc1(), "SELECT e1 FROM pm1.g1 where xyz() > 0", metadata, new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
- helpTest(exampleAuthSvc2(), "SELECT e1, curdate() FROM pm1.g2 where xyz() > 0", metadata, new String[] {"xyz()"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("SELECT e1 FROM pm1.g1 where xyz() > 0", metadata, new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("SELECT e1, curdate() FROM pm1.g2 where xyz() > 0", metadata, new String[] {"xyz()"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
}
@Test public void testEverythingAccessible() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT e1 FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("SELECT e1 FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testEverythingAccessible1() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT e1 FROM (select e1 from pm1.g1) x", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("SELECT e1 FROM (select e1 from pm1.g1) x", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testEverythingAccessible2() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT lookup('pm1.g1', 'e1', 'e1', '1'), e1 FROM (select e1 from pm1.g1) x", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("SELECT lookup('pm1.g1', 'e1', 'e1', '1'), e1 FROM (select e1 from pm1.g1) x", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testInaccesibleElement() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT e2 FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e2"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("SELECT e2 FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e2"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testInaccesibleElement2() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT lookup('pm1.g1', 'e1', 'e2', '1')", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e2"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("SELECT lookup('pm1.g1', 'e1', 'e2', '1')", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e2"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testInaccesibleGroup() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT e1 FROM pm1.g2", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2", "pm1.g2.e1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ helpTest("SELECT e1 FROM pm1.g2", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2", "pm1.g2.e1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@Test public void testInsert() throws Exception {
- helpTest(exampleAuthSvc1(), "INSERT INTO pm1.g1 (e1, e2, e3, e4) VALUES ('x', 5, {b'true'}, 1.0)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("INSERT INTO pm1.g1 (e1, e2, e3, e4) VALUES ('x', 5, {b'true'}, 1.0)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testInsertInaccessible() throws Exception {
- helpTest(exampleAuthSvc1(), "INSERT INTO pm1.g2 (e1, e2, e3, e4) VALUES ('x', 5, {b'true'}, 1.0)", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("INSERT INTO pm1.g2 (e1, e2, e3, e4) VALUES ('x', 5, {b'true'}, 1.0)", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUpdate() throws Exception {
- helpTest(exampleAuthSvc1(), "UPDATE pm1.g1 SET e2 = 5", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("UPDATE pm1.g1 SET e2 = 5", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testUpdateCriteriaInaccessibleForRead() throws Exception {
- helpTest(exampleAuthSvc1(), "UPDATE pm1.g2 SET e2 = 5 WHERE e1 = 'x'", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("UPDATE pm1.g2 SET e2 = 5 WHERE e1 = 'x'", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUpdateCriteriaInaccessibleForRead1() throws Exception {
- helpTest(exampleAuthSvc1(), "UPDATE pm1.g2 SET e2 = cast(e1 as integer)", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("UPDATE pm1.g2 SET e2 = cast(e1 as integer)", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUpdateElementInaccessibleForUpdate() throws Exception {
- helpTest(exampleAuthSvc1(), "UPDATE pm1.g1 SET e1 = 5 WHERE e1 = 'x'", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("UPDATE pm1.g1 SET e1 = 5 WHERE e1 = 'x'", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testDelete() throws Exception {
- helpTest(exampleAuthSvc1(), "DELETE FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("DELETE FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testDeleteCriteriaInaccesibleForRead() throws Exception {
- helpTest(exampleAuthSvc1(), "DELETE FROM pm1.g2 WHERE e1 = 'x'", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("DELETE FROM pm1.g2 WHERE e1 = 'x'", RealMetadataFactory.example1Cached(), new String[] {"pm1.g2.e1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testDeleteInaccesibleGroup() throws Exception {
- helpTest(exampleAuthSvc1(), "DELETE FROM pm1.g3", RealMetadataFactory.example1Cached(), new String[] {"pm1.g3"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("DELETE FROM pm1.g3", RealMetadataFactory.example1Cached(), new String[] {"pm1.g3"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testProc() throws Exception {
- helpTest(exampleAuthSvc1(), "EXEC pm1.sq1()", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("EXEC pm1.sq1()", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
}
@Test public void testProcInaccesible() throws Exception {
- helpTest(exampleAuthSvc1(), "EXEC pm1.sq2('xyz')", RealMetadataFactory.example1Cached(), new String[] {"pm1.sq2"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("EXEC pm1.sq2('xyz')", RealMetadataFactory.example1Cached(), new String[] {"pm1.sq2"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testSelectIntoEverythingAccessible() throws Exception {
- helpTest(exampleAuthSvc2(), "SELECT e1, e2, e3, e4 INTO pm1.g2 FROM pm2.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("SELECT e1, e2, e3, e4 INTO pm1.g2 FROM pm2.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
}
@Test public void testSelectIntoTarget_e1_NotAccessible() throws Exception {
- helpTest(exampleAuthSvc2(), "SELECT e1, e2, e3, e4 INTO pm2.g2 FROM pm2.g1", RealMetadataFactory.example1Cached(), new String[] {"pm2.g2", "pm2.g2.e2","pm2.g2.e4","pm2.g2.e3"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ helpTest("SELECT e1, e2, e3, e4 INTO pm2.g2 FROM pm2.g1", RealMetadataFactory.example1Cached(), new String[] {"pm2.g2", "pm2.g2.e2","pm2.g2.e4","pm2.g2.e3"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
@Test public void testSelectIntoTarget_e1e2_NotAccessible() throws Exception {
- helpTest(exampleAuthSvc2(), "SELECT e1, e2, e3, e4 INTO pm3.g2 FROM pm2.g1", RealMetadataFactory.example1Cached(), new String[] {"pm3.g2", "pm3.g2.e4", "pm3.g2.e3"},RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ helpTest("SELECT e1, e2, e3, e4 INTO pm3.g2 FROM pm2.g1", RealMetadataFactory.example1Cached(), new String[] {"pm3.g2", "pm3.g2.e4", "pm3.g2.e3"}, RealMetadataFactory.example1VDB(),exampleAuthSvc2()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@Test public void testTempTableSelectInto() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT e1 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
- helpTest(exampleAuthSvc2(), "SELECT e1 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {"#temp"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("SELECT e1 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("SELECT e1 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {"#temp"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
+ helpTest("SELECT e1 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc2(), exampleAuthSvc1()); //$NON-NLS-1$
+
}
@Test public void testTempTableSelectInto1() throws Exception {
- helpTest(exampleAuthSvc1(), "SELECT e1, e2 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e2"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("SELECT e1, e2 INTO #temp FROM pm1.g1", RealMetadataFactory.example1Cached(), new String[] {"pm1.g1.e2"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testTempTableInsert() throws Exception {
- helpTest(exampleAuthSvc1(), "insert into #temp (e1, e2, e3, e4) values ('1', '2', '3', '4')", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
- helpTest(exampleAuthSvc2(), "insert into #temp (e1, e2, e3, e4) values ('1', '2', '3', '4')", RealMetadataFactory.example1Cached(), new String[] {"#temp"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$
+ helpTest("insert into #temp (e1, e2, e3, e4) values ('1', '2', '3', '4')", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("insert into #temp (e1, e2, e3, e4) values ('1', '2', '3', '4')", RealMetadataFactory.example1Cached(), new String[] {"#temp"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
}
@Test public void testXMLAccessible() throws Exception {
- helpTest(exampleAuthSvc2(), "select * from xmltest.doc1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("select * from xmltest.doc1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testXMLInAccessible() throws Exception {
- helpTest(exampleAuthSvc1(), "select * from xmltest.doc1", RealMetadataFactory.example1Cached(), new String[] {"xmltest.doc1"}, RealMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("select * from xmltest.doc1", RealMetadataFactory.example1Cached(), new String[] {"xmltest.doc1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testAlter() throws Exception {
- helpTest(exampleAuthSvc1(), "alter view SmallA_2589 as select * from bqt1.smalla", RealMetadataFactory.exampleBQTCached(), new String[] {"SmallA_2589"}, RealMetadataFactory.exampleBQTVDB()); //$NON-NLS-1$ //$NON-NLS-2$
- helpTest(examplePolicyBQT(), "alter view SmallA_2589 as select * from bqt1.smalla", RealMetadataFactory.exampleBQTCached(), new String[] {}, RealMetadataFactory.exampleBQTVDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("alter view SmallA_2589 as select * from bqt1.smalla", RealMetadataFactory.exampleBQTCached(), new String[] {"SmallA_2589"}, RealMetadataFactory.exampleBQTVDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("alter view SmallA_2589 as select * from bqt1.smalla", RealMetadataFactory.exampleBQTCached(), new String[] {}, RealMetadataFactory.exampleBQTVDB(), examplePolicyBQT()); //$NON-NLS-1$ //$NON-NLS-2$
- helpTest(exampleAuthSvc1(), "alter trigger on SmallA_2589 INSTEAD OF UPDATE enabled", RealMetadataFactory.exampleBQTCached(), new String[] {"SmallA_2589"}, RealMetadataFactory.exampleBQTVDB()); //$NON-NLS-1$ //$NON-NLS-2$
- helpTest(examplePolicyBQT(), "alter trigger on SmallA_2589 INSTEAD OF UPDATE enabled", RealMetadataFactory.exampleBQTCached(), new String[] {}, RealMetadataFactory.exampleBQTVDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("alter trigger on SmallA_2589 INSTEAD OF UPDATE enabled", RealMetadataFactory.exampleBQTCached(), new String[] {"SmallA_2589"}, RealMetadataFactory.exampleBQTVDB(), exampleAuthSvc1()); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("alter trigger on SmallA_2589 INSTEAD OF UPDATE enabled", RealMetadataFactory.exampleBQTCached(), new String[] {}, RealMetadataFactory.exampleBQTVDB(), examplePolicyBQT()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -333,6 +333,37 @@
assertEquals(100, item.resultsBuffer.getRowCount());
}
+ @Test public void testBufferReuse1() throws Exception {
+ //the sql should return 100 rows
+ String sql = "SELECT IntKey FROM texttable('1112131415' columns intkey integer width 2 no row delimiter) t " +
+ "union " +
+ "SELECT IntKey FROM bqt1.smalla"; //$NON-NLS-1$
+ String userName = "1"; //$NON-NLS-1$
+ String sessionid = "1"; //$NON-NLS-1$
+ agds.sleep = 500;
+ agds.setUseIntCounter(true);
+ RequestMessage reqMsg = exampleRequestMessage(sql);
+ reqMsg.setCursorType(ResultSet.TYPE_FORWARD_ONLY);
+ DQPWorkContext.getWorkContext().getSession().setSessionId(sessionid);
+ DQPWorkContext.getWorkContext().getSession().setUserName(userName);
+ BufferManagerImpl bufferManager = (BufferManagerImpl)core.getBufferManager();
+ bufferManager.setProcessorBatchSize(20);
+ Future<ResultsMessage> message = core.executeRequest(reqMsg.getExecutionId(), reqMsg);
+ ResultsMessage rm = message.get(500000, TimeUnit.MILLISECONDS);
+ assertNull(rm.getException());
+ assertEquals(5, rm.getResults().length);
+
+ message = core.processCursorRequest(reqMsg.getExecutionId(), 6, 5);
+ rm = message.get(500000, TimeUnit.MILLISECONDS);
+ assertNull(rm.getException());
+ assertEquals(5, rm.getResults().length);
+
+ message = core.processCursorRequest(reqMsg.getExecutionId(), 11, 5);
+ rm = message.get(500000, TimeUnit.MILLISECONDS);
+ assertNull(rm.getException());
+ assertEquals(5, rm.getResults().length);
+ }
+
@Test public void testSourceConcurrency() throws Exception {
//setup default of 2
agds.setSleep(100);
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -42,6 +42,7 @@
import org.teiid.query.resolver.QueryResolver;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.util.ContextProperties;
@@ -52,7 +53,7 @@
*/
public class TestRequest extends TestCase {
- private static final TempTableStore TEMP_TABLE_STORE = new TempTableStore("1"); //$NON-NLS-1$
+ private static final TempTableStore TEMP_TABLE_STORE = new TempTableStore("1", TransactionMode.ISOLATE_WRITES); //$NON-NLS-1$
private final static String QUERY = "SELECT * FROM pm1.g1"; //$NON-NLS-1$
/**
Modified: branches/as7/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/dqp/service/AutoGenDataService.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -59,13 +59,17 @@
public int sleep;
private final AtomicInteger executeCount = new AtomicInteger();
private final AtomicInteger closeCount = new AtomicInteger();
+ private boolean useIntCounter;
-
public AutoGenDataService() {
super("FakeConnector","FakeConnector"); //$NON-NLS-1$ //$NON-NLS-2$
caps = TestOptimizer.getTypicalCapabilities();
}
+ public void setUseIntCounter(boolean useIntCounter) {
+ this.useIntCounter = useIntCounter;
+ }
+
public void setSleep(int sleep) {
this.sleep = sleep;
}
@@ -151,7 +155,7 @@
while(iter.hasNext()) {
SingleElementSymbol symbol = (SingleElementSymbol) iter.next();
Class type = symbol.getType();
- row.add( getValue(type) );
+ row.add( getValue(type, i) );
}
rows[i] = row;
}
@@ -174,11 +178,11 @@
private static final java.sql.Time TIME_VAL = new java.sql.Time(0);
private static final java.sql.Timestamp TIMESTAMP_VAL = new java.sql.Timestamp(0);
- private Object getValue(Class<?> type) {
+ private Object getValue(Class<?> type, int row) {
if(type.equals(DataTypeManager.DefaultDataClasses.STRING)) {
return STRING_VAL;
} else if(type.equals(DataTypeManager.DefaultDataClasses.INTEGER)) {
- return INTEGER_VAL;
+ return useIntCounter?row:INTEGER_VAL;
} else if(type.equals(DataTypeManager.DefaultDataClasses.SHORT)) {
return SHORT_VAL;
} else if(type.equals(DataTypeManager.DefaultDataClasses.LONG)) {
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/optimizer/relational/TestMaterialization.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -37,7 +37,7 @@
import org.teiid.query.processor.ProcessorPlan;
import org.teiid.query.processor.relational.RelationalPlan;
import org.teiid.query.sql.lang.Command;
-import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.GlobalTableStoreImpl;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.util.CommandContext;
@@ -151,7 +151,8 @@
Command command = helpGetCommand(userSql, metadata, null);
CommandContext cc = new CommandContext();
- cc.setGlobalTableStore(new TempTableStore("SYSTEM"));
+ GlobalTableStoreImpl gts = new GlobalTableStoreImpl(null, metadata);
+ cc.setGlobalTableStore(gts);
ProcessorPlan plan = TestOptimizer.getPlan(command, metadata, getGenericFinder(), analysis, true, cc);
TestOptimizer.checkAtomicQueries(new String[] {"SELECT #MAT_MATVIEW.VGROUP2.x FROM #MAT_MATVIEW.VGROUP2"}, plan);
Collection<Annotation> annotations = analysis.getAnnotations();
@@ -168,7 +169,8 @@
Command command = helpGetCommand(userSql, metadata, null);
CommandContext cc = new CommandContext();
- cc.setGlobalTableStore(new TempTableStore("SYSTEM"));
+ GlobalTableStoreImpl gts = new GlobalTableStoreImpl(null, metadata);
+ cc.setGlobalTableStore(gts);
RelationalPlan plan = (RelationalPlan)TestOptimizer.getPlan(command, metadata, getGenericFinder(), analysis, true, cc);
assertEquals(1f, plan.getRootNode().getEstimateNodeCardinality());
TestOptimizer.checkAtomicQueries(new String[] {"SELECT #MAT_MATVIEW.VGROUP3.x, #MAT_MATVIEW.VGROUP3.y FROM #MAT_MATVIEW.VGROUP3 WHERE #MAT_MATVIEW.VGROUP3.x = 'foo'"}, plan);
@@ -186,7 +188,8 @@
Command command = helpGetCommand(userSql, metadata, null);
CommandContext cc = new CommandContext();
- cc.setGlobalTableStore(new TempTableStore("SYSTEM"));
+ GlobalTableStoreImpl gts = new GlobalTableStoreImpl(null, metadata);
+ cc.setGlobalTableStore(gts);
ProcessorPlan plan = TestOptimizer.getPlan(command, metadata, getGenericFinder(), analysis, true, cc);
TestOptimizer.checkAtomicQueries(new String[] {"SELECT #MAT_MATVIEW.VGROUP4.x FROM #MAT_MATVIEW.VGROUP4"}, plan);
Collection<Annotation> annotations = analysis.getAnnotations();
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -25,24 +25,30 @@
import static org.junit.Assert.*;
+import java.io.ByteArrayInputStream;
+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.cache.DefaultCacheFactory;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.TeiidProcessingException;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.QueryProcessorFactoryImpl;
import org.teiid.dqp.internal.process.SessionAwareCache;
+import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataAdapter;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder;
+import org.teiid.query.optimizer.relational.RelationalPlanner;
+import org.teiid.query.tempdata.GlobalTableStoreImpl;
import org.teiid.query.tempdata.TempTableDataManager;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.GlobalTableStoreImpl.MatTableInfo;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.util.CommandContext;
@@ -52,20 +58,21 @@
private TempMetadataAdapter metadata;
private TempTableDataManager dataManager;
private TempTableStore tempStore;
- private TempTableStore globalStore;
+ private GlobalTableStoreImpl globalStore;
private ProcessorPlan previousPlan;
private HardcodedDataManager hdm;
@Before public void setUp() {
- tempStore = new TempTableStore("1"); //$NON-NLS-1$
- globalStore = new TempTableStore("SYSTEM");
- metadata = new TempMetadataAdapter(RealMetadataFactory.exampleMaterializedView(), tempStore.getMetadataStore());
+ tempStore = new TempTableStore("1", TransactionMode.ISOLATE_WRITES); //$NON-NLS-1$
+ BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
+ QueryMetadataInterface actualMetadata = RealMetadataFactory.exampleMaterializedView();
+ globalStore = new GlobalTableStoreImpl(bm, actualMetadata);
+ metadata = new TempMetadataAdapter(actualMetadata, tempStore.getMetadataStore());
hdm = new HardcodedDataManager();
hdm.addData("SELECT matsrc.x FROM matsrc", new List[] {Arrays.asList((String)null), Arrays.asList("one"), Arrays.asList("two"), Arrays.asList("three")});
hdm.addData("SELECT mattable.info.e1, mattable.info.e2 FROM mattable.info", new List[] {Arrays.asList("a", 1), Arrays.asList("a", 2)});
hdm.addData("SELECT mattable.info.e2, mattable.info.e1 FROM mattable.info", new List[] {Arrays.asList(1, "a"), Arrays.asList(2, "a")});
- BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
cache.setBufferManager(bm);
Executor executor = new Executor() {
@@ -74,7 +81,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(hdm, bm, executor, cache, cache, new DefaultCacheFactory());
+ dataManager = new TempTableDataManager(hdm, bm, executor, cache);
}
private void execute(String sql, List<?>... expectedResults) throws Exception {
@@ -95,6 +102,25 @@
assertEquals(1, hdm.getCommandHistory().size());
}
+ @Test public void testReadWrite() throws Exception {
+ execute("SELECT * from vgroup3 where x = 'one'", Arrays.asList("one", "zne"));
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ String matTableName = RelationalPlanner.MAT_PREFIX + "MATVIEW.VGROUP3";
+ this.globalStore.getState(matTableName, baos);
+ MatTableInfo matTableInfo = this.globalStore.getMatTableInfo(matTableName);
+ long time = matTableInfo.getUpdateTime();
+ this.globalStore.failedLoad(matTableName);
+ this.globalStore.setState(matTableName, new ByteArrayInputStream(baos.toByteArray()));
+ assertEquals(time, matTableInfo.getUpdateTime());
+ execute("SELECT * from vgroup3 where x = 'one'", Arrays.asList("one", "zne"));
+
+ execute("select lookup('mattable.info', 'e1', 'e2', 5)", Arrays.asList((String)null));
+ baos = new ByteArrayOutputStream();
+ String codeTableName = "#CODE_MATTABLE.INFO.E2.E1";
+ this.globalStore.getState(codeTableName, baos);
+ this.globalStore.setState(codeTableName, new ByteArrayInputStream(baos.toByteArray()));
+ }
+
@Test(expected=TeiidProcessingException.class) public void testCodeTableResponseException() throws Exception {
//duplicate key
execute("select lookup('mattable.info', 'e2', 'e1', 'a')");
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -93,8 +93,10 @@
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.util.VariableContext;
import org.teiid.query.sql.visitor.ReferenceCollectorVisitor;
+import org.teiid.query.tempdata.GlobalTableStoreImpl;
import org.teiid.query.tempdata.TempTableDataManager;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.unittest.TimestampUtil;
import org.teiid.query.util.CommandContext;
@@ -243,10 +245,11 @@
}
context.getNextRand(0);
if (context.getTempTableStore() == null) {
- context.setTempTableStore(new TempTableStore(context.getConnectionID()));
+ context.setTempTableStore(new TempTableStore(context.getConnectionID(), TransactionMode.ISOLATE_WRITES));
}
if (context.getGlobalTableStore() == null) {
- context.setGlobalTableStore(new TempTableStore("SYSTEM"));
+ GlobalTableStoreImpl gts = new GlobalTableStoreImpl(bufferMgr, context.getMetadata());
+ context.setGlobalTableStore(gts);
}
if (!(dataManager instanceof TempTableDataManager)) {
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
@@ -257,7 +260,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache, null, null);
+ dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache);
}
if (context.getQueryProcessorFactory() == null) {
context.setQueryProcessorFactory(new QueryProcessorFactoryImpl(bufferMgr, dataManager, new DefaultCapabilitiesFinder(), null, context.getMetadata()));
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-3382
+ /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
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -216,7 +216,11 @@
ProcessorPlan plan = helpGetPlan(helpParse(sql), metadata, new DefaultCapabilitiesFinder(), createCommandContext());
- helpProcess(plan, createCommandContext(), dataManager, expected);
+ helpProcess(plan, createCommandContext(), dataManager, expected);
+
+ plan = helpGetPlan(helpParse(sql), metadata, new DefaultCapabilitiesFinder(), createCommandContext());
+
+ doProcess(plan, dataManager, expected, createCommandContext());
}
@Test public void testXmlTableDefaultAndParent() throws Exception {
@@ -474,5 +478,17 @@
public static BlobType blobFromFile(final String file) {
return new BlobType(new BlobImpl(new InputStreamFactory.FileInputStreamFactory(UnitTestUtil.getTestDataFile(file))));
}
+
+ @Test public void testXmlTableWithDefault() throws Exception {
+ String sql = "select * from xmltable(XMLNAMESPACES(default 'http://x.y.com'), '/a/b' passing convert('<a xmlns=\"http://x.y.com\"><b>first</b><b x=\"attr\">second</b></a>', xml) columns x string path '@x', val string path '/.') as x"; //$NON-NLS-1$
+
+ List<?>[] expected = new List<?>[] {
+ Arrays.asList(null, "first"),
+ Arrays.asList("attr", "second"),
+ };
+
+ process(sql, expected);
+ }
+
}
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -24,24 +24,38 @@
import static org.junit.Assert.*;
+import java.sql.Connection;
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;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+
import org.junit.Before;
import org.junit.Test;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.TeiidProcessingException;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.SessionAwareCache;
+import org.teiid.dqp.service.TransactionContext;
+import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.metadata.FunctionMethod.Determinism;
import org.teiid.query.metadata.TempMetadataAdapter;
import org.teiid.query.optimizer.TestOptimizer;
import org.teiid.query.optimizer.TestOptimizer.ComparisonMode;
+import org.teiid.query.tempdata.GlobalTableStoreImpl;
import org.teiid.query.tempdata.TempTableDataManager;
import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.TransactionMode;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.util.CommandContext;
@@ -52,6 +66,10 @@
private TempTableDataManager dataManager;
private TempTableStore tempStore;
+ private TransactionContext tc;
+ private Transaction txn;
+ private Synchronization synch;
+
private ProcessorPlan execute(String sql, List[] expectedResults) throws Exception {
ProcessorPlan plan = TestProcessor.helpGetPlan(sql, metadata);
execute(plan, expectedResults);
@@ -60,6 +78,7 @@
private void execute(ProcessorPlan processorPlan, List[] expectedResults) throws Exception {
CommandContext cc = TestProcessor.createCommandContext();
+ cc.setTransactionContext(tc);
cc.setMetadata(metadata);
cc.setTempTableStore(tempStore);
TestProcessor.doProcess(processorPlan, dataManager, expectedResults, cc);
@@ -67,7 +86,7 @@
}
@Before public void setUp() {
- tempStore = new TempTableStore("1"); //$NON-NLS-1$
+ tempStore = new TempTableStore("1", TransactionMode.ISOLATE_WRITES); //$NON-NLS-1$
metadata = new TempMetadataAdapter(RealMetadataFactory.example1Cached(), tempStore.getMetadataStore());
metadata.setSession(true);
FakeDataManager fdm = new FakeDataManager();
@@ -81,9 +100,99 @@
command.run();
}
};
- dataManager = new TempTableDataManager(fdm, bm, executor, cache, null, null);
+ dataManager = new TempTableDataManager(fdm, bm, executor, cache);
}
+ @Test public void testRollbackNoExisting() throws Exception {
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ execute("update x set e1 = e2 where e2 > 1", new List[] {Arrays.asList(2)}); //$NON-NLS-1$
+
+ Mockito.verify(txn).registerSynchronization((Synchronization) Mockito.anyObject());
+ synch.afterCompletion(Status.STATUS_ROLLEDBACK);
+
+ try {
+ execute("select * from x", new List[] {});
+ fail();
+ } catch (Exception e) {
+
+ }
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ }
+
+ @Test public void testRollbackExisting() throws Exception {
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ //execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ for (int i = 0; i < 86; i++) {
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ }
+ execute("update x set e1 = e2 where e2 > 1", new List[] {Arrays.asList(172)}); //$NON-NLS-1$
+
+ synch.afterCompletion(Status.STATUS_ROLLEDBACK);
+
+ execute("select * from x", new List[] {});
+ }
+
+ @Test public void testRollbackExisting1() throws Exception {
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ for (int i = 0; i < 86; i++) {
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ }
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ //execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ for (int i = 0; i < 86; i++) {
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ }
+ execute("update x set e1 = e2 where e2 > 1", new List[] {Arrays.asList(344)}); //$NON-NLS-1$
+
+ synch.afterCompletion(Status.STATUS_ROLLEDBACK);
+ this.tc = null;
+
+ execute("select count(*) from x", new List[] {Arrays.asList(516)});
+
+ execute("delete from x", new List[] {Arrays.asList(516)});
+ }
+
+ @Test public void testIsolateReads() throws Exception {
+ GlobalTableStoreImpl gtsi = new GlobalTableStoreImpl(BufferManagerFactory.getStandaloneBufferManager(), RealMetadataFactory.example1Cached());
+ tempStore = gtsi.getTempTableStore();
+ metadata = new TempMetadataAdapter(RealMetadataFactory.example1Cached(), tempStore.getMetadataStore());
+ execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
+ for (int i = 0; i < 86; i++) {
+ execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$NON-NLS-1$
+ }
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ execute("select count(*) from x", new List[] {Arrays.asList(516)});
+ gtsi.updateMatViewRow("X", Arrays.asList(1), true);
+ tc=null;
+ //outside of the transaction we can see the row removed
+ execute("select count(*) from x", new List[] {Arrays.asList(515)});
+
+ //back in the transaction we see the original state
+ setupTransaction(Connection.TRANSACTION_SERIALIZABLE);
+ execute("select count(*) from x", new List[] {Arrays.asList(516)});
+
+ synch.afterCompletion(Status.STATUS_COMMITTED);
+ }
+
+ private void setupTransaction(int isolation) throws RollbackException, SystemException {
+ txn = Mockito.mock(Transaction.class);
+ Mockito.doAnswer(new Answer<Void>() {
+ @Override
+ public Void answer(InvocationOnMock invocation) throws Throwable {
+ synch = (Synchronization)invocation.getArguments()[0];
+ return null;
+ }
+ }).when(txn).registerSynchronization((Synchronization)Mockito.anyObject());
+ Mockito.stub(txn.toString()).toReturn("txn");
+ tc = new TransactionContext();
+ tc.setTransaction(txn);
+ tc.setIsolationLevel(isolation);
+ tc.setTransactionType(Scope.REQUEST);
+ }
+
@Test public void testInsertWithQueryExpression() throws Exception {
execute("create local temporary table x (e1 string, e2 integer)", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
execute("insert into x (e2, e1) select e2, e1 from pm1.g1", new List[] {Arrays.asList(6)}); //$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-3382
+ /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
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestTextTable.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestTextTable.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestTextTable.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,6 +22,7 @@
package org.teiid.query.processor;
+import static org.junit.Assert.*;
import static org.teiid.query.optimizer.TestOptimizer.*;
import static org.teiid.query.processor.TestProcessor.*;
@@ -43,6 +44,9 @@
import org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
+import org.teiid.query.processor.relational.JoinNode;
+import org.teiid.query.processor.relational.NestedTableJoinStrategy;
+import org.teiid.query.processor.relational.RelationalPlan;
import org.teiid.query.unittest.RealMetadataFactory;
@SuppressWarnings({"unchecked", "nls"})
@@ -190,6 +194,17 @@
process(sql, expected);
}
+ @Test public void testMissingValues() throws Exception {
+ String sql = "select * from texttable('a,b\nc' COLUMNS c1 string, c2 string) x"; //$NON-NLS-1$
+
+ List[] expected = new List[] {
+ Arrays.asList("a", "b"),
+ Arrays.asList("c", null),
+ };
+
+ process(sql, expected);
+ }
+
@Test public void testQuote() throws Exception {
String sql = "select * from texttable(' \" a\", \" \"\" \"' COLUMNS c1 string, c2 string) x"; //$NON-NLS-1$
@@ -266,8 +281,41 @@
};
process(sql, expected);
- }
+ }
+ @Test public void testTextTableJoin() throws Exception {
+ String sql = "select z.* from (select x.* from (select * from pm1.g1 where e1 = 'c') y, texttable(e1 || '\n' || e2 || '\n' || e3 COLUMNS x string) x) as z, " +
+ "(select x.* from (select * from pm1.g1 where e1 = 'c') y, texttable(e1 || '\n' || e2 || '\n' || e3 COLUMNS x string) x) as z1 where z.x = z1.x";
+
+ List[] expected = new List[] {
+ Arrays.asList("c"),
+ Arrays.asList("1"),
+ Arrays.asList("true"),
+ };
+
+ FakeDataManager dataManager = new FakeDataManager();
+ sampleData1(dataManager);
+ RelationalPlan plan = (RelationalPlan)helpGetPlan(helpParse(sql), RealMetadataFactory.example1Cached());
+ JoinNode join = (JoinNode) plan.getRootNode().getChildren()[0];
+ assertTrue(!(join.getJoinStrategy() instanceof NestedTableJoinStrategy));
+ helpProcess(plan, createCommandContext(), dataManager, expected);
+ }
+
+ @Test public void testTextTableJoin1() throws Exception {
+ String sql = "select e1, e2 from texttable('a' COLUMNS col string) x, pm1.g1 where col = e1";
+
+ List[] expected = new List[] {
+ Arrays.asList("a", 0),
+ Arrays.asList("a", 3),
+ Arrays.asList("a", 0),
+ };
+
+ FakeDataManager dataManager = new FakeDataManager();
+ sampleData1(dataManager);
+ RelationalPlan plan = (RelationalPlan)helpGetPlan(helpParse(sql), RealMetadataFactory.example1Cached());
+ helpProcess(plan, createCommandContext(), dataManager, expected);
+ }
+
public static void process(String sql, List[] expectedResults) throws Exception {
FakeDataManager dataManager = new FakeDataManager();
sampleData1(dataManager);
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-3382
+ /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
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-3382
+ /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
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestWindowFunctions.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -34,6 +34,9 @@
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
import org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
+import org.teiid.query.processor.relational.AccessNode;
+import org.teiid.query.processor.relational.ProjectNode;
+import org.teiid.query.processor.relational.WindowFunctionProjectNode;
import org.teiid.query.unittest.RealMetadataFactory;
@SuppressWarnings({"nls", "unchecked"})
@@ -91,6 +94,49 @@
});
}
+ @Test public void testWindowFunctionPushdown2() throws Exception {
+ BasicSourceCapabilities caps = getTypicalCapabilities();
+ caps.setCapabilitySupport(Capability.ELEMENTARY_OLAP, true);
+ caps.setCapabilitySupport(Capability.WINDOW_FUNCTION_ORDER_BY_AGGREGATES, true);
+ caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
+ ProcessorPlan plan = TestOptimizer.helpPlan("select max(e1) over (order by e1 nulls first) as y from pm1.g1", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(caps),
+ new String[] {
+ "SELECT g_0.e1 FROM pm1.g1 AS g_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ checkNodeTypes(plan, new int[] {1, 1, 1}, new Class<?>[] {AccessNode.class, WindowFunctionProjectNode.class, ProjectNode.class});
+
+ caps.setCapabilitySupport(Capability.QUERY_ORDERBY_NULL_ORDERING, true);
+ plan = TestOptimizer.helpPlan("select max(e1) over (order by e1 nulls first) as y from pm1.g1", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(caps),
+ new String[] {
+ "SELECT MAX(g_0.e1) OVER (ORDER BY g_0.e1 NULLS FIRST) FROM pm1.g1 AS g_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ checkNodeTypes(plan, FULL_PUSHDOWN);
+ }
+
+ @Test public void testWindowFunctionPushdown3() throws Exception {
+ BasicSourceCapabilities caps = getTypicalCapabilities();
+ caps.setCapabilitySupport(Capability.ELEMENTARY_OLAP, true);
+ caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT, true);
+ caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_DISTINCT, true);
+ ProcessorPlan plan = TestOptimizer.helpPlan("select count(distinct e1) over (partition by e2) as y from pm1.g1", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(caps),
+ new String[] {
+ "SELECT g_0.e1, g_0.e2 FROM pm1.g1 AS g_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ checkNodeTypes(plan, new int[] {1, 1, 1}, new Class<?>[] {AccessNode.class, WindowFunctionProjectNode.class, ProjectNode.class});
+
+ caps.setCapabilitySupport(Capability.WINDOW_FUNCTION_DISTINCT_AGGREGATES, true);
+ plan = TestOptimizer.helpPlan("select count(distinct e1) over (partition by e2) as y from pm1.g1", //$NON-NLS-1$
+ RealMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(caps),
+ new String[] {
+ "SELECT COUNT(DISTINCT g_0.e1) OVER (PARTITION BY g_0.e2) FROM pm1.g1 AS g_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+
+ checkNodeTypes(plan, FULL_PUSHDOWN);
+ }
+
+
@Test public void testRanking() throws Exception {
String sql = "select e1, row_number() over (order by e1), rank() over (order by e1), dense_rank() over (order by e1 nulls last) from pm1.g1";
@@ -236,4 +282,24 @@
helpProcess(plan, dataManager, expected);
}
+ @Test public void testPartitionedDistinctCount() throws Exception {
+ String sql = "select e1, e3, count(distinct e1) over (partition by e3) as r from pm1.g1 order by e1, e3";
+
+ List<?>[] expected = new List[] {
+ Arrays.asList(null, Boolean.FALSE, 2),
+ Arrays.asList("a", Boolean.FALSE, 2),
+ Arrays.asList("a", Boolean.FALSE, 2),
+ Arrays.asList("a", Boolean.TRUE, 2),
+ Arrays.asList("b", Boolean.FALSE, 2),
+ Arrays.asList("c", Boolean.TRUE, 2),
+ };
+
+ FakeDataManager dataManager = new FakeDataManager();
+ sampleData1(dataManager);
+ ProcessorPlan plan = helpGetPlan(sql, RealMetadataFactory.example1Cached());
+
+ helpProcess(plan, dataManager, expected);
+ }
+
+
}
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/TestWithClauseProcessing.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -64,10 +64,16 @@
String sql = "with a (x, y, z) as (select e1, e2, e3 from pm1.g1) SELECT a.x from a, a z"; //$NON-NLS-1$
- FakeDataManager dataManager = new FakeDataManager();
- sampleData1(dataManager);
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ List[] expected = new List[] {
+ Arrays.asList("a", 1, Boolean.FALSE),
+ };
+
+ dataManager.addData("WITH a (x, y, z) AS (SELECT g_0.e1, g_0.e2, g_0.e3 FROM pm1.g1 AS g_0) SELECT g_0.x FROM a AS g_0, a AS g_1", expected);
- TestOptimizer.helpPlan(sql, RealMetadataFactory.example1Cached(), null, capFinder, new String[] {"WITH a (x, y, z) AS (SELECT g_0.e1, g_0.e2, g_0.e3 FROM pm1.g1 AS g_0) SELECT g_0.x FROM a AS g_0, a AS g_1"}, ComparisonMode.EXACT_COMMAND_STRING);
+ ProcessorPlan plan = TestOptimizer.helpPlan(sql, RealMetadataFactory.example1Cached(), null, capFinder, new String[] {"WITH a (x, y, z) AS (SELECT g_0.e1, g_0.e2, g_0.e3 FROM pm1.g1 AS g_0) SELECT g_0.x FROM a AS g_0, a AS g_1"}, ComparisonMode.EXACT_COMMAND_STRING);
+
+ helpProcess(plan, dataManager, expected);
}
@Test public void testWithPushdownWithConstants() throws TeiidException {
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-3382
+ /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
Modified: branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestAccessNode.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestAccessNode.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestAccessNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -124,4 +124,9 @@
Query query = (Query)QueryParser.getQueryParser().parseCommand("SELECT e1, e2 FROM pm1.g1 LIMIT 0"); //$NON-NLS-1$
assertFalse(RelationalNodeUtil.shouldExecute(query, false));
}
+
+ @Test public void testShouldExecuteAgg() throws Exception {
+ Query query = (Query)QueryParser.getQueryParser().parseCommand("SELECT count(*) FROM pm1.g1 where false"); //$NON-NLS-1$
+ assertTrue(RelationalNodeUtil.shouldExecute(query, false));
+ }
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -46,7 +46,7 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.util.CommandContext;
-
+@SuppressWarnings("unchecked")
public class TestSortNode {
public static final int BATCH_SIZE = 100;
@@ -321,4 +321,37 @@
assertEquals(Arrays.asList(2), ts.nextTuple());
}
+ @Test public void testDupRemoveLowMemory() throws Exception {
+ ElementSymbol es1 = new ElementSymbol("e1"); //$NON-NLS-1$
+ es1.setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ BufferManager bm = BufferManagerFactory.getTestBufferManager(0, 2);
+ TupleBuffer tsid = bm.createTupleBuffer(Arrays.asList(es1), "test", TupleSourceType.PROCESSOR); //$NON-NLS-1$
+ tsid.addTuple(Arrays.asList(1));
+ tsid.addTuple(Arrays.asList(2));
+ SortUtility su = new SortUtility(tsid.createIndexedTupleSource(), Arrays.asList(es1), Arrays.asList(Boolean.TRUE), Mode.DUP_REMOVE, bm, "test", tsid.getSchema()); //$NON-NLS-1$
+ TupleBuffer out = su.sort();
+ TupleSource ts = out.createIndexedTupleSource();
+ assertEquals(Arrays.asList(1), ts.nextTuple());
+ assertEquals(Arrays.asList(2), ts.nextTuple());
+ try {
+ ts.nextTuple();
+ fail();
+ } catch (BlockedException e) {
+
+ }
+ tsid.addTuple(Arrays.asList(3));
+ tsid.addTuple(Arrays.asList(4));
+ tsid.addTuple(Arrays.asList(5));
+ tsid.addTuple(Arrays.asList(6));
+ tsid.addTuple(Arrays.asList(6));
+ tsid.addTuple(Arrays.asList(6));
+ tsid.close();
+ su.sort();
+ ts.nextTuple();
+ ts.nextTuple();
+ assertNotNull(ts.nextTuple());
+ assertNotNull(ts.nextTuple());
+ assertNull(ts.nextTuple());
+ }
+
}
Modified: branches/as7/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/unittest/RealMetadataFactory.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1742,6 +1742,7 @@
public static Procedure createStoredProcedure(String name, Schema model, List<ProcedureParameter> params) {
Procedure proc = new Procedure();
proc.setName(name);
+ proc.setNameInSource(name);
if (params != null) {
int index = 1;
for (ProcedureParameter procedureParameter : params) {
Modified: branches/as7/engine/src/test/java/org/teiid/query/validator/TestValidator.java
===================================================================
--- branches/as7/engine/src/test/java/org/teiid/query/validator/TestValidator.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/engine/src/test/java/org/teiid/query/validator/TestValidator.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1779,6 +1779,10 @@
@Test public void testXMLNamespaces() {
helpValidate("select xmlforest(xmlnamespaces(no default, default 'http://foo'), e1 as \"table\") from pm1.g1", new String[] {"XMLNAMESPACES(NO DEFAULT, DEFAULT 'http://foo')"}, RealMetadataFactory.example1Cached());
}
+
+ @Test public void testXMLNamespacesInvalid() {
+ helpValidate("select xmlforest(xmlnamespaces('http://foo' as \"1\"), e1 as \"table\") from pm1.g1", new String[] {"XMLNAMESPACES('http://foo' AS \"1\")"}, RealMetadataFactory.example1Cached());
+ }
@Test public void testXMLNamespacesReserved() {
helpValidate("select xmlforest(xmlnamespaces('http://foo' as xmlns), e1 as \"table\") from pm1.g1", new String[] {"XMLNAMESPACES('http://foo' AS xmlns)"}, RealMetadataFactory.example1Cached());
@@ -1945,4 +1949,8 @@
helpValidate("select count(*) over () as y", new String[] {"COUNT(*) OVER ()"}, RealMetadataFactory.example1Cached());
}
+ @Test public void testWindowFunctionOrderedDistinct() {
+ helpValidate("select count(distinct e1) over (order by e2) as y from pm1.g1", new String[] {"COUNT(DISTINCT e1) OVER (ORDER BY e2)"}, RealMetadataFactory.example1Cached());
+ }
+
}
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-3382
+ /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
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Configuration.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -48,7 +48,7 @@
public static final String MAX_SOURCE_ROWS = "max-source-rows-allowed";//$NON-NLS-1$
public static final String EXCEPTION_ON_MAX_SOURCE_ROWS = "exception-on-max-source-rows";//$NON-NLS-1$
public static final String MAX_ODBC_LOB_SIZE_ALLOWED = "max-odbc-lob-size-allowed";//$NON-NLS-1$
- public static final String EVENT_DISTRIBUTOR_NAME = "event-distributor-name";//$NON-NLS-1$
+ public static final String OBJECT_REPLICATOR_NAME = "object-replicator-name";//$NON-NLS-1$
public static final String DETECTING_CHANGE_EVENTS = "detect-change-events";//$NON-NLS-1$
public static final String SECURITY_DOMAIN = "security-domain";//$NON-NLS-1$
public static final String MAX_SESSIONS_ALLOWED = "max-sessions-allowed";//$NON-NLS-1$
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -46,7 +46,7 @@
MAX_SOURCE_ROWS_ELEMENT(MAX_SOURCE_ROWS),
EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT(EXCEPTION_ON_MAX_SOURCE_ROWS),
MAX_ODBC_LOB_SIZE_ALLOWED_ELEMENT(MAX_ODBC_LOB_SIZE_ALLOWED),
- EVENT_DISTRIBUTOR_NAME_ELEMENT(EVENT_DISTRIBUTOR_NAME),
+ OBJECT_REPLICATOR_NAME_ELEMENT(OBJECT_REPLICATOR_NAME),
DETECTING_CHANGE_EVENTS_ELEMENT(DETECTING_CHANGE_EVENTS),
MAX_SESSIONS_ALLOWED_ELEMENT(MAX_SESSIONS_ALLOWED),
SESSION_EXPIRATION_TIME_LIMIT_ELEMENT(SESSION_EXPIRATION_TIME_LIMIT),
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/JBossSecurityHelper.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -36,7 +36,7 @@
private static final long serialVersionUID = 3598997061994110254L;
@Override
- public boolean assosiateSecurityContext(String securityDomain, Object newContext) {
+ public boolean associateSecurityContext(String securityDomain, Object newContext) {
SecurityContext context = SecurityActions.getSecurityContext();
if (context == null || (!context.getSecurityDomain().equals(securityDomain) && newContext != null)) {
SecurityActions.setSecurityContext((SecurityContext)newContext);
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/QueryEngineAdd.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -99,7 +99,6 @@
// now build the engine
final RuntimeEngineDeployer engine = buildQueryEngine(engineName, operation);
engine.setSecurityHelper(new JBossSecurityHelper());
- engine.setContainerLifeCycleListener(shutdownListener);
// TODO: none of the caching is configured..
SocketConfiguration jdbc = null;
@@ -200,8 +199,8 @@
if (node.hasDefined(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED)) {
engine.setMaxODBCLobSizeAllowed(node.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).asInt());
}
- if (node.hasDefined(Configuration.EVENT_DISTRIBUTOR_NAME)) {
- engine.setEventDistributorName(node.get(Configuration.EVENT_DISTRIBUTOR_NAME).asString());
+ if (node.hasDefined(Configuration.OBJECT_REPLICATOR_NAME)) {
+ engine.setObjectReplicatorName(node.get(Configuration.OBJECT_REPLICATOR_NAME).asString());
}
if (node.hasDefined(Configuration.DETECTING_CHANGE_EVENTS)) {
engine.setDetectingChangeEvents(node.get(Configuration.DETECTING_CHANGE_EVENTS).asBoolean());
@@ -296,7 +295,7 @@
addAttribute(node, Configuration.MAX_SOURCE_ROWS, type, bundle.getString(Configuration.MAX_SOURCE_ROWS+DESC), ModelType.INT, false, "-1"); //$NON-NLS-1$
addAttribute(node, Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS, type, bundle.getString(Configuration.EXCEPTION_ON_MAX_SOURCE_ROWS+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
addAttribute(node, Configuration.MAX_ODBC_LOB_SIZE_ALLOWED, type, bundle.getString(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED+DESC), ModelType.INT, false, "5242880"); //$NON-NLS-1$
- addAttribute(node, Configuration.EVENT_DISTRIBUTOR_NAME, type, bundle.getString(Configuration.EVENT_DISTRIBUTOR_NAME+DESC), ModelType.STRING, false, "teiid/event-distributor"); //$NON-NLS-1$
+ addAttribute(node, Configuration.OBJECT_REPLICATOR_NAME, type, bundle.getString(Configuration.OBJECT_REPLICATOR_NAME+DESC), ModelType.STRING, false, "teiid/event-distributor"); //$NON-NLS-1$
addAttribute(node, Configuration.DETECTING_CHANGE_EVENTS, type, bundle.getString(Configuration.DETECTING_CHANGE_EVENTS+DESC), ModelType.BOOLEAN, false, "true"); //$NON-NLS-1$
//session stuff
@@ -381,8 +380,8 @@
if (operation.hasDefined(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED)) {
model.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).set(operation.get(Configuration.MAX_ODBC_LOB_SIZE_ALLOWED).asInt());
}
- if (operation.hasDefined(Configuration.EVENT_DISTRIBUTOR_NAME)) {
- model.get(Configuration.EVENT_DISTRIBUTOR_NAME).set(operation.get(Configuration.EVENT_DISTRIBUTOR_NAME).asString());
+ if (operation.hasDefined(Configuration.OBJECT_REPLICATOR_NAME)) {
+ model.get(Configuration.OBJECT_REPLICATOR_NAME).set(operation.get(Configuration.OBJECT_REPLICATOR_NAME).asString());
}
if (operation.hasDefined(Configuration.SECURITY_DOMAIN)) {
List<ModelNode> domains = operation.get(Configuration.SECURITY_DOMAIN).asList();
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/TeiidSubsystemParser.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -121,7 +121,7 @@
writeElement(writer, Element.MAX_SOURCE_ROWS_ELEMENT, node);
writeElement(writer, Element.EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT, node);
writeElement(writer, Element.MAX_ODBC_LOB_SIZE_ALLOWED_ELEMENT, node);
- writeElement(writer, Element.EVENT_DISTRIBUTOR_NAME_ELEMENT, node);
+ writeElement(writer, Element.OBJECT_REPLICATOR_NAME_ELEMENT, node);
writeElement(writer, Element.DETECTING_CHANGE_EVENTS_ELEMENT, node);
if (node.hasDefined(Element.SECURITY_DOMAIN_ELEMENT.getLocalName())) {
@@ -340,7 +340,7 @@
break;
//Strings
- case EVENT_DISTRIBUTOR_NAME_ELEMENT:
+ case OBJECT_REPLICATOR_NAME_ELEMENT:
node.get(reader.getLocalName()).set(reader.getElementText());
break;
Modified: branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -47,7 +47,6 @@
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
-import org.jboss.netty.util.internal.ConcurrentHashMap;
import org.teiid.adminapi.Admin.Cache;
import org.teiid.adminapi.AdminComponentException;
import org.teiid.adminapi.AdminException;
@@ -66,6 +65,7 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.ApplicationInfo;
import org.teiid.core.util.LRUCache;
+import org.teiid.deployers.CompositeVDB;
import org.teiid.deployers.ContainerLifeCycleListener;
import org.teiid.deployers.VDBLifeCycleListener;
import org.teiid.deployers.VDBRepository;
@@ -84,8 +84,12 @@
import org.teiid.metadata.*;
import org.teiid.metadata.Table.TriggerEvent;
import org.teiid.net.TeiidURL;
+import org.teiid.query.ObjectReplicator;
import org.teiid.query.metadata.TransformationMetadata;
+import org.teiid.query.optimizer.relational.RelationalPlanner;
import org.teiid.query.processor.DdlPlan;
+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;
@@ -111,10 +115,10 @@
private long sessionMaxLimit = SessionService.DEFAULT_MAX_SESSIONS;
private long sessionExpirationTimeLimit = SessionService.DEFAULT_SESSION_EXPIRATION;
- private String eventDistributorName;
+ private transient ObjectReplicator objectReplicator;
+ private String objectReplicatorName;
private transient EventDistributor eventDistributor;
private transient EventDistributor eventDistributorProxy;
- private transient ContainerLifeCycleListener lifecycleListener;
private final InjectedValue<WorkManager> workManagerInjector = new InjectedValue<WorkManager>();
private final InjectedValue<XATerminator> xaTerminatorInjector = new InjectedValue<XATerminator>();
@@ -184,13 +188,18 @@
dqpCore.setTransactionService((TransactionService)LogManager.createLoggingProxy(LogConstants.CTX_TXN_LOG, transactionServerImpl, new Class[] {TransactionService.class}, MessageLevel.DETAIL, Module.getCallerModule().getClassLoader()));
- if (this.eventDistributorName != null) {
+ if (this.objectReplicatorName != null) {
try {
InitialContext ic = new InitialContext();
- this.eventDistributor = (EventDistributor) ic.lookup(this.eventDistributorName);
+ this.objectReplicator = (ObjectReplicator) ic.lookup(this.objectReplicatorName);
+ try {
+ this.eventDistributor = this.objectReplicator.replicate(LocalServerConnection.TEIID_RUNTIME_CONTEXT+getName(), EventDistributor.class, this, 0);
+ } catch (Exception e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", this)); //$NON-NLS-1$
+ }
} catch (NamingException ne) {
//log at a detail level since we may not be in the all profile
- LogManager.logDetail(LogConstants.CTX_RUNTIME, ne, IntegrationPlugin.Util.getString("jndi_failed", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_RUNTIME, ne, IntegrationPlugin.Util.getString("jndi_failed", this.objectReplicatorName)); //$NON-NLS-1$
}
}
this.dqpCore.setMetadataRepository(this.vdbRepository.getMetadataRepository());
@@ -253,19 +262,31 @@
}
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_started", getRuntimeVersion(), new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
-
// add vdb life cycle listeners
this.vdbRepository.addListener(new VDBLifeCycleListener() {
private Set<VDBKey> recentlyRemoved = Collections.newSetFromMap(new LRUCache<VDBKey, Boolean>(10000));
@Override
- public void removed(String name, int version) {
+ public void removed(String name, int version, CompositeVDB vdb) {
recentlyRemoved.add(new VDBKey(name, version));
+ if (objectReplicator != null) {
+ GlobalTableStore gts = vdb.getVDB().getAttachment(GlobalTableStore.class);
+ objectReplicator.stop(gts);
+ }
}
@Override
- public void added(String name, int version) {
+ public void added(String name, int version, CompositeVDB vdb) {
+ GlobalTableStore gts = new GlobalTableStoreImpl(dqpCore.getBufferManager(), vdb.getVDB().getAttachment(TransformationMetadata.class));
+ if (objectReplicator != null) {
+ try {
+ gts = objectReplicator.replicate(name + version, GlobalTableStore.class, gts, 300000);
+ } catch (Exception e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", gts)); //$NON-NLS-1$
+ }
+ }
+ vdb.getVDB().addAttchment(GlobalTableStore.class, gts);
if (!recentlyRemoved.remove(new VDBKey(name, version))) {
return;
}
@@ -286,8 +307,6 @@
dqpCore.clearCache(Cache.QUERY_SERVICE_RESULT_SET_CACHE.toString(), name, version);
}
});
-
- synchronizeMaterializeViews();
}
@Override
@@ -317,6 +336,10 @@
this.sessionService.stop();
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_stopped", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
+
+ if (this.objectReplicator != null && this.eventDistributor != null) {
+ this.objectReplicator.stop(this.eventDistributor);
+ }
}
private void createClientServices() {
@@ -588,26 +611,31 @@
return newResults;
}
- public String getEventDistributorName() {
- return eventDistributorName;
+ public String getObjectReplicatorName() {
+ return objectReplicatorName;
}
- public void setEventDistributorName(String eventDistributorName) {
- this.eventDistributorName = eventDistributorName;
+ public void setObjectReplicatorName(String eventDistributorName) {
+ this.objectReplicatorName = eventDistributorName;
}
@Override
public void updateMatViewRow(String vdbName, int vdbVersion, String schema,
String viewName, List<?> tuple, boolean delete) {
- this.dqpCore.updateMatViewRow(getContextProvider(), vdbName, vdbVersion, schema, viewName, tuple, delete);
+ VDBMetaData metadata = this.vdbRepository.getVDB(vdbName, vdbVersion);
+ if (metadata != null) {
+ GlobalTableStore gts = metadata.getAttachment(GlobalTableStore.class);
+ if (gts != null) {
+ try {
+ gts.updateMatViewRow((RelationalPlanner.MAT_PREFIX + schema + '.' + viewName).toUpperCase(), tuple, delete);
+ } catch (TeiidComponentException e) {
+ LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.getString("replication_failed", "updateMatViewRow")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
}
@Override
- public void refreshMatView(final String vdbName, final int vdbVersion, final String viewName) {
- this.dqpCore.refreshMatView(getContextProvider(), vdbName, vdbVersion, viewName);
- }
-
- @Override
public void dataModification(String vdbName, int vdbVersion, String schema,
String... tableNames) {
updateModified(true, vdbName, vdbVersion, schema, tableNames);
@@ -739,18 +767,6 @@
return this.eventDistributorProxy;
}
- private void synchronizeMaterializeViews() {
- this.lifecycleListener.addListener(new ContainerLifeCycleListener.LifeCycleEventListener() {
- @Override
- public void onStartupFinish() {
- dqpCore.synchronizeInternalMaterializedViews(getContextProvider());
- }
- @Override
- public void onShutdownStart() {
- }
- });
- }
-
public String getRuntimeVersion() {
return ApplicationInfo.getInstance().getBuildNumber();
}
@@ -767,29 +783,6 @@
this.securityDomainNames.add(domain);
}
- private DQPCore.ContextProvider getContextProvider() {
- return new DQPCore.ContextProvider() {
- @Override
- public DQPWorkContext getContext(final String vdbName, final int vdbVersion) {
- return new DQPWorkContext() {
- public VDBMetaData getVDB() {
- return vdbRepository.getVDB(vdbName, vdbVersion);
- }
- public String getVdbName() {
- return vdbName;
- }
- public int getVdbVersion() {
- return vdbVersion;
- }
- };
- }
- };
- }
-
- public void setContainerLifeCycleListener(ContainerLifeCycleListener listener) {
- this.lifecycleListener = listener;
- }
-
public InjectedValue<CacheFactory> getCachefactoryInjector() {
return cachefactoryInjector;
}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2011-09-05 14:27:44 UTC (rev 3451)
@@ -44,7 +44,8 @@
class_not_found=Class {0} not found.
datasource_exists=Data source with name {0} already exists!
datasource_template_not_found=Template {0} for creating the data source is not found.
-jndi_failed=JNDI lookup failed.
+jndi_failed=JNDI lookup failed {0}.
+replication_failed=Could not replicate object {0}
distribute_failed=Deploy of the archive failed {0}
template_not_found=Template not found for {0}
admin_executing=JOPR admin {0} is executing command {1}
Modified: branches/as7/pom.xml
===================================================================
--- branches/as7/pom.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/pom.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -15,6 +15,7 @@
<scm>
<connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/teiid/trunk</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/teiid/trunk</url>
</scm>
<licenses>
<license>
@@ -109,7 +110,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
@@ -119,7 +120,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.9</version>
+ <version>2.9</version>
<configuration>
<includes>
<include>**/*TestCase.java</include>
@@ -194,7 +195,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
+ <version>2.8</version>
<configuration>
<aggregate>true</aggregate>
<maxmemory>512m</maxmemory>
@@ -451,7 +452,6 @@
<version>3.0.0.CR1</version>
</dependency>
- <!--
<dependency>
<groupId>jgroups</groupId>
<artifactId>jgroups</artifactId>
@@ -478,13 +478,6 @@
</exclusions>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- <version>2.1.0.SP1</version>
- <scope>provided</scope>
- </dependency>
- -->
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxonhe</artifactId>
@@ -530,9 +523,7 @@
<module>metadata</module>
<module>runtime</module>
<module>adminshell</module>
- <!--
<module>cache-jbosscache</module>
- -->
<module>hibernate-dialect</module>
<module>jboss-integration</module>
<module>test-integration</module>
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -44,7 +44,6 @@
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.metadata.TransformationMetadata.Resource;
-import org.teiid.query.tempdata.TempTableStore;
import org.teiid.vdb.runtime.VDBKey;
@@ -95,8 +94,6 @@
TransformationMetadata metadata = buildTransformationMetaData(mergedVDB, getVisibilityMap(), getMetadataStores(), getUDF(), systemFunctions, this.additionalStores);
mergedVDB.addAttchment(QueryMetadataInterface.class, metadata);
mergedVDB.addAttchment(TransformationMetadata.class, metadata);
- TempTableStore globalTables = new TempTableStore("SYSTEM"); //$NON-NLS-1$
- mergedVDB.addAttchment(TempTableStore.class, globalTables);
}
private static TransformationMetadata buildTransformationMetaData(VDBMetaData vdb, LinkedHashMap<String, Resource> visibilityMap, MetadataStoreGroup stores, UDFMetaData udf, FunctionTree systemFunctions, MetadataStore[] additionalStores) {
@@ -134,6 +131,13 @@
return this.mergedVDB;
}
+ public boolean hasChildVdb(VDBKey child) {
+ if (this.children != null) {
+ return this.children.containsKey(child);
+ }
+ return false;
+ }
+
private VDBMetaData buildVDB() {
VDBMetaData newMergedVDB = new VDBMetaData();
newMergedVDB.setName(this.vdb.getName());
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -329,7 +329,7 @@
}
private String paramTable(String notIn) {
- return "SELECT dt.oid as oid, pp.Position as position, pp.Type as type FROM ProcedureParams pp LEFT JOIN matpg_datatype dt ON pp.DataType=dt.Name " + //$NON-NLS-1$
+ return "SELECT case when pp.Type <> 'ResultSet' AND pp.DataType = 'object' then 2283 else dt.oid end as oid, pp.Position as position, pp.Type as type FROM ProcedureParams pp LEFT JOIN matpg_datatype dt ON pp.DataType=dt.Name " + //$NON-NLS-1$
"WHERE pp.ProcedureName = t1.Name AND pp.SchemaName = t1.SchemaName AND pp.Type NOT IN ("+notIn+")"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -389,79 +389,45 @@
addColumn("typrelid", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
addColumn("typelem", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
-
String transformation =
- "SELECT 16 as oid, 'boolean' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- //"SELECT 17 as oid, 'blob' as typname,(SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- //" union " + //$NON-NLS-1$
- "SELECT 1043 as oid, 'string' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 25 as oid, 'text' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1042 as oid, 'char' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 21 as oid, 'short' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(2, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 20 as oid, 'long' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(8, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 23 as oid, 'integer' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(4, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 26 as oid, 'oid' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typname, convert(4, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 700 as oid, 'float' as typname,(SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(4, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 701 as oid, 'double' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(8, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- //"SELECT 1009 as oid, 'clob' as typname,(SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- //" union " + //$NON-NLS-1$
- "SELECT 1082 as oid, 'date' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(4, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1083 as oid, 'datetime' as typname,(SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(8, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1114 as oid, 'timestamp' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(8, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1700 as oid, 'decimal' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 142 as oid, 'xml' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 14939 as oid, 'lo' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X"+//$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 2278 as oid, 'void' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(4, short) as typlen, convert('p', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 2249 as oid, 'record' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('p', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 0 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 30 as oid, 'oidvector' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 26 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1000 as oid, '_bool' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 16 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1002 as oid, '_char' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 18 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1005 as oid, '_int2' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 21 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1007 as oid, '_int4' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 23 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1009 as oid, '_text' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 25 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1028 as oid, '_oid' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 26 as typelem FROM (SELECT 1) X" + //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1014 as oid, '_bpchar' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 1042 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1015 as oid, '_varchar' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 1043 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1016 as oid, '_int8' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 20 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1021 as oid, '_float4' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 700 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1022 as oid, '_float8' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 701 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1115 as oid, '_timestamp' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 1114 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1182 as oid, '_date' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 1082 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 1183 as oid, '_time' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 1083 as typelem FROM (SELECT 1) X"+ //$NON-NLS-1$
- " union " + //$NON-NLS-1$
- "SELECT 2287 as oid, '_record' as typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, convert(-1, short) as typlen, convert('b', char) as typtype, 0 as typbasetype, -1 as typtypmod, 0 as typrelid, 2249 as typelem FROM (SELECT 1) X"; //$NON-NLS-1$
+ "select oid, typname, (SELECT OID FROM SYS.Schemas where Name = 'SYS') as typnamespace, typlen, typtype, typbasetype, typtypmod, typrelid, typelem from texttable('" + //$NON-NLS-1$
+ "16,boolean,1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "1043,string,-1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "25,text,-1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "1042,char,1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "21,short,2,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "20,long,8,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "23,integer,4,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "26,oid,4,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "700,float,4,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "701,double,8,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "705,unknown,-2,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "1082,date,4,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "1083,datetime,8,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "1114,timestamp,8,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "1700,decimal,-1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "142,xml,-1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "14939,lo,-1,b,0,-1,0,0\n" + //$NON-NLS-1$
+ "2278,void,4,p,0,-1,0,0\n" + //$NON-NLS-1$
+ "2249,record,-1,p,0,-1,0,0\n" + //$NON-NLS-1$
+ "30,oidvector,-1,b,0,-1,0,26\n" + //$NON-NLS-1$
+ "1000,_bool,-1,b,0,-1,0,16\n" + //$NON-NLS-1$
+ "1002,_char,-1,b,0,-1,0,18\n" + //$NON-NLS-1$
+ "1005,_int2,-1,b,0,-1,0,21\n" + //$NON-NLS-1$
+ "1007,_int4,-1,b,0,-1,0,23\n" + //$NON-NLS-1$
+ "1009,_text,-1,b,0,-1,0,25\n" + //$NON-NLS-1$
+ "1028,_oid,-1,b,0,-1,0,26\n" + //$NON-NLS-1$
+ "1014,_bpchar,-1,b,0,-1,0,1042\n" + //$NON-NLS-1$
+ "1015,_varchar,-1,b,0,-1,0,1043\n" + //$NON-NLS-1$
+ "1016,_int8,-1,b,0,-1,0,20\n" + //$NON-NLS-1$
+ "1021,_float4,-1,b,0,-1,0,700\n" + //$NON-NLS-1$
+ "1022,_float8,-1,b,0,-1,0,701\n" + //$NON-NLS-1$
+ "1115,_timestamp,-1,b,0,-1,0,1114\n" + //$NON-NLS-1$
+ "1182,_date,-1,b,0,-1,0,1082\n" + //$NON-NLS-1$
+ "1183,_time,-1,b,0,-1,0,1083\n" + //$NON-NLS-1$
+ "2287,_record,-1,b,0,-1,0,2249\n" + //$NON-NLS-1$
+ "2283,anyelement,4,p,0,-1,0,0" + //$NON-NLS-1$
+ "' columns oid integer, typname string, typlen short, typtype char, typbasetype integer, typtypmod integer, typrelid integer, typelem integer) AS t"; //$NON-NLS-1$
t.setSelectTransformation(transformation);
return t;
}
@@ -544,6 +510,7 @@
"WHEN (Name = 'time' ) THEN 'datetime' " + //$NON-NLS-1$
"WHEN (Name = 'biginteger' ) THEN 'decimal' " +//$NON-NLS-1$
"WHEN (Name = 'bigdecimal' ) THEN 'decimal' " +//$NON-NLS-1$
+ "WHEN (Name = 'object' ) THEN 'unknown' " +//$NON-NLS-1$
"ELSE Name END) as pg_name, Name, UID from SYS.DataTypes) as t ON t.pg_name = pt.typname"; //$NON-NLS-1$
t.setSelectTransformation(transformation);
t.setMaterialized(true);
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,6 +22,6 @@
package org.teiid.deployers;
public interface VDBLifeCycleListener {
- void added(String name, int version);
- void removed(String name, int version);
+ void added(String name, int version, CompositeVDB vdb);
+ void removed(String name, int version, CompositeVDB vdb);
}
Modified: branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -81,7 +81,7 @@
cvdb = new CompositeVDB(vdb, stores, visibilityMap, udf, this.systemFunctionManager.getSystemFunctions(), cmr, this.systemStore, odbcStore);
}
this.vdbRepo.put(vdbId(vdb), cvdb);
- notifyAdd(vdb.getName(), vdb.getVersion());
+ notifyAdd(vdb.getName(), vdb.getVersion(), cvdb);
}
private void updateFromMetadataRepository(CompositeVDB cvdb) {
@@ -250,9 +250,15 @@
if (removed != null) {
// if this VDB was part of another VDB; then remove them.
for (CompositeVDB other:this.vdbRepo.values()) {
- other.removeChild(key);
+ if (other.hasChildVdb(key)) {
+ notifyRemove(other.getVDB().getName(), other.getVDB().getVersion(), other);
+
+ other.removeChild(key);
+
+ notifyAdd(other.getVDB().getName(), other.getVDB().getVersion(), other);
+ }
}
- notifyRemove(key.getName(), key.getVersion());
+ notifyRemove(key.getName(), key.getVersion(), removed);
return true;
}
return false;
@@ -282,9 +288,12 @@
if (target == null) {
throw new AdminProcessingException(RuntimePlugin.Util.getString("vdb_not_found", sourceVDBName, sourceVDBVersion)); //$NON-NLS-1$
}
-
+
+ notifyRemove(targetVDBName, targetVDBVersion, target);
// merge them
target.addChild(source);
+
+ notifyAdd(targetVDBName, targetVDBVersion, target);
}
// this is called by mc
@@ -310,15 +319,15 @@
this.listeners.remove(listener);
}
- private void notifyAdd(String name, int version) {
+ private void notifyAdd(String name, int version, CompositeVDB vdb) {
for(VDBLifeCycleListener l:this.listeners) {
- l.added(name, version);
+ l.added(name, version, vdb);
}
}
- private void notifyRemove(String name, int version) {
+ private void notifyRemove(String name, int version, CompositeVDB vdb) {
for(VDBLifeCycleListener l:this.listeners) {
- l.removed(name, version);
+ l.removed(name, version, vdb);
}
}
Modified: branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCClientRemote.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCClientRemote.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCClientRemote.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -21,7 +21,6 @@
*/
package org.teiid.odbc;
-import java.io.IOException;
import java.sql.ParameterMetaData;
import java.util.List;
import java.util.Properties;
@@ -81,7 +80,7 @@
void sendMoveCursor(ResultSetImpl rs, int rowCount, ResultsFuture<Integer> results);
- void sendCommandComplete(String sql, int updateCount) throws IOException;
+ void sendCommandComplete(String sql, int updateCount);
// CommandComplete (B)
void sendUpdateCount(String sql, int updateCount);
Modified: branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -21,7 +21,7 @@
*/
package org.teiid.odbc;
-import static org.teiid.odbc.PGUtil.convertType;
+import static org.teiid.odbc.PGUtil.*;
import java.io.IOException;
import java.io.StringReader;
@@ -40,6 +40,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.teiid.client.RequestMessage.ResultsMode;
import org.teiid.client.security.ILogon;
import org.teiid.client.security.LogonException;
import org.teiid.client.security.LogonResult;
@@ -207,7 +208,7 @@
else if (authType.equals(AuthenticationType.KRB5)) {
byte[] serviceToken = data.readServiceToken();
LogonResult result = this.logon.neogitiateGssLogin(this.props, serviceToken, false);
- if ((Boolean)result.getProperty(ILogon.KRB5_ESTABLISHED)) {
+ if (!Boolean.TRUE.equals(result.getProperty(ILogon.KRB5_ESTABLISHED))) {
serviceToken = (byte[])result.getProperty(ILogon.KRB5TOKEN);
this.client.authenticationGSSContinue(serviceToken);
return;
@@ -245,121 +246,88 @@
}
private void cursorExecute(final String cursorName, final String sql, final ResultsFuture<Integer> completion) {
- if (this.connection != null) {
- if (sql != null) {
- try {
- // close if the name is already used or the unnamed prepare; otherwise
- // stmt is alive until session ends.
- Prepared previous = this.preparedMap.remove(cursorName);
- if (previous != null) {
- previous.stmt.close();
- }
-
- final PreparedStatementImpl stmt = this.connection.prepareStatement(sql);
- this.executionFuture = stmt.submitExecute();
- this.executionFuture.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
- @Override
- public void onCompletion(ResultsFuture<Boolean> future) {
- executionFuture = null;
- try {
- if (future.get()) {
- List<PgColInfo> cols = getPgColInfo(stmt.getResultSet().getMetaData());
- cursorMap.put(cursorName, new Cursor(cursorName, sql, stmt, null, stmt.getResultSet(), cols));
- client.sendCommandComplete("DECLARE CURSOR", 0); //$NON-NLS-1$
- }
- else {
- errorOccurred(RuntimePlugin.Util.getString("execution_failed")); //$NON-NLS-1$
- }
- } catch (Throwable e) {
- errorOccurred(e);
- }
- completion.getResultsReceiver().receiveResults(1);
- }
- });
- } catch (SQLException e) {
- errorOccurred(e);
- completion.getResultsReceiver().receiveResults(1);
- }
- }
+ if (sql != null) {
+ try {
+ // close if the name is already used or the unnamed prepare; otherwise
+ // stmt is alive until session ends.
+ Prepared previous = this.preparedMap.remove(cursorName);
+ if (previous != null) {
+ previous.stmt.close();
+ }
+
+ final PreparedStatementImpl stmt = this.connection.prepareStatement(sql);
+ this.executionFuture = stmt.submitExecute(ResultsMode.RESULTSET);
+ this.executionFuture.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
+ @Override
+ public void onCompletion(ResultsFuture<Boolean> future) {
+ executionFuture = null;
+ try {
+ List<PgColInfo> cols = getPgColInfo(stmt.getResultSet().getMetaData());
+ cursorMap.put(cursorName, new Cursor(cursorName, sql, stmt, null, stmt.getResultSet(), cols));
+ client.sendCommandComplete("DECLARE CURSOR", 0); //$NON-NLS-1$
+ completion.getResultsReceiver().receiveResults(0);
+ } catch (Throwable e) {
+ completion.getResultsReceiver().exceptionOccurred(e);
+ }
+ }
+ });
+ } catch (SQLException e) {
+ completion.getResultsReceiver().exceptionOccurred(e);
+ }
}
- else {
- errorOccurred(RuntimePlugin.Util.getString("no_active_connection")); //$NON-NLS-1$
- completion.getResultsReceiver().receiveResults(1);
- }
-
}
- private void cursorFetch(String cursorName, int rows, final ResultsFuture<Integer> completion) {
+ private void cursorFetch(String cursorName, int rows, final ResultsFuture<Integer> completion) throws SQLException {
Cursor cursor = this.cursorMap.get(cursorName);
- if (cursor != null) {
- cursor.fetchSize = rows;
- ResultsFuture<Integer> result = new ResultsFuture<Integer>();
- this.client.sendCursorResults(cursor.rs, cursor.columnMetadata, result, rows);
- result.addCompletionListener(new ResultsFuture.CompletionListener<Integer>() {
- public void onCompletion(ResultsFuture<Integer> future) {
- int rowsSent = 0;
- try {
- rowsSent = future.get();
- client.sendCommandComplete("FETCH", rowsSent); //$NON-NLS-1$
- } catch (InterruptedException e) {
- throw new AssertionError(e);
- } catch (ExecutionException e) {
- errorOccurred(e.getCause());
- } catch (IOException e) {
- errorOccurred(e);
- }
- completion.getResultsReceiver().receiveResults(rowsSent);
- };
- });
+ if (cursor == null) {
+ throw new SQLException(RuntimePlugin.Util.getString("not_bound", cursorName)); //$NON-NLS-1$
}
- else {
- errorOccurred(RuntimePlugin.Util.getString("not_bound", cursorName)); //$NON-NLS-1$
- completion.getResultsReceiver().receiveResults(1);
- }
+ cursor.fetchSize = rows;
+ ResultsFuture<Integer> result = new ResultsFuture<Integer>();
+ this.client.sendCursorResults(cursor.rs, cursor.columnMetadata, result, rows);
+ result.addCompletionListener(new ResultsFuture.CompletionListener<Integer>() {
+ public void onCompletion(ResultsFuture<Integer> future) {
+ try {
+ int rowsSent = future.get();
+ client.sendCommandComplete("FETCH", rowsSent); //$NON-NLS-1$
+ completion.getResultsReceiver().receiveResults(rowsSent);
+ } catch (Throwable e) {
+ completion.getResultsReceiver().exceptionOccurred(e);
+ }
+ };
+ });
}
- private void cursorMove(String prepareName, int rows, final ResultsFuture<Integer> completion) {
+ private void cursorMove(String prepareName, int rows, final ResultsFuture<Integer> completion) throws SQLException {
// win odbc driver sending a move after close; and error is ending up in failure; since the below
// is not harmful it is ok to send empty move.
if (rows == 0) {
- try {
- client.sendCommandComplete("MOVE", 0); //$NON-NLS-1$
- } catch (IOException e) {
- errorOccurred(e);
- }
+ client.sendCommandComplete("MOVE", 0); //$NON-NLS-1$
completion.getResultsReceiver().receiveResults(0);
return;
}
Cursor cursor = this.cursorMap.get(prepareName);
- if (cursor != null) {
- ResultsFuture<Integer> result = new ResultsFuture<Integer>();
- this.client.sendMoveCursor(cursor.rs, rows, result);
- result.addCompletionListener(new ResultsFuture.CompletionListener<Integer>() {
- public void onCompletion(ResultsFuture<Integer> future) {
- int rowsMoved = 0;
- try {
- rowsMoved = future.get();
- client.sendCommandComplete("MOVE", rowsMoved); //$NON-NLS-1$
- } catch (InterruptedException e) {
- throw new AssertionError(e);
- } catch (ExecutionException e) {
- errorOccurred(e.getCause());
- } catch (IOException e) {
- errorOccurred(e);
- }
- completion.getResultsReceiver().receiveResults(rowsMoved);
- };
- });
+ if (cursor == null) {
+ throw new SQLException(RuntimePlugin.Util.getString("not_bound", prepareName)); //$NON-NLS-1$
}
- else {
- errorOccurred(RuntimePlugin.Util.getString("not_bound", prepareName)); //$NON-NLS-1$
- completion.getResultsReceiver().receiveResults(1);
- }
+ ResultsFuture<Integer> result = new ResultsFuture<Integer>();
+ this.client.sendMoveCursor(cursor.rs, rows, result);
+ result.addCompletionListener(new ResultsFuture.CompletionListener<Integer>() {
+ public void onCompletion(ResultsFuture<Integer> future) {
+ try {
+ int rowsMoved = future.get();
+ client.sendCommandComplete("MOVE", rowsMoved); //$NON-NLS-1$
+ completion.getResultsReceiver().receiveResults(rowsMoved);
+ } catch (Throwable e) {
+ completion.getResultsReceiver().exceptionOccurred(e);
+ }
+ };
+ });
}
- private void cursorClose(String prepareName) throws SQLException, IOException {
+ private void cursorClose(String prepareName) throws SQLException {
Cursor cursor = this.cursorMap.remove(prepareName);
if (cursor != null) {
cursor.rs.close();
@@ -379,15 +347,8 @@
try {
ResultsFuture<Integer> result = new ResultsFuture<Integer>();
if (future.get()) {
- if (stmt.getResultSet() != null) {
- List<PgColInfo> cols = getPgColInfo(stmt.getResultSet().getMetaData());
- client.sendResults(sql, stmt.getResultSet(), cols, result, true);
- }
- else {
- // handles the "SET" commands.
- client.sendUpdateCount(sql, 0);
- result.getResultsReceiver().receiveResults(1);
- }
+ List<PgColInfo> cols = getPgColInfo(stmt.getResultSet().getMetaData());
+ client.sendResults(sql, stmt.getResultSet(), cols, result, true);
} else {
client.sendUpdateCount(sql, stmt.getUpdateCount());
setEncoding();
@@ -396,16 +357,20 @@
result.addCompletionListener(new ResultsFuture.CompletionListener<Integer>() {
public void onCompletion(ResultsFuture<Integer> future) {
try {
- stmt.close();
- } catch (SQLException e) {
- LogManager.logDetail(LogConstants.CTX_ODBC, e, "Error closing statement"); //$NON-NLS-1$
+ try {
+ stmt.close();
+ } catch (SQLException e) {
+ LogManager.logDetail(LogConstants.CTX_ODBC, e, "Error closing statement"); //$NON-NLS-1$
+ }
+ future.get();
+ completion.getResultsReceiver().receiveResults(1);
+ } catch (Throwable e) {
+ completion.getResultsReceiver().exceptionOccurred(e);
}
- completion.getResultsReceiver().receiveResults(1);
}
});
} catch (Throwable e) {
- errorOccurred(e);
- completion.getResultsReceiver().receiveResults(1);
+ completion.getResultsReceiver().exceptionOccurred(e);
}
}
});
@@ -413,33 +378,27 @@
@Override
public void prepare(String prepareName, String sql, int[] paramType) {
- if (this.connection != null) {
-
- if (prepareName == null || prepareName.length() == 0) {
- prepareName = UNNAMED;
- }
-
- if (sql != null) {
- String modfiedSQL = fixSQL(sql);
- try {
- // close if the name is already used or the unnamed prepare; otherwise
- // stmt is alive until session ends.
- Prepared previous = this.preparedMap.remove(prepareName);
- if (previous != null) {
- previous.stmt.close();
- }
+ if (prepareName == null || prepareName.length() == 0) {
+ prepareName = UNNAMED;
+ }
- PreparedStatementImpl stmt = this.connection.prepareStatement(modfiedSQL);
- this.preparedMap.put(prepareName, new Prepared(prepareName, sql, stmt, paramType));
- this.client.prepareCompleted(prepareName);
- } catch (SQLException e) {
- errorOccurred(e);
+ if (sql != null) {
+ String modfiedSQL = fixSQL(sql);
+ try {
+ // close if the name is already used or the unnamed prepare; otherwise
+ // stmt is alive until session ends.
+ Prepared previous = this.preparedMap.remove(prepareName);
+ if (previous != null) {
+ previous.stmt.close();
}
+
+ PreparedStatementImpl stmt = this.connection.prepareStatement(modfiedSQL);
+ this.preparedMap.put(prepareName, new Prepared(prepareName, sql, stmt, paramType));
+ this.client.prepareCompleted(prepareName);
+ } catch (SQLException e) {
+ errorOccurred(e);
}
}
- else {
- errorOccurred(RuntimePlugin.Util.getString("no_active_connection")); //$NON-NLS-1$
- }
}
@Override
@@ -518,7 +477,7 @@
stmt.setMaxRows(maxRows);
}
- this.executionFuture = stmt.submitExecute();
+ this.executionFuture = stmt.submitExecute(ResultsMode.EITHER);
executionFuture.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
@Override
public void onCompletion(ResultsFuture<Boolean> future) {
@@ -529,7 +488,6 @@
List<PgColInfo> cols = getPgColInfo(stmt.getResultSet().getMetaData());
client.sendResults(query.sql, stmt.getResultSet(), cols, result, true);
} else {
- // null future
client.sendUpdateCount(query.sql, stmt.getUpdateCount());
setEncoding();
result.getResultsReceiver().receiveResults(1);
@@ -573,8 +531,6 @@
throw new AssertionError(e);
} catch (ExecutionException e) {
errorOccurred(e.getCause());
- } catch (IOException e) {
- errorOccurred(e);
}
};
});
@@ -670,7 +626,7 @@
}
@Override
- public void executeQuery(final String query) {
+ public void executeQuery(String query) {
if (beginExecution()) {
errorOccurred("Awaiting asynch result"); //$NON-NLS-1$
ready();
@@ -679,12 +635,12 @@
//46.2.3 Note that a simple Query message also destroys the unnamed portal.
this.portalMap.remove(UNNAMED);
this.preparedMap.remove(UNNAMED);
-
- if (query.trim().length() == 0) {
- this.client.emptyQueryReceived();
+ query = query.trim();
+ if (query.length() == 0) {
+ client.emptyQueryReceived();
ready();
- return;
}
+
QueryWorkItem r = new QueryWorkItem(query);
r.run();
}
@@ -914,6 +870,15 @@
private QueryWorkItem(String query) {
this.reader = new ScriptReader(new StringReader(query));
}
+
+ private void done(Throwable error) {
+ if (error != null) {
+ errorOccurred(error);
+ } else {
+ doneExecuting();
+ }
+ ready();
+ }
@Override
public void run() {
@@ -933,10 +898,14 @@
} catch (InterruptedException e) {
throw new AssertionError(e);
} catch (IOException e) {
- client.errorOccurred(e);
+ done(e);
return;
} catch (ExecutionException e) {
- client.errorOccurred(e.getCause());
+ Throwable cause = e;
+ while (cause instanceof ExecutionException && cause.getCause() != null && cause != cause.getCause()) {
+ cause = cause.getCause();
+ }
+ done(cause);
return;
}
QueryWorkItem.this.run(); //continue processing
@@ -982,20 +951,23 @@
}
return; //wait for the execution to finish
} catch (SQLException e) {
- errorOccurred(e);
- break;
+ done(e);
+ return;
}
}
} catch(IOException e) {
- errorOccurred(e);
+ done(e);
+ return;
}
- doneExecuting();
- ready();
+ done(null);
}
}
private List<PgColInfo> getPgColInfo(ResultSetMetaData meta)
throws SQLException {
+ if (meta == null) {
+ return null;
+ }
int columns = meta.getColumnCount();
final ArrayList<PgColInfo> result = new ArrayList<PgColInfo>(columns);
for (int i = 1; i < columns + 1; i++) {
Modified: branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -393,13 +393,13 @@
}
@Override
- public void assosiateSubjectInContext(String securityDomain, Subject subject) {
+ public void associateSubjectInContext(String securityDomain, Subject subject) {
Principal principal = null;
for(Principal p:subject.getPrincipals()) {
principal = p;
break;
}
- this.securityHelper.assosiateSecurityContext(securityDomain, this.securityHelper.createSecurityContext(securityDomain, principal, null, subject));
+ this.securityHelper.associateSecurityContext(securityDomain, this.securityHelper.createSecurityContext(securityDomain, principal, null, subject));
}
public void setKrb5SecurityDomain(String domain) {
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/LogonImpl.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -173,7 +173,7 @@
LogManager.logDetail(LogConstants.CTX_SECURITY, "Kerberos context established"); //$NON-NLS-1$
//connProps.setProperty(TeiidURL.CONNECTION.PASSTHROUGH_AUTHENTICATION, "true"); //$NON-NLS-1$
- service.assosiateSubjectInContext(securityDomain, subject);
+ service.associateSubjectInContext(securityDomain, subject);
return logon(connProps, result.serviceTicket);
} catch (LoginException e) {
throw new LogonException(e, RuntimePlugin.Util.getString("krb5_login_failed")); //$NON-NLS-1$
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/ODBCClientInstance.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/ODBCClientInstance.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/ODBCClientInstance.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -21,6 +21,7 @@
*/
package org.teiid.transport;
+import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -90,6 +91,7 @@
@Override
public void exceptionOccurred(Throwable t) {
+ LogManager.log(t instanceof IOException?MessageLevel.DETAIL:MessageLevel.ERROR, LogConstants.CTX_ODBC, t, "Unhandled exception, closing client instance"); //$NON-NLS-1$
server.terminate();
}
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/ODBCSocketListener.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -36,6 +36,7 @@
public class ODBCSocketListener extends SocketListener {
private AuthenticationType authType = AuthenticationType.CLEARTEXT;
+ private int maxBufferSize = Integer.parseInt(System.getProperty("org.teiid.ODBCPacketSize", "307200")); //$NON-NLS-1$ //$NON-NLS-2$
private int maxLobSize;
private TeiidDriver driver;
private ILogon logonService;
@@ -59,6 +60,10 @@
public void setDriver(TeiidDriver driver) {
this.driver = driver;
}
+
+ public void setMaxBufferSize(int maxBufferSize) {
+ this.maxBufferSize = maxBufferSize;
+ }
@Override
protected SSLAwareChannelHandler createChannelPipelineFactory(final SSLConfiguration config, final StorageManager storageManager) {
@@ -67,7 +72,7 @@
ChannelPipeline pipeline = new DefaultChannelPipeline();
pipeline.addLast("odbcFrontendProtocol", new PgFrontendProtocol(1 << 20)); //$NON-NLS-1$
- pipeline.addLast("odbcBackendProtocol", new PgBackendProtocol(maxLobSize, config)); //$NON-NLS-1$
+ pipeline.addLast("odbcBackendProtocol", new PgBackendProtocol(maxLobSize, maxBufferSize, config)); //$NON-NLS-1$
pipeline.addLast("handler", this); //$NON-NLS-1$
return pipeline;
}
Modified: branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
===================================================================
--- branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,4 +1,3 @@
-
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
@@ -21,30 +20,13 @@
* 02110-1301 USA.
*/package org.teiid.transport;
-import static org.teiid.odbc.PGUtil.PG_TYPE_BOOL;
-import static org.teiid.odbc.PGUtil.PG_TYPE_BPCHAR;
-import static org.teiid.odbc.PGUtil.PG_TYPE_BYTEA;
-import static org.teiid.odbc.PGUtil.PG_TYPE_CHARARRAY;
-import static org.teiid.odbc.PGUtil.PG_TYPE_DATE;
-import static org.teiid.odbc.PGUtil.PG_TYPE_FLOAT4;
-import static org.teiid.odbc.PGUtil.PG_TYPE_FLOAT8;
-import static org.teiid.odbc.PGUtil.PG_TYPE_INT2;
-import static org.teiid.odbc.PGUtil.PG_TYPE_INT4;
-import static org.teiid.odbc.PGUtil.PG_TYPE_INT8;
-import static org.teiid.odbc.PGUtil.PG_TYPE_NUMERIC;
-import static org.teiid.odbc.PGUtil.PG_TYPE_OIDARRAY;
-import static org.teiid.odbc.PGUtil.PG_TYPE_OIDVECTOR;
-import static org.teiid.odbc.PGUtil.PG_TYPE_TEXT;
-import static org.teiid.odbc.PGUtil.PG_TYPE_TEXTARRAY;
-import static org.teiid.odbc.PGUtil.PG_TYPE_TIME;
-import static org.teiid.odbc.PGUtil.PG_TYPE_TIMESTAMP_NO_TMZONE;
-import static org.teiid.odbc.PGUtil.PG_TYPE_UNKNOWN;
-import static org.teiid.odbc.PGUtil.PG_TYPE_VARCHAR;
+import static org.teiid.odbc.PGUtil.*;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
import java.io.StreamCorruptedException;
+import java.io.Writer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.charset.Charset;
@@ -61,6 +43,7 @@
import javax.net.ssl.SSLEngine;
import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBufferOutputStream;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.ChannelDownstreamHandler;
import org.jboss.netty.channel.ChannelEvent;
@@ -72,7 +55,6 @@
import org.jboss.netty.handler.ssl.SslHandler;
import org.teiid.client.util.ResultsFuture;
import org.teiid.core.util.ObjectConverterUtil;
-import org.teiid.core.util.ReaderInputStream;
import org.teiid.core.util.ReflectionHelper;
import org.teiid.jdbc.ResultSetImpl;
import org.teiid.jdbc.TeiidSQLException;
@@ -108,9 +90,6 @@
}
}
- // 300k
- static int ODBC_SOCKET_BUFF_SIZE = Integer.parseInt(System.getProperty("ODBCPacketSize", "307200"));
-
private final class ResultsWorkItem implements Runnable {
private final List<PgColInfo> cols;
private final ResultSetImpl rs;
@@ -118,13 +97,14 @@
private int rows2Send;
private int rowsSent = 0;
private int rowsInBuffer = 0;
- private ChannelBuffer buffer = ChannelBuffers.directBuffer(ODBC_SOCKET_BUFF_SIZE);
+ String sql;
private ResultsWorkItem(List<PgColInfo> cols, ResultSetImpl rs, ResultsFuture<Integer> result, int rows2Send) {
this.cols = cols;
this.rs = rs;
this.result = result;
this.rows2Send = rows2Send;
+ initBuffer(maxBufferSize / 8);
}
@Override
@@ -160,7 +140,7 @@
boolean processNext = true;
try {
if (future.get()) {
- sendDataRow(rs, cols, buffer);
+ sendDataRow(rs, cols);
rowsSent++;
rowsInBuffer++;
boolean done = rowsSent == rows2Send;
@@ -170,7 +150,10 @@
result.getResultsReceiver().receiveResults(rowsSent);
}
} else {
- sendContents(buffer);
+ sendContents();
+ if (sql != null) {
+ sendCommandComplete(sql, 0);
+ }
result.getResultsReceiver().receiveResults(rowsSent);
processNext = false;
}
@@ -182,31 +165,33 @@
}
private void flushResults(boolean force) {
- int avgRowsize = buffer.readableBytes()/rowsInBuffer;
- if (force || buffer.writableBytes() < (avgRowsize*2)) {
- sendContents(buffer);
- buffer= ChannelBuffers.directBuffer(ODBC_SOCKET_BUFF_SIZE);
+ int avgRowsize = dataOut.writerIndex()/rowsInBuffer;
+ if (force || (maxBufferSize - dataOut.writerIndex()) < (avgRowsize*2)) {
+ sendContents();
+ initBuffer(maxBufferSize / 8);
rowsInBuffer = 0;
}
}
}
- private DataOutputStream dataOut;
- private ByteArrayOutputStream outBuffer;
- private char messageType;
+ private ChannelBuffer dataOut;
+ private OutputStreamWriter writer;
+
private Properties props;
private Charset encoding = Charset.forName("UTF-8");
private ReflectionHelper clientProxy = new ReflectionHelper(ODBCClientRemote.class);
private ChannelHandlerContext ctx;
private MessageEvent message;
private int maxLobSize = (2*1024*1024); // 2 MB
+ private final int maxBufferSize;
private volatile ResultsFuture<Boolean> nextFuture;
private SSLConfiguration config;
- public PgBackendProtocol(int maxLobSize, SSLConfiguration config) {
+ public PgBackendProtocol(int maxLobSize, int maxBufferSize, SSLConfiguration config) {
this.maxLobSize = maxLobSize;
+ this.maxBufferSize = maxBufferSize;
this.config = config;
}
@@ -255,51 +240,39 @@
@Override
public void useAuthenticationGSS() {
- try {
- sendAuthenticationGSS();
- } catch (IOException e) {
- terminate(e);
- }
+ sendAuthenticationGSS();
}
@Override
public void authenticationGSSContinue(byte[] serviceToken) {
- try {
- sendAuthenticationGSSContinue(serviceToken);
- } catch (IOException e) {
- terminate(e);
- }
+ sendAuthenticationGSSContinue(serviceToken);
}
@Override
public void authenticationSucess(int processId, int screctKey) {
- try {
- sendAuthenticationOk();
- // server_version, server_encoding, client_encoding, application_name,
- // is_superuser, session_authorization, DateStyle, IntervalStyle, TimeZone,
- // integer_datetimes, and standard_conforming_strings.
- // (server_encoding, TimeZone, and integer_datetimes were not reported
- // by releases before 8.0; standard_conforming_strings was not reported by
- // releases before 8.1; IntervalStyle was not reported by releases before 8.4;
- // application_name was not reported by releases before 9.0.)
-
- sendParameterStatus("client_encoding", PGCharsetConverter.getEncoding(this.encoding));
- sendParameterStatus("DateStyle", this.props.getProperty("DateStyle", "ISO"));
- sendParameterStatus("integer_datetimes", "off");
- sendParameterStatus("is_superuser", "off");
- sendParameterStatus("server_encoding", "SQL_ASCII");
- sendParameterStatus("server_version", "8.1.4");
- sendParameterStatus("session_authorization", this.props.getProperty("user"));
- sendParameterStatus("standard_conforming_strings", "off");
- sendParameterStatus("application_name", this.props.getProperty("application_name", "ODBCClient"));
-
- // TODO PostgreSQL TimeZone
- sendParameterStatus("TimeZone", "CET");
-
- sendBackendKeyData(processId, screctKey);
- } catch (IOException e) {
- terminate(e);
- }
+ sendAuthenticationOk();
+ // server_version, server_encoding, client_encoding, application_name,
+ // is_superuser, session_authorization, DateStyle, IntervalStyle, TimeZone,
+ // integer_datetimes, and standard_conforming_strings.
+ // (server_encoding, TimeZone, and integer_datetimes were not reported
+ // by releases before 8.0; standard_conforming_strings was not reported by
+ // releases before 8.1; IntervalStyle was not reported by releases before 8.4;
+ // application_name was not reported by releases before 9.0.)
+
+ sendParameterStatus("client_encoding", PGCharsetConverter.getEncoding(this.encoding));
+ sendParameterStatus("DateStyle", this.props.getProperty("DateStyle", "ISO"));
+ sendParameterStatus("integer_datetimes", "off");
+ sendParameterStatus("is_superuser", "off");
+ sendParameterStatus("server_encoding", "SQL_ASCII");
+ sendParameterStatus("server_version", "8.1.4");
+ sendParameterStatus("session_authorization", this.props.getProperty("user"));
+ sendParameterStatus("standard_conforming_strings", "off");
+ sendParameterStatus("application_name", this.props.getProperty("application_name", "ODBCClient"));
+
+ // TODO PostgreSQL TimeZone
+ sendParameterStatus("TimeZone", "CET");
+
+ sendBackendKeyData(processId, screctKey);
}
@Override
@@ -314,29 +287,17 @@
@Override
public void errorOccurred(String msg) {
- try {
- sendErrorResponse(msg);
- } catch (IOException e) {
- terminate(e);
- }
+ sendErrorResponse(msg);
}
@Override
public void errorOccurred(Throwable t) {
- try {
- sendErrorResponse(t);
- } catch (IOException e) {
- terminate(e);
- }
+ sendErrorResponse(t);
}
@Override
public void ready(boolean inTransaction, boolean failedTransaction) {
- try {
- sendReadyForQuery(inTransaction, failedTransaction);
- } catch (IOException e) {
- terminate(e);
- }
+ sendReadyForQuery(inTransaction, failedTransaction);
}
public void setEncoding(String value) {
@@ -349,47 +310,35 @@
@Override
public void sendParameterDescription(ParameterMetaData meta, int[] paramType) {
try {
- try {
- int count = meta.getParameterCount();
- startMessage('t');
- writeShort(count);
- for (int i = 0; i < count; i++) {
- int type;
- if (paramType != null && paramType[i] != 0) {
- type = paramType[i];
- } else {
- type = convertType(meta.getParameterType(i+1));
- }
- writeInt(type);
+ int count = meta.getParameterCount();
+ startMessage('t');
+ writeShort(count);
+ for (int i = 0; i < count; i++) {
+ int type;
+ if (paramType != null && paramType[i] != 0) {
+ type = paramType[i];
+ } else {
+ type = convertType(meta.getParameterType(i+1));
}
- sendMessage();
- } catch (SQLException e) {
- sendErrorResponse(e);
- }
- } catch (IOException e) {
- terminate(e);
- }
+ writeInt(type);
+ }
+ sendMessage();
+ } catch (SQLException e) {
+ sendErrorResponse(e);
+ }
}
@Override
public void sendResultSetDescription(List<PgColInfo> cols) {
- try {
- sendRowDescription(cols);
- } catch (IOException e) {
- terminate(e);
- }
+ sendRowDescription(cols);
}
@Override
public void sendCursorResults(ResultSetImpl rs, List<PgColInfo> cols, ResultsFuture<Integer> result, int rowCount) {
- try {
- sendRowDescription(cols);
+ sendRowDescription(cols);
- ResultsWorkItem r = new ResultsWorkItem(cols, rs, result, rowCount);
- r.run();
- } catch (IOException e) {
- terminate(e);
- }
+ ResultsWorkItem r = new ResultsWorkItem(cols, rs, result, rowCount);
+ r.run();
}
@Override
@@ -401,48 +350,36 @@
@Override
public void sendMoveCursor(ResultSetImpl rs, int rowCount, ResultsFuture<Integer> results) {
try {
- try {
- int rowsMoved = 0;
- for (int i = 0; i < rowCount; i++) {
- if (!rs.next()) {
- break;
- }
- rowsMoved++;
- }
- results.getResultsReceiver().receiveResults(rowsMoved);
- } catch (SQLException e) {
- sendErrorResponse(e);
- }
- } catch (IOException e) {
- terminate(e);
+ int rowsMoved = 0;
+ for (int i = 0; i < rowCount; i++) {
+ if (!rs.next()) {
+ break;
+ }
+ rowsMoved++;
+ }
+ results.getResultsReceiver().receiveResults(rowsMoved);
+ } catch (SQLException e) {
+ sendErrorResponse(e);
}
}
@Override
public void sendResults(final String sql, final ResultSetImpl rs, List<PgColInfo> cols, ResultsFuture<Integer> result, boolean describeRows) {
- try {
- if (nextFuture != null) {
- sendErrorResponse(new IllegalStateException("Pending results have not been sent")); //$NON-NLS-1$
- }
-
- if (describeRows) {
- sendRowDescription(cols);
- }
- ResultsWorkItem r = new ResultsWorkItem(cols, rs, result, -1);
- r.run();
- sendCommandComplete(sql, 0);
- } catch (IOException e) {
- terminate(e);
+ if (nextFuture != null) {
+ sendErrorResponse(new IllegalStateException("Pending results have not been sent")); //$NON-NLS-1$
}
+
+ if (describeRows) {
+ sendRowDescription(cols);
+ }
+ ResultsWorkItem r = new ResultsWorkItem(cols, rs, result, -1);
+ r.sql = sql;
+ r.run();
}
@Override
public void sendUpdateCount(String sql, int updateCount) {
- try {
- sendCommandComplete(sql, updateCount);
- } catch (IOException e) {
- terminate(e);
- }
+ sendCommandComplete(sql, updateCount);
}
@Override
@@ -453,24 +390,16 @@
@Override
public void terminated() {
- try {
- trace("channel being terminated");
- this.sendNoticeResponse("Connection closed");
- this.ctx.getChannel().close();
- } catch (IOException e) {
- trace(e.getMessage());
- }
+ trace("channel being terminated");
+ this.sendNoticeResponse("Connection closed");
+ this.ctx.getChannel().close();
}
@Override
public void flush() {
- try {
- this.dataOut.flush();
- this.dataOut = null;
- Channels.write(this.ctx.getChannel(), null);
- } catch (IOException e) {
- terminate(e);
- }
+ this.dataOut = null;
+ this.writer = null;
+ Channels.write(this.ctx.getChannel(), null);
}
@Override
@@ -489,7 +418,7 @@
}
@Override
- public void sendCommandComplete(String sql, int updateCount) throws IOException {
+ public void sendCommandComplete(String sql, int updateCount) {
startMessage('C');
sql = sql.trim().toUpperCase();
// TODO remove remarks at the beginning
@@ -526,32 +455,24 @@
sendMessage();
}
- private void sendDataRow(ResultSet rs, List<PgColInfo> cols, ChannelBuffer buffer) throws SQLException, IOException {
- startMessage('D');
+ private void sendDataRow(ResultSet rs, List<PgColInfo> cols) throws SQLException, IOException {
+ startMessage('D', -1);
+ int lengthIndex = this.dataOut.writerIndex() - 4;
writeShort(cols.size());
for (int i = 0; i < cols.size(); i++) {
- byte[] bytes = getContent(rs, cols.get(i), i+1);
- if (bytes == null) {
- writeInt(-1);
- } else {
- writeInt(bytes.length);
- write(bytes);
+ int dataBytesIndex = this.dataOut.writerIndex();
+ writeInt(-1);
+ getContent(rs, cols.get(i), i+1);
+ writer.flush();
+ if (!rs.wasNull()) {
+ int bytes = this.dataOut.writerIndex() - dataBytesIndex - 4;
+ this.dataOut.setInt(dataBytesIndex, bytes);
}
}
-
- byte[] buff = outBuffer.toByteArray();
- int len = buff.length;
- this.outBuffer = null;
- this.dataOut = null;
-
- // now build the wire contents.
- buffer.writeByte((byte)this.messageType);
- buffer.writeInt(len+4);
- buffer.writeBytes(buff);
+ this.dataOut.setInt(lengthIndex, this.dataOut.writerIndex() - lengthIndex);
}
- private byte[] getContent(ResultSet rs, PgColInfo col, int column) throws SQLException, TeiidSQLException, IOException {
- byte[] bytes = null;
+ private void getContent(ResultSet rs, PgColInfo col, int column) throws SQLException, TeiidSQLException, IOException {
switch (col.type) {
case PG_TYPE_BOOL:
case PG_TYPE_BPCHAR:
@@ -567,14 +488,19 @@
case PG_TYPE_VARCHAR:
String value = rs.getString(column);
if (value != null) {
- bytes = value.getBytes(this.encoding);
+ writer.write(value);
}
break;
case PG_TYPE_TEXT:
Clob clob = rs.getClob(column);
if (clob != null) {
- bytes = ObjectConverterUtil.convertToByteArray(new ReaderInputStream(clob.getCharacterStream(), this.encoding), this.maxLobSize);
+ Reader r = clob.getCharacterStream();
+ try {
+ ObjectConverterUtil.write(writer, r, this.maxLobSize, false);
+ } finally {
+ r.close();
+ }
}
break;
@@ -582,7 +508,8 @@
Blob blob = rs.getBlob(column);
if (blob != null) {
try {
- bytes = PGbytea.toPGString(ObjectConverterUtil.convertToByteArray(blob.getBinaryStream(), this.maxLobSize)).getBytes(this.encoding);
+ String blobString = PGbytea.toPGString(ObjectConverterUtil.convertToByteArray(blob.getBinaryStream(), this.maxLobSize));
+ writer.write(blobString);
} catch(OutOfMemoryError e) {
throw new StreamCorruptedException("data too big: " + e.getMessage()); //$NON-NLS-1$
}
@@ -595,25 +522,25 @@
{
Object[] obj = (Object[])rs.getObject(column);
if (obj != null) {
- StringBuilder sb = new StringBuilder();
- sb.append("{");
+ writer.append("{");
boolean first = true;
for (Object o:obj) {
if (!first) {
- sb.append(",");
+ writer.append(",");
}
else {
first = false;
}
- if (col.type == PG_TYPE_TEXTARRAY) {
- escapeQuote(sb, o.toString());
+ if (o != null) {
+ if (col.type == PG_TYPE_TEXTARRAY) {
+ escapeQuote(writer, o.toString());
+ }
+ else {
+ writer.append(o.toString());
+ }
}
- else {
- sb.append(o.toString());
- }
}
- sb.append("}");
- bytes = sb.toString().getBytes(this.encoding);
+ writer.append("}");
}
}
break;
@@ -622,18 +549,18 @@
{
Object[] obj = (Object[])rs.getObject(column);
if (obj != null) {
- StringBuilder sb = new StringBuilder();
boolean first = true;
for (Object o:obj) {
if (!first) {
- sb.append(" ");
+ writer.append(" ");
}
else {
first = false;
}
- sb.append(o);
+ if (o != null) {
+ writer.append(o.toString());
+ }
}
- bytes = sb.toString().getBytes(this.encoding);
}
}
break;
@@ -641,10 +568,9 @@
default:
throw new TeiidSQLException("unknown datatype failed to convert");
}
- return bytes;
}
- public static void escapeQuote(StringBuilder sb, String s) {
+ public static void escapeQuote(Writer sb, String s) throws IOException {
sb.append('"');
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
@@ -667,7 +593,7 @@
} catch (GeneralSecurityException e) {
LogManager.logError(LogConstants.CTX_ODBC, e, RuntimePlugin.Util.getString("PgBackendProtocol.ssl_error"));
}
- ChannelBuffer buffer = ChannelBuffers.directBuffer(1);
+ ChannelBuffer buffer = ctx.getChannel().getConfig().getBufferFactory().getBuffer(1);
if (engine == null) {
buffer.writeByte('N');
} else {
@@ -677,7 +603,7 @@
Channels.write(this.ctx, this.message.getFuture(), buffer, this.message.getRemoteAddress());
}
- private void sendErrorResponse(Throwable t) throws IOException {
+ private void sendErrorResponse(Throwable t) {
trace(t.getMessage());
SQLException e = TeiidSQLException.create(t);
startMessage('E');
@@ -693,7 +619,13 @@
sendMessage();
}
- private void sendRowDescription(List<PgColInfo> cols) throws IOException {
+ private void sendRowDescription(List<PgColInfo> cols) {
+ if (cols == null) {
+ //send NoData
+ startMessage('n');
+ sendMessage();
+ return;
+ }
startMessage('T');
writeShort(cols.size());
for (PgColInfo info : cols) {
@@ -723,7 +655,7 @@
}
}
- private void sendErrorResponse(String message) throws IOException {
+ private void sendErrorResponse(String message) {
trace("Exception:", message);
startMessage('E');
write('S');
@@ -736,7 +668,7 @@
sendMessage();
}
- private void sendNoticeResponse(String message) throws IOException {
+ private void sendNoticeResponse(String message) {
trace("notice:", message);
startMessage('N');
write('S');
@@ -768,26 +700,26 @@
sendMessage();
}
- private void sendAuthenticationGSS() throws IOException {
+ private void sendAuthenticationGSS() {
startMessage('R');
writeInt(7);
sendMessage();
}
- private void sendAuthenticationGSSContinue(byte[] serviceToken) throws IOException {
+ private void sendAuthenticationGSSContinue(byte[] serviceToken) {
startMessage('R');
writeInt(8);
write(serviceToken);
sendMessage();
}
- private void sendAuthenticationOk() throws IOException {
+ private void sendAuthenticationOk() {
startMessage('R');
writeInt(0);
sendMessage();
}
- private void sendReadyForQuery(boolean inTransaction, boolean failedTransaction) throws IOException {
+ private void sendReadyForQuery(boolean inTransaction, boolean failedTransaction) {
startMessage('Z');
char c;
if (failedTransaction) {
@@ -807,14 +739,14 @@
sendMessage();
}
- private void sendBackendKeyData(int processId, int screctKey) throws IOException {
+ private void sendBackendKeyData(int processId, int screctKey) {
startMessage('K');
writeInt(processId);
writeInt(screctKey);
sendMessage();
}
- private void sendParameterStatus(String param, String value) throws IOException {
+ private void sendParameterStatus(String param, String value) {
startMessage('S');
writeString(param);
writeString(value);
@@ -823,76 +755,75 @@
@Override
public void functionCallResponse(byte[] data) {
- try {
- startMessage('V');
- if (data == null) {
- writeInt(-1);
- }
- else {
- writeInt(data.length);
- write(data);
- }
- sendMessage();
- } catch (IOException e) {
- terminate(e);
- }
+ startMessage('V');
+ if (data == null) {
+ writeInt(-1);
+ }
+ else {
+ writeInt(data.length);
+ write(data);
+ }
+ sendMessage();
}
@Override
public void functionCallResponse(int data) {
- try {
- startMessage('V');
- writeInt(4);
- writeInt(data);
- sendMessage();
- } catch (IOException e) {
- terminate(e);
- }
+ startMessage('V');
+ writeInt(4);
+ writeInt(data);
+ sendMessage();
}
- private void writeString(String s) throws IOException {
+ private void writeString(String s) {
write(s.getBytes(this.encoding));
write(0);
}
- private void writeInt(int i) throws IOException {
+ private void writeInt(int i) {
dataOut.writeInt(i);
}
- private void writeShort(int i) throws IOException {
+ private void writeShort(int i) {
dataOut.writeShort(i);
}
- private void write(byte[] data) throws IOException {
- dataOut.write(data);
+ private void write(byte[] data) {
+ dataOut.writeBytes(data);
}
- private void write(int b) throws IOException {
- dataOut.write(b);
+ private void write(int b) {
+ dataOut.writeByte(b);
}
private void startMessage(char newMessageType) {
- this.messageType = newMessageType;
- this.outBuffer = new ByteArrayOutputStream();
- this.dataOut = new DataOutputStream(this.outBuffer);
+ startMessage(newMessageType, 32);
}
+ private void startMessage(char newMessageType, int estimatedLength) {
+ if (estimatedLength > -1) {
+ initBuffer(estimatedLength);
+ }
+ this.dataOut.writeByte((byte)newMessageType);
+ this.dataOut.writerIndex(this.dataOut.writerIndex() + 4);
+ }
+
+ private void initBuffer(int estimatedLength) {
+ this.dataOut = ChannelBuffers.dynamicBuffer(estimatedLength);
+ ChannelBufferOutputStream cbos = new ChannelBufferOutputStream(this.dataOut);
+ this.writer = new OutputStreamWriter(cbos, this.encoding);
+ }
+
private void sendMessage() {
- byte[] buff = outBuffer.toByteArray();
- int len = buff.length;
- this.outBuffer = null;
- this.dataOut = null;
-
- // now build the wire contents.
- ChannelBuffer buffer = ChannelBuffers.directBuffer(len+5);
- buffer.writeByte((byte)this.messageType);
- buffer.writeInt(len+4);
- buffer.writeBytes(buff);
- Channels.write(this.ctx, this.message.getFuture(), buffer, this.message.getRemoteAddress());
+ int pos = this.dataOut.writerIndex();
+ this.dataOut.setInt(1, pos - 1);
+ sendContents();
}
- private void sendContents(ChannelBuffer buffer) {
- Channels.write(this.ctx, this.message.getFuture(), buffer, this.message.getRemoteAddress());
+ private void sendContents() {
+ ChannelBuffer cb = this.dataOut;
+ this.dataOut = null;
+ this.writer = null;
+ Channels.write(this.ctx, this.message.getFuture(), cb, this.message.getRemoteAddress());
}
private static void trace(String... msg) {
Modified: branches/as7/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- branches/as7/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2011-09-05 14:27:44 UTC (rev 3451)
@@ -82,7 +82,6 @@
name_not_found=Translator property "name" not defined for the deployment "{0}"
translator_type_not_found=The parent translator defined not found in configuration "{0}"
failed_to_load_odbc_metadata=Failed to load the ODBC metadata repository.
-no_active_connection=No active connection found
bad_binding=Binding on a statement, that has not been prepared:{0}
not_bound=No bound statement found with name {0}
no_stmt_found=No prepared statement found with name {0}
@@ -92,7 +91,6 @@
ambigious_name=Ambiguous VDB name specified. Only single occurrence of the "." is allowed in the VDB name. Also, when version based vdb name is specified, then a separate "version" connection option is not allowed:{0}.{1}
lo_not_supported=LO functions are not supported
SSLConfiguration.no_anonymous=The anonymous cipher suite TLS_DH_anon_WITH_AES_128_CBC_SHA is not available. Please change the transport to be non-SSL or use non-anonymous SSL.
-execution_failed=Cursor execution failed
PgBackendProtocol.ssl_error=Could not initialize ODBC SSL. non-SSL connections will still be allowed.
wrong_logon_type_jaas = Wrong logon method is being used. Server is not set up for JAAS based authentication. Correct your client's 'AuthenticationType' property.
Modified: branches/as7/runtime/src/test/java/org/teiid/deployers/TestCompositeVDB.java
===================================================================
--- branches/as7/runtime/src/test/java/org/teiid/deployers/TestCompositeVDB.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/runtime/src/test/java/org/teiid/deployers/TestCompositeVDB.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -149,8 +149,13 @@
@Test public void testRemoveChild() throws Exception {
CompositeVDB vdb = createCompositeVDB(RealMetadataFactory.exampleBQTStore(), "bqt");
- vdb.removeChild(new VDBKey("foo", 1));
+ VDBKey child = new VDBKey("foo", 1);
+ vdb.removeChild(child);
assertNotNull(vdb.getVDB());
+ assertFalse(vdb.hasChildVdb(child));
+ vdb.addChild(createCompositeVDB(RealMetadataFactory.example1Store(), "foo"));
+ assertTrue(vdb.hasChildVdb(child));
+ assertNotNull(vdb.getVDB());
}
}
Modified: branches/as7/test-integration/common/pom.xml
===================================================================
--- branches/as7/test-integration/common/pom.xml 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/test-integration/common/pom.xml 2011-09-05 14:27:44 UTC (rev 3451)
@@ -20,6 +20,18 @@
<artifactId>h2</artifactId>
<version>1.2.147</version>
</dependency>
+ <dependency>
+ <artifactId>teiid-cache-jbosscache</artifactId>
+ <groupId>org.jboss.teiid</groupId>
+ </dependency>
+ <dependency>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: branches/as7/test-integration/common/src/test/java/org/teiid/cdk/api/TestTranslationUtility.java
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/cdk/api/TestTranslationUtility.java 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/cdk/api/TestTranslationUtility.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -22,16 +22,15 @@
package org.teiid.cdk.api;
+import static org.junit.Assert.assertEquals;
import junit.framework.TestCase;
-import org.teiid.cdk.api.TranslationUtility;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.language.Command;
import org.teiid.language.NamedTable;
import org.teiid.language.Select;
import org.teiid.metadata.AbstractMetadataRecord;
-
public class TestTranslationUtility extends TestCase {
/**
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -23,12 +23,7 @@
import java.io.File;
import java.security.Principal;
-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 java.util.*;
import javax.security.auth.Subject;
@@ -44,10 +39,7 @@
import org.teiid.cache.DefaultCacheFactory;
import org.teiid.client.DQP;
import org.teiid.client.security.ILogon;
-import org.teiid.deployers.MetadataStoreGroup;
-import org.teiid.deployers.UDFMetaData;
-import org.teiid.deployers.VDBRepository;
-import org.teiid.deployers.VirtualDatabaseException;
+import org.teiid.deployers.*;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
import org.teiid.dqp.internal.datamgr.FakeTransactionService;
@@ -62,10 +54,14 @@
import org.teiid.metadata.index.VDBMetadataFactory;
import org.teiid.net.CommunicationException;
import org.teiid.net.ConnectionException;
+import org.teiid.query.ObjectReplicator;
import org.teiid.query.function.SystemFunctionManager;
+import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.metadata.TransformationMetadata.Resource;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
import org.teiid.query.optimizer.capabilities.SourceCapabilities;
+import org.teiid.query.tempdata.GlobalTableStore;
+import org.teiid.query.tempdata.GlobalTableStoreImpl;
import org.teiid.security.SecurityHelper;
import org.teiid.services.SessionServiceImpl;
import org.teiid.transport.ClientServiceRegistry;
@@ -82,11 +78,16 @@
VDBRepository repo = new VDBRepository();
private ConnectorManagerRepository cmr;
private boolean useCallingThread = true;
+ private ObjectReplicator replicator;
public FakeServer() {
this(new DQPConfiguration());
}
+ public void setReplicator(ObjectReplicator replicator) {
+ this.replicator = replicator;
+ }
+
public FakeServer(DQPConfiguration config) {
Map<String, SecurityDomainContext> securityDomainMap = new HashMap<String, SecurityDomainContext>();
@@ -123,7 +124,26 @@
sessionService.setSecurityDomains(Arrays.asList("somedomain"), securityDomainMap);
this.logon = new LogonImpl(sessionService, null);
-
+ this.repo.addListener(new VDBLifeCycleListener() {
+
+ @Override
+ public void removed(String name, int version, CompositeVDB vdb) {
+
+ }
+
+ @Override
+ public void added(String name, int version, CompositeVDB vdb) {
+ GlobalTableStore gts = new GlobalTableStoreImpl(dqp.getBufferManager(), vdb.getVDB().getAttachment(TransformationMetadata.class));
+ if (replicator != null) {
+ try {
+ gts = replicator.replicate(name + version, GlobalTableStore.class, gts, 300000);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ vdb.getVDB().addAttchment(GlobalTableStore.class, gts);
+ }
+ });
this.repo.setSystemStore(VDBMetadataFactory.getSystem());
this.repo.setSystemFunctionManager(new SystemFunctionManager());
this.repo.odbcEnabled();
Copied: branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java (from rev 3450, trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java)
===================================================================
--- branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java (rev 0)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViewReplication.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -0,0 +1,141 @@
+/*
+ * 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.systemmodel;
+
+import static org.junit.Assert.*;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.jgroups.JChannelFactory;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.UnitTestUtil;
+import org.teiid.jdbc.FakeServer;
+import org.teiid.metadata.FunctionMethod;
+import org.teiid.metadata.FunctionParameter;
+import org.teiid.metadata.FunctionMethod.Determinism;
+import org.teiid.metadata.FunctionMethod.PushDown;
+import org.teiid.replication.jboss.JGroupsObjectReplicator;
+
+@SuppressWarnings("nls")
+public class TestMatViewReplication {
+
+ private static final String MATVIEWS = "matviews";
+ private static final boolean DEBUG = false;
+
+ @BeforeClass public static void oneTimeSetup() {
+ System.setProperty("jgroups.bind_addr", "127.0.0.1");
+ }
+
+ @Test public void testReplication() throws Exception {
+ if (DEBUG) {
+ Logger logger = Logger.getLogger("org.teiid");
+ logger.setLevel(Level.FINEST);
+ for (Handler h : logger.getHandlers()) {
+ h.setLevel(Level.FINEST);
+ }
+ /*org.apache.log4j.Logger l = LogManager.getLogger("org.jgroups");
+ l.setLevel(org.apache.log4j.Level.TRACE);
+ ConsoleAppender ca = new ConsoleAppender(new PatternLayout());
+ ca.setName("x");
+ l.addAppender(ca);*/
+ }
+
+ FakeServer server1 = createServer();
+
+ Connection c1 = server1.createConnection("jdbc:teiid:matviews");
+ Statement stmt = c1.createStatement();
+ stmt.execute("select * from TEST.RANDOMVIEW");
+ ResultSet rs = stmt.getResultSet();
+ assertTrue(rs.next());
+ double d1 = rs.getDouble(1);
+ double d2 = rs.getDouble(2);
+
+ FakeServer server2 = createServer();
+ Connection c2 = server2.createConnection("jdbc:teiid:matviews");
+ Statement stmt2 = c2.createStatement();
+ ResultSet rs2 = stmt2.executeQuery("select * from matviews where name = 'RandomView'");
+ assertTrue(rs2.next());
+ assertEquals("LOADED", rs2.getString("loadstate"));
+ assertEquals(true, rs2.getBoolean("valid"));
+ stmt2.execute("select * from TEST.RANDOMVIEW");
+ rs2 = stmt2.getResultSet();
+ assertTrue(rs2.next());
+ assertEquals(d1, rs2.getDouble(1), 0);
+ assertEquals(d2, rs2.getDouble(2), 0);
+
+ rs2 = stmt2.executeQuery("select * from (call refreshMatView('TEST.RANDOMVIEW', false)) p");
+
+ Thread.sleep(1000);
+
+ //make sure we're still valid and the same
+ stmt.execute("select * from TEST.RANDOMVIEW");
+ rs = stmt.getResultSet();
+ assertTrue(rs.next());
+ d1 = rs.getDouble(1);
+ d2 = rs.getDouble(2);
+ stmt2.execute("select * from TEST.RANDOMVIEW");
+ rs2 = stmt2.getResultSet();
+ assertTrue(rs2.next());
+ assertEquals(d1, rs2.getDouble(1), 0);
+ assertEquals(d2, rs2.getDouble(2), 0);
+
+ //ensure a lookup is usable on each side
+ rs2 = stmt2.executeQuery("select lookup('sys.schemas', 'VDBName', 'name', 'SYS')");
+ Thread.sleep(1000);
+
+ rs = stmt.executeQuery("select lookup('sys.schemas', 'VDBName', 'name', 'SYS')");
+ rs.next();
+ assertEquals("matviews", rs.getString(1));
+
+ server1.stop();
+ server2.stop();
+ }
+
+ private FakeServer createServer() throws Exception {
+ FakeServer server = new FakeServer();
+
+ JGroupsObjectReplicator jor = new JGroupsObjectReplicator();
+ jor.setClusterName("demo");
+ jor.setMultiplexerStack("tcp");
+ JChannelFactory jcf = new JChannelFactory();
+ jcf.setMultiplexerConfig(this.getClass().getClassLoader().getResource("stacks.xml")); //$NON-NLS-1$
+ jor.setChannelFactory(jcf);
+
+ server.setReplicator(jor);
+ HashMap<String, Collection<FunctionMethod>> udfs = new HashMap<String, Collection<FunctionMethod>>();
+ udfs.put("funcs", Arrays.asList(new FunctionMethod("pause", null, null, PushDown.CANNOT_PUSHDOWN, TestMatViews.class.getName(), "pause", null, new FunctionParameter("return", DataTypeManager.DefaultDataTypes.INTEGER), false, Determinism.NONDETERMINISTIC)));
+ server.deployVDB(MATVIEWS, UnitTestUtil.getTestDataPath() + "/matviews.vdb", udfs);
+ return server;
+ }
+
+}
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-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/test-integration/common/src/test/java/org/teiid/transport/TestODBCSocketTransport.java 2011-09-05 14:27:44 UTC (rev 3451)
@@ -130,7 +130,7 @@
config.setBindAddress(addr.getHostName());
config.setPortNumber(0);
odbcTransport = new ODBCSocketListener(config, BufferManagerFactory.getStandaloneBufferManager(), 0, 100000, Mockito.mock(ILogon.class));
-
+ odbcTransport.setMaxBufferSize(1000); //set to a small size to ensure buffering over the limit works
FakeServer server = new FakeServer();
server.setUseCallingThread(false);
server.deployVDB("parts", UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
@@ -181,6 +181,18 @@
TestMMDatabaseMetaData.compareResultSet(s.getResultSet());
}
+ @Test public void testMultibatchSelect() throws Exception {
+ Statement s = conn.createStatement();
+ assertTrue(s.execute("select * from tables, columns"));
+ ResultSet rs = s.getResultSet();
+ int i = 0;
+ while (rs.next()) {
+ i++;
+ rs.getString(1);
+ }
+ assertEquals(7812, i);
+ }
+
@Test public void testBlob() throws Exception {
Statement s = conn.createStatement();
assertTrue(s.execute("select to_bytes('abc', 'UTF-16')"));
@@ -199,6 +211,16 @@
String clob = rs.getString(1);
assertEquals("abc", clob);
}
+
+ @Test public void testLargeClob() throws Exception {
+ Statement s = conn.createStatement();
+ assertTrue(s.execute("select cast(repeat('_', 3000) as clob)"));
+ ResultSet rs = s.getResultSet();
+ assertTrue(rs.next());
+ //getting as a clob is unsupported, since it uses the lo logic
+ String clob = rs.getString(1);
+ assertEquals(3000, clob.length());
+ }
@Test public void testTransactionCycle() throws Exception {
//TODO: drill in to ensure that the underlying statement has been set to autocommit false
@@ -276,6 +298,14 @@
rs.next();
}
+ @Test public void testPreparedUpdate() throws Exception {
+ Statement stmt = conn.createStatement();
+ assertFalse(stmt.execute("create local temporary table x (y string)"));
+ PreparedStatement ps = conn.prepareStatement("delete from x");
+ assertFalse(ps.execute());
+ assertNull(ps.getMetaData());
+ }
+
@Test public void testSelectSsl() throws Exception {
conn.close();
Driver d = new Driver();
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-3382
+ /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
Modified: branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
===================================================================
--- branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2011-09-05 14:27:44 UTC (rev 3451)
@@ -209,10 +209,10 @@
207 25 proretset 16 1 3 4 false false false
208 25 prorettype 23 4 4 4 false false false
209 25 pronargs 21 2 5 4 false false false
-210 25 proargtypes <null> <null> 6 4 false false false
-211 25 proargnames <null> <null> 7 4 false false false
-212 25 proargmodes <null> <null> 8 4 false false false
-213 25 proallargtypes <null> <null> 9 4 false false false
+210 25 proargtypes 705 -2 6 4 false false false
+211 25 proargnames 705 -2 7 4 false false false
+212 25 proargmodes 705 -2 8 4 false false false
+213 25 proallargtypes 705 -2 9 4 false false false
214 25 pronamespace 23 4 10 4 false false false
215 26 oid 23 4 1 4 false false false
216 26 tgconstrrelid 23 4 2 4 false false false
@@ -232,8 +232,8 @@
230 28 encoding 23 4 3 4 false false false
231 28 datlastsysoid 23 4 4 4 false false false
232 28 datallowconn 1042 1 5 4 false false false
-233 28 datconfig <null> <null> 6 4 false false false
-234 28 datacl <null> <null> 7 4 false false false
+233 28 datconfig 705 -2 6 4 false false false
+234 28 datacl 705 -2 7 4 false false false
235 28 datdba 23 4 8 4 false false false
236 28 dattablespace 23 4 9 4 false false false
237 29 oid 23 4 1 4 false false false
Modified: branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected
===================================================================
--- branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected 2011-09-03 22:46:04 UTC (rev 3450)
+++ branches/as7/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected 2011-09-05 14:27:44 UTC (rev 3451)
@@ -1,40 +1,42 @@
integer string integer short char integer integer integer integer
oid typname typnamespace typlen typtype typbasetype typtypmod typrelid typelem
16 boolean 3 1 b 0 -1 0 0
+1043 string 3 -1 b 0 -1 0 0
+25 text 3 -1 b 0 -1 0 0
+1042 char 3 1 b 0 -1 0 0
+21 short 3 2 b 0 -1 0 0
20 long 3 8 b 0 -1 0 0
-21 short 3 2 b 0 -1 0 0
23 integer 3 4 b 0 -1 0 0
-25 text 3 -1 b 0 -1 0 0
26 oid 3 4 b 0 -1 0 0
-30 oidvector 3 -1 b 0 -1 0 26
-142 xml 3 -1 b 0 -1 0 0
700 float 3 4 b 0 -1 0 0
701 double 3 8 b 0 -1 0 0
+705 unknown 3 -2 b 0 -1 0 0
+1082 date 3 4 b 0 -1 0 0
+1083 datetime 3 8 b 0 -1 0 0
+1114 timestamp 3 8 b 0 -1 0 0
+1700 decimal 3 -1 b 0 -1 0 0
+142 xml 3 -1 b 0 -1 0 0
+14939 lo 3 -1 b 0 -1 0 0
+2278 void 3 4 p 0 -1 0 0
+2249 record 3 -1 p 0 -1 0 0
+30 oidvector 3 -1 b 0 -1 0 26
1000 _bool 3 -1 b 0 -1 0 16
1002 _char 3 -1 b 0 -1 0 18
1005 _int2 3 -1 b 0 -1 0 21
1007 _int4 3 -1 b 0 -1 0 23
1009 _text 3 -1 b 0 -1 0 25
+1028 _oid 3 -1 b 0 -1 0 26
1014 _bpchar 3 -1 b 0 -1 0 1042
1015 _varchar 3 -1 b 0 -1 0 1043
1016 _int8 3 -1 b 0 -1 0 20
1021 _float4 3 -1 b 0 -1 0 700
1022 _float8 3 -1 b 0 -1 0 701
-1028 _oid 3 -1 b 0 -1 0 26
-1042 char 3 1 b 0 -1 0 0
-1043 string 3 -1 b 0 -1 0 0
-1082 date 3 4 b 0 -1 0 0
-1083 datetime 3 8 b 0 -1 0 0
-1114 timestamp 3 8 b 0 -1 0 0
1115 _timestamp 3 -1 b 0 -1 0 1114
1182 _date 3 -1 b 0 -1 0 1082
1183 _time 3 -1 b 0 -1 0 1083
-1700 decimal 3 -1 b 0 -1 0 0
-2249 record 3 -1 p 0 -1 0 0
-2278 void 3 4 p 0 -1 0 0
2287 _record 3 -1 b 0 -1 0 2249
-14939 lo 3 -1 b 0 -1 0 0
-Row Count : 34
+2283 anyelement 3 4 p 0 -1 0 0
+Row Count : 36
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
typname 12 PartsSupplier java.lang.String typname string pg_catalog pg_type 4000 4000 0 false false false false 2 true true false false
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
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-3382
+ /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
13 years, 7 months