You can either pass in a specific JMS Connection directly or let this factory lazily create a Connection via a given target ConnectionFactory. In the latter case, this factory just works with JMS 1.1; use {@link SingleConnectionFactory102} for JMS 1.0.2.
Useful for testing and standalone environments in order to keep using the same Connection for multiple {@link org.springframework.jms.core.JmsTemplate}calls, without having a pooling ConnectionFactory underneath. This may span any number of transactions, even concurrently executing transactions.
Note that Spring's message listener containers support the use of a shared Connection within each listener container instance. Using SingleConnectionFactory in combination only really makes sense for sharing a single JMS Connection across multiple listener containers. @author Juergen Hoeller @author Mark Pollack @since 1.1 @see org.springframework.jms.core.JmsTemplate @see org.springframework.jms.listener.SimpleMessageListenerContainer @see org.springframework.jms.listener.DefaultMessageListenerContainer#setCacheLevel
|
|