You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/08/27 10:29:12 UTC

svn commit: r1620803 [3/3] - in /ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./ applications/marketing/src/org/ofbiz/marketing/tracking/ applications/order/script/org/ofbiz/order/order/ applications/order/src/org/ofbiz/order/shoppingcart/...

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java Wed Aug 27 08:29:10 2014
@@ -32,15 +32,15 @@ import org.apache.geronimo.transaction.m
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.config.model.Datasource;
-import org.ofbiz.entity.config.EntityConfigUtil;
+import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
-import org.ofbiz.entity.transaction.TransactionFactoryInterface;
+import org.ofbiz.entity.jdbc.ConnectionFactoryLoader;
+import org.ofbiz.entity.transaction.TransactionFactory;
 
 /**
  * GeronimoTransactionFactory
  */
-public class GeronimoTransactionFactory implements TransactionFactoryInterface {
+public class GeronimoTransactionFactory implements TransactionFactory {
 
     public static final String module = GeronimoTransactionFactory.class.getName();
 
@@ -59,14 +59,14 @@ public class GeronimoTransactionFactory 
     }
 
     /*
-     * @see org.ofbiz.entity.transaction.TransactionFactoryInterface#getTransactionManager()
+     * @see org.ofbiz.entity.transaction.TransactionFactory#getTransactionManager()
      */
     public TransactionManager getTransactionManager() {
         return geronimoTransactionManager;
     }
 
     /*
-     * @see org.ofbiz.entity.transaction.TransactionFactoryInterface#getUserTransaction()
+     * @see org.ofbiz.entity.transaction.TransactionFactory#getUserTransaction()
      */
     public UserTransaction getUserTransaction() {
         return geronimoTransactionManager;
@@ -77,10 +77,10 @@ public class GeronimoTransactionFactory 
     }
 
     public Connection getConnection(GenericHelperInfo helperInfo) throws SQLException, GenericEntityException {
-        Datasource datasourceInfo = EntityConfigUtil.getDatasource(helperInfo.getHelperBaseName());
+        Datasource datasourceInfo = EntityConfig.getDatasource(helperInfo.getHelperBaseName());
 
         if (datasourceInfo != null && datasourceInfo.getInlineJdbc() != null) {
-            return ConnectionFactory.getManagedConnection(helperInfo, datasourceInfo.getInlineJdbc());
+            return ConnectionFactoryLoader.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
         } else {
             Debug.logError("Geronimo is the configured transaction manager but no inline-jdbc element was specified in the " + helperInfo.getHelperBaseName() + " datasource. Please check your configuration", module);
             return null;
@@ -88,7 +88,7 @@ public class GeronimoTransactionFactory 
     }
 
     public void shutdown() {
-        ConnectionFactory.closeAllManagedConnections();
+        ConnectionFactoryLoader.getInstance().closeAll();
         /*
         if (transactionContextManager != null) {
             // TODO: need to do anything for this?

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/DispatchContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/DispatchContext.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/DispatchContext.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/DispatchContext.java Wed Aug 27 08:29:10 2014
@@ -40,8 +40,8 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.cache.UtilCache;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityConfException;
-import org.ofbiz.entity.config.EntityConfigUtil;
 import org.ofbiz.entity.config.model.DelegatorElement;
+import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.security.Security;
 import org.ofbiz.service.config.ServiceConfigUtil;
 import org.ofbiz.service.config.model.GlobalServices;
@@ -84,7 +84,7 @@ public class DispatchContext implements 
             if (delegator != null) {
                 DelegatorElement delegatorInfo = null;
                 try {
-                    delegatorInfo = EntityConfigUtil.getDelegator(delegator.getDelegatorBaseName());
+                    delegatorInfo = EntityConfig.getInstance().getDelegator(delegator.getDelegatorBaseName());
                 } catch (GenericEntityConfException e) {
                     Debug.logWarning(e, "Exception thrown while getting delegator config: ", module);
                 }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Wed Aug 27 08:29:10 2014
@@ -34,11 +34,9 @@ import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilTimer;
 import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.entity.GenericDelegator;
-import org.ofbiz.entity.GenericEntityConfException;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.transaction.DebugXaResource;
@@ -58,7 +56,6 @@ import org.ofbiz.service.jms.JmsListener
 import org.ofbiz.service.job.JobManager;
 import org.ofbiz.service.job.JobManagerException;
 import org.ofbiz.service.semaphore.ServiceSemaphore;
-import org.w3c.dom.Element;
 
 import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap;
 
@@ -563,9 +560,6 @@ public class ServiceDispatcher {
         } catch (GenericTransactionException te) {
             Debug.logError(te, "Problems with the transaction", module);
             throw new GenericServiceException("Problems with the transaction.", te.getNested());
-        } catch (GenericEntityConfException e) {
-            Debug.logError(e, "Problems with the transaction", module);
-            throw new GenericServiceException("Problems with the transaction.", e);
         } finally {
             if (lock != null) {
                 // release the semaphore lock
@@ -759,9 +753,6 @@ public class ServiceDispatcher {
         } catch (GenericTransactionException se) {
             Debug.logError(se, "Problems with the transaction", module);
             throw new GenericServiceException("Problems with the transaction: " + se.getMessage() + "; See logs for more detail");
-        } catch (GenericEntityConfException e) {
-            Debug.logError(e, "Problems with the transaction", module);
-            throw new GenericServiceException("Problems with the transaction: " + e.getMessage() + "; See logs for more detail");
         } finally {
             // resume the parent transaction
             if (parentTransaction != null) {

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceSynchronization.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceSynchronization.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceSynchronization.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceSynchronization.java Wed Aug 27 08:29:10 2014
@@ -14,7 +14,7 @@ import javax.transaction.Transaction;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.entity.transaction.GenericTransactionException;
-import org.ofbiz.entity.transaction.TransactionFactory;
+import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.entity.transaction.TransactionUtil;
 
 /**
@@ -49,7 +49,7 @@ public class ServiceSynchronization impl
     protected static ServiceSynchronization getInstance() throws GenericServiceException {
         ServiceSynchronization sync = null;
         try {
-            Transaction transaction = TransactionFactory.getTransactionManager().getTransaction();
+            Transaction transaction = TransactionFactoryLoader.getInstance().getTransactionManager().getTransaction();
             synchronized (transaction) {
                 sync = syncingleton.get(transaction);
                 if (sync == null) {

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Wed Aug 27 08:29:10 2014
@@ -254,8 +254,8 @@ public class ContextFilter implements Fi
         }
 
         // check if multi tenant is enabled
-        String useMultitenant = UtilProperties.getPropertyValue("general.properties", "multitenant");
-        if ("Y".equals(useMultitenant)) {
+        boolean useMultitenant = EntityUtil.isMultiTenantEnabled();
+        if (useMultitenant) {
             // get tenant delegator by domain name
             String serverName = httpRequest.getServerName();
             try {

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Wed Aug 27 08:29:10 2014
@@ -18,7 +18,6 @@
  *******************************************************************************/
 package org.ofbiz.webapp.stats;
 
-import java.net.InetAddress;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -55,8 +54,22 @@ public class ServerHitBin {
     public static final int VIEW = 3;
     public static final int ENTITY = 4;
     public static final int SERVICE = 5;
-    public static final String[] typeNames = {"", "Request", "Event", "View", "Entity", "Service"};
-    public static final String[] typeIds = {"", "REQUEST", "EVENT", "VIEW", "ENTITY", "SERVICE"};
+
+    private static final String[] typeIds = {"", "REQUEST", "EVENT", "VIEW", "ENTITY", "SERVICE"};
+
+    // these Maps contain Lists of ServerHitBin objects by id, the most recent is first in the list
+    public static Map<String, List<ServerHitBin>> requestHistory = FastMap.newInstance();
+    public static Map<String, List<ServerHitBin>> eventHistory = FastMap.newInstance();
+    public static Map<String, List<ServerHitBin>> viewHistory = FastMap.newInstance();
+    public static Map<String, List<ServerHitBin>> entityHistory = FastMap.newInstance();
+    public static Map<String, List<ServerHitBin>> serviceHistory = FastMap.newInstance();
+
+    // these Maps contain ServerHitBin objects by id
+    public static Map<String, ServerHitBin> requestSinceStarted = FastMap.newInstance();
+    public static Map<String, ServerHitBin> eventSinceStarted = FastMap.newInstance();
+    public static Map<String, ServerHitBin> viewSinceStarted = FastMap.newInstance();
+    public static Map<String, ServerHitBin> entitySinceStarted = FastMap.newInstance();
+    public static Map<String, ServerHitBin> serviceSinceStarted = FastMap.newInstance();
 
     public static void countRequest(String id, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) {
         countHit(id, REQUEST, request, startTime, runningTime, userLogin);
@@ -78,30 +91,12 @@ public class ServerHitBin {
         countHit(id, SERVICE, request, startTime, runningTime, userLogin);
     }
 
-    public static void countHit(String id, int type, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) {
+    private static void countHit(String id, int type, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) {
         // only count hits if enabled, if not specified defaults to false
         if (!"true".equals(UtilProperties.getPropertyValue("serverstats", "stats.enable." + typeIds[type]))) return;
         countHit(id, type, request, startTime, runningTime, userLogin, true);
     }
 
-    public static void advanceAllBins(long toTime) {
-        advanceAllBins(toTime, requestHistory);
-        advanceAllBins(toTime, eventHistory);
-        advanceAllBins(toTime, viewHistory);
-        advanceAllBins(toTime, entityHistory);
-        advanceAllBins(toTime, serviceHistory);
-    }
-
-    static void advanceAllBins(long toTime, Map<String, List<ServerHitBin>> binMap) {
-        for (Map.Entry<String, List<ServerHitBin>> entry  :binMap.entrySet()) {
-            if (entry.getValue() != null) {
-                for (ServerHitBin bin: entry.getValue()) {
-                    bin.advanceBin(toTime);
-                }
-            }
-        }
-    }
-    
     private static String makeIdTenantAware(String id, Delegator delegator) {
         if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId())) {
             return id + "#" + delegator.getDelegatorTenantId();
@@ -110,7 +105,7 @@ public class ServerHitBin {
         }
     }
 
-    protected static void countHit(String baseId, int type, HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin, boolean isOriginal) {
+    private 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");
@@ -238,11 +233,7 @@ public class ServerHitBin {
             countHit("GLOBAL", type, request, startTime, runningTime, userLogin, true);
     }
 
-    static void countHitSinceStart(String baseId, int type, long startTime, long runningTime, boolean isOriginal,
-        Delegator delegator) {
-        if (delegator == null) {
-            throw new IllegalArgumentException("The delegator passed to countHitSinceStart cannot be null");
-        }
+    private static void countHitSinceStart(String baseId, int type, long startTime, long runningTime, boolean isOriginal, Delegator delegator) {
 
         String id = makeIdTenantAware(baseId, delegator);
 
@@ -328,111 +319,33 @@ public class ServerHitBin {
             countHitSinceStart("GLOBAL", type, startTime, runningTime, false, delegator);
     }
 
-    // these Maps contain Lists of ServerHitBin objects by id, the most recent is first in the list
-    public static Map<String, List<ServerHitBin>> requestHistory = FastMap.newInstance();
-    public static Map<String, List<ServerHitBin>> eventHistory = FastMap.newInstance();
-    public static Map<String, List<ServerHitBin>> viewHistory = FastMap.newInstance();
-    public static Map<String, List<ServerHitBin>> entityHistory = FastMap.newInstance();
-    public static Map<String, List<ServerHitBin>> serviceHistory = FastMap.newInstance();
-
-    // these Maps contain ServerHitBin objects by id
-    public static Map<String, ServerHitBin> requestSinceStarted = FastMap.newInstance();
-    public static Map<String, ServerHitBin> eventSinceStarted = FastMap.newInstance();
-    public static Map<String, ServerHitBin> viewSinceStarted = FastMap.newInstance();
-    public static Map<String, ServerHitBin> entitySinceStarted = FastMap.newInstance();
-    public static Map<String, ServerHitBin> serviceSinceStarted = FastMap.newInstance();
-
-    Delegator delegator;
-    String delegatorName;
-    String id;
-    int type;
-    boolean limitLength;
-    long startTime;
-    long endTime;
-    long numberHits;
-    long totalRunningTime;
-    long minTime;
-    long maxTime;
-
-    public ServerHitBin(String id, int type, boolean limitLength, Delegator delegator) {
-        super();
-        if (delegator == null) {
-            throw new IllegalArgumentException("The delegator passed to countHitSinceStart cannot be null");
-        }
+    private final Delegator delegator;
+    private final String id;
+    private final int type;
+    private final boolean limitLength;
+    private final long binLength;
+    private long startTime;
+    private long endTime;
+    private long numberHits;
+    private long totalRunningTime;
+    private long minTime;
+    private long maxTime;
 
+    private ServerHitBin(String id, int type, boolean limitLength, Delegator delegator) {
         this.id = id;
         this.type = type;
         this.limitLength = limitLength;
         this.delegator = delegator;
-        this.delegatorName = delegator.getDelegatorName();
+        this.binLength = getNewBinLength();
         reset(getEvenStartingTime());
     }
 
-    public Delegator getDelegator() {
-        if (this.delegator == null) {
-            this.delegator = DelegatorFactory.getDelegator(this.delegatorName);
-        }
-        // if still null, then we have a problem
-        if (this.delegator == null) {
-            throw new IllegalArgumentException("Could not perform stats operation: could not find delegator with name: " + this.delegatorName);
-        }
-        return this.delegator;
-    }
-
-    long getEvenStartingTime() {
-        // binLengths should be a divisable evenly into 1 hour
-        long curTime = System.currentTimeMillis();
-        long binLength = getNewBinLength();
-
-        // find the first previous millis that are even on the hour
-        Calendar cal = Calendar.getInstance();
-
-        cal.setTime(new Date(curTime));
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.MILLISECOND, 0);
-
-        while (cal.getTime().getTime() < (curTime - binLength)) {
-            cal.add(Calendar.MILLISECOND, (int) binLength);
-        }
-
-        return cal.getTime().getTime();
-    }
-
-    static long getNewBinLength() {
-        long binLength = (long) UtilProperties.getPropertyNumber("serverstats", "stats.bin.length.millis");
-
-        // if no or 0 binLength specified, set to 30 minutes
-        if (binLength <= 0) binLength = 1800000;
-        // if binLength is more than an hour, set it to one hour
-        if (binLength > 3600000) binLength = 3600000;
-        return binLength;
-    }
-
-    void reset(long startTime) {
-        this.startTime = startTime;
-        if (limitLength) {
-            long binLength = getNewBinLength();
-
-            // subtract 1 millisecond to keep bin starting times even
-            this.endTime = startTime + binLength - 1;
-        } else {
-            this.endTime = 0;
-        }
-        this.numberHits = 0;
-        this.totalRunningTime = 0;
-        this.minTime = Long.MAX_VALUE;
-        this.maxTime = 0;
-    }
-
-    ServerHitBin(ServerHitBin oldBin) {
-        super();
-
+    private ServerHitBin(ServerHitBin oldBin) {
         this.id = oldBin.id;
         this.type = oldBin.type;
         this.limitLength = oldBin.limitLength;
         this.delegator = oldBin.delegator;
-        this.delegatorName = oldBin.delegatorName;
+        this.binLength = oldBin.binLength;
         this.startTime = oldBin.startTime;
         this.endTime = oldBin.endTime;
         this.numberHits = oldBin.numberHits;
@@ -441,6 +354,10 @@ public class ServerHitBin {
         this.maxTime = oldBin.maxTime;
     }
 
+    public Delegator getDelegator() {
+        return this.delegator;
+    }
+
     public String getId() {
         return this.id;
     }
@@ -449,10 +366,6 @@ public class ServerHitBin {
         return this.type;
     }
 
-    public String getTypeString() {
-        return typeNames[this.type];
-    }
-
     /** returns the startTime of the bin */
     public long getStartTime() {
         return this.startTime;
@@ -488,22 +401,10 @@ public class ServerHitBin {
         return this.numberHits;
     }
 
-    public long getTotalRunningTime() {
-        return this.totalRunningTime;
-    }
-
-    public long getMinTime() {
-        return this.minTime;
-    }
-
     public double getMinTimeSeconds() {
         return (this.minTime) / 1000.0;
     }
 
-    public long getMaxTime() {
-        return this.maxTime;
-    }
-
     public double getMaxTimeSeconds() {
         return (this.maxTime) / 1000.0;
     }
@@ -521,7 +422,50 @@ public class ServerHitBin {
         return (this.numberHits) / this.getBinLengthMinutes();
     }
 
-    synchronized void addHit(long startTime, long runningTime) {
+    private long getNewBinLength() {
+        long binLength = (long) UtilProperties.getPropertyNumber("serverstats", "stats.bin.length.millis");
+
+        // if no or 0 binLength specified, set to 30 minutes
+        if (binLength <= 0) binLength = 1800000;
+        // if binLength is more than an hour, set it to one hour
+        if (binLength > 3600000) binLength = 3600000;
+        return binLength;
+    }
+
+    private long getEvenStartingTime() {
+        // binLengths should be a divisable evenly into 1 hour
+        long curTime = System.currentTimeMillis();
+
+        // find the first previous millis that are even on the hour
+        Calendar cal = Calendar.getInstance();
+
+        cal.setTime(new Date(curTime));
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        cal.set(Calendar.MILLISECOND, 0);
+
+        while (cal.getTime().getTime() < (curTime - this.binLength)) {
+            cal.add(Calendar.MILLISECOND, (int) this.binLength);
+        }
+
+        return cal.getTime().getTime();
+    }
+
+    private void reset(long startTime) {
+        this.startTime = startTime;
+        if (limitLength) {
+            // subtract 1 millisecond to keep bin starting times even
+            this.endTime = startTime + this.binLength - 1;
+        } else {
+            this.endTime = 0;
+        }
+        this.numberHits = 0;
+        this.totalRunningTime = 0;
+        this.minTime = Long.MAX_VALUE;
+        this.maxTime = 0;
+    }
+
+    private synchronized void addHit(long startTime, long runningTime) {
         advanceBin(startTime + runningTime);
 
         this.numberHits++;
@@ -532,7 +476,7 @@ public class ServerHitBin {
             this.maxTime = runningTime;
     }
 
-    synchronized void advanceBin(long toTime) {
+    private synchronized void advanceBin(long toTime) {
         // first check to see if this bin has expired, if so save and recycle it
         while (limitLength && toTime > this.endTime) {
             List<ServerHitBin> binList = null;
@@ -577,17 +521,9 @@ public class ServerHitBin {
                     serverHitBin.set("minTimeMillis", Long.valueOf(this.minTime));
                     serverHitBin.set("maxTimeMillis", Long.valueOf(this.maxTime));
                     // get localhost ip address and hostname to store
-                    try {
-                        InetAddress address = InetAddress.getLocalHost();
-
-                        if (address != null) {
-                            serverHitBin.set("serverIpAddress", address.getHostAddress());
-                            serverHitBin.set("serverHostName", address.getHostName());
-                        } else {
-                            Debug.logError("Unable to get localhost internet address, was null", module);
-                        }
-                    } catch (java.net.UnknownHostException e) {
-                        Debug.logError("Unable to get localhost internet address: " + e.toString(), module);
+                    if (VisitHandler.address != null) {
+                        serverHitBin.set("serverIpAddress", VisitHandler.address.getHostAddress());
+                        serverHitBin.set("serverHostName", VisitHandler.address.getHostName());
                     }
                     try {
                         delegator.createSetNextSeqId(serverHitBin);
@@ -601,7 +537,7 @@ public class ServerHitBin {
         }
     }
 
-    void saveHit(HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) throws GenericEntityException {
+    private void saveHit(HttpServletRequest request, long startTime, long runningTime, GenericValue userLogin) throws GenericEntityException {
         // persist record of hit in ServerHit entity if option turned on
         if (UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist." + ServerHitBin.typeIds[type] + ".hit", "true")) {
             // if the hit type is ENTITY and the name contains "ServerHit" don't
@@ -679,17 +615,9 @@ public class ServerHitBin {
             serverHit.set("referrerUrl", referrerUrl.length() > 250 ? referrerUrl.substring(0, 250) : referrerUrl);
 
             // get localhost ip address and hostname to store
-            try {
-                InetAddress address = InetAddress.getLocalHost();
-
-                if (address != null) {
-                    serverHit.set("serverIpAddress", address.getHostAddress());
-                    serverHit.set("serverHostName", address.getHostName());
-                } else {
-                    Debug.logError("Unable to get localhost internet address, was null", module);
-                }
-            } catch (java.net.UnknownHostException e) {
-                Debug.logError("Unable to get localhost internet address: " + e.toString(), module);
+            if (VisitHandler.address != null) {
+                serverHit.set("serverIpAddress", VisitHandler.address.getHostAddress());
+                serverHit.set("serverHostName", VisitHandler.address.getHostName());
             }
 
             // The problem with

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java Wed Aug 27 08:29:10 2014
@@ -45,6 +45,17 @@ public class VisitHandler {
 
     public static final String visitorCookieName = "OFBiz.Visitor";
 
+    protected static final InetAddress address;
+    static {
+        InetAddress tmpAddress = null;
+        try {
+            tmpAddress = InetAddress.getLocalHost();
+        } catch (java.net.UnknownHostException e) {
+            Debug.logError("Unable to get server's internet address: " + e.toString(), module);
+        }
+        address = tmpAddress;
+    }
+
     public static void setUserLogin(HttpSession session, GenericValue userLogin, boolean userCreated) {
         if (userLogin == null) return;
         ModelEntity modelUserLogin = userLogin.getModelEntity();
@@ -165,17 +176,11 @@ public class VisitHandler {
                             }
 
                             // get localhost ip address and hostname to store
-                            try {
-                                InetAddress address = InetAddress.getLocalHost();
-                                if (address != null) {
-                                    visit.set("serverIpAddress", address.getHostAddress());
-                                    visit.set("serverHostName", address.getHostName());
-                                } else {
-                                    Debug.logError("Unable to get localhost internet address, was null", module);
-                                }
-                            } catch (java.net.UnknownHostException e) {
-                                Debug.logError("Unable to get localhost internet address: " + e.toString(), module);
+                            if (address != null) {
+                                visit.set("serverIpAddress", address.getHostAddress());
+                                visit.set("serverHostName", address.getHostName());
                             }
+
                             try {
                                 visit = delegator.createSetNextSeqId(visit);
                                 session.setAttribute("visit", visit);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java Wed Aug 27 08:29:10 2014
@@ -30,9 +30,10 @@ import jimm.datavision.UserCancellationE
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.datasource.GenericHelperInfo;
+import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 /**
  * Handles DataVision type view rendering
@@ -74,7 +75,7 @@ public class DataVisionViewHandler exten
             String datasourceName = delegator.getEntityHelperName(info);
 
             Report report = new Report();
-            report.setDatabaseConnection(ConnectionFactory.getConnection(datasourceName));
+            report.setDatabaseConnection(TransactionFactoryLoader.getInstance().getConnection(new GenericHelperInfo(null, datasourceName)));
 
             /* NOTE: this is the old code that is no londer needed because of the new setDatabaseConnection method
             report.setDatabasePassword(""); // password can be bogus because we are using an OFBiz connection...

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java Wed Aug 27 08:29:10 2014
@@ -38,10 +38,10 @@ import net.sf.jasperreports.engine.expor
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.cache.UtilCache;
+import org.ofbiz.entity.datasource.GenericHelperInfo;
+import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 
 /**
@@ -105,7 +105,7 @@ public class JasperReportsJXlsViewHandle
                 String datasourceName = delegator.getEntityHelperName(info);
                 if (UtilValidate.isNotEmpty(datasourceName)) {
                     Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
-                    jp = JasperFillManager.fillReport(report, parameters, ConnectionFactory.getConnection(datasourceName));
+                    jp = JasperFillManager.fillReport(report, parameters, TransactionFactoryLoader.getInstance().getConnection(new GenericHelperInfo(null, datasourceName)));
                 } else {
                     Debug.logInfo("Filling report with an empty JR datasource", module);
                     jp = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java Wed Aug 27 08:29:10 2014
@@ -37,10 +37,10 @@ import net.sf.jasperreports.engine.Jaspe
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.cache.UtilCache;
+import org.ofbiz.entity.datasource.GenericHelperInfo;
+import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 /**
  * Handles JasperReports PDF view rendering
@@ -103,7 +103,7 @@ public class JasperReportsPdfViewHandler
                 String datasourceName = delegator.getEntityHelperName(info);
                 if (UtilValidate.isNotEmpty(datasourceName)) {
                     Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
-                    jp = JasperFillManager.fillReport(report, parameters, ConnectionFactory.getConnection(datasourceName));
+                    jp = JasperFillManager.fillReport(report, parameters, TransactionFactoryLoader.getInstance().getConnection(new GenericHelperInfo(null, datasourceName)));
                 } else {
                     Debug.logInfo("Filling report with an empty JR datasource", module);
                     jp = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java Wed Aug 27 08:29:10 2014
@@ -38,10 +38,10 @@ import net.sf.jasperreports.engine.expor
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.cache.UtilCache;
+import org.ofbiz.entity.datasource.GenericHelperInfo;
+import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 
 /**
@@ -105,7 +105,7 @@ public class JasperReportsPoiXlsViewHand
                 String datasourceName = delegator.getEntityHelperName(info);
                 if (UtilValidate.isNotEmpty(datasourceName)) {
                     Debug.logInfo("Filling report with connection from datasource: " + datasourceName, module);
-                    jp = JasperFillManager.fillReport(report, parameters, ConnectionFactory.getConnection(datasourceName));
+                    jp = JasperFillManager.fillReport(report, parameters, TransactionFactoryLoader.getInstance().getConnection(new GenericHelperInfo(null, datasourceName)));
                 } else {
                     Debug.logInfo("Filling report with an empty JR datasource", module);
                     jp = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java Wed Aug 27 08:29:10 2014
@@ -36,10 +36,10 @@ import net.sf.jasperreports.engine.Jaspe
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilHttp;
+import org.ofbiz.entity.datasource.GenericHelperInfo;
+import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 /**
  * Handles JasperReports PDF view rendering
@@ -90,7 +90,7 @@ public class JasperReportsXmlViewHandler
             PipedInputStream fillToPrintInputStream = new PipedInputStream(fillToPrintOutputStream);
 
             if (UtilValidate.isNotEmpty(datasourceName)) {
-                JasperFillManager.fillReportToStream(report, fillToPrintOutputStream, parameters, ConnectionFactory.getConnection(datasourceName));
+                JasperFillManager.fillReportToStream(report, fillToPrintOutputStream, parameters, TransactionFactoryLoader.getInstance().getConnection(new GenericHelperInfo(null, datasourceName)));
             } else {
                 JasperFillManager.fillReportToStream(report, fillToPrintOutputStream, parameters, new JREmptyDataSource());
             }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Wed Aug 27 08:29:10 2014
@@ -43,8 +43,8 @@ import org.ofbiz.base.util.GeneralExcept
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.cache.UtilCache;
 import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.config.EntityConfigUtil;
 import org.ofbiz.entity.config.model.DelegatorElement;
+import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelReader;
 import org.ofbiz.service.DispatchContext;
@@ -128,7 +128,7 @@ public class ArtifactInfoFactory {
     protected ArtifactInfoFactory(String delegatorName) throws GeneralException {
         this.delegatorName = delegatorName;
         this.entityModelReader = ModelReader.getModelReader(delegatorName);
-        DelegatorElement delegatorInfo = EntityConfigUtil.getDelegator(delegatorName);
+        DelegatorElement delegatorInfo = EntityConfig.getInstance().getDelegator(delegatorName);
         String modelName;
         if (delegatorInfo != null) {
             modelName = delegatorInfo.getEntityModelReader();

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java Wed Aug 27 08:29:10 2014
@@ -42,7 +42,7 @@ import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityConfException;
 import org.ofbiz.entity.config.model.DelegatorElement;
-import org.ofbiz.entity.config.EntityConfigUtil;
+import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelField;
 import org.ofbiz.service.DispatchContext;
@@ -73,7 +73,7 @@ public class LabelReferences {
         this.labels = factory.getLabels();
         DelegatorElement delegatorInfo = null;
         try {
-            delegatorInfo = EntityConfigUtil.getDelegator(delegator.getDelegatorBaseName());
+            delegatorInfo = EntityConfig.getInstance().getDelegator(delegator.getDelegatorBaseName());
         } catch (GenericEntityConfException e) {
             Debug.logWarning(e, "Exception thrown while getting delegator config: ", module);
         }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.groovy?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/log/LogConfiguration.groovy Wed Aug 27 08:29:10 2014
@@ -16,39 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggerRepository;
 
 import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.entity.util.EntityUtil;
-
-
-rootLogger = Logger.getRootLogger();
-loggerRepository = rootLogger.getLoggerRepository();
-
-loggerList = [];
-for (Enumeration enumeration = loggerRepository.getCurrentLoggers(); enumeration.hasMoreElements();) {
-    logger = enumeration.nextElement();
-
-    if (logger.getLevel() != null) {
-        loggerMap = [name : logger.getName(), level : logger.getLevel(), additivity : logger.getAdditivity() ? "Y" : "N", logger : logger];
-        loggerList.add(loggerMap);
-    }
-}
-
-Collections.sort(loggerList, [compare: {l1, l2 -> l1.name.compareTo(l2.name)}] as Comparator);
-
-loggerList.add(0, [name : rootLogger.getName(), level : rootLogger.getLevel(), additivity : rootLogger.getAdditivity() ? "Y" : "N", logger : rootLogger]);
-context.loggerList = loggerList;
 
-context.defaultLogger = [name : "org.ofbiz.", level : "INFO", additivity : "Y"];
 context.activeDebugLevel = [fatal : Debug.fatalOn() ? "Y" : "N",
                             error : Debug.errorOn() ? "Y" : "N",
                             warning : Debug.warningOn() ? "Y" : "N",

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy Wed Aug 27 08:29:10 2014
@@ -61,7 +61,7 @@ eventList = FastList.newInstance();
 while (iterator.hasNext()) {
     requestIdMap = FastMap.newInstance();
     statsId = iterator.next();
-    bin = ServerHitBin.requestSinceStarted.get(statsId);
+    bin = ServerHitBin.eventSinceStarted.get(statsId);
     if (bin) {
         requestIdMap.requestId = bin.getId();
         requestIdMap.requestType = bin.getType();
@@ -85,7 +85,7 @@ viewList = FastList.newInstance();
 while (iterator.hasNext()) {
     requestIdMap = FastMap.newInstance();
     statsId = iterator.next();
-    bin = ServerHitBin.requestSinceStarted.get(statsId);
+    bin = ServerHitBin.viewSinceStarted.get(statsId);
     if (bin) {
         requestIdMap.requestId = bin.getId();
         requestIdMap.requestType = bin.getType();

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/WEB-INF/controller.xml Wed Aug 27 08:29:10 2014
@@ -244,16 +244,6 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="LogConfiguration"/>
     </request-map>
-    <request-map uri="AddLogger">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="addOrUpdateLogger"/>
-        <response name="success" type="view" value="LogConfiguration"/>
-    </request-map>
-    <request-map uri="UpdateLogger">
-        <security https="true" auth="true"/>
-        <event type="service-multi" invoke="addOrUpdateLogger"/>
-        <response name="success" type="view" value="LogConfiguration"/>
-    </request-map>
     <request-map uri="AdjustDebugLevels">
         <security https="true" auth="true"/>
         <event type="service" invoke="adjustDebugLevels"/>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/entity/ModelWriter.jsp
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/entity/ModelWriter.jsp?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/entity/ModelWriter.jsp (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/webapp/webtools/entity/ModelWriter.jsp Wed Aug 27 08:29:10 2014
@@ -99,7 +99,7 @@ under the License.
   String originalLoaderName = request.getParameter("originalLoaderName");
   String originalLocation = request.getParameter("originalLocation");
   if (originalLoaderName != null && originalLocation != null) {
-    ec = reader.getResourceHandlerEntities(new MainResourceHandler(EntityConfigUtil.ENTITY_ENGINE_XML_FILENAME, originalLoaderName, originalLocation));
+    ec = reader.getResourceHandlerEntities(new MainResourceHandler(EntityConfig.ENTITY_ENGINE_XML_FILENAME, originalLoaderName, originalLocation));
   } else {
     ec = reader.getEntityNames();
   }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogForms.xml?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogForms.xml Wed Aug 27 08:29:10 2014
@@ -32,43 +32,4 @@ under the License.
     <field name="submit" title="${uiLabelMap.CommonUpdate}"><submit/></field>
   </form>
 
-  <form name="AddLogger" type="single" default-map-name="defaultLogger" target="AddLogger"
-    header-row-style="header-row" default-table-style="basic-table">
-    <field name="name" title="${uiLabelMap.WebtoolsLoggerName}"><text size="50"/></field>
-    <field name="level" title="${uiLabelMap.WebtoolsLoggerLevel}">
-        <drop-down>
-          <option key="OFF"/>
-          <option key="FATAL"/>
-          <option key="ERROR"/>
-          <option key="WARN"/>
-          <option key="INFO"/>
-          <option key="TRACE"/>
-          <option key="DEBUG"/>
-          <option key="ALL"/>
-        </drop-down>
-    </field>
-    <field name="additivity" title="${uiLabelMap.WebtoolsLoggerAdditivity}"><check/></field>
-    <field name="submit" title="${uiLabelMap.CommonAdd}"><submit/></field>
-  </form>
-
-  <form name="LoggerList" type="multi" target="UpdateLogger" list-name="loggerList" separate-columns="true"
-    paginate="false" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-    <field name="name" title="${uiLabelMap.WebtoolsLoggerName}"><display/></field>
-    <field name="level" title="${uiLabelMap.WebtoolsLoggerLevel}">
-        <drop-down>
-          <option key="OFF"/>
-          <option key="FATAL"/>
-          <option key="ERROR"/>
-          <option key="WARN"/>
-          <option key="INFO"/>
-          <option key="TRACE"/>
-          <option key="DEBUG"/>
-          <option key="ALL"/>
-        </drop-down>
-    </field>
-    <field name="additivity" title="${uiLabelMap.WebtoolsLoggerAdditivity}">
-      <check/>
-    </field>
-    <field name="submit" title="${uiLabelMap.CommonUpdate}"><submit/></field>
-  </form>
 </forms>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogScreens.xml?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogScreens.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/widget/LogScreens.xml Wed Aug 27 08:29:10 2014
@@ -87,12 +87,6 @@ under the License.
                          <screenlet title="${uiLabelMap.WebtoolsDebuggingLevelFormDescription}">
                              <include-form name="LevelSwitch" location="component://webtools/widget/LogForms.xml"/>
                          </screenlet>
-                         <screenlet title="${uiLabelMap.WebtoolsAddLoggerFormDescription}">
-                             <include-form name="AddLogger" location="component://webtools/widget/LogForms.xml"/>
-                         </screenlet>
-                         <screenlet title="${uiLabelMap.WebtoolsLoggerListFormDescription}">
-                             <include-form name="LoggerList" location="component://webtools/widget/LogForms.xml"/>
-                         </screenlet>
                      </decorator-section>
                  </decorator-screen>
                </widgets>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=1620803&r1=1620802&r2=1620803&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Wed Aug 27 08:29:10 2014
@@ -36,7 +36,6 @@ import net.xoetrope.xui.helper.SwingWork
 import org.ofbiz.accounting.payment.PaymentGatewayServices;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
-import org.ofbiz.base.util.Log4jLoggerWriter;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilFormatOut;
 import org.ofbiz.base.util.UtilGenerics;
@@ -96,7 +95,6 @@ public class PosTransaction implements S
     public static final int INTERNAL_PAYMENT = 1;
     public static final int EXTERNAL_PAYMENT = 2;
 
-    private static PrintWriter defaultPrintWriter = new Log4jLoggerWriter(Debug.getLogger(module));
     private static PosTransaction currentTx = null;
     private static LifoSet<PosTransaction> savedTx = new LifoSet<PosTransaction>();
 
@@ -125,7 +123,7 @@ public class PosTransaction implements S
         this.session = session;
         this.terminalId = session.getId();
         this.partyId = "_NA_";
-        this.trace = defaultPrintWriter;
+        //this.trace = defaultPrintWriter;
 
         this.productStoreId = (String) session.getAttribute("productStoreId");
         this.facilityId = (String) session.getAttribute("facilityId");
@@ -1195,6 +1193,7 @@ public class PosTransaction implements S
     }
 
     private void trace(String s1, String s2, Throwable t) {
+        /*
         if (trace != null) {
             String msg = s1;
             if (UtilValidate.isNotEmpty(s2)) {
@@ -1208,6 +1207,7 @@ public class PosTransaction implements S
             trace.println("[POS @ " + terminalId + " TX:" + transactionId + "] - " + msg);
             trace.flush();
         }
+        */
     }
 
     public static synchronized PosTransaction getCurrentTx(XuiSession session) {