ghillert/spring-integration — comment on commit a2bbf971585ecaebc59751091e417fa1fac1c8d0
File: spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/JdbcOutboundGateway.java line 74
By olegz:

I know that this is based on existing code, but I am not a big fan of using setter method to set anything other than an instance attribute and in this case I would prefer to have 'maxRowsPerPoll' as an instance variable and set the poller's maxRowsPerPoll in the onInit() method. That is actually a very common pattern in SI.
The bottom line setters IMHO should never result in exception other than Asserting for null on the input argument which is not even applicable in this case since the input variable is primitive.