* new factory interface for LocalDispatcher objects
* new factory implementation of GenericDispatcher
* new ServiceContainer container that initializes the factory (based on a configuration parameter)
* moved the getLocalDispatcher method out of GenericDispatcher and refactored (in a thread safe way) into ServiceContainer/GenericDispatcherFactory
* ServiceContainer also maintains the cache of LocalDispatchers that was managed by GenericDispatcher
* added code to ServiceContainer to deregister LocalDispatchers at shutdown: this finally fix the current code that was broken because the thread pool maintained by the JobPoller was never closed because of an issue with LocalDispatchers not being deregistered when not started by the ContextFilter
* change all code to call the ServiceContainer rather than GenericContainer to get a LocalDispatcher: now the implementation is no more directly referenced by calling code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364952 13f79535-47bb-0310-9956-ffa450edef68
* removed the support for serviceReaderUrls for local services specified in the WEB-INF folder; this feature was not used in years and OFBiz has better mechanisms to define services in components;
* as a consequence of the previous point, a lot of code has been cleaned in the DispatchContext class; in this refactoring, I have fixed some non thread safe code (but this is only a first step and this class needs to be enhanced under this aspect)
* greatly simplified the static instance creator and constructors of ServiceDispatcher and GenericDispatcher to reflect the changes in DispatchContext but also removed old unused code, simplified code for readability, added some comments to better document it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364222 13f79535-47bb-0310-9956-ffa450edef68
Now it will be very easy to extract the birt component (for OFBiz Extras) or to disable it when deploying to production or when interested in sparing some hardware resources. I did some cursory tests but since the work has been challenging and rather complex I would appreciate testing help and also reviews to finds chunks of code that I could have missed and that could be moved out as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361130 13f79535-47bb-0310-9956-ffa450edef68
1) removed the request-maps for changeDelegator from components' controller.xml files: they were not used
2) removed CoreEvents.changeDelegator(...): not used (apart from the request-maps removed at #1)
3) removed CoreEvents.changeDispatcher(...): not used
4) cleaned up some code (related to multitenant development): now the objects are set in the request rather than the session
PS: as a consequence this will also fix the issue reported in OFBIZ-4289
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353681 13f79535-47bb-0310-9956-ffa450edef68
The commit when this bug was introduced is:
Author: jleroux
Date: Mon Jun 6 20:26:35 2011
New Revision: 1132749
and unfortunately the revision was backported to the release branches; the commit may have introduced other issues but I can't review it now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351778 13f79535-47bb-0310-9956-ffa450edef68
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343724 13f79535-47bb-0310-9956-ffa450edef68
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343662 13f79535-47bb-0310-9956-ffa450edef68
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343277 13f79535-47bb-0310-9956-ffa450edef68
referenced a public static variable, it really should have called the
public static method introduced in that same commit. This happened
because the change wasn't reviewed before it was committed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341051 13f79535-47bb-0310-9956-ffa450edef68
"As of creating new BeansWrapper, be sure you create it only once during the application life-cycle and then reuse the same instance, or else it will have to rebuild the class introspection cache again and again."
Thanks to Adam Heath for the comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340631 13f79535-47bb-0310-9956-ffa450edef68
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)
Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.
If conditional check is used for some debug level lets say "Verbose" then the containing Debug statement will be Debug.logVerbose() instead of Debug.logInfo() - Comment from Jacopo and Adrian.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337024 13f79535-47bb-0310-9956-ffa450edef68
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)
Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
In order to use these engine and event rather than the one that uses JSR223:
* for services (service definition): set the engine to "groovy" rather than "script"
* for events (event element in the controller): set the event type to "groovy" rather than "script"
The main advantage of using them is that it is possible to attach a debugger to the Groovy methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325253 13f79535-47bb-0310-9956-ffa450edef68
Currently auto-completer uses sync call to prepare auto-completer source (result list).
Due to this user can't perform any other operation on lookup field and user should have to wait until response came.
In general, synchronous requests should never be used because they tend to block the execution of anything else on the page (or even the entire browser UI), which isn't good.
Also ajax-loader image not display on google chrome browser due to sync request.
Need to use async request for auto-completer.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308751 13f79535-47bb-0310-9956-ffa450edef68
The transform is now used to pass the "postalAddress" to the context of the postal address formatter screen.
This should fix the issue, reported by Chatree, that prevented to render the localized address when the screen was rendered from the send mail service (no request object was available).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307288 13f79535-47bb-0310-9956-ffa450edef68
Fixes this bug:
---- exception report ----------------------------------------------------------
Error in request handler:
Exception: org.ofbiz.widget.screen.ScreenRenderException
Message: Error rendering screen component://ecommerce/widget/CommonScreens.xml#main-decorator: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 (String index out of range: 0)
---- cause ---------------------------------------------------------------------
Exception: java.lang.StringIndexOutOfBoundsException
Message: String index out of range: 0
---- stack trace ---------------------------------------------------------------
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
java.lang.String.charAt(String.java:686)
org.ofbiz.webapp.ftl.OfbizContentTransform$1.close(OfbizContentTransform.java:97)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304200 13f79535-47bb-0310-9956-ffa450edef68