stored-proc-inbound-channel-adapter wit returning-resultset returning SqlOutParameter
Hi,
I try to use stored-proc-inbound-channel-adapter with returning-resultset.
The problem is that the returning-resultset is converted to SqlOutParameter, but i should be SqlReturnResultSet.
When JdbcTemplate is invoking call method the condition if (parameter.isResultsParameter()) is false and the parameter is added to call parameters.
I use PostgreSql 8.3., Spring Integration 2.1.3.RELEASE and Spring 3.1.2.RELASE.
Here is my app context.
How to force to return a result set?
Code:
<context:property-placeholder location="jdbc.properties"/>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${jdbc.driverClassName}" />
<property name="jdbcUrl" value="${jdbc.url}"/>
<property name="user" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
<int-jdbc:stored-proc-inbound-channel-adapter id="notifications_inbound"
stored-procedure-name="aquirenotifications" data-source="dataSource" channel="notifications" is-function="false" ignore-column-meta-data="true" expect-single-result="false">
<int:poller fixed-delay="50000"/>
<int-jdbc:sql-parameter-definition name="pnotification_type" type="CHAR" direction="IN"/>
<int-jdbc:sql-parameter-definition name="papp_code" type="CHAR" direction="IN"/>
<int-jdbc:sql-parameter-definition name="pexcluded_app_codes" type="VARCHAR" direction="IN"/>
<int-jdbc:sql-parameter-definition name="pmax_results" type="INTEGER" direction="IN" />
<int-jdbc:parameter name="pnotification_type" value="EMAIL" />
<int-jdbc:parameter name="papp_code" value="TEST1" />
<int-jdbc:parameter name="pexcluded_app_codes" value="JAKAS" />
<int-jdbc:parameter name="pmax_results" value="2" type="java.lang.Integer"/>
<int-jdbc:returning-resultset name="out" row-mapper="my.com.NotificationResultMapper" />
</int-jdbc:stored-proc-inbound-channel-adapter>
<int:channel id="notifications"></int:channel>
<int:router id="notification_router" expression="payload.notificationType"
input-channel="notifications">
<int:mapping value="EMAIL" channel="email" />
<int:mapping value="SMS" channel="sms" />
</int:router>
<int:channel id="email"></int:channel>
<int:channel id="sms"></int:channel>