Skip to content
Permalink
Browse files
enable testResume4 - related to GERONIMO-4448
  • Loading branch information
Lin Sun committed Dec 10, 2008
1 parent 278f196 commit af107211180295eed1d36d8d80c6df4ec847e4d1
Showing 2 changed files with 5 additions and 5 deletions.
@@ -176,10 +176,10 @@ public Transaction suspend() throws SystemException {
}

public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
if (getTransaction() != null) {
if (getTransaction() != null && tx != getTransaction()) {
throw new IllegalStateException("Thread already associated with another transaction");
}
if (tx != null) {
if (tx != null && tx != getTransaction()) {
if (!(tx instanceof TransactionImpl)) {
throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx);
}
@@ -395,7 +395,7 @@ public void testResume3() throws Exception {
}

// resume works on any valid tx
/*public void testResume4() throws Exception {
public void testResume4() throws Exception {
Transaction tx;
assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());
tm.begin();
@@ -409,13 +409,13 @@ public void testResume3() throws Exception {
assertNotNull(tx);
assertEquals(Status.STATUS_ACTIVE, tx.getStatus());
} catch (InvalidTransactionException e) {
// null is considered valid so we don't expect InvalidTransactionException here
// tx is considered valid so we don't expect InvalidTransactionException here
e.printStackTrace();
fail();
}

tm.commit();
assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());
assertNull(tm.getTransaction());
}*/
}
}

0 comments on commit af10721

Please sign in to comment.