and declared indices, do the work in parallel. Also, when the database
does not support wildcard looking of primary key info, do the per-table
lookup in parallel.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139851 13f79535-47bb-0310-9956-ffa450edef68
In view entity definition, we can use <condition-expr> to create a filter condition between field and some value using specific operator. It should be also possible to make condition between field and rel-field through some kind operator. Such as:
<view-entity entity-name="xxx" package-name="xxx">
...
<entity-condition>
<condition-expr entity-alias="A" field-name="a" operator="equals" rel-entity-alias="B" rel-field-name="b" />
</entity-condition>
</view-entity>
But there's a trivial defect in current ModelViewEntity which prevent this case working.
} else if ( value == null && (operator.equals(EntityOperator.EQUALS) || operator.equals(EntityOperator.NOT_EQUAL))) {
return EntityCondition.makeCondition(lhs, UtilGenerics.<EntityComparisonOperator<?,?>>cast(operator), null);
} else {
In the above code extracted from ModelViewEntity, it does not consider the condition that the relField could be defined when value==null.
JLR:I checked that || should not be used in <<value == null && this.relFieldName>>, it was not obvious to me but is correct
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1137201 13f79535-47bb-0310-9956-ffa450edef68
Simply avoid to start a JMS Listener thread from Job Manager when DCC is on. Then set it back to previous value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1131144 13f79535-47bb-0310-9956-ffa450edef68
Test mode rollback doesn't work right in GenericDelegator for calls to removeByPrimary() key and removeByValue() when the row to be deleted didn't exist in the first place. It creates a TestOperation with a null value and subsequently fails to create that during rollback.
First, the TestOperation shouldn't be created at all. Second, if null is passed to GenericDelegator.create() it tries to handle this, but fails with a NullPointerException.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1104423 13f79535-47bb-0310-9956-ffa450edef68
XmlFileLoader: File file:.....framework/entity/config/entityengine.xml process fatal error. Line: 686. Error message: Invalid byte 2 of 2-byte UTF-8 sequence.
After having manually put back the line modified by an automatically applied patch, I got this mis-representation. Not sure why, and anyway had no chances to think about it (certainly due to a difference on how UTF-8 was represented on these servers and on my machine - XP with Putty and SSH)
So I remove this weirdness to prevent future possible nervous crises ;o)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1104173 13f79535-47bb-0310-9956-ffa450edef68
<<Slight improvement to prevent false error messages when putting spaces in readers names, eg after commas for instance>>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1097712 13f79535-47bb-0310-9956-ffa450edef68
We found an infinite loop when instantiate the delegator. This happens when you use the distributetCacheClear .
I moved the init of the dist cache clear to a separate method and call it in the factory which resolves the loop issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090952 13f79535-47bb-0310-9956-ffa450edef68
sql-Timestamp is defined as xsd:dateTime in ModelService.getTypes(), so try to parse the value as xsd:dateTime first.
Fallback is java.sql.Timestamp because it has been this way before.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1087883 13f79535-47bb-0310-9956-ffa450edef68
Thanks Martin & Dimitri for your effort.
Orig. Msg.:
The Perl5Matcher Perl5Compiler are not thread safe, as mentioned in their documentation: http://jakarta.apache.org/oro/api/org/apache/oro/text/regex/Perl5Compiler.html
A separate instance should be used per thread.
The concrete issue occurred in our system in the createCommContentDataResource service. The service tries to save emails to the database after they have been sent. It failed because of the described issue. This caused the whole email service (sendMailFromScreen) to be rescheduled. So customers got emails twice.
The Perl5Matcher and Perl5Compiler instances are assigned to static fields in the org.ofbiz.minilang.method.ifops.IfRegexp class. So every thread will use the same instance. No synchronization is done currently. Changing the fields to be non-static will not work either, as SimpleMethods are cached. So all calls to the same simple method use the same IfRegexp instance.
We fixed the problem by moving the instantiation of the Perl5Matcher and Perl5Compiler to the exec() method in IfRegexp.
Other classes are most likely affected, too: org.ofbiz.entity.condition.EntityComparisonOperator, org.ofbiz.minilang.method.conditional.RegexpCondition, org.ofbiz.minilang.operation.Regexp, org.ofbiz.widget.menu.ModelMenuCondition$IfRegexp, org.ofbiz.widget.screen.ModelScreenCondition$IfRegexp, org.ofbiz.widget.tree.ModelTreeCondition$IfRegexp
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075322 13f79535-47bb-0310-9956-ffa450edef68