1 28 29 package com.caucho.sql; 30 31 import javax.transaction.xa.XAException ; 32 import javax.transaction.xa.XAResource ; 33 import javax.transaction.xa.Xid ; 34 35 38 public class DisjointXAResource implements XAResource { 39 private XAResource _xaResource; 41 42 45 public DisjointXAResource(XAResource resource) 46 { 47 _xaResource = resource; 48 } 49 50 53 public XAResource getXAResource() 54 { 55 return _xaResource; 56 } 57 58 61 public boolean setTransactionTimeout(int seconds) 62 throws XAException 63 { 64 return _xaResource.setTransactionTimeout(seconds); 65 } 66 67 70 public int getTransactionTimeout() 71 throws XAException 72 { 73 return _xaResource.getTransactionTimeout(); 74 } 75 76 79 public boolean isSameRM(XAResource resource) 80 throws XAException 81 { 82 return false; 83 } 84 85 88 public void start(Xid xid, int flags) 89 throws XAException 90 { 91 _xaResource.start(xid, flags); 92 } 93 94 97 public void end(Xid xid, int flags) 98 throws XAException 99 { 100 _xaResource.end(xid, flags); 101 } 102 103 106 public int prepare(Xid xid) 107 throws XAException 108 { 109 return _xaResource.prepare(xid); 110 } 111 112 115 public void commit(Xid xid, boolean onePhase) 116 throws XAException 117 { 118 _xaResource.commit(xid, onePhase); 119 } 120 121 124 public void rollback(Xid xid) 125 throws XAException 126 { 127 _xaResource.rollback(xid); 128 } 129 130 133 public Xid []recover(int flags) 134 throws XAException 135 { 136 return _xaResource.recover(flags); 137 } 138 139 142 public void forget(Xid xid) 143 throws XAException 144 { 145 _xaResource.forget(xid); 146 } 147 148 public String toString() 149 { 150 return "DisjointXAResource[" + _xaResource.getClass().getName() + "]"; 151 } 152 } 153 | Popular Tags |