svn commit: r1369382 [13/19] - in /ofbiz/branches/20120329_portletWidget: ./ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/webapp/accounting/WEB-INF/ appli...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1369382 [13/19] - in /ofbiz/branches/20120329_portletWidget: ./ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/webapp/accounting/WEB-INF/ appli...

erwan
Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Sat Aug  4 18:11:00 2012
@@ -40,9 +40,6 @@ import javax.servlet.http.HttpServletRes
 
 import javolution.util.FastList;
 
-import org.ofbiz.base.container.Container;
-import org.ofbiz.base.container.ContainerException;
-import org.ofbiz.base.container.ContainerLoader;
 import org.ofbiz.base.util.CachedClassLoader;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.StringUtil;
@@ -61,11 +58,8 @@ import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.security.Security;
 import org.ofbiz.security.SecurityConfigurationException;
 import org.ofbiz.security.SecurityFactory;
-import org.ofbiz.security.authz.AbstractAuthorization;
-import org.ofbiz.security.authz.Authorization;
-import org.ofbiz.security.authz.AuthorizationFactory;
-import org.ofbiz.service.GenericDispatcher;
 import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceContainer;
 
 /**
  * ContextFilter - Restricts access to raw files and configures servlet objects.
@@ -73,14 +67,11 @@ import org.ofbiz.service.LocalDispatcher
 public class ContextFilter implements Filter {
 
     public static final String module = ContextFilter.class.getName();
-    public static final String CONTAINER_CONFIG = "limited-containers.xml";
     public static final String FORWARDED_FROM_SERVLET = "_FORWARDED_FROM_SERVLET_";
 
     protected ClassLoader localCachedClassLoader = null;
     protected FilterConfig config = null;
     protected boolean debug = false;
-    protected Container rmiLoadedContainer = null; // used in Geronimo/WASCE to allow to deregister
-
 
     /**
      * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
@@ -101,17 +92,10 @@ public class ContextFilter implements Fi
             debug = Debug.verboseOn();
         }
 
-        // load the containers
-        Container container = getContainers();
-        if (container != null) {
-            rmiLoadedContainer = container; // used in Geronimo/WASCE to allow to deregister
-        }
         // check the serverId
         getServerId();
         // initialize the delegator
         getDelegator(config.getServletContext());
-        // initialize authorizer
-        getAuthz();
         // initialize security
         getSecurity();
         // initialize the services dispatcher
@@ -305,12 +289,9 @@ public class ContextFilter implements Fi
                     config.getServletContext().setAttribute("delegator", delegator);
 
                     // clear web context objects
-                    config.getServletContext().setAttribute("authz", null);
                     config.getServletContext().setAttribute("security", null);
                     config.getServletContext().setAttribute("dispatcher", null);
 
-                    // initialize authorizer
-                    getAuthz();
                     // initialize security
                     Security security = getSecurity();
                     // initialize the services dispatcher
@@ -335,9 +316,6 @@ public class ContextFilter implements Fi
 
         // we're done checking; continue on
         chain.doFilter(httpRequest, httpResponse);
-
-        // reset thread local security
-        AbstractAuthorization.clearThreadLocal();
     }
 
     /**
@@ -345,11 +323,6 @@ public class ContextFilter implements Fi
      */
     public void destroy() {
         getDispatcher(config.getServletContext()).deregister();
-        try {
-            destroyRmiContainer(); // used in Geronimo/WASCE to allow to deregister
-        } catch (ServletException e) {
-            Debug.logError("Error when stopping containers, this exception should not arise...", module);
-        }
         config = null;
     }
 
@@ -369,22 +342,6 @@ public class ContextFilter implements Fi
             Debug.logError("[ContextFilter.init] ERROR: delegator not defined.", module);
             return null;
         }
-        Collection<URL> readers = null;
-        String readerFiles = servletContext.getInitParameter("serviceReaderUrls");
-
-        if (readerFiles != null) {
-            readers = FastList.newInstance();
-            for (String name: StringUtil.split(readerFiles, ";")) {
-                try {
-                    URL readerURL = servletContext.getResource(name);
-                    if (readerURL != null) readers.add(readerURL);
-                } catch (NullPointerException npe) {
-                    Debug.logInfo(npe, "[ContextFilter.init] ERROR: Null pointer exception thrown.", module);
-                } catch (MalformedURLException e) {
-                    Debug.logError(e, "[ContextFilter.init] ERROR: cannot get URL from String.", module);
-                }
-            }
-        }
         // get the unique name of this dispatcher
         String dispatcherName = servletContext.getInitParameter("localDispatcherName");
 
@@ -393,7 +350,7 @@ public class ContextFilter implements Fi
             dispatcherName = delegator.getDelegatorName();
         }
 
-        LocalDispatcher dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, delegator, readers, null);
+        LocalDispatcher dispatcher = ServiceContainer.getLocalDispatcher(dispatcherName, delegator);
         if (dispatcher == null) {
             Debug.logError("[ContextFilter.init] ERROR: dispatcher could not be initialized.", module);
         }
@@ -419,27 +376,6 @@ public class ContextFilter implements Fi
         return delegator;
     }
 
-    protected Authorization getAuthz() {
-        Authorization authz = (Authorization) config.getServletContext().getAttribute("authz");
-        if (authz == null) {
-            Delegator delegator = (Delegator) config.getServletContext().getAttribute("delegator");
-
-            if (delegator != null) {
-                try {
-                    authz = AuthorizationFactory.getInstance(delegator);
-                } catch (SecurityConfigurationException e) {
-                    Debug.logError(e, "[ServiceDispatcher.init] : No instance of authorization implementation found.", module);
-                }
-            }
-            config.getServletContext().setAttribute("authz", authz);
-            if (authz == null) {
-                Debug.logError("[ContextFilter.init] ERROR: authorization create failed.", module);
-            }
-        }
-        return authz;
-    }
-
-    @Deprecated
     protected Security getSecurity() {
         Security security = (Security) config.getServletContext().getAttribute("security");
         if (security == null) {
@@ -449,12 +385,12 @@ public class ContextFilter implements Fi
                 try {
                     security = SecurityFactory.getInstance(delegator);
                 } catch (SecurityConfigurationException e) {
-                    Debug.logError(e, "[ServiceDispatcher.init] : No instance of security imeplemtation found.", module);
+                    Debug.logError(e, "Unable to obtain an instance of the security object.", module);
                 }
             }
             config.getServletContext().setAttribute("security", security);
             if (security == null) {
-                Debug.logError("[ContextFilter.init] ERROR: security create failed.", module);
+                Debug.logError("An invalid (null) Security object has been set in the servlet context.", module);
             }
         }
         return security;
@@ -487,20 +423,4 @@ public class ContextFilter implements Fi
         }
         return serverId;
     }
-
-    protected Container getContainers() throws ServletException {
-        return ContainerLoader.getContainer("rmi-dispatcher");
-    }
-
-    // used in Geronimo/WASCE to allow to deregister
-    protected void destroyRmiContainer() throws ServletException {
-        if (rmiLoadedContainer != null) {
-            try {
-                rmiLoadedContainer.stop();
-            } catch (ContainerException e) {
-                Debug.logError(e, module);
-                throw new ServletException("Error when stopping the RMI loaded container");
-            }
-        }
-    }
 }

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Sat Aug  4 18:11:00 2012
@@ -46,7 +46,6 @@ import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.transaction.GenericTransactionException;
 import org.ofbiz.entity.transaction.TransactionUtil;
 import org.ofbiz.security.Security;
-import org.ofbiz.security.authz.Authorization;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.webapp.stats.ServerHitBin;
 import org.ofbiz.webapp.stats.VisitHandler;
@@ -177,15 +176,6 @@ public class ControlServlet extends Http
         }
         request.setAttribute("dispatcher", dispatcher);
 
-        Authorization authz = (Authorization) session.getAttribute("authz");
-        if (authz == null) {
-            authz = (Authorization) getServletContext().getAttribute("authz");
-        }
-        if (authz == null) {
-            Debug.logError("[ControlServlet] ERROR: authorization not found in ServletContext", module);
-        }
-        request.setAttribute("authz", authz); // maybe we should also add the value to 'security'
-
         Security security = (Security) session.getAttribute("security");
         if (security == null) {
             security = (Security) getServletContext().getAttribute("security");

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Sat Aug  4 18:11:00 2012
@@ -63,8 +63,6 @@ import org.ofbiz.entity.transaction.Tran
 import org.ofbiz.security.Security;
 import org.ofbiz.security.SecurityConfigurationException;
 import org.ofbiz.security.SecurityFactory;
-import org.ofbiz.security.authz.Authorization;
-import org.ofbiz.security.authz.AuthorizationFactory;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
@@ -478,25 +476,17 @@ public class LoginWorker {
     private static void setWebContextObjects(HttpServletRequest request, HttpServletResponse response, Delegator delegator, LocalDispatcher dispatcher) {
         HttpSession session = request.getSession();
         // NOTE: we do NOT want to set this in the servletContext, only in the request and session
-        // We also need to setup the security and authz objects since they are dependent on the delegator
+        // We also need to setup the security objects since they are dependent on the delegator
         Security security = null;
         try {
             security = SecurityFactory.getInstance(delegator);
         } catch (SecurityConfigurationException e) {
             Debug.logError(e, module);
         }
-        Authorization authz = null;
-        try {
-            authz = AuthorizationFactory.getInstance(delegator);
-        } catch (SecurityConfigurationException e) {
-            Debug.logError(e, module);
-        }
-
         session.setAttribute("delegatorName", delegator.getDelegatorName());
         request.setAttribute("delegator", delegator);
         request.setAttribute("dispatcher", dispatcher);
         request.setAttribute("security", security);
-        request.setAttribute("authz", authz);
 
         // get rid of the visit info since it was pointing to the previous database, and get a new one
         session.removeAttribute("visitor");
@@ -612,7 +602,6 @@ public class LoginWorker {
         request.removeAttribute("delegator");
         request.removeAttribute("dispatcher");
         request.removeAttribute("security");
-        request.removeAttribute("authz");
 
         // now empty out the session
         session.invalidate();
@@ -991,14 +980,12 @@ public class LoginWorker {
         Security security = (Security) request.getAttribute("security");
         if (security != null) {
             ServletContext context = (ServletContext) request.getAttribute("servletContext");
-            Authorization authz = (Authorization) request.getAttribute("authz");
             String serverId = (String) context.getAttribute("_serverId");
             String contextPath = request.getContextPath();
             ComponentConfig.WebappInfo info = ComponentConfig.getWebAppInfo(serverId, contextPath);
             if (info != null) {
                 for (String permission: info.getBasePermission()) {
-                    if (!"NONE".equals(permission) && !security.hasEntityPermission(permission, "_VIEW", userLogin) &&
-                            !authz.hasPermission(userLogin.getString("userLoginId"), permission, null)) {
+                    if (!"NONE".equals(permission) && !security.hasEntityPermission(permission, "_VIEW", userLogin)) {
                         return false;
                     }
                 }

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Sat Aug  4 18:11:00 2012
@@ -106,6 +106,7 @@ public class RequestHandler {
     public void doRequest(HttpServletRequest request, HttpServletResponse response, String chain,
             GenericValue userLogin, Delegator delegator) throws RequestHandlerException {
 
+        long startTime = System.currentTimeMillis();
         HttpSession session = request.getSession();
 
         // get the controllerConfig once for this method so we don't have to get it over and over inside the method
@@ -155,8 +156,11 @@ public class RequestHandler {
         if (requestMap == null) {
             throw new RequestHandlerException(requestMissingErrorMessage);
         }
-
         String eventReturn = null;
+        if (requestMap.metrics != null && requestMap.metrics.getThreshold() != 0.0 && requestMap.metrics.getTotalEvents() > 3 && requestMap.metrics.getThreshold() < requestMap.metrics.getServiceRate()) {
+            eventReturn = "threshold-exceeded";
+        }
+
         boolean interruptRequest = false;
 
         // Check for chained request.
@@ -650,6 +654,9 @@ public class RequestHandler {
                 if (Debug.verboseOn()) Debug.logVerbose("[RequestHandler.doRequest]: Response is handled by the event." + " sessionId=" + UtilHttp.getSessionId(request), module);
             }
         }
+        if (requestMap.metrics != null) {
+            requestMap.metrics.recordServiceRate(1, System.currentTimeMillis() - startTime);
+        }
     }
 
     /** Find the event handler and invoke an event. */

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Sat Aug  4 18:11:00 2012
@@ -43,17 +43,12 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericValue;
-import org.ofbiz.security.authz.Authorization;
-import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.GenericDispatcher;
+import org.ofbiz.security.Security;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
-import org.ofbiz.service.ServiceDispatcher;
 import org.ofbiz.service.calendar.RecurrenceRule;
 import org.ofbiz.webapp.control.RequestHandler;
 import org.ofbiz.webapp.control.ConfigXMLReader.Event;
@@ -110,8 +105,8 @@ public class CoreEvents {
      * @return Response code string
      */
     public static String scheduleService(HttpServletRequest request, HttpServletResponse response) {
+        Security security = (Security) request.getAttribute("security");
         GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
-        Authorization authz = (Authorization) request.getAttribute("authz");
         LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
         //Delegator delegator = (Delegator) request.getAttribute("delegator");
         Locale locale = UtilHttp.getLocale(request);
@@ -216,7 +211,7 @@ public class CoreEvents {
             serviceContext.put("locale", locale);
         }
 
-        if (!modelService.export && !authz.hasPermission(request.getSession(), "SERVICE_INVOKE_ANY", null)) {
+        if (!modelService.export && !security.hasPermission("SERVICE_INVOKE_ANY", request.getSession())) {
             String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.not_authorized_to_call", locale);
             request.setAttribute("_ERROR_MESSAGE_", errMsg);
             return "error";
@@ -438,7 +433,7 @@ public class CoreEvents {
         }
 
         // now do a security check
-        Authorization authz = (Authorization) request.getAttribute("authz");
+        Security security = (Security) request.getAttribute("security");
         LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
 
         //lookup the service definition to see if this service is externally available, if not require the SERVICE_INVOKE_ANY permission
@@ -457,7 +452,7 @@ public class CoreEvents {
             return "error";
         }
 
-        if (!modelService.export && !authz.hasPermission(request.getSession(), "SERVICE_INVOKE_ANY", null)) {
+        if (!modelService.export && !security.hasPermission("SERVICE_INVOKE_ANY", request.getSession())) {
             String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.not_authorized_to_call", locale);
             request.setAttribute("_ERROR_MESSAGE_", errMsg + ".");
             return "error";

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java Sat Aug  4 18:11:00 2012
@@ -365,7 +365,6 @@ public class ServiceEventHandler impleme
                 responseString = ModelService.RESPOND_SUCCESS;
             } else {
                 responseString = (String) result.get(ModelService.RESPONSE_MESSAGE);
-                request.setAttribute(ModelService.RESPONSE_MESSAGE,result.get(ModelService.RESPONSE_MESSAGE)); // necessary for Ajax-Json and ModelService.RESPOND_FAIL
             }
 
             // set the messages in the request; this will be picked up by messages.ftl and displayed

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceStreamHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceStreamHandler.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceStreamHandler.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/ServiceStreamHandler.java Sat Aug  4 18:11:00 2012
@@ -34,9 +34,9 @@ import javolution.util.FastMap;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
-import org.ofbiz.service.GenericDispatcher;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceContainer;
 import org.ofbiz.service.ServiceUtil;
 import org.ofbiz.webapp.control.ConfigXMLReader.Event;
 import org.ofbiz.webapp.control.ConfigXMLReader.RequestMap;
@@ -53,7 +53,7 @@ public class ServiceStreamHandler implem
     public void init(ServletContext context) throws EventHandlerException {
         String delegatorName = context.getInitParameter("entityDelegatorName");
         this.delegator = DelegatorFactory.getDelegator(delegatorName);
-        this.dispatcher = GenericDispatcher.getLocalDispatcher(this.delegator.getDelegatorName(), delegator);
+        this.dispatcher = ServiceContainer.getLocalDispatcher(this.delegator.getDelegatorName(), delegator);
     }
 
     public String invoke(Event event, RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException {

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java Sat Aug  4 18:11:00 2012
@@ -52,10 +52,10 @@ import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.GenericDispatcher;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
+import org.ofbiz.service.ServiceContainer;
 import org.ofbiz.service.ServiceUtil;
 import org.ofbiz.webapp.control.ConfigXMLReader;
 import org.ofbiz.webapp.control.ConfigXMLReader.Event;
@@ -76,7 +76,7 @@ public class XmlRpcEventHandler extends
     public void init(ServletContext context) throws EventHandlerException {
         String delegatorName = context.getInitParameter("entityDelegatorName");
         this.delegator = DelegatorFactory.getDelegator(delegatorName);
-        this.dispatcher = GenericDispatcher.getLocalDispatcher(delegator.getDelegatorName(), delegator);
+        this.dispatcher = ServiceContainer.getLocalDispatcher(delegator.getDelegatorName(), delegator);
         this.setHandlerMapping(new ServiceRpcHandler());
 
         String extensionsEnabledString = context.getInitParameter("xmlrpc.enabledForExtensions");

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java Sat Aug  4 18:11:00 2012
@@ -87,7 +87,6 @@ public class FreeMarkerViewHandler exten
         // add in the OFBiz objects
         root.put("delegator", request.getAttribute("delegator"));
         root.put("dispatcher", request.getAttribute("dispatcher"));
-        root.put("authz", request.getAttribute("authz"));
         root.put("security", request.getAttribute("security"));
         root.put("userLogin", session.getAttribute("userLogin"));
 

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Sat Aug  4 18:11:00 2012
@@ -207,7 +207,11 @@ public class ServerHitBin {
                 }
                 if (bin == null) {
                     bin = new ServerHitBin(id, type, true, delegator);
-                    binList.add(0, bin);
+                    if (binList.size() > 0) {
+                        binList.add(0, bin);
+                    } else {
+                        binList.add(bin);
+                    }
                 }
             }
         }

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/RequestHandler.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/RequestHandler.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/RequestHandler.java Sat Aug  4 18:11:00 2012
@@ -32,7 +32,6 @@ public interface RequestHandler {
      *   <tr><td>delegator</td><td>A <code>GenericDelgator</code> instance</td></tr>
      *   <tr><td>dispatcher</td><td>A <code>LocalDispatcher</code> instance</td></tr>
      *   <tr><td>security</td><td>A <code>Security</code> instance</td></tr>
-     *   <tr><td>authz</td><td>An <code>Authorization</code> instance</td></tr>
      * </table></p>
      */
     public void handleRequest(HttpServletRequest request, HttpServletResponse response, ServletContext context) throws ServletException, IOException;

Modified: ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java Sat Aug  4 18:11:00 2012
@@ -36,10 +36,8 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.security.Security;
 import org.ofbiz.security.SecurityFactory;
-import org.ofbiz.security.authz.Authorization;
-import org.ofbiz.security.authz.AuthorizationFactory;
-import org.ofbiz.service.GenericDispatcher;
 import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceContainer;
 
 /** Implements a WebDAV servlet. The servlet simply forwards WebDAV requests
  * to a <code>RequestHandlerFactory</code> instance, whose class is specified
@@ -54,7 +52,6 @@ public class WebDavServlet extends Gener
 
     public static final String module = WebDavServlet.class.getName();
 
-    protected Authorization authz = null;
     protected Delegator delegator = null;
     protected LocalDispatcher dispatcher = null;
     protected RequestHandlerFactory handlerFactory = null;
@@ -70,9 +67,8 @@ public class WebDavServlet extends Gener
             String delegatorName = context.getInitParameter("entityDelegatorName");
             this.delegator = DelegatorFactory.getDelegator(delegatorName);
             String dispatcherName = context.getInitParameter("localDispatcherName");
-            this.dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, this.delegator);
+            this.dispatcher = ServiceContainer.getLocalDispatcher(dispatcherName, this.delegator);
             this.security = SecurityFactory.getInstance(this.delegator);
-            this.authz = AuthorizationFactory.getInstance(this.delegator);
             String factoryClassName = context.getInitParameter("requestHandlerFactoryClass");
             this.handlerFactory = (RequestHandlerFactory) loader.loadClass(factoryClassName).newInstance();
         } catch (Exception e) {
@@ -86,8 +82,6 @@ public class WebDavServlet extends Gener
             buff.append(this.dispatcher.getName());
             buff.append(", security = ");
             buff.append(this.security.getClass().getName());
-            buff.append(", authz = ");
-            buff.append(this.authz.getClass().getName());
             buff.append(", handler factory = ");
             buff.append(this.handlerFactory.getClass().getName());
             Debug.logVerbose(buff.toString(), module);
@@ -99,7 +93,6 @@ public class WebDavServlet extends Gener
         request.setAttribute("delegator", this.delegator);
         request.setAttribute("dispatcher", this.dispatcher);
         request.setAttribute("security", this.security);
-        request.setAttribute("authz", this.authz);
         HttpServletRequest httpRequest = (HttpServletRequest) request;
         RequestHandler handler = this.handlerFactory.getHandler(httpRequest.getMethod());
         try {

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/config/WebtoolsUiLabels.xml?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/config/WebtoolsUiLabels.xml Sat Aug  4 18:11:00 2012
@@ -18,7 +18,7 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz.properties.xsd">
     <property key="ConnectionPoolStatus">
         <value xml:lang="en">Connection Pool Status</value>
         <value xml:lang="vi">Trạng thái chia sẻ kết nối cÆ¡ sở dữ liệu</value>
@@ -3052,14 +3052,17 @@
         <value xml:lang="zh">内存</value>
         <value xml:lang="zh_TW">記憶體</value>
     </property>
-    <property key="WebtoolsMinervaConnectionObjects">
-        <value xml:lang="de">Minerva Verbindungsobjekte</value>
-        <value xml:lang="en">Minerva Connection Objects</value>
-        <value xml:lang="it">Oggetti connessione Minerva</value>
-        <value xml:lang="pt">Objetos de Conexão Minerva</value>
-        <value xml:lang="vi">Đối tượng kết nối Minerva</value>
-        <value xml:lang="zh">智能连接对象</value>
-        <value xml:lang="zh_TW">智慧連接物件</value>
+    <property key="WebtoolsMetrics">
+        <value xml:lang="en">Metrics</value>
+    </property>
+    <property key="WebtoolsMetricsRate">
+        <value xml:lang="en">Service Rate (mS)</value>
+    </property>
+    <property key="WebtoolsMetricsThreshold">
+        <value xml:lang="en">Threshold</value>
+    </property>
+    <property key="WebtoolsMetricsTotalEvents">
+        <value xml:lang="en">Total Events</value>
     </property>
     <property key="WebtoolsMiscSetupTools">
         <value xml:lang="de">Versch. Setup Tools</value>
@@ -4301,12 +4304,6 @@
         <value xml:lang="pt">Definir</value>
         <value xml:lang="vi">Thiết lập</value>
     </property>
-    <!--#Bam# portletWidget -->
-    <property key="WebtoolsShowPortalPortlet">
-        <value xml:lang="en">Show Portlet field</value>
-        <value xml:lang="fr">Montrer les champs d'une portlet</value>
-    </property>
-    <!--#Eam# portletWidget -->
     <property key="WebtoolsShowShowWSDL">
         <value xml:lang="de">WSDL zeigen</value>
         <value xml:lang="en">Show wsdl</value>
@@ -5128,6 +5125,9 @@
         <value xml:lang="zh">浏览日志</value>
         <value xml:lang="zh_TW">瀏覽日誌</value>
     </property>
+    <property key="WebtoolsViewMetrics">
+        <value xml:lang="en">View Metrics</value>
+    </property>
     <property key="WebtoolsViewPermissionError">
         <value xml:lang="de">Sie haben keine Berechtigung um diesen Bereich anzusehen (Sie benötigen OFBTOOLS_VIEW oder OFBIZTOOLS_ADMIN Berechtigung)</value>
         <value xml:lang="en">You do not have permission to view this page. ("OFBTOOLS_VIEW" or "OFBTOOLS_ADMIN" needed)</value>

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Sat Aug  4 18:11:00 2012
@@ -22,32 +22,35 @@ import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Future;
 
 import javax.xml.parsers.ParserConfigurationException;
 
-import javolution.util.FastMap;
 import javolution.util.FastSet;
 
 import org.ofbiz.base.component.ComponentConfig;
+import org.ofbiz.base.concurrent.ExecutionPool;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.FileUtil;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.cache.UtilCache;
 import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.config.DelegatorInfo;
+import org.ofbiz.entity.config.EntityConfigUtil;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelReader;
-import org.ofbiz.entityext.eca.EntityEcaRule;
-import org.ofbiz.entityext.eca.EntityEcaUtil;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.eca.ServiceEcaRule;
-import org.ofbiz.service.eca.ServiceEcaUtil;
 import org.ofbiz.webapp.control.ConfigXMLReader;
 import org.ofbiz.webapp.control.ConfigXMLReader.ControllerConfig;
 import org.ofbiz.widget.form.FormFactory;
@@ -56,9 +59,6 @@ import org.ofbiz.widget.screen.ModelScre
 import org.ofbiz.widget.screen.ScreenFactory;
 import org.xml.sax.SAXException;
 
-/**
- *
- */
 public class ArtifactInfoFactory {
 
     public static final String module = ArtifactInfoFactory.class.getName();
@@ -73,46 +73,44 @@ public class ArtifactInfoFactory {
     public static final String ControllerRequestInfoTypeId = "request";
     public static final String ControllerViewInfoTypeId = "view";
 
-    protected String delegatorName;
-    protected ModelReader entityModelReader;
-    protected DispatchContext dispatchContext;
-    protected Map<String, Map<String, List<EntityEcaRule>>> entityEcaCache;
-    protected Map<String, Map<String, List<ServiceEcaRule>>> serviceEcaCache;
-
-    public Map<String, EntityArtifactInfo> allEntityInfos = FastMap.newInstance();
-    public Map<String, ServiceArtifactInfo> allServiceInfos = FastMap.newInstance();
-    public Map<ServiceEcaRule, ServiceEcaArtifactInfo> allServiceEcaInfos = FastMap.newInstance();
-    public Map<String, FormWidgetArtifactInfo> allFormInfos = FastMap.newInstance();
-    public Map<String, ScreenWidgetArtifactInfo> allScreenInfos = FastMap.newInstance();
-    public Map<String, ControllerRequestArtifactInfo> allControllerRequestInfos = FastMap.newInstance();
-    public Map<String, ControllerViewArtifactInfo> allControllerViewInfos = FastMap.newInstance();
+    protected final String delegatorName;
+    protected final ModelReader entityModelReader;
+    protected final DispatchContext dispatchContext;
+
+    public Map<String, EntityArtifactInfo> allEntityInfos = new ConcurrentHashMap<String, EntityArtifactInfo>();
+    public Map<String, ServiceArtifactInfo> allServiceInfos = new ConcurrentHashMap<String, ServiceArtifactInfo>();
+    public Map<ServiceEcaRule, ServiceEcaArtifactInfo> allServiceEcaInfos = new ConcurrentHashMap<ServiceEcaRule, ServiceEcaArtifactInfo>();
+    public Map<String, FormWidgetArtifactInfo> allFormInfos = new ConcurrentHashMap<String, FormWidgetArtifactInfo>();
+    public Map<String, ScreenWidgetArtifactInfo> allScreenInfos = new ConcurrentHashMap<String, ScreenWidgetArtifactInfo>();
+    public Map<String, ControllerRequestArtifactInfo> allControllerRequestInfos = new ConcurrentHashMap<String, ControllerRequestArtifactInfo>();
+    public Map<String, ControllerViewArtifactInfo> allControllerViewInfos = new ConcurrentHashMap<String, ControllerViewArtifactInfo>();
 
     // reverse-associative caches for walking backward in the diagram
-    public Map<String, Set<ServiceEcaArtifactInfo>> allServiceEcaInfosReferringToServiceName = FastMap.newInstance();
-    public Map<String, Set<ServiceArtifactInfo>> allServiceInfosReferringToServiceName = FastMap.newInstance();
-    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosReferringToServiceName = FastMap.newInstance();
-    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosBasedOnServiceName = FastMap.newInstance();
-    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToServiceName = FastMap.newInstance();
-    public Map<String, Set<ControllerRequestArtifactInfo>> allRequestInfosReferringToServiceName = FastMap.newInstance();
-
-    public Map<String, Set<ServiceArtifactInfo>> allServiceInfosReferringToEntityName = FastMap.newInstance();
-    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosReferringToEntityName = FastMap.newInstance();
-    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToEntityName = FastMap.newInstance();
-
-    public Map<ServiceEcaRule, Set<ServiceArtifactInfo>> allServiceInfosReferringToServiceEcaRule = FastMap.newInstance();
-
-    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosExtendingForm = FastMap.newInstance();
-    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToForm = FastMap.newInstance();
-
-    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToScreen = FastMap.newInstance();
-    public Map<String, Set<ControllerViewArtifactInfo>> allViewInfosReferringToScreen = FastMap.newInstance();
-
-    public Map<String, Set<ControllerRequestArtifactInfo>> allRequestInfosReferringToView = FastMap.newInstance();
-
-    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosTargetingRequest = FastMap.newInstance();
-    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosReferringToRequest = FastMap.newInstance();
-    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToRequest = FastMap.newInstance();
-    public Map<String, Set<ControllerRequestArtifactInfo>> allRequestInfosReferringToRequest = FastMap.newInstance();
+    public Map<String, Set<ServiceEcaArtifactInfo>> allServiceEcaInfosReferringToServiceName = new ConcurrentHashMap<String, Set<ServiceEcaArtifactInfo>>();
+    public Map<String, Set<ServiceArtifactInfo>> allServiceInfosReferringToServiceName = new ConcurrentHashMap<String, Set<ServiceArtifactInfo>>();
+    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosReferringToServiceName = new ConcurrentHashMap<String, Set<FormWidgetArtifactInfo>>();
+    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosBasedOnServiceName = new ConcurrentHashMap<String, Set<FormWidgetArtifactInfo>>();
+    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToServiceName = new ConcurrentHashMap<String, Set<ScreenWidgetArtifactInfo>>();
+    public Map<String, Set<ControllerRequestArtifactInfo>> allRequestInfosReferringToServiceName = new ConcurrentHashMap<String, Set<ControllerRequestArtifactInfo>>();
+
+    public Map<String, Set<ServiceArtifactInfo>> allServiceInfosReferringToEntityName = new ConcurrentHashMap<String, Set<ServiceArtifactInfo>>();
+    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosReferringToEntityName = new ConcurrentHashMap<String, Set<FormWidgetArtifactInfo>>();
+    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToEntityName = new ConcurrentHashMap<String, Set<ScreenWidgetArtifactInfo>>();
+
+    public Map<ServiceEcaRule, Set<ServiceArtifactInfo>> allServiceInfosReferringToServiceEcaRule = new ConcurrentHashMap<ServiceEcaRule, Set<ServiceArtifactInfo>>();
+
+    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosExtendingForm = new ConcurrentHashMap<String, Set<FormWidgetArtifactInfo>>();
+    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToForm = new ConcurrentHashMap<String, Set<ScreenWidgetArtifactInfo>>();
+
+    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToScreen = new ConcurrentHashMap<String, Set<ScreenWidgetArtifactInfo>>();
+    public Map<String, Set<ControllerViewArtifactInfo>> allViewInfosReferringToScreen = new ConcurrentHashMap<String, Set<ControllerViewArtifactInfo>>();
+
+    public Map<String, Set<ControllerRequestArtifactInfo>> allRequestInfosReferringToView = new ConcurrentHashMap<String, Set<ControllerRequestArtifactInfo>>();
+
+    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosTargetingRequest = new ConcurrentHashMap<String, Set<FormWidgetArtifactInfo>>();
+    public Map<String, Set<FormWidgetArtifactInfo>> allFormInfosReferringToRequest = new ConcurrentHashMap<String, Set<FormWidgetArtifactInfo>>();
+    public Map<String, Set<ScreenWidgetArtifactInfo>> allScreenInfosReferringToRequest = new ConcurrentHashMap<String, Set<ScreenWidgetArtifactInfo>>();
+    public Map<String, Set<ControllerRequestArtifactInfo>> allRequestInfosReferringToRequest = new ConcurrentHashMap<String, Set<ControllerRequestArtifactInfo>>();
 
     public static ArtifactInfoFactory getArtifactInfoFactory(String delegatorName) throws GeneralException {
         if (UtilValidate.isEmpty(delegatorName)) {
@@ -129,14 +127,23 @@ public class ArtifactInfoFactory {
     protected ArtifactInfoFactory(String delegatorName) throws GeneralException {
         this.delegatorName = delegatorName;
         this.entityModelReader = ModelReader.getModelReader(delegatorName);
-        this.dispatchContext = new DispatchContext("ArtifactInfoDispCtx", null, this.getClass().getClassLoader(), null);
-        this.entityEcaCache = EntityEcaUtil.getEntityEcaCache(EntityEcaUtil.getEntityEcaReaderName(delegatorName));
-        this.serviceEcaCache = ServiceEcaUtil.ecaCache;
+        DelegatorInfo delegatorInfo = EntityConfigUtil.getDelegatorInfo(delegatorName);
+        String modelName;
+        if (delegatorInfo != null) {
+            modelName = delegatorInfo.entityModelReader;
+        } else {
+            modelName = "main";
+        }
+        // since we do not associate a dispatcher to this DispatchContext, it is important to set a name of an existing entity model reader:
+        // in this way it will be possible to retrieve the service models from the cache
+        this.dispatchContext = new DispatchContext(modelName, this.getClass().getClassLoader(), null);
 
         this.prepareAll();
     }
 
     public void prepareAll() throws GeneralException {
+        Debug.logInfo("Loading artifact info objects...", module);
+        List<Future<Void>> futures = new ArrayList();
         Set<String> entityNames = this.getEntityModelReader().getEntityNames();
         for (String entityName: entityNames) {
             this.getEntityArtifactInfo(entityName);
@@ -144,79 +151,18 @@ public class ArtifactInfoFactory {
 
         Set<String> serviceNames = this.getDispatchContext().getAllServiceNames();
         for (String serviceName: serviceNames) {
-            this.getServiceArtifactInfo(serviceName);
+            futures.add(ExecutionPool.GLOBAL_EXECUTOR.submit(prepareTaskForServiceAnalysis(serviceName)));
         }
-
         // how to get all Service ECAs to prepare? don't worry about it, will be populated from service load, ie all ECAs for each service
 
         Collection<ComponentConfig> componentConfigs = ComponentConfig.getAllComponents();
+        ExecutionPool.getAllFutures(futures);
+        futures = new ArrayList();
         for (ComponentConfig componentConfig: componentConfigs) {
-            String componentName = componentConfig.getGlobalName();
-            String rootComponentPath = componentConfig.getRootLocation();
-            List<File> screenFiles;
-            List<File> formFiles;
-            List<File> controllerFiles;
-            try {
-                screenFiles = FileUtil.findXmlFiles(rootComponentPath, null, "screens", "widget-screen.xsd");
-                formFiles = FileUtil.findXmlFiles(rootComponentPath, null, "forms", "widget-form.xsd");
-                controllerFiles = FileUtil.findXmlFiles(rootComponentPath, null, "site-conf", "site-conf.xsd");
-            } catch (IOException ioe) {
-                throw new GeneralException(ioe.getMessage());
-            }
-            for (File screenFile: screenFiles) {
-                String screenFilePath = screenFile.getAbsolutePath();
-                screenFilePath = screenFilePath.replace('\\', '/');
-                String screenFileRelativePath = screenFilePath.substring(rootComponentPath.length());
-                String screenLocation = "component://" + componentName + "/" + screenFileRelativePath;
-                Map<String, ModelScreen> modelScreenMap = null;
-                try {
-                    modelScreenMap = ScreenFactory.getScreensFromLocation(screenLocation);
-                } catch (Exception exc) {
-                    throw new GeneralException(exc.toString(), exc);
-                }
-                for (String screenName : modelScreenMap.keySet()) {
-                    this.getScreenWidgetArtifactInfo(screenName, screenLocation);
-                }
-            }
-            for (File formFile: formFiles) {
-                String formFilePath = formFile.getAbsolutePath();
-                formFilePath = formFilePath.replace('\\', '/');
-                String formFileRelativePath = formFilePath.substring(rootComponentPath.length());
-                String formLocation = "component://" + componentName + "/" + formFileRelativePath;
-                Map<String, ModelForm> modelFormMap = null;
-                try {
-                    modelFormMap = FormFactory.getFormsFromLocation(formLocation, this.getEntityModelReader(), this.getDispatchContext());
-                } catch (Exception exc) {
-                    throw new GeneralException(exc.toString(), exc);
-                }
-                for (String formName : modelFormMap.keySet()) {
-                    this.getFormWidgetArtifactInfo(formName, formLocation);
-                }
-            }
-            for (File controllerFile: controllerFiles) {
-                URL controllerUrl = null;
-                try {
-                    controllerUrl = controllerFile.toURI().toURL();
-                } catch (MalformedURLException mue) {
-                    throw new GeneralException(mue.getMessage());
-                }
-                ControllerConfig cc = ConfigXMLReader.getControllerConfig(controllerUrl);
-                for (String requestUri: cc.getRequestMapMap().keySet()) {
-                    try {
-                        this.getControllerRequestArtifactInfo(controllerUrl, requestUri);
-                    } catch (GeneralException e) {
-                        Debug.logWarning(e.getMessage(), module);
-                    }
-                }
-                for (String viewUri: cc.getViewMapMap().keySet()) {
-                    try {
-                        this.getControllerViewArtifactInfo(controllerUrl, viewUri);
-                    } catch (GeneralException e) {
-                        Debug.logWarning(e.getMessage(), module);
-                    }
-                }
-            }
+            futures.add(ExecutionPool.GLOBAL_EXECUTOR.submit(prepareTaskForComponentAnalysis(componentConfig)));
         }
+        ExecutionPool.getAllFutures(futures);
+        Debug.logInfo("Artifact info objects loaded.", module);
     }
 
     public ModelReader getEntityModelReader() {
@@ -298,7 +244,7 @@ public class ArtifactInfoFactory {
         return curInfo;
     }
 
-    public ScreenWidgetArtifactInfo getScreenWidgetArtifactInfo(String screenName, String screenLocation) throws GeneralException {
+    public ScreenWidgetArtifactInfo getScreenWidgetArtifactInfo(String screenName, String screenLocation) {
         ScreenWidgetArtifactInfo curInfo = this.allScreenInfos.get(screenLocation + "#" + screenName);
         if (curInfo == null) {
             try {
@@ -314,6 +260,12 @@ public class ArtifactInfoFactory {
     }
 
     public ControllerRequestArtifactInfo getControllerRequestArtifactInfo(URL controllerXmlUrl, String requestUri) throws GeneralException {
+        if (controllerXmlUrl == null) {
+            throw new GeneralException("Got a null URL controller");
+        }
+        if (requestUri == null) {
+            throw new GeneralException("Got a null requestUri for controller: " + controllerXmlUrl);
+        }
         ControllerRequestArtifactInfo curInfo = this.allControllerRequestInfos.get(controllerXmlUrl.toExternalForm() + "#" + requestUri);
         if (curInfo == null) {
             curInfo = new ControllerRequestArtifactInfo(controllerXmlUrl, requestUri, this);
@@ -416,4 +368,105 @@ public class ArtifactInfoFactory {
 
         return aiBaseSet;
     }
+
+    // private methods
+    private Callable<Void> prepareTaskForServiceAnalysis(final String serviceName) {
+        return new Callable() {
+            public Callable<Void> call() throws Exception {
+                try {
+                    getServiceArtifactInfo(serviceName);
+                } catch(Exception exc) {
+                    Debug.logWarning(exc, "Error processing service: " + serviceName, module);
+                }
+                return null;
+            }
+        };
+    }
+
+    private Callable<Void> prepareTaskForComponentAnalysis(final ComponentConfig componentConfig) {
+        return new Callable() {
+            public Callable<Void> call() throws Exception {
+                String componentName = componentConfig.getGlobalName();
+                String rootComponentPath = componentConfig.getRootLocation();
+                List<File> screenFiles = new ArrayList<File>();
+                List<File> formFiles = new ArrayList<File>();
+                List<File> controllerFiles = new ArrayList<File>();
+                try {
+                    screenFiles = FileUtil.findXmlFiles(rootComponentPath, null, "screens", "widget-screen.xsd");
+                } catch (IOException ioe) {
+                    Debug.logWarning(ioe.getMessage(), module);
+                }
+                try {
+                    formFiles = FileUtil.findXmlFiles(rootComponentPath, null, "forms", "widget-form.xsd");
+                } catch (IOException ioe) {
+                    Debug.logWarning(ioe.getMessage(), module);
+                }
+                try {
+                    controllerFiles = FileUtil.findXmlFiles(rootComponentPath, null, "site-conf", "site-conf.xsd");
+                } catch (IOException ioe) {
+                    Debug.logWarning(ioe.getMessage(), module);
+                }
+                for (File screenFile: screenFiles) {
+                    String screenFilePath = screenFile.getAbsolutePath();
+                    screenFilePath = screenFilePath.replace('\\', '/');
+                    String screenFileRelativePath = screenFilePath.substring(rootComponentPath.length());
+                    String screenLocation = "component://" + componentName + "/" + screenFileRelativePath;
+                    Map<String, ModelScreen> modelScreenMap = null;
+                    try {
+                        modelScreenMap = ScreenFactory.getScreensFromLocation(screenLocation);
+                    } catch (Exception exc) {
+                        Debug.logWarning(exc.getMessage(), module);
+                    }
+                    for (String screenName : modelScreenMap.keySet()) {
+                        getScreenWidgetArtifactInfo(screenName, screenLocation);
+                    }
+                }
+                for (File formFile: formFiles) {
+                    String formFilePath = formFile.getAbsolutePath();
+                    formFilePath = formFilePath.replace('\\', '/');
+                    String formFileRelativePath = formFilePath.substring(rootComponentPath.length());
+                    String formLocation = "component://" + componentName + "/" + formFileRelativePath;
+                    Map<String, ModelForm> modelFormMap = null;
+                    try {
+                        modelFormMap = FormFactory.getFormsFromLocation(formLocation, getEntityModelReader(), getDispatchContext());
+                    } catch (Exception exc) {
+                        Debug.logWarning(exc.getMessage(), module);
+                    }
+                    for (String formName : modelFormMap.keySet()) {
+                        try {
+                            getFormWidgetArtifactInfo(formName, formLocation);
+                        } catch (GeneralException ge) {
+                            Debug.logWarning(ge.getMessage(), module);
+                        }
+                    }
+                }
+                for (File controllerFile: controllerFiles) {
+                    URL controllerUrl = null;
+                    try {
+                        controllerUrl = controllerFile.toURI().toURL();
+                    } catch (MalformedURLException mue) {
+                        Debug.logWarning(mue.getMessage(), module);
+                    }
+                    if (controllerUrl == null) continue;
+                    ControllerConfig cc = ConfigXMLReader.getControllerConfig(controllerUrl);
+                    for (String requestUri: cc.getRequestMapMap().keySet()) {
+                        try {
+                            getControllerRequestArtifactInfo(controllerUrl, requestUri);
+                        } catch (GeneralException e) {
+                            Debug.logWarning(e.getMessage(), module);
+                        }
+                    }
+                    for (String viewUri: cc.getViewMapMap().keySet()) {
+                        try {
+                            getControllerViewArtifactInfo(controllerUrl, viewUri);
+                        } catch (GeneralException e) {
+                            Debug.logWarning(e.getMessage(), module);
+                        }
+                    }
+                }
+                return null;
+            }
+        };
+    }
+
 }

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java Sat Aug  4 18:11:00 2012
@@ -57,10 +57,6 @@ public class ControllerRequestArtifactIn
         if (this.requestInfoMap == null) {
             throw new GeneralException("Controller request with name [" + requestUri + "] is not defined in controller file [" + controllerXmlUrl + "].");
         }
-
-        if (this.requestInfoMap == null) {
-            throw new GeneralException("Could not find Controller Request [" + requestUri + "] at URL [" + controllerXmlUrl.toExternalForm() + "]");
-        }
     }
 
     /** note this is mean to be called after the object is created and added to the ArtifactInfoFactory.allControllerRequestInfos in ArtifactInfoFactory.getControllerRequestArtifactInfo */
@@ -69,14 +65,10 @@ public class ControllerRequestArtifactIn
 
         if (this.requestInfoMap.event != null && this.requestInfoMap.event.type != null && (this.requestInfoMap.event.type.indexOf("service") >= 0)) {
             String serviceName = this.requestInfoMap.event.invoke;
-            try {
-                this.serviceCalledByRequestEvent = this.aif.getServiceArtifactInfo(serviceName);
-                if (this.serviceCalledByRequestEvent != null) {
-                    // add the reverse association
-                    UtilMisc.addToSortedSetInMap(this, aif.allRequestInfosReferringToServiceName, this.serviceCalledByRequestEvent.getUniqueId());
-                }
-            } catch (GeneralException e) {
-                Debug.logWarning(e.toString(), module);
+            this.serviceCalledByRequestEvent = this.aif.getServiceArtifactInfo(serviceName);
+            if (this.serviceCalledByRequestEvent != null) {
+                // add the reverse association
+                UtilMisc.addToSortedSetInMap(this, aif.allRequestInfosReferringToServiceName, this.serviceCalledByRequestEvent.getUniqueId());
             }
         }
 

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java Sat Aug  4 18:11:00 2012
@@ -63,14 +63,10 @@ public class ControllerViewArtifactInfo
             String fullScreenName = this.viewInfoMap.page;
             if (UtilValidate.isNotEmpty(fullScreenName)) {
                 int poundIndex = fullScreenName.indexOf('#');
-                try {
-                    this.screenCalledByThisView = this.aif.getScreenWidgetArtifactInfo(fullScreenName.substring(poundIndex+1), fullScreenName.substring(0, poundIndex));
-                    if (this.screenCalledByThisView != null) {
-                        // add the reverse association
-                        UtilMisc.addToSortedSetInMap(this, aif.allViewInfosReferringToScreen, this.screenCalledByThisView.getUniqueId());
-                    }
-                } catch (GeneralException e) {
-                    Debug.logWarning(e.toString(), module);
+                this.screenCalledByThisView = this.aif.getScreenWidgetArtifactInfo(fullScreenName.substring(poundIndex+1), fullScreenName.substring(0, poundIndex));
+                if (this.screenCalledByThisView != null) {
+                    // add the reverse association
+                    UtilMisc.addToSortedSetInMap(this, aif.allViewInfosReferringToScreen, this.screenCalledByThisView.getUniqueId());
                 }
             }
         }

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java Sat Aug  4 18:11:00 2012
@@ -39,6 +39,8 @@ import org.ofbiz.base.util.UtilFormatOut
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.config.DelegatorInfo;
+import org.ofbiz.entity.config.EntityConfigUtil;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelField;
 import org.ofbiz.service.DispatchContext;
@@ -67,7 +69,16 @@ public class LabelReferences {
     public LabelReferences(Delegator delegator, LabelManagerFactory factory) {
         this.delegator = delegator;
         this.labels = factory.getLabels();
-        this.dispatchContext = new DispatchContext("LabelManagerDispCtx:" + delegator.getDelegatorName(), null, this.getClass().getClassLoader(), null);
+        DelegatorInfo delegatorInfo = EntityConfigUtil.getDelegatorInfo(delegator.getDelegatorBaseName());
+        String modelName;
+        if (delegatorInfo != null) {
+            modelName = delegatorInfo.entityModelReader;
+        } else {
+            modelName = "main";
+        }
+        // since we do not associate a dispatcher to this DispatchContext, it is important to set a name of an existing entity model reader:
+        // in this way it will be possible to retrieve the service models from the cache
+        this.dispatchContext = new DispatchContext(modelName, this.getClass().getClassLoader(), null);
         Collection<LabelInfo> infoList = this.labels.values();
         for (LabelInfo labelInfo : infoList) {
             this.labelSet.add(labelInfo.getLabelKey());

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy Sat Aug  4 18:11:00 2012
@@ -25,7 +25,7 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.service.eca.ServiceEcaUtil;
 import org.ofbiz.service.ModelPermGroup;
 import org.ofbiz.service.ModelPermission;
-import org.ofbiz.service.GenericDispatcher;
+import org.ofbiz.service.ServiceContainer;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilProperties;
 
@@ -331,7 +331,7 @@ List getEcaListForService(String selecte
 
 //Local Dispatchers
 dispArrList = new TreeSet();
-dispArrList.addAll(GenericDispatcher.getAllDispatcherNames());
+dispArrList.addAll(ServiceContainer.getAllDispatcherNames());
 context.dispArrList = dispArrList;
 
 uiLabelMap = UtilProperties.getResourceBundleMap("WebtoolsUiLabels", locale);
@@ -339,9 +339,8 @@ uiLabelMap.addBottomResourceBundle("Comm
 
 selDisp = parameters.selDisp ?: "webtools";
 
-curLocalDispatcher = dispatcher.getLocalDispatcher(selDisp, delegator);
-curDispatchContext = curLocalDispatcher.getDispatchContext();
-context.dispatcherName = curLocalDispatcher.getName();
+curDispatchContext = dispatcher.getDispatchContext();
+context.dispatcherName = dispatcher.getName();
 
 selectedService = parameters.sel_service_name;
 

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/ScheduleJob.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/ScheduleJob.groovy?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/ScheduleJob.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/ScheduleJob.groovy Sat Aug  4 18:11:00 2012
@@ -27,7 +27,6 @@ import java.sql.Timestamp;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.service.ServiceDispatcher;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.ModelParam;

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/Threads.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/Threads.groovy?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/Threads.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/actions/service/Threads.groovy Sat Aug  4 18:11:00 2012
@@ -25,7 +25,6 @@ import java.util.Map;
 import java.sql.Timestamp;
 
 import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.service.ServiceDispatcher;
 import org.ofbiz.service.RunningService;
 import org.ofbiz.service.engine.GenericEngine;
 import org.ofbiz.base.util.UtilHttp;
@@ -35,19 +34,9 @@ uiLabelMap = UtilProperties.getResourceB
 uiLabelMap.addBottomResourceBundle("CommonUiLabels");
 
 threads = [];
-jobs = dispatcher.getJobManager().processList();
-jobs.each { job ->
-    state = job.status;
-    switch (state) {
-        case 0 : status = uiLabelMap.WebtoolsStatusSleeping; break;
-        case 1 : status = uiLabelMap.WebtoolsStatusRunning; break;
-        case -1: status = uiLabelMap.WebtoolsStatusShuttingDown; break;
-        default: status = uiLabelMap.WebtoolsStatusInvalid; break;
-    }
-    job.status = status;
-    threads.add(job);
-}
-context.threads = threads;
+poolState = dispatcher.getJobManager().getPoolState();
+context.poolState = poolState;
+context.threads = poolState.taskList;
 
 // Some stuff for general threads on the server
 currentThread = Thread.currentThread();

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/controller.xml Sat Aug  4 18:11:00 2012
@@ -226,6 +226,18 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="StatBinsHistory"/>
     </request-map>
+    <request-map uri="ViewMetrics">
+        <security https="true" auth="true"/>
+        <metric name="URL: webtools/ViewMetrics" /><!-- Here for demonstration -->
+        <response name="success" type="view" value="ViewMetrics"/>
+    </request-map>
+    <request-map uri="ResetMetric">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="resetMetric"/>
+        <response name="success" type="view" value="ViewMetrics"/>
+        <response name="error" type="view" value="ViewMetrics"/>
+    </request-map>
+
 
     <!-- Loggin Setup -->
     <request-map uri="LogConfiguration">
@@ -530,8 +542,6 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="FindPortalPage"/>
     </request-map>
-    <request-map uri="ShowPortalPortlet"><security https="true" auth="true"/><response name="success" type="view" value="ShowPortalPortlet"/></request-map>
-    <request-map uri="ShowPortalPortletHelp"><security https="true" auth="true"/><response name="success" type="view" value="ShowPortalPortletHelp"/></request-map>
     <request-map uri="EditPortalPage">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditPortalPage"/>
@@ -641,6 +651,7 @@ under the License.
 
     <view-map name="StatsSinceStart" type="screen" page="component://webtools/widget/StatsScreens.xml#StatsSinceStart"/>
     <view-map name="StatBinsHistory" type="screen" page="component://webtools/widget/StatsScreens.xml#StatBinsHistory"/>
+    <view-map name="ViewMetrics" type="screen" page="component://webtools/widget/StatsScreens.xml#ViewMetrics"/>
 
     <view-map name="EntityPerformanceTest" type="screen" page="component://webtools/widget/EntityScreens.xml#EntityPerformanceTest"/>
 
@@ -670,7 +681,6 @@ under the License.
     <view-map name="EntityImportReaders" page="component://webtools/widget/EntityScreens.xml#EntityImportReaders" type="screen"/>
 
     <view-map name="ViewComponents" page="component://webtools/widget/MiscScreens.xml#ViewComponents" type="screen"/>
-    <view-map name="minervaobjects" page="component://webtools/widget/EntityScreens.xml#minervaobjects" type="screen"/>
 
     <!-- cert views -->
     <view-map name="viewbrowsercerts" type="screen" page="component://webtools/widget/CommonScreens.xml#browsercerts"/>
@@ -690,8 +700,6 @@ under the License.
 
     <!-- PortalPage administration  -->
     <view-map name="FindPortalPage" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#FindPortalPage"/>
-    <view-map name="ShowPortalPortlet" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#ShowPortalPortlet"/>
-    <view-map name="ShowPortalPortletHelp" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#ShowPortalPortletHelp"/>
     <view-map name="CreatePortalPage" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#CreatePortalPage"/>
     <view-map name="EditPortalPage" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#EditPortalPage"/>
 

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/web.xml?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/web.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/WEB-INF/web.xml Sat Aug  4 18:11:00 2012
@@ -35,16 +35,6 @@ under the License.
     <!--<description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>-->
   </context-param>
   <context-param>
-    <param-name>serviceReaderUrls</param-name>
-    <param-value>/WEB-INF/services.xml</param-value>
-    <!--<description>Configuration File(s) For The Service Dispatcher</description>-->
-  </context-param>
-  <context-param>
-    <param-name>scriptLocationPath</param-name>
-    <param-value>/WEB-INF/bsh</param-value>
-    <!--<description>BeanShell Script Location</description>-->
-  </context-param>
-  <context-param>
     <param-name>xmlrpc.enabledForExtensions</param-name>
     <param-value>true</param-value>
   </context-param>

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/main.ftl?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/main.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/webapp/webtools/main.ftl Sat Aug  4 18:11:00 2012
@@ -61,7 +61,6 @@ under the License.
           <li><a href="<@ofbizUrl>EntityEoModelBundle</@ofbizUrl>">${uiLabelMap.WebtoolsExportEntityEoModelBundle}</a></li>
           <li><a href="<@ofbizUrl>view/checkdb</@ofbizUrl>">${uiLabelMap.WebtoolsCheckUpdateDatabase}</a></li>
           <li><a href="<@ofbizUrl>ConnectionPoolStatus</@ofbizUrl>">${uiLabelMap.ConnectionPoolStatus}</a></li>
-          <#-- not using Minerva by default any more <li><a href="<@ofbizUrl>minervainfo</@ofbizUrl>">Minerva Connection Info</a></li> -->
           <#-- want to leave these out because they are only working so-so, and cause people more problems that they solve, IMHO
             <li><a href="<@ofbizUrl>view/EditEntity</@ofbizUrl>"  target="_blank">Edit Entity Definitions</a></li>
             <li><a href="<@ofbizUrl>ModelWriter</@ofbizUrl>" target="_blank">Generate Entity Model XML (all in one)</a></li>
@@ -97,7 +96,6 @@ under the License.
         </#if>
         <li><h3>${uiLabelMap.WebtoolsMiscSetupTools}</h3></li>
         <#if security.hasPermission("PORTALPAGE_ADMIN", session)>
-          <li><a href="<@ofbizUrl>ShowPortalPortlet</@ofbizUrl>">${uiLabelMap.WebtoolsShowPortalPortlet}</a></li>
           <li><a href="<@ofbizUrl>FindPortalPage</@ofbizUrl>">${uiLabelMap.WebtoolsAdminPortalPage}</a></li>
           <li><a href="<@ofbizUrl>FindGeo</@ofbizUrl>">${uiLabelMap.WebtoolsGeoManagement}</a></li>
           <li><a href="<@ofbizUrl>WebtoolsLayoutDemo</@ofbizUrl>">${uiLabelMap.WebtoolsLayoutDemo}</a></li>

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/widget/CommonScreens.xml?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/widget/CommonScreens.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/widget/CommonScreens.xml Sat Aug  4 18:11:00 2012
@@ -308,37 +308,5 @@ under the License.
             </widgets>
         </section>
     </screen>
-    <!--#Bam# uiLabelDecorator : decorator for portlet, it's uiLabelDecorator of portlet Components which is call by portlet -->
-    <screen name="portletUiLabelDecorator">
-        <section><!-- Decorator use by portlet define in their preference label -->
-            <actions>
-                <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
-                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
-                <property-map resource="SecurityUiLabels" map-name="uiLabelMap" global="true"/>  
-            </actions>
-            <widgets>
-                <decorator-screen name="uiLabelDecorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <decorator-section-include name="body"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="uiLabelDecorator"><!-- Main decorator -->
-        <section> <!-- labels define here are loading before portlet label (use for surcharge label definition)-->
-              <actions>
-                <!-- base/top/specific map first, then more common map added for shared labels -->
-                <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
-                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
-                <property-map resource="SecurityUiLabels" map-name="uiLabelMap" global="true"/>              
-            </actions>
-            <widgets>
-                <include-screen name="uiLabelDecorator" location="component://common/widget/CommonScreens.xml"/>
-                <decorator-section-include name="body"/>
-            </widgets>
-        </section>
-    </screen>
-    <!--#Eam# uiLabelDecorator  -->
     
 </screens>

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/widget/EntityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/widget/EntityScreens.xml?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/widget/EntityScreens.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/widget/EntityScreens.xml Sat Aug  4 18:11:00 2012
@@ -437,23 +437,6 @@ under the License.
         </section>
     </screen>
 
-    <screen name="minervaobjects">
-        <section>
-            <actions>
-                <set field="headerItem" value="main"/>
-                <set field="title" value="${uiLabelMap.WebtoolsMinervaConnectionObjects}"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.WebtoolsMinervaConnectionObjects}">
-                            <platform-specific><html><html-template location="component://webtools/webapp/webtools/entity/minervaObjects.ftl"/></html></platform-specific>
-                        </screenlet>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
     <screen name="ConnectionPoolStatus">
         <section>
             <actions>

Modified: ofbiz/branches/20120329_portletWidget/framework/webtools/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/webtools/widget/Menus.xml?rev=1369382&r1=1369381&r2=1369382&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/webtools/widget/Menus.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/webtools/widget/Menus.xml Sat Aug  4 18:11:00 2012
@@ -216,6 +216,16 @@ under the License.
         </menu-item>
     </menu>
 
+    <menu name="StatsTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
+          selected-menuitem-context-field-name="tabButtonItem">
+        <menu-item name="stats" title="${uiLabelMap.WebtoolsStatistics}">
+            <link target="StatsSinceStart"/>
+        </menu-item>
+        <menu-item name="metrics" title="${uiLabelMap.WebtoolsMetrics}">
+            <link target="ViewMetrics"/>
+        </menu-item>
+    </menu>
+
     <menu name="StatsSinceStart" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
         <menu-item name="clearStats" title="${uiLabelMap.WebtoolsStatsClearSince}">
             <link target="StatsSinceStart">
@@ -228,9 +238,6 @@ under the License.
     </menu>
 
     <menu name="StatsBinHistory" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
-        <menu-item name="statsSinceStart" title="${uiLabelMap.WebtoolsStatsMainPageTitle}">
-            <link target="StatsSinceStart"/>
-        </menu-item>
         <menu-item name="refresh" title="${uiLabelMap.CommonRefresh}" widget-style="buttontext refresh">
             <link target="StatBinsHistory">
                <parameter param-name="statsId" from-field="parameters.statsId"/>