1 17 18 package org.apache.geronimo.connector; 19 20 import javax.transaction.HeuristicMixedException ; 21 import javax.transaction.HeuristicRollbackException ; 22 import javax.transaction.RollbackException ; 23 import javax.transaction.Synchronization ; 24 import javax.transaction.SystemException ; 25 import javax.transaction.Transaction ; 26 import javax.transaction.xa.XAResource ; 27 28 33 public class MockTransaction implements Transaction { 34 35 private int status = -1; 36 37 38 public MockTransaction() { 39 } 40 41 public void commit() throws HeuristicMixedException , 42 HeuristicRollbackException , 43 RollbackException , 44 SecurityException , 45 SystemException { 46 } 47 48 public boolean delistResource(XAResource xaRes, int flag) 49 throws IllegalStateException , SystemException { 50 return false; 51 } 52 53 public boolean enlistResource(XAResource xaRes) 54 throws IllegalStateException , 55 RollbackException , 56 SystemException { 57 return false; 58 } 59 60 public int getStatus() throws SystemException { 61 return status; 62 } 63 64 public void registerSynchronization(Synchronization synch) 65 throws IllegalStateException , 66 RollbackException , 67 SystemException { 68 } 69 70 public void rollback() throws IllegalStateException , SystemException { 71 } 72 73 public void setRollbackOnly() 74 throws IllegalStateException , 75 SystemException { 76 } 77 78 public void setStatus(int status) { 79 this.status = status; 80 } 81 82 } 83 | Popular Tags |