Mercurial > hg > ismi-richfaces
changeset 95:12af756065b5
better transaction logging and some cleanup.
author | casties |
---|---|
date | Thu, 20 Oct 2016 14:09:28 +0200 |
parents | d2cee1040062 |
children | 895bf7494d17 |
files | src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCityBean.java src/main/java/de/mpiwg/itgroup/ismi/event/beans/CopyEvent.java src/main/java/de/mpiwg/itgroup/ismi/event/beans/TransferEvent.java |
diffstat | 4 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java Thu Oct 20 14:08:16 2016 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java Thu Oct 20 14:09:28 2016 +0200 @@ -18,6 +18,7 @@ import org.mpi.openmind.repository.bo.Entity; import org.mpi.openmind.repository.bo.Node; import org.mpi.openmind.repository.bo.Relation; +import org.mpi.openmind.repository.services.PersistenceService; import org.mpi.openmind.security.SecurityService; import org.mpi.openmind.security.bo.User; @@ -39,6 +40,7 @@ private static final long serialVersionUID = 9193140306343947209L; private static Logger logger = Logger.getLogger(AbstractISMIBean.class); + private static Logger txLog = Logger.getLogger(PersistenceService.TRANSACTION_LOGGER); public static String WITNESS = "WITNESS"; public static String TEXT = "TEXT"; @@ -127,6 +129,7 @@ */ public String save(){ logger.info("*************** START Saving "+ this.defObjectClass + " [ID=" + entity.getId() +", user"+ getUserName() +"] *********************"); + txLog.debug("*** START Saving "+ this.defObjectClass + " id=" + entity.getId() +" user="+getUserName()); this.start = System.currentTimeMillis(); return null; } @@ -138,6 +141,7 @@ */ protected void saveEnd(){ logger.info("*************** END Saving "+ this.defObjectClass + " [ID=" + entity.getId() +", user"+ getUserName() +"] *********************\n"); + txLog.debug("*** END Saving "+ this.defObjectClass + " id=" + entity.getId() +" user="+getUserName()); } public Entity getEntity() {
--- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCityBean.java Thu Oct 20 14:08:16 2016 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCityBean.java Thu Oct 20 14:09:28 2016 +0200 @@ -30,7 +30,6 @@ public CurrentCityBean() { this.reset(); - } @Override
--- a/src/main/java/de/mpiwg/itgroup/ismi/event/beans/CopyEvent.java Thu Oct 20 14:08:16 2016 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/event/beans/CopyEvent.java Thu Oct 20 14:09:28 2016 +0200 @@ -45,25 +45,25 @@ for (Relation rel : event.getSourceRelations()) { Entity target = null; if (rel.getOwnValue().equals(was_copied_for)) { - //EVENT was_studied_by PERSON + //EVENT was_copied_for PERSON target = getTargetRelation(rel); personCopiedForLo.setEntityAndAttribute0(target); }else if (rel.getOwnValue().equals(has_person_copying_text)) { - //EVENT was_advised_by PERSON + //EVENT has_person_copying_text PERSON target = getTargetRelation(rel); personCopyingTextLo.setEntityAndAttribute0(target); } else if (rel.getOwnValue().equals(was_copied_in)) { target = getTargetRelation(rel); if(target.getObjectClass().equals(PLACE)){ - //EVENT was_studied_in PLACE + //EVENT was_copied_in PLACE placeLo.setEntityAndAttribute0(target); }else if(target.getObjectClass().equals(REPOSITORY)){ - //EVENT was_studied_in REPOSITORY + //EVENT was_copied_in REPOSITORY repositoryLo.setEntityAndAttribute0(target); } } else if (rel.getOwnValue().equals(is_a_copy_of)) { - //EVENT study_of WITNESS + //EVENT is_a_copy_of WITNESS //WITNESS is_exemplar_of TEXT this.witness = getTargetRelation(rel); if(witness != null && witness.isPersistent()){
--- a/src/main/java/de/mpiwg/itgroup/ismi/event/beans/TransferEvent.java Thu Oct 20 14:08:16 2016 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/event/beans/TransferEvent.java Thu Oct 20 14:09:28 2016 +0200 @@ -5,7 +5,6 @@ import java.util.List; import javax.faces.event.ActionEvent; -import javax.faces.event.ValueChangeEvent; import javax.faces.model.SelectItem; import org.mpi.openmind.repository.bo.Attribute; @@ -204,8 +203,6 @@ this.placeNewLocationLo = new ListenerObject(PLACE, name); this.repositoryNewLocationLo = new ListenerObject(REPOSITORY, name); - this.personToLo = new ListenerObject(PERSON, name_translit); - this.repositoryToLo = new ListenerObject(REPOSITORY, name); this.placeOriginalLocationLo = new ListenerObject(PLACE, name); this.repositoryOriginalLocationLo = new ListenerObject(REPOSITORY, name); /*