Document max-rows-per-poll for the JDBC Gateway
StackOverflow https://stackoverflow.com/questions/45611037
This commit is contained in:
@@ -92,16 +92,12 @@ public class JdbcOutboundGateway extends AbstractReplyProducingMessageHandler im
|
||||
|
||||
/**
|
||||
* The maximum number of rows to pull out of the query results per poll (if
|
||||
* greater than zero, otherwise all rows will be packed into the outgoing
|
||||
* message).
|
||||
*
|
||||
* greater than zero, otherwise all rows will be packed into the outgoing message).
|
||||
* The value is ultimately set on the underlying {@link JdbcPollingChannelAdapter}.
|
||||
* If not specified this value will default to <code>zero</code>.
|
||||
*
|
||||
* If not specified this value will default to {@code 1}.
|
||||
* This parameter is only applicable if a selectQuery was provided. Null values
|
||||
* are not permitted.
|
||||
*
|
||||
* @param maxRowsPerPoll Must not be null.
|
||||
* @param maxRowsPerPoll the number of rows to select. Must not be null.
|
||||
*/
|
||||
public void setMaxRowsPerPoll(Integer maxRowsPerPoll) {
|
||||
Assert.notNull(maxRowsPerPoll, "MaxRowsPerPoll must not be null.");
|
||||
|
||||
@@ -274,6 +274,12 @@ The reply message is then generated from the result, like the inbound adapter, a
|
||||
data-source="dataSource"/>
|
||||
----
|
||||
|
||||
[IMPORTANT]
|
||||
=====
|
||||
By default the component for the SELECT query returns only one, first row from the cursor.
|
||||
This can be adjusted with the `max-rows-per-poll` option.
|
||||
Consider to specify `max-rows-per-poll="0"` if you need to return all the rows from the SELECT.
|
||||
|
||||
As with the channel adapters, there is also the option to provide `SqlParameterSourceFactory` instances for request and reply.
|
||||
The default is the same as for the outbound adapter, so the request message is available as the root of an expression.
|
||||
If `keys-generated="true"` then the root of the expression is the generated keys (a map if there is only one or a list of maps if multi-valued).
|
||||
|
||||
Reference in New Issue
Block a user