com.r3corda.node.utilities / StrandLocalTransactionManager / <init>

# <init>

`StrandLocalTransactionManager(initWithDatabase: <ERROR CLASS>)`

A relatively close copy of the ThreadLocalTransactionManager in Exposed but with the following adjustments to suit our environment:

Because the construction of a Database instance results in replacing the singleton TransactionManager instance, our tests involving two MockNodes effectively replace the database instances of each other and continue to trample over each other. So here we use a companion object to hold them as ThreadLocal and StrandLocalTransactionManager is otherwise effectively stateless so its replacement does not matter. The ThreadLocal is then set correctly and explicitly just prior to initiating a transaction in databaseTransaction and createDatabaseTransaction above.