1 23 24 package com.sun.enterprise.transaction; 25 26 import javax.sql.*; 27 import javax.transaction.xa.*; 28 import javax.security.auth.Subject ; 29 import javax.resource.spi.ManagedConnection ; 30 31 import com.sun.enterprise.util.i18n.StringManager; 32 33 42 public abstract class XAResourceWrapper implements XAResource 43 { 44 45 private static StringManager sm = StringManager.getManager(XAResourceWrapper.class); 47 48 protected ManagedConnection m_xacon; 49 protected Subject subject; 50 public void init(ManagedConnection xacon,Subject subject){ 51 m_xacon=xacon; 52 this.subject = subject; 53 } 54 public void end(Xid xid, int i) throws XAException{ 55 throw new XAException(sm.getString("transaction.for_recovery_only")); 56 } 57 public void forget(Xid xid) throws XAException{ 58 throw new XAException(sm.getString("transaction.for_recovery_only")); 59 } 60 public int getTransactionTimeout() throws XAException{ 61 throw new XAException(sm.getString("transaction.for_recovery_only")); 62 } 63 public boolean isSameRM(XAResource xaresource) throws XAException 64 { 65 throw new XAException(sm.getString("transaction.for_recovery_only")); 66 } 67 public int prepare(Xid xid) throws XAException{ 68 throw new XAException(sm.getString("transaction.for_recovery_only")); 69 } 70 public boolean setTransactionTimeout(int i) throws XAException { 71 throw new XAException(sm.getString("transaction.for_recovery_only")); 72 } 73 public void start(Xid xid, int i) throws XAException{ 74 throw new XAException(sm.getString("transaction.for_recovery_only")); 75 } 76 77 public abstract Xid[] recover(int flag) throws XAException; 78 79 public abstract void commit(Xid xid, boolean flag) throws XAException; 80 81 public abstract void rollback(Xid xid) throws XAException; 82 83 94 } 95 | Popular Tags |