The previous section on the ACTIVEMQ server Building, here is the spring configuration, in fact, this is not too much to say, just a few points, with the Project Eclipse Project package, everyone download the project to see
The main use is the Receive class and the sender class, the configuration file is mainly Application-jms-queue-offical-service.xml
The configuration file definitions are written in more detail in the XML above, and note that the ACTIVEMQ beans XML domain namespace is introduced into the configuration file, and the following dependencies need to be introduced into the Pom.xml:
<dependency>
<artifactId>xbean-spring</artifactId>
<groupId>org.apache.xbean</groupId>
<version>4.1</version>
</dependency>
Or you'll throw the wrong
In the spring configuration, a retransmission policy map definition is introduced, in which you can customize the retransmission policy for each queue (a single queue is uniquely identified by the queue name and the destination object reference)
If an exception is thrown in the OnMessage method, you need to configure the transaction to open in Listenercontainer so that once the exception is thrown, the retransmission is repeated, and after the maximum number of retransmissions, the message is placed in the corresponding DLQ of the queue if it has not been successfully transmitted again.
Project Engineering Attachment Connection
http://download.csdn.net/detail/icecream0/8485021