I limited logging to org.springframework.integration.
To me it looks like it starts based on how the order is in the application-context file.
PHP Code:
<bean id="inputReferenceQueue" class="progress.message.jclient.Queue">
<constructor-arg value="${queue.reference}" />
</bean>
<bean id="containerReferenceIn" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="autoStartup" value="${queues.autostart}" />
<property name="connectionFactory" ref="connectionFactory" />
<property name="destination" ref="inputReferenceQueue" />
<property name="errorHandler" ref="errorHandler" />
</bean>
<jms:message-driven-channel-adapter auto-startup="${queues.autostart}" id="jmsReferenceIn" container="containerReferenceIn" channel="fileReferenceIn"/>
<!-- File -->
<file:inbound-channel-adapter id="fileReferenceIn" auto-startup="${file.autostart}"
directory="${import.basedir}/Reference/pickup"
filename-pattern=".*">
<si:poller>
<si:interval-trigger interval="5" time-unit="SECONDS" />
</si:poller>
</file:inbound-channel-adapter>
<file:outbound-gateway id="referenceMover" request-channel="fileReferenceIn"
reply-channel="referenceFileChannel" filename-generator="timeStampFileNameGenerator"
directory="${import.basedir}/Reference/${import.started.dir}" delete-source-files="true"/>
...
...
Code:
2010-09-29 13:22:06,425 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@13d3f62
2010-09-29 13:22:06,425 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@c7816
2010-09-29 13:22:06,425 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@a0187c
2010-09-29 13:22:06,425 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@a79c31
2010-09-29 13:22:06,425 INFO [org.springframework.integration.gateway.GatewayProxyFactoryBean](WrapperSimpleAppMain) started availabilityBatchFileInboundPublisher
2010-09-29 13:22:06,535 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@265121
2010-09-29 13:22:06,535 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@19853c2
2010-09-29 13:22:06,535 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@1a2f9dd
2010-09-29 13:22:06,535 INFO [org.springframework.integration.gateway.SimpleMessagingGateway](WrapperSimpleAppMain) started org.springframework.integration.gateway.SimpleMessagingGateway@c21d01
2010-09-29 13:22:06,535 INFO [org.springframework.integration.gateway.GatewayProxyFactoryBean](WrapperSimpleAppMain) started availabilityBatchFileInboundPublisher
2010-09-29 13:22:10,925 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor](WrapperSimpleAppMain) No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2010-09-29 13:22:10,925 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor](WrapperSimpleAppMain) No bean named 'taskScheduler' has been explicitly defined. Therefore, a default SimpleTaskScheduler will be created.
2010-09-29 13:22:36,582 INFO [org.springframework.integration.jms.JmsMessageDrivenEndpoint](WrapperSimpleAppMain) started jmsReferenceIn
2010-09-29 13:22:37,613 DEBUG [org.springframework.integration.jms.HeaderMappingMessageConverter](containerReferenceIn-1) converted JMS Message [progress.message.jimpl.TextMessage@174689] to integration Message [[Payload=Hello Im gonna fail startup data again][Headers={springintegration_jms_messageId=ID:3f27f598:2fd22d000d:12B5D39AB24, springintegration_timestamp=1285759357613, springintegration_id=43bbf30f-0ebc-4228-80d8-d4311c9d5d91, springintegration_jms_correlationId=Message 1, springintegration_jms_redelivered=false}]]
2010-09-29 13:22:37,613 DEBUG [org.springframework.integration.channel.DirectChannel](containerReferenceIn-1) preSend on channel 'fileReferenceIn', message: [Payload=Hello Im gonna fail startup data again][Headers={springintegration_jms_messageId=ID:3f27f598:2fd22d000d:12B5D39AB24, springintegration_timestamp=1285759357613, springintegration_id=43bbf30f-0ebc-4228-80d8-d4311c9d5d91, springintegration_jms_correlationId=Message 1, springintegration_jms_redelivered=false}]
2010-09-29 13:22:37,629 INFO [org.springframework.integration.endpoint.SourcePollingChannelAdapter](WrapperSimpleAppMain) started fileReferenceIn.adapter
2010-09-29 13:22:37,629 DEBUG [org.springframework.integration.channel.PublishSubscribeChannel](containerReferenceIn-1) preSend on channel 'errorChannel', message: [Payload=org.springframework.integration.message.MessageDeliveryException: Dispatcher has no subscribers.][Headers={springintegration_timestamp=1285759357629, springintegration_id=ee3330e7-87d9-4503-bfd5-c1dfb3ad29e0}]
2010-09-29 13:22:37,629 DEBUG [org.springframework.integration.channel.PublishSubscribeChannel](containerReferenceIn-1) postSend (sent=false) on channel 'errorChannel', message: [Payload=org.springframework.integration.message.MessageDeliveryException: Dispatcher has no subscribers.][Headers={springintegration_timestamp=1285759357629, springintegration_id=ee3330e7-87d9-4503-bfd5-c1dfb3ad29e0}]
2010-09-29 13:22:37,629 ERROR [org.springframework.integration.channel.MessagePublishingErrorHandler](containerReferenceIn-1) failure occurred in messaging task with message: [Payload=Hello Im gonna fail startup data again][Headers={springintegration_jms_messageId=ID:3f27f598:2fd22d000d:12B5D39AB24, springintegration_timestamp=1285759357613, springintegration_id=43bbf30f-0ebc-4228-80d8-d4311c9d5d91, springintegration_jms_correlationId=Message 1, springintegration_jms_redelivered=false}]
org.springframework.integration.message.MessageDeliveryException: Dispatcher has no subscribers.
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:97)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94)
at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:224)
at org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:181)
at org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:169)
at org.springframework.integration.jms.ChannelPublishingJmsMessageListener.onMessage(ChannelPublishingJmsMessageListener.java:203)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:535)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:495)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1056)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1048)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
at java.lang.Thread.run(Thread.java:619)
2010-09-29 13:22:37,691 INFO [org.springframework.integration.endpoint.EventDrivenConsumer](WrapperSimpleAppMain) started referenceMover
2010-09-29 13:22:37,738 INFO [org.springframework.integration.endpoint.EventDrivenConsumer](WrapperSimpleAppMain) started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
2010-09-29 13:22:37,816 INFO [org.springframework.integration.endpoint.EventDrivenConsumer](WrapperSimpleAppMain) started org.springframework.integration.config.ConsumerEndpointFactoryBean#1
2010-09-29 13:22:37,863 INFO [org.springframework.integration.endpoint.EventDrivenConsumer](WrapperSimpleAppMain) started org.springframework.integration.config.ConsumerEndpointFactoryBean#2
2010-09-29 13:22:38,004 INFO
...