@pabl0rg , after you call Database.connect() connection info is stored in TransactionManager which use it to instantiate new connections.
All code that will be executed within
transaction{ }
block will reuse that connection with separate transaction.