1 23 package com.sun.enterprise; 24 25 import com.sun.ejb.*; 26 import com.sun.enterprise.resource.ResourceHandle; 27 import javax.transaction.*; 28 import javax.transaction.xa.XAResource ; 29 import javax.transaction.xa.Xid ; 30 import java.rmi.RemoteException ; 31 import javax.resource.spi.XATerminator ; 32 import javax.resource.spi.work.WorkException ; 33 34 import java.util.List ; 36 38 44 public interface J2EETransactionManager extends TransactionManager { 45 46 59 public void registerSynchronization(Synchronization sync) 60 throws RollbackException, IllegalStateException , SystemException; 61 62 63 83 public boolean enlistResource(Transaction tran, 84 ResourceHandle h) 85 throws RollbackException, 86 IllegalStateException , SystemException; 87 88 104 public boolean delistResource(Transaction tran, 105 ResourceHandle h, 106 int flag) 107 throws IllegalStateException , SystemException; 108 109 116 public void enlistComponentResources() throws RemoteException ; 117 118 128 public void delistComponentResources(boolean suspend) 129 throws RemoteException ; 130 131 138 public void componentDestroyed(Object instance); 139 140 public void ejbDestroyed(ComponentContext context); 141 142 145 146 public void preInvoke(ComponentInvocation prev) 147 throws InvocationException; 148 149 152 153 public void postInvoke(ComponentInvocation curr, ComponentInvocation prev) 154 throws InvocationException; 155 156 public void setDefaultTransactionTimeout(int seconds); 157 public void cleanTxnTimeout(); 161 162 public List getExistingResourceList(Object instance, ComponentInvocation inv); 163 164 public void registerComponentResource(ResourceHandle h); 165 166 public void unregisterComponentResource(ResourceHandle h); 167 168 public void recover(XAResource [] resourceList); 169 170 public void begin(int timeout) 171 throws NotSupportedException, SystemException; 172 173 181 public boolean isNullTransaction(); 182 183 186 public void checkTransactionExport(boolean isLocal); 187 188 192 public void checkTransactionImport(); 193 194 195 200 public boolean isTimedOut(); 201 202 204 208 public java.util.ArrayList getActiveTransactions(); 209 210 213 public void forceRollback(Transaction tran) throws IllegalStateException , SystemException; 214 215 218 public int getNumberOfTransactionsCommitted(); 219 220 223 public int getNumberOfTransactionsRolledBack(); 224 225 228 public int getNumberOfActiveTransactions(); 229 230 233 public void setMonitoringEnabled(boolean enabled); 234 235 238 public void freeze(); 239 242 public void unfreeze(); 243 244 247 public boolean isFrozen(); 248 249 251 252 259 public void recreate(Xid xid, long timeout) throws WorkException ; 260 261 268 public void release(Xid xid) throws WorkException ; 269 270 279 public XATerminator getXATerminator() ; 280 281 282 } 283 | Popular Tags |