public class StoredProcOutboundGateway extends AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler.RequestHandler
logger
Constructor and Description |
---|
StoredProcOutboundGateway(StoredProcExecutor storedProcExecutor)
Constructor taking
StoredProcExecutor . |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
void |
setExpectSingleResult(boolean expectSingleResult)
This parameter indicates that only one result object shall be returned from
the Stored Procedure/Function Call.
|
doInit, doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public StoredProcOutboundGateway(StoredProcExecutor storedProcExecutor)
StoredProcExecutor
.storedProcExecutor
- Must not be null.protected java.lang.Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
public void setExpectSingleResult(boolean expectSingleResult)
MessagingException
is thrown.
Otherwise the complete resultMap is returned as the Message
payload.
Important Note: Several databases such as H2 are not fully supported.
The H2 database, for example, does not fully support the CallableStatement
semantics and when executing function calls against H2, a result list is
returned rather than a single value.
Therefore, even if you set expectSingleResult = true, you may end up with
a collection being returned.expectSingleResult
-