"running within DataSourceTransactionManager if told to manage the DataSource itself. " +
"It is recommended to use a single PersistenceBrokerTransactionManager for all transactions " +
"on a single DataSource, no matter whether PersistenceBroker or JDBC access.");
}
PersistenceBroker pb = null;
try {
pb = getPersistenceBroker();
if (logger.isDebugEnabled()) {
logger.debug("Opened new PersistenceBroker [" + pb + "] for OJB transaction");
}
PersistenceBrokerTransactionObject txObject = (PersistenceBrokerTransactionObject) transaction;
txObject.setPersistenceBrokerHolder(new PersistenceBrokerHolder(pb));
Connection con = pb.serviceConnectionManager().getConnection();
Integer previousIsolationLevel = DataSourceUtils.prepareConnectionForTransaction(con, definition);
txObject.setPreviousIsolationLevel(previousIsolationLevel);
pb.beginTransaction();
// Register the OJB PersistenceBroker's JDBC Connection for the DataSource, if set.
if (getDataSource() != null) {
ConnectionHolder conHolder = new ConnectionHolder(con);
if (definition.getTimeout() != TransactionDefinition.TIMEOUT_DEFAULT) {