(OFBIZ-9208)
Adrian created the following commit to cache URL objects
Revision: 1649979
Author: adrianc
Date: 07 January 2015 00:24:28
Message:
Some optimizations for URL lookups.
----
Modified : /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java
Modified : /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java
and was later reverted in this commit
Revision: 1650347
Author: adrianc
Date: 08 January 2015 17:53:59
Message:
Some small fixups for some of my previous commits.
----
Modified : /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java
Modified : /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java
We have found in one of our production servers that line 98 in UtilURL.java
url = loader.getResource(resourceName);
has caused locking and looking at the stack trace (from jstack). There are
numerous threads waiting on locks from within this method
I propose the cache gets added back (we have done this as a patch on our systems
with no ill effect)
FYI - The commits are in reference to the EntityClassLoader which is not used
and does not work see OFBIZ-6210
Thanks: Gareth Carter for report and suggestion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1782520 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9152)
Since the introduction of EntityQuery there was no distinction between a simple
method tags
<find-by-and use-iterator="true"> and <find-by-and use-iterator="false">
(except cache handling).
There is a condition "if (useIterator)" but with entityQueries did use
"[...].queryList()".
Thanks: Mirko Vogelsmeier
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1782498 13f79535-47bb-0310-9956-ffa450edef68
completes r1781219 by putting svn:eol-style=native to all file types declared
in [auto-props] section of the svn config files.css
Actually this is only a 1st pass, it was too complicated to do it for
all file types at once only concerned here
*.java;*.bsh;*.groovy;*.jsp;*.tld;*.ftl;*.js;*.sql;*.c;*.cpp;*.h;*.txt;*.sgml;
*.properties;*.xml;.classpath;.project;*.sld;*.gml;*.xsl;*.xsd
*.html;*.htm;*.css;*.md;README;NOTICE;LICENSE;rc.ofbiz.*;*.less;*.dsp;*.dsw
Most files should not be concerned by this change, but it's impossible to do
it one by one.
There are also changes in files with have mixed EOLs; because this has no sense
when using native which automatically resolves this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781731 13f79535-47bb-0310-9956-ffa450edef68
I did not even notice I committed this bunch of WIP stuff. I guess I clicked
somewhere while my machine was too buzy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781367 13f79535-47bb-0310-9956-ffa450edef68
I did not even notice I committed this bunch of WIP stuff. I guess I clicked
somewhere while my machine was too buzy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781366 13f79535-47bb-0310-9956-ffa450edef68
At http://markmail.org/message/ffmyw773p65fndey I wrote:
I'd like to follow the suggestion I made in the last message of the linked
thread.
In other words, use
http://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-confighttp://blogs.collab.net/subversion/the-road-to-repository-dictated-configuration-day-2-autoprops
Then this problem would be over. No longer need to check from time to time that
concerned files, have svn:eol-style=native property set
This imply that all OFBiz users use svn > 1.7, but we can inform them, et voilà
Then at markmail.org/message/h3q2yvj4db544ro7 I wrote:
Actually, since we get new committers now and then and their are able to create
new files I have a warning every 6 months which says "Check Java
files, have all svn:eol-style=native" (I totally forgot that because I assume
the machine knows it and warns me ;))
I could extend that to all files (at least the most prominent types), I'll
see...
This does what the last sentence said for Groovy, XML and few new Birt
Java files.
I'll see if I can implement the svn 1.8 repos-dictated-config ASAP!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781219 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9191)
This is due to a change in (at least) Tomcat 8.0.39
Here is a simple fix. I tried other ways but none worked and I prefer to keep
this simple.
I tried other ways but none worked and I prefer to keep this simple.
* Using an encoder at this stage (just before calling the macro) is not an
option. Or maybe by using the encoder on the linkurl variable alone.
But then linkurl must be transformed in a String and back to a
StringBuilder or more refactoring is needed. It does not worth it IMO.
* Also using encode="true" for links in AccountingTrees.xml does not work.
This also removes trailing blanks (by hand)
Thanks: Moatasim Al Masri for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781125 13f79535-47bb-0310-9956-ffa450edef68
Because the log level always is display as FATAL on log, this raise useless log and generate many noise for production site.
Generally these logs are present for debugging historical reason
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1780691 13f79535-47bb-0310-9956-ffa450edef68
Despite missing the creation data in svn, I guess this file has been created
after I created the portoffset feature or I missed it then (unlikely since I
changed all 8080 and 8443 ports in Java code).
Anyway, we now need this to be portoffset aware and this commit just does that
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1780659 13f79535-47bb-0310-9956-ffa450edef68
Easier user possibility of report creation.
(OFBIZ-6919)
Fixes a small issue: the REPORT contentId is now named FLEXIBLE_REPORT
Note: the BIRT_REPORT_BUILDER_USAGE_POLICY still need to be completed. Hence
it's for now bypassed in ContentWorker.renderContentAsText(), based on the
FLEXIBLE_REPORT contentId
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1779701 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9184)
Currently in the entitymodel.xsd the line
<xs:attribute name="entity-alias" type="xs:string"/>
is wrong, should be
<xs:attribute name="entity-alias" type="xs:string" use="required"/>
Else in line
this.entityAlias = entityAlias;
in ModelViewEntity.ViewConditionExpr()
this.entityAlias
receives null.
All supported branches are concerned
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1779625 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9155)
Symptom:
* services that are invoked with "dispatcher.runAsync" stay "pending" in the
job-list and never get executed
* scheduled jobs don't get executed
Steps to Reproduce
* Login to /webtools
* Schedule a Job to run in 5 mins, (for example service "clearAllEntityCaches")
* Wait 7mins
Expected:
* the scheduled service "clearAllEntityCaches" is not "pending" anymore but
should have status "finished"
Actual:
* scheduled service "clearAllEntityCaches" is still "pending"
Analysis:
The problem can be reproduced with the OFBiz 16.11 branxh as well as
with the OFBiz 16.11.01 zip file version and the trunk
JobPoller does get started on OFBiz start but does get stuck on line:
org.apache.ofbiz.service.job.JobPoller.java: 213-215
The reason is that the "Start.ServerState" never reaches "RUNNING"
Doing a full-text scan through the whole source code shows, that there is no
code at all that sets the ServerState to "RUNNING"
Comparing it to the 15.11-branch. There used to be a line:
serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)
no such line exists in 16.11 anymore.
jleroux: I confirm the behaviour in R16 branch as well as in trunk.
Leonard's "patch" is a good solution and works for the R16 branch which is less
changed than the trunk when compared to R15.
The same applies to the trunk with the relative block of code which contains
if (serverState.get() == ServerState.STOPPING) {
The line Leonard propose to add was obviously missed during the recent
refactoring.
Thanks: Leonard Lin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1779596 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9172)
Currently no support for New Zealand regions in
framework/common/data/GeoData_*
Thanks: David McNeill
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1778879 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7972)
In another step towards completing the plugin system for OFBiz, we renamed
the /specialpurpose directory to /plugins and changed all occurences of the
word "specialpurpose" to "plugins" in all files found in the system
Reference discussion: http://markmail.org/message/hpyuxkmftiyn44w2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1778271 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9169)
In OFBIZ-5409 a prefix was added for GET ajax requests.
It would be beneficial if the prefix could be configured instead of hard coded
Pierre Smits suggested to make the feature multi-tenant aware. I made signature
and calls changes based on Chris Howe's patch.
Thanks: Chris Howe and Pierre Smits
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777942 13f79535-47bb-0310-9956-ffa450edef68
in ContentWorker for Birt Report Builder
(OFBIZ-9166)
This is still an incomplete feature because I did not find yet a way to complete
the BIRT_REPORT_BUILDER_USAGE_POLICY and had to bypass the sanitization for this
case, WIP...
This commit has no effect on OFBiz yet.
I need to commit this now to continue to work on the main task: OFBIZ-6919
"New implementation of Birt. Easier user possibility of report creation".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777451 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9164)
While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue
due to r1652852 where Adrian improved the cacheKey in
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants).
Actually I'm not even sure it was done at r1652852 because Adrian did not
maintain the FormFactory svn history.
Anyway, to make a long story short I had to introduce a DispatchContext
parameter when calling FormFactory.readFormDocument() when the code from
R13.07 only passed a null.
This had an impact in the hierarchy tree because FormFactory.readFormDocument()
was called in DataResourceWorker class, where the new code was called
from renderDataResourceAsText().
So I instead of only passing a Delegator I decided to pass only a
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the
Delegator from the LocalDispatcher. Doing so it had an impact on the
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface
and all related.
I finally decided to apply the same "Change Method Signature" refactoring
pattern (http://refactoring.com/catalog/addParameter.html) to all cases
related to ContentWorkerInterface. No need to pass a delegator when you have
LocalDispatcher!
Since last commit and revert I fixed 5 test failures and improved the code more,
mostly formatting, comments, etc.
There are very ugly method signatures out there which still need refactoring,
but it's so much work...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777297 13f79535-47bb-0310-9956-ffa450edef68
Improved: Refactor ContentWorkerInterface methods signatures
(OFBIZ-9164)
While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue
due to r1652852 where Adrian improved the cacheKey in
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants).
Actually I'm not even sure it was done at r1652852 because Adrian did not
maintain the FormFactory svn history.
Anyway, to make a long story short I had to introduce a DispatchContext
parameter when calling FormFactory.readFormDocument() when the code from
R13.07 only passed a null.
This had an impact in the hierarchy tree because FormFactory.readFormDocument()
was called in DataResourceWorker class, where the new code was called
from renderDataResourceAsText().
So I instead of only passing a Delegator I decided to pass only a
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the
Delegator from the LocalDispatcher. Doing so it had an impact on the
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface
and all related.
I finally decided to apply the same "Change Method Signature" refactoring
pattern (http://refactoring.com/catalog/addParameter.html) to all cases
related to ContentWorkerInterface. No need to pass a delegator when you have
LocalDispatcher!
I locally got 5 incomprehensible test failures. After checking as much as I can
w/o committing I believe it's a Windows 7 issue only. Anyway if Buildbot reports
the same I'll revert. I need this changes in to continue on another not yet
created subtask of OFBIZ-6919
........
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777154 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9164)
While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue
due to r1652852 where Adrian improved the cacheKey in
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants).
Actually I'm not even sure it was done at r1652852 because Adrian did not
maintain the FormFactory svn history.
Anyway, to make a long story short I had to introduce a DispatchContext
parameter when calling FormFactory.readFormDocument() when the code from
R13.07 only passed a null.
This had an impact in the hierarchy tree because FormFactory.readFormDocument()
was called in DataResourceWorker class, where the new code was called
from renderDataResourceAsText().
So I instead of only passing a Delegator I decided to pass only a
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the
Delegator from the LocalDispatcher. Doing so it had an impact on the
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface
and all related.
I finally decided to apply the same "Change Method Signature" refactoring
pattern (http://refactoring.com/catalog/addParameter.html) to all cases
related to ContentWorkerInterface. No need to pass a delegator when you have
LocalDispatcher!
I locally got 5 incomprehensible test failures. After checking as much as I can
w/o committing I believe it's a Windows 7 issue only. Anyway if Buildbot reports
the same I'll revert. I need this changes in to continue on another not yet
created subtask of OFBIZ-6919
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777145 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9161)
At OFBIZ-9159 I added the entity-auto CRUD services for JobSandbox but
w/o permission check.
While working on this issue I decided it's better to have them and decided to
also put them for JobSandbox CRUD services.
So here are the entity-auto CRUD services for RuntimeData and permission check
for JobSandbox CRUD services
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776558 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9158)
Improves after a discussion with Scott and Taher on dev ML
Improved to be called only with IN params, the JavaDoc is also improved to
reflect the changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776447 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9158)
The idea is to use validate() to render a boolean result. I needed that in a
custom project, I think it's worth contributing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776243 13f79535-47bb-0310-9956-ffa450edef68
ExternalLoginKeysManager.getExternalLoginKey(...) method.
Minor refactoring of the getExternalLoginKey(...) method to make it more
friendly to unit tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776138 13f79535-47bb-0310-9956-ffa450edef68
tokens from the LoginWorker class to a new class named ExternalLoginKeysManager.
Improved Javadocs in the new class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1775807 13f79535-47bb-0310-9956-ffa450edef68
Improvements remove in total roughly 70 lines of code and includes:
- moving all default values to the constructor to make it clear
- refactor getProperty to use the Optional monad
- remove FileInputStream from getPropertiesFile as it is not used
- properly indent conditions in determineOfbizPropertiesFileName
- simplify locale creation
- remove dependency on base (StringUtil)
- other minor renamings and formatting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1775340 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9144)
This is the first commit to the above mentioned issue which fixes many javadoc
errors dispersed through the different components. The fixes are not
necessarily improvements to the javadocs but rather making them valid javadocs
to prevent reporting errors from gradle
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774154 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8537)
Committed wangjunyuan's new patch.
Thanks: wangjunyuan for the new patch to make the PBKDF2 hashed password comply with RFC 6070, the feedbacks of Jacques and Nicolas on the previous patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1773066 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8537)
Change the currentPassword of flexadmin back to SHA format as the PBKDF2 password string in the patch doesn't follow RFC standard.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1772899 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8337)
This is another major commit to the refactoring of the startup sequence in
OFBiz with the following highlighted changes:
- Delete the NativeLibClassLoader.java
- Delete the native classpath logic in Classpath.java
- Refactor the ComponentContainer and StartupControlPanel to operate without
the NativeLibClassLoader. This substantially simplifies the code
- Declare a URLClassLoader in ComponentContainer that is instantiated upon
building the classpath for all components. This makes the classloader start
in one shot
- Simplify the Config file and remove fields that are not used. Also
refactor some messy logic for loading the props file and other code
improvements
- Refactor all the .properties files for startup to have a consistent
structure that clearly documents all available properties and the
default value for each property. This change is also related to the
changes applied on Config.java
- Remove the declaration of the StartupLoader implementation class
from all startup .properties files because only one implementation exists
and it should be the default always.
- Refactor the loaders retrieval code (main, rmi, test, load-data) defined
in the startup .properties files
- Refactor some switch statements to comply with java coding standards
- Add the DTDs defined in base through Gradle because we removed the
NativeLibClassLoader and the classpath buildup logic in StartupControlPanel
Thanks: Jacopo Cappellato for reviewing the work
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1772879 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8337)
Continuing the refactoring work on the startup sequence, this commit
specifically focuses on the ComponentContainer and how it loads
components into the system. The following changes are made:
- simplify and cleanup the ofbiz-containers.xml to have only one entry
- substantially simplify the ComponentLoaderConfig class and remove unnecessary defined state
- delete the JustLoadComponentsContainer (used to exist for the server command --testlist which no longer exists)
- fully refactor the ComponentContainer class and breakup the messy logic into chunks of private methods. The methods are also properly documented.
- remove an old reference to the testlist container which no longer exists
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1772256 13f79535-47bb-0310-9956-ffa450edef68