Mercurial > hg > ismi-richfaces
comparison src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java @ 95:12af756065b5
better transaction logging and some cleanup.
author | casties |
---|---|
date | Thu, 20 Oct 2016 14:09:28 +0200 |
parents | be377d5f9cc4 |
children | e27603a39e70 |
comparison
equal
deleted
inserted
replaced
94:d2cee1040062 | 95:12af756065b5 |
---|---|
16 import org.mpi.openmind.cache.WrapperService; | 16 import org.mpi.openmind.cache.WrapperService; |
17 import org.mpi.openmind.repository.bo.Attribute; | 17 import org.mpi.openmind.repository.bo.Attribute; |
18 import org.mpi.openmind.repository.bo.Entity; | 18 import org.mpi.openmind.repository.bo.Entity; |
19 import org.mpi.openmind.repository.bo.Node; | 19 import org.mpi.openmind.repository.bo.Node; |
20 import org.mpi.openmind.repository.bo.Relation; | 20 import org.mpi.openmind.repository.bo.Relation; |
21 import org.mpi.openmind.repository.services.PersistenceService; | |
21 import org.mpi.openmind.security.SecurityService; | 22 import org.mpi.openmind.security.SecurityService; |
22 import org.mpi.openmind.security.bo.User; | 23 import org.mpi.openmind.security.bo.User; |
23 | 24 |
24 import de.mpiwg.itgroup.ismi.auxObjects.ListenerObject; | 25 import de.mpiwg.itgroup.ismi.auxObjects.ListenerObject; |
25 import de.mpiwg.itgroup.ismi.entry.dataBeans.SimpleSearchCache; | 26 import de.mpiwg.itgroup.ismi.entry.dataBeans.SimpleSearchCache; |
37 public class AbstractISMIBean extends AbstractBean implements Serializable{ | 38 public class AbstractISMIBean extends AbstractBean implements Serializable{ |
38 | 39 |
39 private static final long serialVersionUID = 9193140306343947209L; | 40 private static final long serialVersionUID = 9193140306343947209L; |
40 | 41 |
41 private static Logger logger = Logger.getLogger(AbstractISMIBean.class); | 42 private static Logger logger = Logger.getLogger(AbstractISMIBean.class); |
43 private static Logger txLog = Logger.getLogger(PersistenceService.TRANSACTION_LOGGER); | |
42 | 44 |
43 public static String WITNESS = "WITNESS"; | 45 public static String WITNESS = "WITNESS"; |
44 public static String TEXT = "TEXT"; | 46 public static String TEXT = "TEXT"; |
45 public static String PERSON = "PERSON"; | 47 public static String PERSON = "PERSON"; |
46 public static String COLLECTION = "COLLECTION"; | 48 public static String COLLECTION = "COLLECTION"; |
125 * | 127 * |
126 * @return | 128 * @return |
127 */ | 129 */ |
128 public String save(){ | 130 public String save(){ |
129 logger.info("*************** START Saving "+ this.defObjectClass + " [ID=" + entity.getId() +", user"+ getUserName() +"] *********************"); | 131 logger.info("*************** START Saving "+ this.defObjectClass + " [ID=" + entity.getId() +", user"+ getUserName() +"] *********************"); |
132 txLog.debug("*** START Saving "+ this.defObjectClass + " id=" + entity.getId() +" user="+getUserName()); | |
130 this.start = System.currentTimeMillis(); | 133 this.start = System.currentTimeMillis(); |
131 return null; | 134 return null; |
132 } | 135 } |
133 | 136 |
134 /** | 137 /** |
136 * | 139 * |
137 * To be called at the end of save(). | 140 * To be called at the end of save(). |
138 */ | 141 */ |
139 protected void saveEnd(){ | 142 protected void saveEnd(){ |
140 logger.info("*************** END Saving "+ this.defObjectClass + " [ID=" + entity.getId() +", user"+ getUserName() +"] *********************\n"); | 143 logger.info("*************** END Saving "+ this.defObjectClass + " [ID=" + entity.getId() +", user"+ getUserName() +"] *********************\n"); |
144 txLog.debug("*** END Saving "+ this.defObjectClass + " id=" + entity.getId() +" user="+getUserName()); | |
141 } | 145 } |
142 | 146 |
143 public Entity getEntity() { | 147 public Entity getEntity() { |
144 if (this.entity == null) { | 148 if (this.entity == null) { |
145 this.entity = new Entity(); | 149 this.entity = new Entity(); |