Commit Graph
613 Commits
Author SHA1 Message Date
Adrian Crum ae07fca011 Fixed a bug in one of my recent commits:
https://issues.apache.org/jira/browse/OFBIZ-5140


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1449429 13f79535-47bb-0310-9956-ffa450edef68
2013-02-24 00:27:33 +00:00
Adrian Crum 3caa1e66d3 Small improvements to ApacheFopWorker: check for file/folder existence before applying settings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446940 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 20:43:38 +00:00
Adrian Crum 9b6b06c44a Reverting revision 1345849 because it is not thread-safe and it doesn't work.
It appears this was an attempt to create per-tenant FOP factories, but instead each tenant overwrites the previous FOP factory settings.

A proper implementation would require a FOP factory cache keyed by delegator name.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446913 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 16:31:31 +00:00
Jacques Le Roux bb024a2951 Better simpler comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432858 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:59:05 +00:00
Jacques Le Roux 4f7d1dc425 No functional change, forgot this one
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432856 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:52:43 +00:00
Jacques Le Roux f1fd26862c https://issues.apache.org/jira/browse/OFBIZ-5109
"Allow a whole controller or/and request/s to override a default 302 in case of redirect"

Since I did not get any feedbacks but Paul's, I decided to use 302 as default instead of 303.
The reason is like that nobody will be surprised. The same (bad for SEO) default than Java will be used.

Please test and review, and let's discuss it more if wanted...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432567 13f79535-47bb-0310-9956-ffa450edef68
2013-01-13 08:46:35 +00:00
Jacques Le Roux b14d7c1ab9 Those are not needed and even counter productive now, see discussion on dev ML http://markmail.org/message/mqe6c6qm2rofa4gg
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426605 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:32:23 +00:00
Scott Gray 0af4184d61 Remove a bunch of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418650 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:01 +00:00
Scott Gray 5df3e3f70b Remove a bunch of unused imports, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418646 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:03:52 +00:00
Jacques Le Roux 6dc2929e10 A patch from Sergei Biletnikov "Remote services via XMLRpc ignore the locale which is passed as the service parameter, the default locale is used forever" https://issues.apache.org/jira/browse/OFBIZ-5083
This code replaces the possible locale from parameters by default locale.

// add the locale to the context
context.put("locale", Locale.getDefault());

The solution is simple: firstly check, if we have the locale as the parameter, if no, use the default locale.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1413307 13f79535-47bb-0310-9956-ffa450edef68
2012-11-25 09:20:23 +00:00
Jacopo Cappellato 6565a78ee0 OFBIZ-5072 Committed slightly different version of the patch contributed by Rene Frauli: the delegator, dispatcher and security objects are required in the session in multitenant mode.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1411196 13f79535-47bb-0310-9956-ffa450edef68
2012-11-19 14:25:55 +00:00
Jacques Le Roux b46c7a2c06 A patch from Naofumi Fukue "Japanese patch" https://issues.apache.org/jira/browse/OFBIZ-5061
Got an issue merging GeoData_JP.xml with Subclipse, using Toirtoise solved it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1403746 13f79535-47bb-0310-9956-ffa450edef68
2012-10-30 15:48:42 +00:00
Scott Gray a2a2857bef Replace more misc. webSiteId retrievals with calls to WebSiteWorker.getWebSiteId(request). Deprecated CatalogWorker.getWebSiteId(request) and CatalogWorker.getWebSite(request).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400626 13f79535-47bb-0310-9956-ffa450edef68
2012-10-21 11:27:10 +00:00
Jacques Le Roux cc5ddd92da Remove trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1395035 13f79535-47bb-0310-9956-ffa450edef68
2012-10-06 12:53:28 +00:00
Jacques Le Roux ac9f940790 A modified patch from Jyoti Sharma https://issues.apache.org/jira/browse/OFBIZ-5043
When i worked with Url Rewrite Filter, i faced the following issue:-
In case of http protocol in the url, https links on th epage were not being rewritten and when their was https url, http links were not rewritten.

The issue behind this what i found is that in RequestHandler.java encodeUrl() is not called in the above given case.
So, if we place response.encodeUrl() their the issue is resolved. 

jleroux: This makes sense since we are still in the "if (encode) {" block. I just noticed that response != null was checked above so I placed the same check before encoding

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1394995 13f79535-47bb-0310-9956-ffa450edef68
2012-10-06 10:59:12 +00:00
Jacques Le Roux d652185fce Adds a new line
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1393369 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 09:26:15 +00:00
Jacques Le Roux 899598caba Moves throwRequestHandlerExceptionOnMissingLocalRequest from general.properties to requestHandler.properties
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1393367 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 09:25:19 +00:00
Sascha Rodekamp 959321e0f1 Bug Fix: No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628). Thanks Wojciech Szymanowski for the hint. This Patch fixes the problems with parameters from hidden fields sending with POST method and parameters sending during "request-redirect" response type
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1392766 13f79535-47bb-0310-9956-ffa450edef68
2012-10-02 07:22:05 +00:00
Jacques Le Roux ecfc317a79 Closes "ControlServlet - Exception thrown for requests not defined by controller.xml" https://issues.apache.org/jira/browse/OFBIZ-5037
This has been tested in a custom project and work as expected it does not add any functional features for OFBiz if you don't use external requests in controllers. So should have any impacts OOTB

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1391037 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 14:49:20 +00:00
Hans Bakker 3bca44db12 OFBiz 5018: LoginWorker does not check a base permission for the root mount point
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1378020 13f79535-47bb-0310-9956-ffa450edef68
2012-08-28 08:30:10 +00:00
Jacopo Cappellato 955ae9eee1 A rather important refactoring of service related code:
* 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
2012-07-24 09:16:26 +00:00
Jacopo Cappellato e3ad85e49f First pass of a rather relevant cleanup of service related code:
* 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
2012-07-22 07:33:48 +00:00
Jacques Le Roux e3d7c51870 A patch from Leon for "IndexOutOfBoundsException thrown by ServerHitBin.countHit" https://issues.apache.org/jira/browse/OFBIZ-4969
This exception thrown out when initiated a "json" request.

    229156224 [http-bio-0.0.0.0-443-exec-6138] ERROR org.ofbiz.webapp.control.ControlServlet -
    ---- runtime exception report --------------------------------------------------
    Error in request handler:
    Exception: java.lang.IndexOutOfBoundsException
    Message: index: 0
    ---- stack trace ---------------------------------------------------------------
    java.lang.IndexOutOfBoundsException: index: 0
    javolution.util.FastList.add(FastList.java:228)
    org.ofbiz.webapp.stats.ServerHitBin.countHit(ServerHitBin.java:210)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364046 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 08:43:19 +00:00
Jacopo Cappellato bfbf80afdb Small enhancements to log messages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363699 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:58:08 +00:00
Jacopo Cappellato 7d473126d3 removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363698 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 09:57:13 +00:00
Jacopo Cappellato 59aed51931 Removed some Geronimo/RMI specific code that was causing issues during system shutdown (several attempts to shutdown the RMIContainer); the code had also some tweaks that made the classes less readable; the static containerMap in ContainerLoader was breaking thread safety because the put operations were not atomic with the related add operations of the loadedContainers list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363656 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 05:41:27 +00:00
Jacques Le Roux 188353ef90 Tiny improvement in doc
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361946 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:16:57 +00:00
Adrian Crum 115e96c2f6 New feature - performance metrics. Web application integration.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361727 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:11:44 +00:00
Jacopo Cappellato 3aa85842f2 Moved the "birt" component out of framework to specialpurpose; moved all the birt reports from the applications to the birt component itself, where the application webapps are overriden to inject the reports; the end result is the same but since all these birt reports are simply a proof of concepts that cannot be used in production (for example they use hardcoded userlogin for authentication) the birt component should be probably disabled by default (but this will be discussed in the dev list).
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
2012-07-13 09:48:32 +00:00
Adrian Crum a17298a06e Removed unused "authz" security code - https://issues.apache.org/jira/browse/OFBIZ-4839.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360283 13f79535-47bb-0310-9956-ffa450edef68
2012-07-11 16:34:26 +00:00
Jacopo Cappellato d7d999966c Fixed a few wrong attribute names: authorization --> authz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353686 13f79535-47bb-0310-9956-ffa450edef68
2012-06-25 18:00:01 +00:00
Jacopo Cappellato 3756ed0294 Cleaned up some code that was adding the delegator/dispatcher/security/auth objects in the user session rather than the request;
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
2012-06-25 17:46:07 +00:00
Jacques Le Roux 2cf0faf52c Closes "Login out on a cluster handled by DeltaManager causes a NPE" https://issues.apache.org/jira/browse/OFBIZ-4289
Removes all changes related to this issue. We will see later if ever it proves to be a real issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353135 13f79535-47bb-0310-9956-ffa450edef68
2012-06-23 14:57:18 +00:00
Jacopo Cappellato a9a1bc5f24 When an IOException error happens while communicating with the browser (for example when the user closes the browser window before the page is returned) there is no need to attempt to render the error page; this was causing two error stack traces in the logs every time a connection was aborted; improved logging for this event.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351999 13f79535-47bb-0310-9956-ffa450edef68
2012-06-20 09:00:26 +00:00
Jacopo Cappellato 3688639a2d Fixed typo in comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351955 13f79535-47bb-0310-9956-ffa450edef68
2012-06-20 07:03:21 +00:00
Jacopo Cappellato 3c0b58d8e6 Setting a default value of DeltaManager was causing a side effect: the method setWebContextObjects was always invoked with the persistSerialized argument set to false; this was causing a series of issues (including one reported recently happening when two users login/logout to the same application from the same browser and visit another application).
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
2012-06-19 17:14:14 +00:00
Jacopo Cappellato 0faee1b07e Trivial change to make to avoid to perform a series of useless method calls when the security object is not in the context.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351777 13f79535-47bb-0310-9956-ffa450edef68
2012-06-19 16:53:03 +00:00
Jacques Le Roux 5cf7578d86 Small improvement:
* Adds "cross-redirect"
* Improve doc for 
  ** request-redirect
  ** request-redirect-noparam
  ** url
  


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1347762 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 19:25:30 +00:00
Hans Bakker 8f0c926dbb allow the fop configuration to be different between tenants
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1345849 13f79535-47bb-0310-9956-ffa450edef68
2012-06-04 07:33:24 +00:00
Jacopo Cappellato 2130bc14e8 Improved code that manages the cache:
* 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
2012-05-29 13:46:49 +00:00
Jacopo Cappellato c4c79f58e8 Improved code that manages the cache:
* 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
2012-05-29 10:54:16 +00:00
Adam Heath 1aa422773b DEPRECATION: framework: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343478 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:11:19 +00:00
Jacopo Cappellato 733bb64592 Improved code that manages the cache:
* 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
2012-05-28 15:02:39 +00:00
Jacques Le Roux c62a93044a Forget to document the value option for redirect-parameter (not a big deal, pretty obvious, so I don't backport)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342567 13f79535-47bb-0310-9956-ffa450edef68
2012-05-25 10:47:00 +00:00
Adam Heath 2e5e25fdce OPTIMIZE: In v1340631, the new FreeMarkerImport was placed in the wrong
block of imports, this change fixes it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341052 13f79535-47bb-0310-9956-ffa450edef68
2012-05-21 14:39:51 +00:00
Adam Heath a76bc2e73b FIX: In v1340631, a change was introduced in a comment; however, that
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
2012-05-21 14:39:44 +00:00
Jacques Le Roux db3f521441 Typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340944 13f79535-47bb-0310-9956-ffa450edef68
2012-05-21 09:21:41 +00:00
Jacques Le Roux ec604e54eb Forgot this trick, thanks to Si Chen cookbook...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340943 13f79535-47bb-0310-9956-ffa450edef68
2012-05-21 09:20:58 +00:00
Jacques Le Roux 2c6ad14046 Closes "Improve site-conf.xsd" https://issues.apache.org/jira/browse/OFBIZ-4874
I always wondered why the controller syntax was poorly documented. I tried to improve that...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340774 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 17:36:26 +00:00
Jacopo Cappellato 748dd94841 Removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340637 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 08:21:18 +00:00