(OFBIZ-9449)
While working on an issue reported by Pierre Gaudin on user ML
https://s.apache.org/gDo3, here quoted:
I found another issue while testing: the port 8443 is missing in the URL used
underneath by the form reported by Pierre.
It was broken by OFBIZ-9206 where I removed the value of port.https in
url.properties.
It's not an issue if you set the value of port.https, or let it empty when
using a SSL certificate on a production server. But if you try locally
(localhost) then the URL misses the 8443 port.
Solution append 8443 as default secure port when using localhost
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801094 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9435)
Another round of refactoring in the start component with the following changes:
- Change the default adminKey to "NA" since it is only used in the "start"
context. Other contexts do not require an admin server (test, load-data)
- Simplify and cleanup the locale creation logic in the constructor and move
things out to the method with a return value
- Simplify the Timezone creation logic by moving it outside the constructor into
a small method
- Substantially simplify the determineOfbizPropertiesFileName(..) method by
reversing the order of condition evaluation (first, load-data, then test, then
anything else is start)
- Change default locale to be 'en' as the system crashes if not provided.
- Remove all comments from properties files except for start.properties and
refer to it from the other properties files
- Update the properties files accordingly
Thanks: Jacques Le Roux for review and suggestion to remove the comments from
properties files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800368 13f79535-47bb-0310-9956-ffa450edef68
creating the wanted data structure.
(OFBIZ-9393)
This patch removes a number of outdated methods that took a fixed number of
objects to create a data structure, such as a linked list. Since the code is
outdated and inflexible, this patch removes these methods and added methods to
create the given data structure via a variable amount of arguments.
This approach also ensures that no other code needs a refactoring. In addition
the method populateMap() was removed which was private and was only used by the
multiple outdated toMap() functions.
Thanks Martin Becker for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800299 13f79535-47bb-0310-9956-ffa450edef68
While checking there were no other cases like in OFBIZ-9432
(missing path to class), to be consistent I removed the trailing semicolons in
groovy scripts and made few formatting
I did not changes tests code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799867 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9392)
No functional change, but an almost complete rewrite of the tomcat container
with the following highlights:
- breakup the logic in init() many smaller functions each specializing in one
thing
- Unify the host creation logic between main host and context-specific hosts
- introduce streams and lambdas where appropriate
- rename loadComponents() to loadWebapps()
- rename createContext() to createCallableContext()
- rename configureContext() to prepareContext()
- remove instance variables that are not necessary / redundant for operating
the container correctly and refactor the code logic accordingly
- remove unnecessary valve comments and point to documentation URL
- remove any commented out code
- remove the static block for initializing SSLUtil.loadJsseProperties(). This
- code is already called and hence redundant
- remove redundant / dead / unused code
- add missing FilterDef to context
- rename J2EE server from "ofbiz container 3.1" to "ofbiz container"
- lots and lots of re-arranging and small code improvements
Thanks: Jacopo Capellato, Michael Brohl, Scott Gray and Jacques Le Roux for
your help in testing, reviewing and providing feedback.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799708 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9305)
When print.verbose was set to true in debug.properties, the unit test
EntitySaxReaderTests.parse was failing because it is using some mock objects;
fixed by temporarily disabling the verbose logging during the test.
Thanks: William Wang for the report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799417 13f79535-47bb-0310-9956-ffa450edef68
India has 29 states and 7 Union Territory. Need to update data as in data Union Territory also added as STATE,
used TERRITORY as GeoTypeId for Union Territories.
Applied patch from jira issue
- Updated geoTypeId for 7 union territory from STATE to TERRITORY
- Update geoName for Andaman And Nicobar it should be Andaman and Nicobar Islands
- Corrected geoName and gooId and other detail for Delhi union territory
- Corrected to the name for Jammu and Kashmir (And should be in lower camel case)
- Corrected name for Odisha (Orissa>> Odisha)
- Corrected geoName for Puducherry, also added wellKnownText = "Pondicherry"
- Corrected geoName for Tamil Nadu (Tamilnadu >> Tamil Nadu)
- Added data for new state Telangana
- Corrected geoName for Uttarakhand (Uttaranchal >> Uttarakhand)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798796 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9385)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the EntityListIterator creation and before it's
closed the EntityListIterator remains in memory.
It should be closed in EntityListIterator.finalize() but the less happens there
the better.
The solution is to use try-with-ressources when possible
This completes OFBIZ-9385, there are no other cases left.
There are few methods like FindServices.executeFind() or performFindParty
service which can't be improved because they return an EntityListIterator.
So methods using them must be carefully crafted to close the EntityListIterator.
Most where already documented (in the framework). I completed few in
applications at r1798495
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798566 13f79535-47bb-0310-9956-ffa450edef68
As noted in code the EntityListIterator was not closed for a "good" reason: it
might be used later by the framework though not passed as a var. I think I found
1 case where it's closed after the returned list have been used (in
EntityAnd.getChildren() in ModelTree.java); but I have to check the whole thing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798086 13f79535-47bb-0310-9956-ffa450edef68
Improved: Writer closed but not in case of exception
(OFBIZ-9388)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the Writer creation and before it's closed the
Writer remains in memory.
The solution is to use try-with-ressources when possible.
This also improves the way the EntityListIterator is closed, using
try-with-ressources instead of closing in case of exception
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797744 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9388)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the Writer creation and before it's closed the
Writer remains in memory.
The solution is to use try-with-ressources when possible, even when finally was
used (no problems then).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797742 13f79535-47bb-0310-9956-ffa450edef68
Improves EntityListIterator.close() warning
It was something like
ContentAssoc] has already been closed, not closing again.
It's now properly
This EntityListIterator for Entity [ContentAssoc] has already been closed,
not closing again.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797356 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9385)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the EntityListIterator creation and before it's
closed the EntityListIterator remains in memory.
It should be closed in EntityListIterator.finalize() but the less happens there
the better.
The solution is to use try-with-ressources
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797160 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9385)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the EntityListIterator creation and before it's
closed the EntityListIterator remains in memory.
It should be closed in EntityListIterator.finalize() but the less happens there
the better.
The solution is to use try-with-ressources
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797159 13f79535-47bb-0310-9956-ffa450edef68
from given freqCount raster.
(OFBIZ-9374)
If a job is scheduled using TemporalExpressions.Frequency the start time of the
job will gradually move forward when the excecution of the job is delayed by one
or more units of the frequency type.
Example: Job is set up to start at 2017-01-01 00:00:00 and run every ten
minutes. One month later due to some circumstances the job starts at
2017-02-01 00:01:01 which results in the next execution to be scheduled at
2017-02-01 01:11:00 in stead of 2017-02-01 01:10:00.
The reason behind this behaviour is the TemporalExpressions.Frequency#prepareCal
function. It has the purpose to jump from the first starting time to the latest
possible execution of the job. But instead it just sets it to the current time
(with the precision of the chosen frequency type) and calculates the next
execution time from this point.
Thanks: Tobias Laufkötter for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1796047 13f79535-47bb-0310-9956-ffa450edef68
I found an inconsistency in the code for string comparison statusId.equals("PRUN_COMPLETED") whereas it should be written as "PRUN_COMPLETED".equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks Devanshu Vyas for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795342 13f79535-47bb-0310-9956-ffa450edef68
with "id", "id-long" and "id-vlong" respectively which are primary keys
(OFBIZ-9354)
As discussed in http://markmail.org/message/d2tpovewhtotukwa the "not empty"
field types ("id-ne", "id-long-ne" and "id-vlong-ne") were initially added
to implement validations on data. But, because the validations where only
implemented in some place like webtools, it contradicts the distinction to be
upheld on various layers. So it is better to remove these field types.
So we will remove all those field types and will create sub tickets to replace
them in entity definitions by corresponding "id" types.
When replacing the "not empty" field types in entity definitions by
corresponding "id" types we will add a *not-null="true"* attribute to "makes
the field NOT NULL on the database (like primary key fields)" as explained in
"not-null" documentation in fieldtypemodel.xsd.
We will finally clean the documentation of the "not-null" in fieldtypemodel.xsd.
Deepak: If field is define as primary key field so by default is will be set as
not-null=true, so we can replace all the primary key field type from id-ne to id
in one shot.
Thanks: Deepak and Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794743 13f79535-47bb-0310-9956-ffa450edef68
screens for set element.
(OFBIZ-9251)
As stated in the discussion:
http://ofbiz.markmail.org/thread/hembr4hiabgwr7cs
"set-if-null" controls if field can be set to null and "set-if-empty" controls
if field can be set to an empty value. Both these attributes are supported by
"set" element of simple-method and similar support should be there on the screen.
jleroux: I fixed "if" formatting and added default="true" in widget-common.xsd
Thanks: Aditya Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794513 13f79535-47bb-0310-9956-ffa450edef68
When Adrian removed finished removing Javolution from the base component at
r1635910 https://s.apache.org/cwfE he routinely changed FastList to LinkedList
and FastMap to HashMap.
Actually those are just duplicates of ArrayList for LinkedList and strictly
HashMap for, er, HashMap.
This removes those useless line from the tests.
I wodered about it, but I hope noone will argue that we should keep LinkedList,
obviously ArrayList is enough there as a List implementation.
With this change the words fastlist and fastmap (case insensitive) no longer
exists in any OOTB files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794504 13f79535-47bb-0310-9956-ffa450edef68