1 16 17 package org.springframework.transaction; 18 19 import javax.transaction.Status ; 20 import javax.transaction.Synchronization ; 21 import javax.transaction.xa.XAResource ; 22 23 27 public class MockJtaTransaction implements javax.transaction.Transaction { 28 29 private Synchronization synchronization; 30 31 public int getStatus() { 32 return Status.STATUS_ACTIVE; 33 } 34 35 public void registerSynchronization(Synchronization synchronization) { 36 this.synchronization = synchronization; 37 } 38 39 public Synchronization getSynchronization() { 40 return synchronization; 41 } 42 43 public boolean enlistResource(XAResource xaResource) { 44 return false; 45 } 46 47 public boolean delistResource(XAResource xaResource, int i) { 48 return false; 49 } 50 51 public void commit() { 52 } 53 54 public void rollback() { 55 } 56 57 public void setRollbackOnly() { 58 } 59 60 } 61 | Popular Tags |