Author: vhalbert(a)redhat.com
Date: 2009-04-22 13:54:23 -0400 (Wed, 22 Apr 2009)
New Revision: 824
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
Log:
TEIID-444 Per Ramesh, this change fixes the issue with obtaining the ContextCache from the
buffersevice, instead of from the proxy.
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-04-22
08:13:51 UTC (rev 823)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-04-22
17:54:23 UTC (rev 824)
@@ -117,7 +117,7 @@
private MetadataService metadataService;
private TrackingService tracker;
private TransactionService transactionService;
- private DQPContextCache contextCache;
+ private BufferService bufferService;
private volatile Boolean started;
@@ -140,6 +140,7 @@
return classloader;
}
+
public SourceCapabilities getCapabilities(RequestID requestID, Serializable
executionPayload, DQPWorkContext message) throws ConnectorException {
Connection conn = null;
// Defect 17536 - Set the thread-context classloader to the non-delegating
classloader when calling
@@ -162,7 +163,7 @@
requestID.toString(),
"capabilities-request", "0"); //$NON-NLS-1$
//$NON-NLS-2$
- context.setContextCache(this.contextCache);
+ context.setContextCache(getContextCache());
conn = connector.getConnection(context);
caps = conn.getCapabilities();
@@ -325,11 +326,7 @@
this.exceptionOnMaxRows = PropertiesUtils.getBooleanProperty(props,
ConnectorPropertyNames.EXCEPTION_ON_MAX_ROWS, false);
this.synchWorkers = PropertiesUtils.getBooleanProperty(props,
ConnectorPropertyNames.SYNCH_WORKERS, true);
- BufferService bufferService =
(BufferService)env.findService(DQPServiceNames.BUFFER_SERVICE);
- if (bufferService != null) {
- this.contextCache = bufferService.getContextCache();
- }
-
+ this.bufferService = (BufferService)
env.findService(DQPServiceNames.BUFFER_SERVICE);
// Initialize and start the connector
initStartConnector(connectorEnv);
//check result set cache
@@ -626,7 +623,11 @@
}
DQPContextCache getContextCache() {
- return this.contextCache;
+ if (bufferService != null) {
+ return bufferService.getContextCache();
+ }
+
+ return null;
}
/**
Show replies by date