1 44 45 package org.objectweb.jotm; 46 47 import java.util.Vector ; 48 49 52 class Log { 53 54 57 public Log() { 58 if (TraceTm.jotm.isDebugEnabled()) { 59 TraceTm.jotm.debug("Log constructor"); 60 } 61 } 62 63 66 public void addResource(Resource res) { 67 if (TraceTm.jotm.isDebugEnabled()) { 68 TraceTm.jotm.debug("res="+ res); 69 } 70 ResourceInfo ri = new ResourceInfo(res); 71 resourceLogged.addElement(ri); 72 } 73 74 77 public void flushLog(int decide) { 78 if (TraceTm.jotm.isDebugEnabled()) { 79 TraceTm.jotm.debug("decide="+ decide); 80 } 81 decision = decide; 82 83 } 85 86 89 public void forgetLog() { 90 if (TraceTm.jotm.isDebugEnabled()) { 91 TraceTm.jotm.debug("forget log"); 92 } 93 94 } 96 97 100 public void updateLog() { 101 if (TraceTm.jotm.isDebugEnabled()) { 102 TraceTm.jotm.debug("update log"); 103 } 104 105 } 107 108 Vector resourceLogged = new Vector (); 110 111 static final int DECISION_TO_COMMIT = 1; 113 static final int DECISION_TO_ROLLBACK = 2; 114 int decision; 115 116 } 117 | Popular Tags |