public int prepare(Xid xid) throws XAException {
// flush data on disk here
System.out.println("XAResourceManager.prepare(Xid=" + xid + "), th_id=" + th_id);
try {
log.flush();
log.close();
} catch (IOException e) {
throw new XAException("Unable to flush data to the log file <" +
log.getFilename() + ">.");
}
return XAResource.XA_OK;
}
thanks for the cool library