Two things: 1. By asking "What bug?" I was trying to remind you to add proper details to commit messages. 2. Are you sure this is the correct fix? I'm pretty sure we moved away from using a default delegator when the tenant stuff was added.
Maybe the deeper question is "Why is delegator name empty? Why is there no delegator instance in the request?". Not everything is solvable with a quick fix, it is always better to try and understand the cause of the problem before coming up with a solution. Regards Scott On 1/10/2011, at 5:54 PM, Jacques Le Roux wrote: > http://markmail.org/message/4b37lgy7ymsfg43u > > I was able to reproduce > > Jacques > > Scott Gray wrote: >> What bug? >> >> On 1/10/2011, at 8:25 AM, [email protected] wrote: >> >>> Author: jleroux >>> Date: Fri Sep 30 19:25:16 2011 >>> New Revision: 1177789 >>> >>> URL: http://svn.apache.org/viewvc?rev=1177789&view=rev >>> Log: >>> Fix a bug reported by Martin Sanchez Vivo on user ML >>> >>> 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=1177789&r1=1177788&r2=1177789&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 >>> Fri Sep 30 19:25:16 2011 @@ -111,10 >>> +111,9 @@ public class ServerHitBin { } >>> >>> protected static void countHit(String baseId, int type, >>> HttpServletRequest request, long startTime, long runningTime, >>> GenericValue userLogin, boolean isOriginal) { >>> - String delegatorName = (String) >>> request.getSession().getAttribute("delegatorName"); >>> - Delegator delegator = null; >>> - if (UtilValidate.isNotEmpty(delegatorName)) { >>> - delegator = DelegatorFactory.getDelegator(delegatorName); >>> + Delegator delegator = (Delegator)request.getAttribute("delegator"); >>> + if (delegator == null){ >>> + delegator = DelegatorFactory.getDelegator("default"); >>> } >>> if (delegator == null) { >>> throw new IllegalArgumentException("In countHit could not find a >>> delegator or delegatorName to work from");
smime.p7s
Description: S/MIME cryptographic signature
