각 구성 파일이 JMS 큐에 연결된 다중 구성 파일이있는 Spring Integration 응용 프로그램이 있습니다. 모든 대기열이 단일 채널 [requestChannel]로 메시지를 보내면 common.xml 파일에이 공통 정보가 보관됩니다.여러 개의 구성 파일과의 Spring 통합
JMS 대기열로 메시지를 보낼 때 하나의 대기열 만 requestChannel 메시지를 보내고 나머지 대기열은 [requestChannel] 대상에 메시지를 보내지 않습니다.
Can 누군가 내가 잘못하고있는 것을 제안 할 수 있습니다.
2 개의 다른 파일에서 동일한 varibale 이름을 사용하고 하나의 기본 Conext 파일에서 호출 할 수 있습니까? [MainApplicationContext.xml], 현재, 나는 이것을하고있다.
MainApplicationContext.xml 파일 - 다른 모든 구성 파일을 호출합니다.
<beans>
<import resource="common.xml"/>
<import resource="config1.xml"/>
<import resource="config2.xml"/>
<import resource="config3.xml"/>
</beans>
은 common.xml는 - JMS 큐 1
<beans>
<int-jms:message-driven-channel-adapter
id="jmsInputQueueAdaptor_au" channel="requestChannel" connection-factory="cf_au" destination="InputQueueOne"
error-channel="errorChannel" />
<jee:jndi-lookup id="cf_au" jndi-name="jms/ConnectionFactory">
</jee:jndi-lookup>
<jee:jndi-lookup id="InputQueueOne" jndi-name="jms/InputQueueOne">
</jee:jndi-lookup>
</beans>
config2.xml - - JMS 큐 2
<beans>
<int-jms:message-driven-channel-adapter
id="jmsInputQueueAdaptor_au" channel="requestChannel" connection-factory="cf_au" destination="InputQueueOne"
error-channel="errorChannel" />
<jee:jndi-lookup id="cf_au" jndi-name="jms/ConnectionFactory">
</jee:jndi-lookup>
<jee:jndi-lookup id="InputQueueTwo" jndi-name="jms/InputQueueTwo">
</jee:jndi-lookup>
</beans>
공통 채널 상세
<bean>
<int:channel id="requestChannel" />
<bean id="testBean" class="com.TestBean" />
<int:chain input-channel="requestChannel">
<int:service-activator ref="testBean" method="processor"/>
</int:chain>
<int:channel id="errorChannel" />
<bean id="epBean" class="com.ErrorProcessorBean" />
<int:chain input-channel="errorChannel">
<int:service-activator ref="epBean" method="processor"/>
</int:chain>
</bean>
config1.xml을
안녕하세요 당신이 봄에 부모 자식 관계를 가진 여러 구성 파일을 만드는 방법을 자세히 설명해 수를 참조하십시오. –