<bean class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location">
<value>config.properties</value>
</property>
</bean>
<!-- Websphere MQ connection factory config-->
<bean id="jmsQueueWriteConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="queueManager">
<value>${MQ.QueueManagerWrite}</value>
</property>
<property name="hostName">
<value>${MQ.HostNameWrite}</value>
</property>
<property name="port">
<value>${MQ.Port}</value>
</property>
<property name="channel">
<value>${MQ.Channel}</value>
</property>
<property name="transportType">
<value>${MQ.TransportType}</value>
</property>
</bean>
<bean id="jmsQueueReadConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="queueManager">
<value>${MQ.QueueManagerRead}</value>
</property>
<property name="hostName">
<value>${MQ.HostNameRead}</value>
</property>
<property name="port">
<value>${MQ.Port}</value>
</property>
<property name="channel">
<value>${MQ.Channel}</value>
</property>
<property name="transportType">
<value>${MQ.TransportType}</value>
</property>
</bean>
<bean id="mqConnectionFactory"
class="org.springframework.jms.connection.SingleCo nnectionFactory">
<property name="targetConnectionFactory">
<ref bean="jmsQueueWriteConnectionFactory" />
</property>
</bean>
<!-- Jms Template to send messages. Used for Unit Testing -->
<!--<bean id="jmsTemplate"
class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref bean="mqConnectionFactory" />
</property>
<property name="defaultDestinationName">
<value>${MQ.DefaultDestinationName}</value>
</property>
</bean>
-->
<!-- Websphere MQ queue config. This config is used only in the absence of jndi -->
<bean id="odsRequestQueue_dev1" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueManagerName" value="${MQ.BaseQueueManagerName}" />
<property name="baseQueueName" value="${MQ.BaseQueueName}" />
<property name="targetClient" value="${MQ.TargetClient}" />
</bean>
<!-- putting data into the queue commented by saral -->
<si:channel id="input">
</si:channel>
<jms:outbound-channel-adapter id="channel-to-mq"
channel="input" destination-name="${queueNameWrite}" connection-factory="mqConnectionFactory" />
<!-- Reading from the queue commented by saral -->
<jms:message-driven-channel-adapter
id="mq-message-listner_QManager_4" channel="aggregator-input-channel_1" connection-factory="jmsQueueReadConnectionFactory"
destination-name="${queueNameRead}" concurrent-consumers="${concurrent-consumers}" />
<jms:message-driven-channel-adapter
id="mq-message-listner_QManager_3" channel="aggregator-input-channel_2" connection-factory="jmsQueueWriteConnectionFactory"
destination-name="${queueNameRead}" concurrent-consumers="${concurrent-consumers}" />
<!-- <si:gateway id="gateway" service-interface="com.sample.agg.Gateway"
default-request-channel="aggregator-input-channel">
</si:gateway> -->
<si:channel id="aggregator-input-channel_1">
<si:queue capacity="${queueCapacity}" />
</si:channel>
<si:channel id="aggregator-input-channel_2">
<si:queue capacity="${queueCapacity}" />
</si:channel>
<si:aggregator id="aggregator_1" input-channel="aggregator-input-channel_1" output-channel="aggregator-output-channel_1"
ref="sampleAggregator" method="aggregateMessagaes"
correlation-strategy="correlationBean" correlation-strategy-method="correlationStrategy"
release-strategy="releaseStrategyBean" release-strategy-method="releaseStrategy"
message-store="messageStore"
order="1"
send-partial-result-on-expiry="true"
send-timeout = "5000" >
</si:aggregator>
<si:aggregator id="aggregator_2" input-channel="aggregator-input-channel_2" output-channel="aggregator-output-channel_2"
ref="sampleAggregator" method="aggregateMessagaes"
correlation-strategy="correlationBean" correlation-strategy-method="correlationStrategy"
release-strategy="releaseStrategyBean" release-strategy-method="releaseStrategy"
message-store="messageStore"
order="1"
send-partial-result-on-expiry="true"
send-timeout = "5000"
>
</si:aggregator>
<bean id="sampleAggregator" class="com.walgreens.ods.producer.Aggregator" scope="prototype" ></bean>
<bean id="correlationBean" class="com.walgreens.ods.producer.CorrelationBean" scope="prototype" />
<bean id="releaseStrategyBean" class="com.walgreens.ods.producer.ReleaseStrategyB ean" scope="prototype" >
<property name="recordLength" value="${recordLength}" />
</bean>
<si:channel id="throwAwayChannel" >
<si:queue capacity="${queueCapacity}" />
</si:channel>
<file:outbound-channel-adapter channel="aggregator-output-channel_1"
directory="${aggregatorOutputDirectoryPathtemp1}" filename-generator-expression="${outputFileNameExpression}" temporary-file-suffix="_swp"
/>
<file:outbound-channel-adapter channel="aggregator-output-channel_2"
directory="${aggregatorOutputDirectoryPathtemp2}" filename-generator-expression="${outputFileNameExpression}" temporary-file-suffix="_swp"
/>
<!-- <file:outbound-channel-adapter channel="throwAwayChannel"
directory="${aggregatorOutputDirectoryPath}" filename-generator-expression="'discard-'+headers.getTimestamp()+'.xml'"
temporary-file-suffix="_swp" /> -->
<si:channel id="aggregator-output-channel_1">
<si:queue capacity="${queueCapacity}" />
</si:channel>
<si:channel id="aggregator-output-channel_2">
<si:queue capacity="${queueCapacity}" />
</si:channel>
<task:scheduler id="scheduler" />
<!--
<task:scheduled-tasks scheduler="scheduler">
<task:scheduled ref="reaper" method="run" fixed-rate="${reaperSchedulerFixedRate}" />
</task:scheduled-tasks>
-->
<bean id="reaper" class="org.springframework.integration.store.Messa geGroupStoreReaper">
<property name="messageGroupStore" ref="messageStore" />
<property name="timeout" value="${reaperTimeOut}" />
</bean>
<bean id="messageStore" class="org.springframework.integration.store.Simpl eMessageStore" />
<!--<si:service-activator input-channel="aggregator-output-channel" ref="printerService" method="printString" ></si:service-activator>-->
<!-- <bean id="printerService" class="com.sample.agg.PrinterService"></bean>-->
<si

oller max-messages-per-poll="1" id="defaultPoller" default="true">
<si:interval-trigger interval="${pollerInterval}" />
</si

oller>
<!-- <si:inbound-channel-adapter id="test" ref="exampleReleaseStrategy" method="releaseStrategy" >
<si

oller fixed-rate="5000"/>
</si:inbound-channel-adapter> -->
</beans>