public Connection createConnection() throws JMSException {
return createConnection(null, null);
}
public synchronized Connection createConnection(final String userName, final String password) throws JMSException {
final ConnectionKey key = new ConnectionKey(userName, password);
PooledSpringXAConnection connection = (PooledSpringXAConnection) this.cache.get(key);
if (connection == null) {
final XAConnection delegate = createConnection(key);
connection = new PooledSpringXAConnection(this, getTransactionManager(), delegate);
this.cache.put(key, connection);