if (_txDbPool != null && (_txDbPool.containsTx(tx))) {
return _txDbPool.get(tx);
}
// In all other cases we need to create a new database instance.
GlobalDatabaseImpl dbImpl;
dbImpl = new GlobalDatabaseImpl(_databaseName, _lockTimeout,
_callbackInterceptor, _instanceFactory, tx, _classLoader,
_autoStore, getDatabasePooling());
// We have to register the database at the transaction next.
try {