Change API to allow construction

try ( Transaction tx = broker.beginTx() )
{
    // operations on database
    
    tx.success();
}