1 23 24 26 package com.sun.enterprise.transaction; 27 28 import javax.transaction.xa.*; 29 import javax.resource.ResourceException ; 30 31 import com.sun.enterprise.util.i18n.StringManager; 32 33 39 public class SybaseXAResource extends XAResourceWrapper 40 { 41 42 43 private static StringManager sm = StringManager.getManager(SybaseXAResource.class); 45 54 public Xid[] recover(int flag) throws XAException { 55 try{ 56 if(flag==XAResource.TMSTARTRSCAN) 57 return m_xacon.getXAResource().recover(flag); 58 }catch(ResourceException e){ 59 throw new XAException(sm.getString("transaction.sybase_xa_wrapper_connection_failed",e)); 62 } 63 return null; 64 } 65 public void commit(Xid xid, boolean flag) throws XAException{ 66 try{ 67 m_xacon.getXAResource().commit(xid, flag); 68 }catch(ResourceException e){ 69 throw new XAException(sm.getString("transaction.sybase_xa_wrapper_connection_failed",e)); 71 } 73 } 74 public void rollback(Xid xid) throws XAException{ 75 try{ 76 m_xacon.getXAResource().rollback(xid); 77 }catch(ResourceException e){ 78 throw new XAException(sm.getString("transaction.sybase_xa_wrapper_connection_failed",e)); 80 } 82 } 83 } 84 | Popular Tags |