<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:int="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xmlns:int-jpa="http://www.springframework.org/schema/integration/jpa" xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-2.2.xsd
http://www.springframework.org/schema/integration/jpa
http://www.springframework.org/schema/integration/jpa/spring-integration-jpa-2.2.xsd
http://www.springframework.org/schema/integration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
http://www.springframework.org/schema/oxm
http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd">
<int:channel id="queryJobListChannel" />
<int:channel id="startupJobChannel" />
<int-jpa:inbound-channel-adapter id="testJobName" auto-startup="${auto.start}" entity-manager="em"
send-timeout="${channel.default.timeout}" channel="queryJobListChannel" expect-single-result="true"
jpa-query="SELECT job FROM JobEntity job WHERE job.jobBeanId='testJobName' ">
<int:poller fixed-delay="${poll.interval}" />
</int-jpa:inbound-channel-adapter>
<int:service-activator id="jobStatusServiceActivator" ref="jobStatusService" method="checkJobStatus"
input-channel="queryJobListChannel" output-channel="startupJobChannel" />
<bean id="jobStatusService" class="com.xxx.service.JobStatusService" />
<int-jpa:retrieving-outbound-gateway id="queryRunDayGateway" entity-manager="em"
expect-single-result="true" request-channel="startupJobChannel" reply-channel="queryBListChannel"
jpa-query="SELECT sf FROM Aentity sf">
</int-jpa:retrieving-outbound-gateway>
<int:channel id="queryBListChannel" />
<int-jpa:retrieving-outbound-gateway id="queryCashTranListAdapter" entity-manager="em"
request-channel="queryBListChannel" reply-channel="sendJmsChannel"
jpa-query="SELECT A, B FROM XXA AS A, XXB AS B WHERE A.id = B.id
AND B.createOn = :runDate "
>
<int-jpa:parameter expression="payload.sysDate" name="runDate" />
</int-jpa:retrieving-outbound-gateway>
<int:channel id="sendJmsChannel" />
<int:service-activator id="sendReportActivator" input-channel="sendJmsChannel" ref="jmsSender"
method="send" />
<bean id="jmsSender" class="com.xx.service.JmsSenderService">
<constructor-arg ref="jmsTemplate" />
<property name="retryTimes" value="${jms.send.retryTimes}" />
</bean>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:int="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xmlns:int-jpa="http://www.springframework.org/schema/integration/jpa" xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-2.2.xsd
http://www.springframework.org/schema/integration/jpa
http://www.springframework.org/schema/integration/jpa/spring-integration-jpa-2.2.xsd
http://www.springframework.org/schema/integration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
http://www.springframework.org/schema/oxm
http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd">
<int:channel id="queryJobListChannel" />
<int:channel id="startupJobChannel" />
<int-jpa:inbound-channel-adapter id="testJobName" auto-startup="${auto.start}" entity-manager="em"
send-timeout="${channel.default.timeout}" channel="queryJobListChannel" expect-single-result="true"
jpa-query="SELECT job FROM JobEntity job WHERE job.jobBeanId='testJobName' ">
<int:poller fixed-delay="${poll.interval}" />
</int-jpa:inbound-channel-adapter>
<int:service-activator id="jobStatusServiceActivator" ref="jobStatusService" method="checkJobStatus"
input-channel="queryJobListChannel" output-channel="startupJobChannel" />
<bean id="jobStatusService" class="com.xxx.service.JobStatusService" />
<int-jpa:retrieving-outbound-gateway id="queryRunDayGateway" entity-manager="em"
expect-single-result="true" request-channel="startupJobChannel" reply-channel="queryBListChannel"
jpa-query="SELECT sf FROM Aentity sf">
</int-jpa:retrieving-outbound-gateway>
<int:channel id="queryBListChannel" />
<int-jpa:retrieving-outbound-gateway id="queryCashTranListAdapter" entity-manager="em"
request-channel="queryBListChannel" reply-channel="sendJmsChannel"
jpa-query="SELECT A, B FROM XXA AS A, XXB AS B WHERE A.id = B.id
AND B.createOn = :runDate "
>
<int-jpa:parameter expression="payload.sysDate" name="runDate" />
</int-jpa:retrieving-outbound-gateway>
<int:channel id="sendJmsChannel" />
<int:service-activator id="sendReportActivator" input-channel="sendJmsChannel" ref="jmsSender"
method="send" />
<bean id="jmsSender" class="com.xx.service.JmsSenderService">
<constructor-arg ref="jmsTemplate" />
<property name="retryTimes" value="${jms.send.retryTimes}" />
</bean>
</beans>