protected ConnectionFactory retrieveConnectionFactory ( String name ) throws JMSException { if ( name == null && defaultConnectionFactory != null ) { return defaultConnectionFactory ; // injected } else { try { // autowiring did not occur return ( ConnectionFactory ) SpringAppContext . getInstance ( ) . getBean ( name ) ; } catch ( Exception ex ) { logger . severeException ( ex . getMessage ( ) , ex ) ; throw new JMSException ( "JMS ConnectionFactory not found: " + name ) ; } } }
Pooling and remote queues are configured via Spring in broker config XML .