*/
try {
this.beginWithNameMethod.invoke(txObject.getUserTransaction(), new Object[] {definition.getName()});
}
catch (InvocationTargetException ex) {
throw new TransactionSystemException(
"OC4J's UserTransaction.begin(String) method failed", ex.getTargetException());
}
catch (Exception ex) {
throw new TransactionSystemException(
"Could not invoke OC4J's UserTransaction.begin(String) method", ex);
}
}
else {
// No OC4J UserTransaction available or no transaction name specified
// -> standard JTA begin call.
txObject.getUserTransaction().begin();
}
// Specify isolation level, if any, through the corresponding OC4J transaction method.
if (this.setTransactionIsolationMethod != null) {
if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
try {
Transaction tx = getTransactionManager().getTransaction();
/*
oracle.j2ee.transaction.OC4JTransaction otx = (oracle.j2ee.transaction.OC4JTransaction) tx;
otx.setTransactionIsolation(definition.getIsolationLevel());
*/
Integer isolationLevel = new Integer(definition.getIsolationLevel());
this.setTransactionIsolationMethod.invoke(tx, new Object[] {isolationLevel});
}
catch (InvocationTargetException ex) {
throw new TransactionSystemException(
"OC4J's Transaction.setTransactionIsolation(int) method failed", ex.getTargetException());
}
catch (Exception ex) {
throw new TransactionSystemException(
"Could not invoke OC4J's Transaction.setTransactionIsolation(int) method", ex);
}
}
}
else {