Sorry, but I don't have the source with me.
Look here some examples, but unfortunately nat are about JMS:
http://static.springsource.org/spring/docs/3.0.x/reference/beans.html#beans-java-instantiating-container-register
http://mballem.wordpress.com/2012/11/01/spring-framework-3-100-livre-de-configuracao-por-xml/
You will need to follow this model of configuration, however it of course, for configuring JMS. Use the classes of jms beans from your XML to create your beans programmatically.
Sorry by my english, I am still learning .