Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3767

JpaInboundChannelAdapterParser doesn't parse "parameter-source"

    XMLWordPrintable

    Details

      Description

      See the workaround on the reference link:

      <bean id="spelSource"
          class="org.springframework.integration.jdbc.ExpressionEvaluatingSqlParameterSourceFactory">
          <property name="parameterExpressions">
              <map>
                  <entry key="purgeDate"
                      value="new java.sql.Timestamp(T(System).currentTimeMillis()-(T(java.util.concurrent.TimeUnit).MILLISECONDS.convert(${eam.integration.arcgis.purge.daysToKeep}, T(java.util.concurrent.TimeUnit).DAYS)))" />
              </map>
          </property>
      </bean>
      
      <bean id="parameterSource" factory-bean="spelSource"
                  factory-method="createParameterSourceNoCache">
          <constructor-arg value="" />
      </bean>
      
      <bean id="jpaExecutor" class="org.springframework.integration.jpa.core.JpaExecutor">
      	<constructor-arg name="entityManager" ref="entityManager"/>
              <property name="jpaQuery" value="from Book b where b.isbn = :isbn"/>
              <property name="parameterSource" ref="parameterSource"/>
      </bean>
      
      <bean id="jpaMessageSource" class="org.springframework.integration.jpa.inbound.JpaPollingChannelAdapter">
      	<constructor-arg ref="jpaExecutor"/>
      </bean>
      
      <int:inbound-channel-adapter channel="input" ref="jpaMessageSource">
          <int:poller cron="*/5 * * * * *" >
              <int:transactional transaction-manager="transactionManager"/>
          </int:poller>
      </int:inbound-channel-adapter>
      

      So, there is no need to backport the fix. Unless on demand.

        Attachments

          Activity

            People

            Assignee:
            abilan Artem Bilan
            Reporter:
            abilan Artem Bilan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: