1 23 24 package javax.resource.spi.work; 25 26 import java.lang.Object ; 27 import java.lang.Runnable ; 28 import java.lang.Exception ; 29 import java.lang.Throwable ; 30 31 import javax.transaction.xa.Xid ; 32 import javax.resource.NotSupportedException ; 33 35 56 public class ExecutionContext { 57 58 61 private Xid xid; 62 63 66 private long transactionTimeout = WorkManager.UNKNOWN; 67 68 71 73 78 public void setXid(Xid xid) { this.xid = xid; } 79 80 84 public Xid getXid() { return this.xid; } 85 86 96 public void setTransactionTimeout(long timeout) 97 throws NotSupportedException { 98 if (timeout > 0) { 99 this.transactionTimeout = timeout; 100 } else { 101 throw new NotSupportedException ("Illegal timeout value"); 102 } 103 } 104 105 114 public long getTransactionTimeout() { 115 return this.transactionTimeout; 116 } 117 118 123 128 131 134 } 135 | Popular Tags |