1 17 package org.alfresco.repo.transaction; 18 19 import javax.transaction.Status ; 20 import javax.transaction.UserTransaction ; 21 22 import org.alfresco.service.transaction.TransactionService; 23 24 31 public class DummyTransactionService implements TransactionService 32 { 33 private UserTransaction txn = new UserTransaction () 34 { 35 public void begin() {}; 36 public void commit() {}; 37 public int getStatus() {return Status.STATUS_NO_TRANSACTION;}; 38 public void rollback() {}; 39 public void setRollbackOnly() {}; 40 public void setTransactionTimeout(int arg0) {}; 41 }; 42 43 public boolean isReadOnly() 44 { 45 return false; 46 } 47 48 public UserTransaction getUserTransaction() 49 { 50 return txn; 51 } 52 53 public UserTransaction getUserTransaction(boolean readOnly) 54 { 55 return txn; 56 } 57 58 public UserTransaction getNonPropagatingUserTransaction() 59 { 60 return txn; 61 } 62 63 public UserTransaction getNonPropagatingUserTransaction(boolean readOnly) 64 { 65 return txn; 66 } 67 } 68 | Popular Tags |