mirror of https://github.com/apache/activemq.git
added a better example of using the xbean-spring flavour of XML configuration
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@430407 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a96820ed17
commit
c3fae7767d
|
@ -21,7 +21,7 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://activemq.org/config/1.0 http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd">
|
||||
|
||||
|
||||
<!-- lets create an embedded ActiveMQ Broker -->
|
||||
<amq:broker useJmx="false" persistent="false">
|
||||
<amq:transportConnectors>
|
||||
|
@ -29,10 +29,12 @@
|
|||
</amq:transportConnectors>
|
||||
</amq:broker>
|
||||
|
||||
<!-- ActiveMQ destinations to use -->
|
||||
<amq:queue id="destination" physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
|
||||
|
||||
<!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
|
||||
<bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
|
||||
<property name="brokerURL" value="vm://localhost" />
|
||||
</bean>
|
||||
<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
|
||||
|
||||
|
||||
<!-- Spring JMS Template -->
|
||||
<bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
|
||||
|
@ -61,24 +63,12 @@
|
|||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- a sample POJO consumer -->
|
||||
<bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
|
||||
<property name="template">
|
||||
<ref bean="myJmsTemplate"></ref>
|
||||
</property>
|
||||
|
||||
<property name="destination">
|
||||
<ref bean="destination" />
|
||||
</property>
|
||||
<property name="template" ref="myJmsTemplate"/>
|
||||
<property name="destination" ref="destination"/>
|
||||
</bean>
|
||||
|
||||
<!-- TODO lets use the better element... -->
|
||||
<bean id="destination" class="org.apache.activemq.command.ActiveMQQueue" autowire="constructor">
|
||||
<constructor-arg>
|
||||
<value>org.apache.activemq.spring.Test.spring.embedded</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
<!-- END SNIPPET: spring -->
|
||||
|
|
Loading…
Reference in New Issue