Author: jleroux
Date: Sat Oct 1 06:05:46 2011
New Revision: 1177926
URL:
http://svn.apache.org/viewvc?rev=1177926&view=revLog:
Better solution than r1177923 (like it's done in trunk)
Modified:
ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
Modified: ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=1177926&r1=1177925&r2=1177926&view=diff==============================================================================
--- ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original)
+++ ofbiz/branches/release10.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Sat Oct 1 06:05:46 2011
@@ -113,6 +113,10 @@ public class ServerHitBin {
protected static void countHit(String baseId, int type, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin, boolean isOriginal) {
Delegator delegator = (Delegator)request.getAttribute("delegator");
if (delegator == null) {
+ String delegatorName = (String)request.getSession().getAttribute("delegatorName");
+ delegator = DelegatorFactory.getDelegator(delegatorName);
+ }
+ if (delegator == null) {
throw new IllegalArgumentException("In countHit could not find a delegator or delegatorName to work from");
}