It looks like you need to associate transactions with table wrappers better than just downstream. IOW, you need to create a transaction class. A transaction class acquires / releases connections from / to the connection pool when a transaction is opened and closed.
Then the transaction will become a factory for your table wrappers. Any table wrapper created by a transaction is inside the transaction because it does not have access to any connections except the one in which the transaction is included.
, . SmartPtr , , , - .