@Throws(Exception::class) protected fun createConnection(): Connection? { val factory = ActiveMQConnectionFactory("vm://localhost?broker.persistent=false") return factory.createConnection() }
Creates a connection .