Fixed at r1177923, see also my answer to Scott's, I did no read your message 
before. I think we would never get to this point,
anyway better safe than sorry, since it was wrong.

Jacques

David E Jones wrote:
Also, this introduces a bug: a hard-coded dependence on the "default"
delegator. The delegator name for this should always comes from the
webapp, which is configured in the web.xml file.

-David


Scott Gray wrote:
What bug?

On 1/10/2011, at 8:25 AM, jler...@apache.org 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");

Reply via email to