1 22 package org.jboss.test.recover.interfaces; 23 24 import org.jboss.tm.recovery.Recoverable; 25 26 import javax.transaction.xa.XAException ; 27 import javax.transaction.xa.XAResource ; 28 import javax.transaction.xa.Xid ; 29 30 37 public class DummyRecoverable implements Recoverable 38 { 39 private String id; 40 private XAResource resource; 41 42 public DummyRecoverable() 43 { 44 } 45 46 public DummyRecoverable(String id, XAResource resource) 47 { 48 this.id = id; 49 this.resource = resource; 50 } 51 52 public String getId() 53 { 54 return id; 55 } 56 57 public XAResource getResource() 58 { 59 return resource; 60 } 61 62 public Xid [] scan() throws XAException 63 { 64 return resource.recover(XAResource.TMSTARTRSCAN); 65 } 66 67 public void cleanupResource() 68 { 69 } 70 71 } 72 | Popular Tags |