/**
* @param activationSpec
*/
public ActiveMQConnection makeConnection(ActiveMQActivationSpec activationSpec) throws JMSException {
ActiveMQConnectionFactory connectionFactory = getConnectionFactory();
String userName = defaultValue(activationSpec.getUserName(), info.getUserName());
String password = defaultValue(activationSpec.getPassword(), info.getPassword());
ActiveMQConnection physicalConnection = (ActiveMQConnection) connectionFactory.createConnection(userName, password);
if (activationSpec.isDurableSubscription()) {
physicalConnection.setClientID(activationSpec.getClientId());
}
return physicalConnection;
}