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
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
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
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
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
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
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
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
* 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
"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
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
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
* 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
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
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
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
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
base-64 crypted({hashType}$text), key values are base64 encoded,
encrypted row values are $salt$encoded. Note, however, that this code
is not yet active, as it hasn't been added to the list of key handlers.
This new handler is *not* active yet.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334255 13f79535-47bb-0310-9956-ffa450edef68
classes and concrete instances. This allows for adding new types of key
management blocks, so that enhanced features can be added. No
functional changes have actually been implemented yet; all existing
systems should behave *exactly* the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334254 13f79535-47bb-0310-9956-ffa450edef68
longer a need to pre-populate the EntityKeyStore table with 20 random
keys; in reality, these 20 keys were enought to expand the keyMap
HashMap's internal structure, to a size that wouldn't normally be
auto-expanded during production. And it was this lack of auto-expanding
that was keeping the map from becoming corrupted in very rare
circumstances.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334252 13f79535-47bb-0310-9956-ffa450edef68
rest of the code. The key stored in the database is not only just for
decrypting or encrypting, it's just a key.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334214 13f79535-47bb-0310-9956-ffa450edef68
into two separate methods; a find for an old-style hashed key will no
longer create the old-style key. This commit does not fix the existing
issue when multiplle threads try to encrypt a value with a key that
hasn't been created or loaded from the database yet; that is still to
come.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334212 13f79535-47bb-0310-9956-ffa450edef68
now follow the same form: (String hashType, ..., String valueToHash).
Some methods also follow a polish notation suffix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334172 13f79535-47bb-0310-9956-ffa450edef68