Commit Graph
1143 Commits
Author SHA1 Message Date
Jacopo Cappellato 582f00fdaf Completed the work to make the ServerHitBin class thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621088 13f79535-47bb-0310-9956-ffa450edef68
2014-08-28 08:05:50 +00:00
Jacopo Cappellato 58f766c3b8 First part of the overhaul of ServerHitBin class: now ServerHitBin objects are thread-safe; however the ServerHitBin class isn't because of its static maps (more work is needed in order to fix this).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620907 13f79535-47bb-0310-9956-ffa450edef68
2014-08-27 15:10:12 +00:00
Jacopo Cappellato bc57bb04a0 A series of cleanups and changes in preparation for some work to attempt to fix the thread safety of the ServerHitBin class.
Also fixed a bug affecting multi-tenant systems: ServerHitBin entries had an additional #tenant suffix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620831 13f79535-47bb-0310-9956-ffa450edef68
2014-08-27 09:23:55 +00:00
Jacopo Cappellato 41f9eb69d1 Small optimization to the ServerHitBin class: the bin length is now stored in a private final field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620661 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 17:10:38 +00:00
Jacopo Cappellato 46dec2f2bd Removed some not required code and made some field final; however the class is still thread unsafe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620656 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 16:49:51 +00:00
Jacopo Cappellato 0574a1d798 Removed unused/unnecessary code from ServerHitBin; no functional changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620648 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 16:18:06 +00:00
Jacopo Cappellato 6577a5b203 Moved the definition of public static maps at the top of the ServerHitBin class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620617 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 14:49:33 +00:00
Jacopo Cappellato 03a947f506 Made some methods in ServerHitBin private; moved the position of sevaral methods (no functional changes).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620616 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 14:47:33 +00:00
Jacopo Cappellato 27af86459c First pass in the cleanup of the ServerHitBin class: made private a bunch of fields and methods, removed some unused fields and methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620611 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 14:37:15 +00:00
Jacopo Cappellato 7495a309d6 Small optimization: instead of calling the InetAddress.getLocalHost() method every time a ServerHitBin record is created, use the address provided by VisitHandler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620571 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 11:14:15 +00:00
Jacopo Cappellato 5d2d659d39 Small optimization: instead of calling the InetAddress.getLocalHost() method every time a ServerHit is created, use the address provided by VisitHandler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620567 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 11:02:05 +00:00
Jacopo Cappellato c00fc92699 Merged framework-api-cleanup branch into trunk.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620538 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 09:16:52 +00:00
Jacopo Cappellato be81ed385d Small optimization: instead of calling the InetAddress.getLocalHost() method every time a Visit is created, do it once when the class is loaded.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620525 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 08:02:29 +00:00
Adrian Crum c63cb8c89e Better encapsulation of entity engine multitenant setting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620120 13f79535-47bb-0310-9956-ffa450edef68
2014-08-24 10:27:24 +00:00
Ashish Vijaywargiya 0dff62e4e9 Reverting the changes that I mistakenly committed in trunk r1618325.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618368 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 14:43:05 +00:00
Ashish Vijaywargiya e4d68ed2f7 Applied the patch OFBIZ-4902_framework.patch from OFBIZ-4902 - Replace in Freemarker templates the deprecated built-ins: default, exists, if_exists.
Thanks http://ofbiz.us team for providing the patch work.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618325 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 10:58:51 +00:00
Jacopo Cappellato fb20420e20 Some optimization for service event handler to prevent unnecessary operations at every service invocation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617473 13f79535-47bb-0310-9956-ffa450edef68
2014-08-12 13:38:55 +00:00
Jacopo Cappellato 066d782950 Misc minor cleanups to log messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616744 13f79535-47bb-0310-9956-ffa450edef68
2014-08-08 13:16:46 +00:00
Jacopo Cappellato b399cbb143 Moved to Attic (https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Attic ) the incomplete, unmaintained and unused support for WFS. This code had also a series of issues: low level calls to Freemarker components that may change with newer versions of Freemarker, references to hotwaxmedia, wrong location for ftl files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616446 13f79535-47bb-0310-9956-ffa450edef68
2014-08-07 09:12:43 +00:00
Jacques Le Roux fb62866eee Removes an useless @SuppressWarnings("deprecation")
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1612022 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 06:13:38 +00:00
Jacques Le Roux d647a61edb Better French label and clearly separate the label and the error in all languages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597274 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 11:00:44 +00:00
Jacques Le Roux c045d83fa0 A patch from Deepak Dixit for "ofbizCurrency transform does not honor the rounding passed in ofbizCurrency macro." https://issues.apache.org/jira/browse/OFBIZ-5591
ofbizCurrency transform does not honor the rounding passed in ofbizCurrency macro. OfbizCurrency transform always used the default rounding set in general.properties file.

jleroux:I apply Deepak's patch,  seems good to me. If someone thinks there might be a better solution, please reopen

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583040 13f79535-47bb-0310-9956-ffa450edef68
2014-03-29 18:42:06 +00:00
Jacopo Cappellato 7d8d938a3b Performance optimization for UtilHttp.getFullRequestUrl method: instead of returning a StringBuffer object (synchronized) it now returns a String (immutable); internally it uses a StringBuilder (lighter because not synchronized) within a private context.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1570810 13f79535-47bb-0310-9956-ffa450edef68
2014-02-22 08:32:28 +00:00
Jacopo Cappellato 0bf26e2829 Upgraded code to avoid a warning for a deprecated Tomcat class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1570641 13f79535-47bb-0310-9956-ffa450edef68
2014-02-21 17:12:29 +00:00
Jacques Le Roux 4c49d987f2 No functional changes.
Not a big deal(because it should be very rarely changed during a session + with cache cleared) but I did not want to have final here. I tried this "save action" in Eclipse (on private variable) but finally decided to remove it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549026 13f79535-47bb-0310-9956-ffa450edef68
2013-12-08 13:01:46 +00:00
Jacques Le Roux 80b881bd11 No functional change: removes trailing spaces
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549017 13f79535-47bb-0310-9956-ffa450edef68
2013-12-08 11:07:20 +00:00
Jacques Le Roux 082d2ec52f In r1533839 (related to https://issues.apache.org/jira/browse/OFBIZ-4794 "Set different ports for testing in a CI environment (e.g. Jenkins)"
Which will mostly be used to simultaneously run official demos without having to create patches, I forgot the portOffset for websites and url.properties ports values.
This fixes this point. I also did in it RequestHandler class though the getDefaultServerRootUrl() method is now deprecated.
To be consistent with r1547186 I will backport in R13.07

People should be aware that this will change the ports values of websites and url.properties ports values which in some cases could be an unwanted side effect. 
Anyway the portOffset feature is not destined to be used in production environments where websites and url.properties ports values are often changed purposely

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549015 13f79535-47bb-0310-9956-ffa450edef68
2013-12-08 10:48:18 +00:00
Adrian Crum 63462fa908 Added a new attribute to the ofbiz-component.xml <webapp> element - access-permission. It is used to specify an explicit permission to allow access to the web application, instead of the implied permissions specified in the base-permission attribute (which causes unpredictable behavior).
Also moved web application authorization code from the Flat Grey visual theme to LoginWorker.java. This change needs to be copied to other visual themes as well.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1546891 13f79535-47bb-0310-9956-ffa450edef68
2013-12-02 04:19:48 +00:00
Jacques Le Roux ddf898a735 This reverts r1541641 + 1541746
Local variables are always thread safe, no needs to worry about them

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541894 13f79535-47bb-0310-9956-ffa450edef68
2013-11-14 12:55:18 +00:00
Jacques Le Roux e4529567c2 java.util.regex.Pattern instances are immutable but not instances of the Matcher companion class.
So better be safe than sorry, even if in the loops we loose a bit of performance (here only "short" loops anyway)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541641 13f79535-47bb-0310-9956-ffa450edef68
2013-11-13 18:04:14 +00:00
Adrian Crum 2ccdb6b312 Fixed a bug in WebSiteProperties.java where host name defaults were not initialized properly. Also added a toString method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1540482 13f79535-47bb-0310-9956-ffa450edef68
2013-11-10 15:17:15 +00:00
Adrian Crum 203ba5c608 Improved WebSiteProperties.java - better handling of missing values.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1539513 13f79535-47bb-0310-9956-ffa450edef68
2013-11-07 01:55:06 +00:00
Adrian Crum 33d54463cc The RequestHandler.makeLink method uses the new URL generation classes (2nd try).
This time I preserved the complicated boolean logic in the host-part block of code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535755 13f79535-47bb-0310-9956-ffa450edef68
2013-10-25 14:57:25 +00:00
Jacques Le Roux 185925a648 No functional changes, just better documentation on status-code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535669 13f79535-47bb-0310-9956-ffa450edef68
2013-10-25 09:50:21 +00:00
Adrian Crum 5b675f5a79 Some code simplification in the new URL generation classes.
Also loosened things up a bit in the OfbizUrlBuilder class: allow object construction with partial information - required by some services. I don't like this approach because it makes it possible to create nonsensical URLs, but it is a necessary evil to keep the existing code working.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535444 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 17:12:46 +00:00
Adrian Crum 4af172cad4 Reverting rev 1535129 due to a problem reported by Jacques on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535419 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 15:44:03 +00:00
Adrian Crum 6107ff911a Fixed a bug in RequestHandler.java that threw an exception when the servlet is mapped to /.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535276 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 04:47:12 +00:00
Adrian Crum 0aa028cbce Simplified some code in OfbizUrlTransform.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535270 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 02:45:47 +00:00
Adrian Crum a8109cf259 Added a helpful method to WebAppUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535268 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 02:44:45 +00:00
Adrian Crum ca37709641 Deprecated a method in RequestHandler.java that should not be used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535261 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 01:48:22 +00:00
Adrian Crum 64177b19d7 Eliminated a logged warning in OfbizUrlBuilder - the request-map might not exist because of the various URL rewriting schemes in OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535260 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 01:46:56 +00:00
Adrian Crum d28470d4be Code cleanup and JavaDocs in OfbizUrlTransform.java.
If a web site ID is specified, the transform does not require a HttpServletRequest object - so the transform will work in scheduled services.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535246 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 00:45:51 +00:00
Adrian Crum f569a189a7 Formatted OfbizUrlTransform.java - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535164 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 20:40:39 +00:00
Adrian Crum b803a32fc9 Some JavaDoc fixups - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535131 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:40:05 +00:00
Adrian Crum 501ca548d5 The RequestHandler.makeLink method uses the new URL generation classes.
I tried to preserve the complicated boolean logic in the replaced block of code, but if I got something wrong, just leave a message on the dev mailing list.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535129 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:35:17 +00:00
Adrian Crum 86fc2a1c8e Oops, missed a file in my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535128 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:32:47 +00:00
Adrian Crum cf3b8d7025 Added a new classes to simplify OFBiz URL generation and eliminate redundant code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535126 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:29:47 +00:00
Jacques Le Roux 1aebfe082b An enhanced patch from Shi Jinghai <<Change GROOVY_SUPPORT position in .classpath to remove "The method getContextPath() is undefined for the type ServletContext" message in Eclipse.>> https://issues.apache.org/jira/browse/OFBIZ-5369
While editing some java files with "request.getSession().getServletContext().getContextPath()" in Eclipse, an error message appears:
"The method getContextPath() is undefined for the type ServletContext".

This error message can be removed by changing GROOVY_SUPPORT position to be after servlet jar in .classpath

jleroux: I needed to also remove the now useless warning message I put in ControlServlet.java

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534989 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 11:28:31 +00:00
Adrian Crum 56e780b97c Fixed a flaw in the RequestHandler.makeLink method: if any exceptions were thrown while generating the URL, the method proceeded as if nothing was wrong and created an invalid URL. Now the method returns null if any exceptions were thrown - it is up to calling code to decide what to do about it.
This commit also makes use of the new WebSiteProperties class to simplify code and improve performance.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534827 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 22:32:56 +00:00
Adrian Crum 0580243b03 Added a new class to simplify OFBiz URL generation and eliminate redundant code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534826 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 22:27:13 +00:00