Commit Graph
878 Commits
Author SHA1 Message Date
Jacques Le Roux feecb15093 "Housekeeping of jar files" https://issues.apache.org/jira/browse/OFBIZ-4833
Moves Minerva and XAPool to Attic

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356471 13f79535-47bb-0310-9956-ffa450edef68
2012-07-02 20:29:54 +00:00
Adrian Crum dfb74cc196 Fixed some bugs in EntityFinderUtil.java:
1. LimitRange and LimitView classes treated ELI and List indexes the same - causing inconsistent results because ELI indexes are one-based and List indexes are zero-based.
2. LimitRange and LimitView classes returned different results at the end of the list depending on whether an ELI or List was being used.
3. LimitView class view index calculation was wrong.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356201 13f79535-47bb-0310-9956-ffa450edef68
2012-07-02 12:16:36 +00:00
Adrian Crum 83c60b16da Small fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356168 13f79535-47bb-0310-9956-ffa450edef68
2012-07-02 10:33:49 +00:00
Adrian Crum 523436cb76 Some optimizations in EntityFinderUtil.java:
1. Made the Condition implementations immutable and thread-safe.
2. Moved operator lookup from run-time to parse-time.
3. Removed unnecessary calls to UtilValidate.
4. Replaced LinkedList with ArrayList.
5. Optimized code in the ConditionExpr.createCondition method.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356024 13f79535-47bb-0310-9956-ffa450edef68
2012-07-01 20:54:23 +00:00
Jacopo Cappellato 15fe323128 Removed some junk and unused code left over after the commit:
Author: jleroux
Date: Fri Jun  3 19:05:07 2011
New Revision: 1131144

was "reverted" as part of:
 
 Author: jleroux
 Date: Fri Sep 23 19:22:40 2011
 New Revision: 1174964
 
 The code is still broken.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353094 13f79535-47bb-0310-9956-ffa450edef68
2012-06-23 08:33:01 +00:00
Hans Bakker 5ea30aab8f tenant data in the entity component is meant for demo, so demo data. comment from Adam
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351213 13f79535-47bb-0310-9956-ffa450edef68
2012-06-18 06:40:31 +00:00
Hans Bakker 14f4e5a292 reverted recent security file changes revisions: 1350847,1350843,1350840,1348534,1347908,1347213,1346264, need more investigation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351206 13f79535-47bb-0310-9956-ffa450edef68
2012-06-18 04:36:20 +00:00
Hans Bakker a8040d7806 security should be loaded first
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1347213 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 00:04:08 +00:00
Hans Bakker f6a992b6ee tenant data in the entity component is meant for demo, so demo data. comment from Adam
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1346713 13f79535-47bb-0310-9956-ffa450edef68
2012-06-06 02:20:54 +00:00
Hans Bakker d2ae6af774 enable tenant demo data
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1346269 13f79535-47bb-0310-9956-ffa450edef68
2012-06-05 07:35:26 +00:00
Hans Bakker fff7f99081 introduced a new data-reader : 'security'
Security is now by default not loaded because not part of seed anymore this will make all component hidden and not accessible .
It is still loaded as part of the reader 'demo'

to load the security files:
./ant load-readers -Ddata-readers=security

Now it is possible to load only a selection of the security files in your hot-deploy component as follows:

<entity-resource type=data reader-name=seed loader=main location=../../framework/security/data/SecurityData.xml/>
<entity-resource type=data reader-name=seed loader=main location=../../framework/webtools/data/WebtoolsSecurityData.xml/>
<entity-resource type=data reader-name=seed loader=main location=../../applications/party/data/PartySecurityData.xml/>

This will enable only standard groups, the party and the webtools application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1346255 13f79535-47bb-0310-9956-ffa450edef68
2012-06-05 06:37:06 +00:00
Jacopo Cappellato df927cd6dd Fixed lock that was set to the wrong class (this was probably caused by a copy and paste error).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1345001 13f79535-47bb-0310-9956-ffa450edef68
2012-06-01 07:13:59 +00:00
Jacopo Cappellato f6fc46c679 Removed default value for the attribute for inline-jdbc used to specify an XA wrapper class: it was set to a specific implementation (Enhydra).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1344999 13f79535-47bb-0310-9956-ffa450edef68
2012-06-01 07:10:39 +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 d9a34a8c8c Deprecate EntityUtil.getRelated(ByAnd|OrderBy)(|Cache), replaced with
the single getRelated variant.

EntityUtil.getRelatedByAnd(String, Map) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

EntityUtil.getRelatedByAndCache(String, Map) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

EntityUtil.getRelatedOrderBy(String, List) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

EntityUtil.getRelatedOrderByCache(String, List) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343532 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:21:38 +00:00
Adam Heath 4a0f383a5a Deprecate GenericValue.getRelated(ByAnd|OrderBy)(|Cache), replaced with
the single getRelated variant.

GenericValue.getRelatedByAnd(String, Map) replaced by
GenericValue.getRelated(String, Map, List, boolean)

GenericValue.getRelatedByAndCache(String, Map) replaced by
GenericValue.getRelated(String, Map, List, boolean)

GenericValue.getRelatedOrderBy(String, List) replaced by
GenericValue.getRelated(String, Map, List, boolean)

GenericValue.getRelatedOrderByCache(String, List) replaced by
GenericValue.getRelated(String, Map, List, boolean)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343531 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:21:21 +00:00
Adam Heath e3c2dac101 DEPRECATION: framework: GenericValue.getRelated(ByAnd|OrderBy)(|Cache)
replaced by the single getRelated variant.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343527 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:20:26 +00:00
Adam Heath fb698e509b Deprecate all GenericValue.getRelated and GenericValue.getRelatedCache,
and add a version that takes a cache parameter.

Continuing the simplication of the entity api, this is the final step to
replacing all the GenericValue.getRelated(and cache versions as well)
with a variant that takes a boolean useCache parameter.

GenericValue.getRelated(String) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelated(String, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelated(String, Map, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelatedCache(String) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelatedCache(String, Map, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343526 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:20:19 +00:00
Adam Heath 83d37a796b DEPRECATION: framework: GenericValue.getRelated/getRelatedCache variants replaced with a single getRelated variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343509 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:17:17 +00:00
Adam Heath 21c0cef59e DEPRECATION: Add a new GenericValue.getRelated() variant that takes a
boolean useCache parameter.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343508 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:57 +00:00
Adam Heath fb3e3bb557 Deprecate all Delegator.getRelated and Delegator.getRelatedCache
and add a version that takes a cache parameter.

This Continuing the simplication of the entity api, this is the final step to
replacing all the GenericValue.getRelated(and cache versions as well)
with a variant that takes a boolean useCache parameter.

Delegator.getRelated(String, Map, List, GenericValue) is replaced by
Delegator.getRelated(String, Map, List, GenericValue, boolean).

Delegator.getRelatedCache(String, GenericValue) is replaced by
Delegator.getRelated(String, Map, List, GenericValue, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343507 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:51 +00:00
Adam Heath c9eaf52fc9 FEATURE: Add new Delegator.getRelated that takes a boolean useCache
parameter; all internal calls from GenericDelegator and GenericValue
have been modified to use the new method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343506 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:42 +00:00
Adam Heath 5bc50ed5f2 Deprecate GenericValue.getRelatedOne/getRelatedOneCache, and add
a version that takes a cache parameter.

Yet again, another simplication of the delegator api.  This replaces
all simple getRelatedOne type methods with a single version that takes
all possible arguments.

GenericValue.getRelatedOne(String) is replaced by
GenericValue.getRelatedOne(String, boolean).

GenericValue.getRelatedOneCache(String) is replaced by
GenericValue.getRelatedOne(String, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343504 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:26 +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
Adam Heath 9e8ddebcac FEATURE: Add GenericValue.getRelatedOne that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343477 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:58 +00:00
Adam Heath 7cf7538567 Deprecate all Delegator.getRelatedOne/getRelatedOneCache, and add a
version that takes a cache parameter.

This commit finishes the Delegator.getRelatedOne set of changes; the
previous methods are now deprecated, and the new ones should be used
going forward.

Delegator.getRelatedOne(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).

Delegator.getRelatedOneCache(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343476 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:52 +00:00
Adam Heath 221b2c0312 FEATURE: Add Delegator.getRelatedOne variant that takes a boolean useCache parameter.
Rework internal GenericDelegator methods to call the new method, but no
other external classes directly call this new one yet.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343475 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:44 +00:00
Adam Heath ce8e0a2c24 FIX: Found a local case of findByPrimaryKey usage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343471 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:09:53 +00:00
Adam Heath 1ba97a3210 FIX: This is the correct fix for 1343088;
TransactionUtil.doNewTransaction was starting a new transaction, then
immediately suspending it.  This caused confusion in calling code that
tried to use doNewTransaction.  Fortunately, this was not used very
much,

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343469 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:55:05 +00:00
Adam Heath a2d4b1b5e3 OPTIMIZE: Change return type of noTransaction(Callable) to
NoTransaction; it used to be Callable.  NoTransaction implements
Callable.  This change requires a recompile, but is otherwise
compatible with calling code.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343468 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:58 +00:00
Adam Heath b829aa5d60 FEATURE: Change NoTransaction.call() to throw GenericEntityException
instead of Exception.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343467 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:51 +00:00
Jacopo Cappellato 247c205188 Improved code that manages the cache:
* replaced putIfAbsent + get with putIfAbsentAndGet to avoid the risk of a NPE if the cache entry is removed (or expired) between the two calls



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343287 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:32:28 +00:00
Jacques Le Roux baa73733d2 Where it shows that maintaining help is not that easy. Unlike Javadoc you don't have under eyes when changing things
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343030 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 10:41:13 +00:00
Jacopo Cappellato 8c28b9751b Modified validation query (executed by DBCP to verify that a connection is valid before borrowing it) to remove dependency on the the "example" component; thanks to Adam Heath and Jacques Le Roux for the suggestions and tests to find out a proper SQL statement (db independent and efficient).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342310 13f79535-47bb-0310-9956-ffa450edef68
2012-05-24 16:12:05 +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
Jacopo Cappellato 79ae52492a Refactored code to use the default BeansWrapper defined by FreemarkerWorker; this is important according to comment from one of the Freemarker committers:
"As of creating new BeansWrapper, be sure you create it only once during the application life-cycle and then reuse the same instance, or else it will have to rebuild the class introspection cache again and again."

Thanks to Adam Heath for the comment.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340631 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 07:49:45 +00:00
Adam Heath abdead8200 Remove errant NOTE for 2008 that was part of a cut-n-waste.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338735 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 14:45:45 +00:00
Adam Heath 6299c90426 Deprecate all Delegator.findByAnd and Delegator.findByAndCache;
introduce a new Delegator.findByAnd variant that takes a boolean cache
parameter.

This change continues the simplication of the delegator api.  There is
no longer a version of a method with a 'Cache' suffix; instead, a single
version now exists that takes a boolean cache parameter.  Also, there
has been a trend to remove several method variants that take different
numbers and types of parameters, instead preferring to fully specify all
parameters; this also continues that trend.

Delegator.findByAnd(String, Map) is replaced with findByAnd(String, Map,
null, false).

Delegator.findByAnd(String, Map, List) is replaced with
findByAnd(String, Map, List, false).

Delegator.findByAnd(String, Object...) is replaced with
findByAnd(String, Map, null, false).  The object array is converted to a
map by using UtilMisc.toMap(Object...).

Delegator.findByAndCache(String, Map) is replaced with findByAnd(String,
Map, null, true).

Delegator.findByAndCache(String, Map, List) is replaced with
findByAnd(String, Map, List, true).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338424 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 21:03:45 +00:00
Adam Heath 9e5f405a4d DEPRECATION: framework: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338403 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:54 +00:00
Adam Heath 321196326a OPTIMIZE: One findByAnd call was calling another findByAnd, instead of
calling findList directly.  This change should speed it up(just
slightly).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338402 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:26 +00:00
Adam Heath 14db0dbfda DEPRECATION: Add new findByAnd variant, that has a boolean useCache
parameter; this is the same similiar pattern that other methods have.

After all code has been modified to use this new method, the older
methods will be deprecated(and eventually replaced).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338400 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:20 +00:00
Jacopo Cappellato cef1cccf82 OFBIZ-4864
* enabled by default the DebugManagedDataSource wrapper around ManagedDataSource
* enhanced the DebugManagedDataSource wrapper to:
** print log messages only at verbose level (instead of always as it was before)
** if possible print additional information about the connection status
** added new method that returns information about the connection pool settings/status
* added new static method to DBCPConnectionFactory to return information about the pools
* new screen in the webtools where information about each pool/helper is shown
The information provided by the screen can be very useful to analyze the status of the connection pools.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338230 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 14:45:43 +00:00
Jacques Le Roux ef02599c23 Removes the ij.script and derbytools-10.8.2.2.jar.
Reasons for this:
 * no active committer was maintaining it
 * it's maintained by the Derby project, see http://db.apache.org/derby/docs/dev/tools/ for details


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338173 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 12:03:58 +00:00
Adam Heath 2b3fdc9379 Deprecate Delegator.findByPrimaryKey and Delegator.findByPrimaryKeyCache.
Ofbiz is moving towards simpler delegator apis; this means all
'fooCache' variants are removed(and their matching 'foo' method), and a
new version of 'foo' added that takes a boolean cache parameter.

Delegator.findByPrimaryKey(String, Map) is replaced with
findOne(String, Map, false).

Delegator.findByPrimaryKeyCache(String, Map) is replaced with
findOne(String, Map, true).

Delegator.findByPrimaryKey(String, Object...) is replaced with
findOne(String, false, Object...).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337688 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:22:26 +00:00
Ashish Vijaywargiya e0971b304c Applied similar fix as we did on trunk r1300463.
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)

Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-09 05:28:17 +00:00
Adam Heath 6cd099d6fd FEATURE: Key-encrypting-key(kek) support is now enabled. To enable
support for this, run:

java org.ofbiz.base.crypto.Main -kek

and paste that value as a new attribute in entityengine.xml, <delegator
key-encrypting-key="$kekText"/>.  Make certain to add that attribute to
*all* delegators that share the same datasources.

ps: That java command should really be added to build.xml.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335268 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 21:27:32 +00:00
Adam Heath 48062a3c41 FIX: There is a problem with tenant kek support, this should fix it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335064 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 15:29:28 +00:00
Hans Bakker 7f14038f90 fix duplicate relation name
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 08:58:06 +00:00
Adam Heath f1be0a1e0c FEATURE: Add key-encrypting-key support; this is to bring ofbiz *much*
closer to PCI compliance.  This key handler is *still* not active.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334257 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:37:06 +00:00
Adam Heath 48a8ed8b34 OPTIMIZE: Move delegatorInfo assignment into the constructor; in all
cases, this will always be configured, so might as well do it early.
This really should be final, but that change will come later.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334256 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:56 +00:00