Author: jonesde
Date: Tue May 1 05:42:05 2007
New Revision: 534041
URL:
http://svn.apache.org/viewvc?view=rev&rev=534041Log:
Changed to behave better after recent VisitHandler refactoring; now shows warning message when no visit is found in a session (which really shouldn't ever happen...)
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlEventListener.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlEventListener.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlEventListener.java?view=diff&rev=534041&r1=534040&r2=534041==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlEventListener.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlEventListener.java Tue May 1 05:42:05 2007
@@ -70,10 +70,13 @@
try {
beganTransaction = TransactionUtil.begin();
- GenericValue visit = VisitHandler.getVisit(session);
+ // instead of using this message, get directly from session attribute so it won't create a new one: GenericValue visit = VisitHandler.getVisit(session);
+ GenericValue visit = (GenericValue) session.getAttribute("visit");
if (visit != null) {
visit.set("thruDate", new Timestamp(session.getLastAccessedTime()));
visit.store();
+ } else {
+ Debug.logWarning("Could not find visit value object in session [" + session.getId() + "] that is being destroyed", module);
}
// Store the UserLoginSession