This has been discussed before, but I will mention it again for instruction: GenericEntity instances that are kept in the entity cache are shared among multiple threads. Therefore, they must be immutable. If you get a GenericEntity instance from the cache and you want to modify it, you must clone it first.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1547790 13f79535-47bb-0310-9956-ffa450edef68
The idea is to avoid ThreadLocal with custom classes, this can lead to memory leaks when an external application server is used.
Reverts r1075322 (commit for OFBIZ-4107) hence removes CompilerMatcher
Uses PatternFactory instead of CompilerMatcher class (from CompilerMatcher keeps the compiled patterns cache idea)
In UtilHttp.java
Removes dead code
Removes useless "UtilHttp." for class methods and constants calls (moot point, have we conventions on this?).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542960 13f79535-47bb-0310-9956-ffa450edef68
The original code would provide a null or empty password (depending on code branching) if no password was configured, so I wasn't able to determine what the desired behavior was. Now an exception is thrown if there is no JDBC password, and datasource connection attempts fail gracefully.
If we want to support 'authenticationless' JDBC connections, then this will need to be looked at again.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533202 13f79535-47bb-0310-9956-ffa450edef68
* Removes useless commented out blocks of <group-maps in <delegators definitions
* Removes now useless localpostnew <datasource definition
* Default the result-fetch-size attribute to 50, and comment about older unsupported versions of jdbc drivers
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531269 13f79535-47bb-0310-9956-ffa450edef68
At r1529674 I forgot that CC numbers are encoded in DB and CC dates are not 4 (1013) but 7 chars (10/2013)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530235 13f79535-47bb-0310-9956-ffa450edef68
1. The only exception caught was GenericEntityException, so any other thrown exception was missed - meaning the transaction was committed and GenericDelegator acted as if nothing was wrong.
2. The commit was performed in the finally block, so it was ALWAYS performed - even after an exception was thrown and the transaction was rolled back.
We managed to get away with this all along because typically there is a wrapping transaction that clears it all up. But still, the Delegator code needs to handle transactions correctly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527810 13f79535-47bb-0310-9956-ffa450edef68
I believe the original intention was to perform the validation check after the EV_VALIDATE ECAs were run, but the primary key was being used in three method calls before that happened - so those methods could have been passed an invalid primary key.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527609 13f79535-47bb-0310-9956-ffa450edef68
* Deprecates methods in Delegator interface and class
* Deprecates cache clear related variable and methods in EntitySaxReader class
* Deprecates cache clear related variables in minilang related delegator classes
* In simple-method schema annotations, marks do-cache-clear attribute as deprecated
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524704 13f79535-47bb-0310-9956-ffa450edef68
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
of having to deal with some kind of map/generic value. This makes it
simpler to use full-text-search queries thru the entity
engine(postgresql and oracle).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497893 13f79535-47bb-0310-9956-ffa450edef68
field, then we need to be certain to remove the existing defined field
from the list of available fields. Otherwise, you'll end up with the
same field being queried in SELECT, and the same field being updated in
INSERT or UPDATE.
This issue was discovered when changing the type of a pre-existing
field(so that the length of the field could be increased).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497889 13f79535-47bb-0310-9956-ffa450edef68
1. Added file name and line number to validation code so exceptions can show where things went wrong.
2. Convert some attributes to primitive types.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490535 13f79535-47bb-0310-9956-ffa450edef68
There was some code to check for this, but it was testing a "fields to select" List that was never empty, so SELECT * was never used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1486552 13f79535-47bb-0310-9956-ffa450edef68