1 10 11 package org.mule.umo; 12 13 18 public interface UMOTransaction 19 { 20 21 int STATUS_ACTIVE = 0; 22 int STATUS_MARKED_ROLLBACK = 1; 23 int STATUS_PREPARED = 2; 24 int STATUS_COMMITTED = 3; 25 int STATUS_ROLLEDBACK = 4; 26 int STATUS_UNKNOWN = 5; 27 int STATUS_NO_TRANSACTION = 6; 28 int STATUS_PREPARING = 7; 29 int STATUS_COMMITTING = 8; 30 int STATUS_ROLLING_BACK = 9; 31 32 37 void begin() throws TransactionException; 38 39 44 void commit() throws TransactionException; 45 46 51 void rollback() throws TransactionException; 52 53 int getStatus() throws TransactionException; 54 55 boolean isBegun() throws TransactionException; 56 57 boolean isRolledBack() throws TransactionException; 58 59 boolean isCommitted() throws TransactionException; 60 61 Object getResource(Object key); 62 63 boolean hasResource(Object key); 64 65 void bindResource(Object key, Object resource) throws TransactionException; 66 67 void setRollbackOnly() throws TransactionException; 68 69 boolean isRollbackOnly() throws TransactionException; 70 } 71 | Popular Tags |