1 21 38 package org.apache.derby.client.net; 39 40 import javax.transaction.xa.XAResource ; 41 import javax.transaction.xa.Xid ; 42 43 import org.apache.derby.client.am.Connection; 44 45 public class NetXACallInfo { 46 Xid xid_; int xaFlags_; int xaFunction_; int xaRetVal_; boolean xaInProgress_; boolean xaWasSuspended; boolean currConnection_; boolean freeEntry_; boolean convReleased_; NetXAResource xaResource_; NetXAConnection actualConn_; 65 66 private byte[] crrtkn_; 67 private java.io.InputStream in_; 68 private java.io.OutputStream out_; 69 70 private byte[] uowid_; 72 private boolean readOnlyTransaction_; 74 public NetXACallInfo() { 75 xid_ = null; 76 xaFlags_ = XAResource.TMNOFLAGS; 77 xaInProgress_ = false; 78 currConnection_ = false; 79 freeEntry_ = true; 80 convReleased_ = false; 81 actualConn_ = null; 82 readOnlyTransaction_ = true; 83 xaResource_ = null; 84 xaRetVal_ = 0; 85 xaWasSuspended = false; 86 } 87 88 public NetXACallInfo(Xid xid, int flags, NetXAResource xares, NetXAConnection actualConn) { 89 xid_ = xid; 90 xaFlags_ = flags; 91 xaInProgress_ = false; 92 currConnection_ = false; 93 freeEntry_ = true; 94 actualConn_ = actualConn; 95 readOnlyTransaction_ = true; 96 xaResource_ = xares; 97 xaRetVal_ = 0; 98 xaWasSuspended = false; 99 } 100 101 public void saveConnectionVariables() { 102 in_ = actualConn_.getNetConnection().getInputStream(); 103 out_ = actualConn_.getNetConnection().getOutputStream(); 104 crrtkn_ = actualConn_.getCorrelatorToken(); 105 } 106 107 public java.io.InputStream getInputStream() { 108 return in_; 109 } 110 111 public java.io.OutputStream getOutputStream() { 112 return out_; 113 } 114 115 public byte[] getCorrelatorToken() { 116 return crrtkn_; 117 } 118 119 protected void setUOWID(byte[] uowid) { 120 uowid_ = uowid; 121 } 122 123 protected byte[] getUOWID() { 124 return uowid_; 125 } 126 127 protected void setReadOnlyTransactionFlag(boolean flag) { 128 readOnlyTransaction_ = flag; 129 } 130 131 protected boolean getReadOnlyTransactionFlag() { 132 return readOnlyTransaction_; 133 } 134 135 136 } 137 138 139 140 141 142 143 144 145 146 | Popular Tags |