Commit Graph
734 Commits
Author SHA1 Message Date
Adam Heath 8fba300516 FIX: When the rhs was an EntityFieldValue, the wrong model field was being
checked(it was checking the left field).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139856 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:44 +00:00
Adam Heath 0653d3a7d1 FEATURE: When doing bulk creation of tables, foreign key indices,
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
2011-06-26 18:07:18 +00:00
Adam Heath 1af60a7143 FEATURE: Add a thread pool to GenericHelper; this is per datasource.
Nothing makes use of this yet.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139700 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:49 +00:00
Jacques Le Roux 7a9e80e6ef A patch from Leon "Trivial patch to ModelViewEntity class to make view entity able to handle entity condition between field from one entity and another" https://issues.apache.org/jira/browse/OFBIZ-4321
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
2011-06-18 15:17:22 +00:00
Erwan de Ferrieres e1c4ec0c5d when sorting on more than 1 criteria, only the last one was used
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1136833 13f79535-47bb-0310-9956-ffa450edef68
2011-06-17 10:06:50 +00:00
Jacques Le Roux e6539dc8fc Closes "JmsTopicListener started twice when distributed-cache-clear is active" reported by Martin Kreidenweis at https://issues.apache.org/jira/browse/OFBIZ-4296
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
2011-06-03 19:05:07 +00:00
Marco Risaliti c44b4beb0f Removed some javadoc warning (wrong param/return) into entity component no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126715 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 20:23:32 +00:00
Jacques Le Roux 0bc35e7275 A patch from Martin Kreidenweis "NullPointerException in GenericDelegator during testMode rollback" https://issues.apache.org/jira/browse/OFBIZ-4284
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
2011-05-17 17:25:52 +00:00
Jacques Le Roux 87f0cfbb36 I got caught by this typo on a production cluster:
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
2011-05-17 11:54:11 +00:00
Erwan de Ferrieres 07a566932d Upgrading derby to 10.8.1.2 - changelog is here http://db.apache.org/derby/releases/release-10.8.1.2.cgi
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1103767 13f79535-47bb-0310-9956-ffa450edef68
2011-05-16 15:27:39 +00:00
Jacques Le Roux 5c8fbb779d Fix the comment of the not-null attribute (field element)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1100729 13f79535-47bb-0310-9956-ffa450edef68
2011-05-08 13:01:30 +00:00
Jacques Le Roux f90dcae786 Add an explicit comment about use-indices-unique="false" which is needed because of Derby bug with null values in a unique index
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1099727 13f79535-47bb-0310-9956-ffa450edef68
2011-05-05 09:09:39 +00:00
Jacques Le Roux 0f99d5d983 I did it wrong in r1094600 and just noticed
<<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
2011-04-29 07:43:56 +00:00
Adrian Crum 79a144483d Bug fix: Entity ModelInfo default info was not working.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1095029 13f79535-47bb-0310-9956-ffa450edef68
2011-04-19 11:17:01 +00:00
Jacques Le Roux 4ba28611c0 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@1094600 13f79535-47bb-0310-9956-ffa450edef68
2011-04-18 14:40:15 +00:00
Jacques Le Roux a3a109e366 A patch from Sascha Rodekamp "Infinite loop when instantiate the delegator using distributetCacheClear" https://issues.apache.org/jira/browse/OFBIZ-3987
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
2011-04-11 07:03:32 +00:00
Hans Bakker 4931953320 Extended error message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090909 13f79535-47bb-0310-9956-ffa450edef68
2011-04-10 23:24:12 +00:00
David E. Jones 8f80abdb52 Added code to keep track of where transactions are suspended to help diagnose lock wair timeout types of errors; also small cleanup with new getSuspendedTxStack instead of that code duplicated for each method
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1088875 13f79535-47bb-0310-9956-ffa450edef68
2011-04-05 03:32:07 +00:00
Jacques Le Roux df2c499190 Better handling of the sql-timestamp case (follow ISO format by default)
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
2011-04-01 20:22:46 +00:00
Scott Gray 686033475f Added check for presence of the max-idle attribute before attempting to parse its value
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1081689 13f79535-47bb-0310-9956-ffa450edef68
2011-03-15 09:08:28 +00:00
Sascha Rodekamp 4ce5654fc9 Improvement - Added a new method: getRelatedByAndCache because there is only a methode getRelatedByAnd which uses no cache.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1079456 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 18:09:47 +00:00
Marco Risaliti 582b2b4cca Remove some warning in GenericDelegator (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078214 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 23:22:13 +00:00
Marco Risaliti 4074ec00db Remove some warning in ModelViewEntity (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078212 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 23:19:24 +00:00
Marco Risaliti e156beeb76 Remove some warning in SqlJdbcUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078211 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 23:18:33 +00:00
Marco Risaliti 88cda83037 Remove some warning in ModelFieldType (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1078210 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 23:18:16 +00:00
Erwan de Ferrieres f1f6fbc85e When displaying a view, using at first the default-resource and the view entity-name for entitylabels then the entity. Before only the entity was read
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1077951 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 14:05:03 +00:00
Erwan de Ferrieres cfe25142ae When using a view and fields with different names than in the original entity, the model was taking the original names so this could lead to warnings
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1077940 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 13:36:11 +00:00
Marco Risaliti fed87a3cbd Remove a warning in EntityUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076851 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 22:31:42 +00:00
Marco Risaliti 06f4d340a8 Remove some warning in XmlSerializer (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076843 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 22:22:59 +00:00
Marco Risaliti 55d029ee2c Remove some warning in EntityConditionPlanner (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076841 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 22:21:31 +00:00
Marco Risaliti d067c65f81 Remove some warning/unused variable in EntityPlanner (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076840 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 22:20:56 +00:00
Marco Risaliti abb3c8b436 Remove some warning in EntitySelectPlan (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076837 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 22:19:03 +00:00
Scott Gray c9ec4ae824 Add inline-jdbc attribute idle-maxsize for greater control over the max idle connections that should remain in the pool. Previously it was always set to half of pool-maxsize (and still defaults to this value)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1076114 13f79535-47bb-0310-9956-ffa450edef68
2011-03-02 06:31:38 +00:00
Marco Risaliti 2b1f993292 Remove some warning in EntityFinderUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075521 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 20:36:29 +00:00
Marco Risaliti 8fc1103633 Add some @SuppressWarning("serial") in EntityFinderUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075512 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 20:13:30 +00:00
Marco Risaliti 321e1ef08d Remove an unused variable in GenericDAO (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075510 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 20:02:07 +00:00
Marco Risaliti f729c27c2d Remove an unused import in GenericDelegator (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075507 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 19:53:15 +00:00
Marco Risaliti a14d03ccde Remove an unused import in EntityComparisonOperator (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075506 13f79535-47bb-0310-9956-ffa450edef68
2011-02-28 19:51:42 +00:00
Sascha Rodekamp 40f52ad764 Improvement - if-regexp conditions in Minilang and Screens not thread safe (https://issues.apache.org/jira/browse/OFBIZ-4107). I added another getTestPattern Method to support case insensitive tests. The case insensitive testPattern is needed from the UtilHttp.checkURLforSpiders.
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
2011-02-28 13:43:23 +00:00
David E. Jones bcae85b5f4 Reduced logging of an exception that is just rethrown, still logs error but not full stack trace
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1073196 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 01:18:55 +00:00
David E. Jones 3b20b9c06f Reversing accidental commit in rev 1072292
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1072301 13f79535-47bb-0310-9956-ffa450edef68
2011-02-19 10:38:13 +00:00
David E. Jones 2d28cc3d66 VUA-429 full implementation to add a path through the screens for creating a sales order for a contact and add a customer for the contact in the process
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1072292 13f79535-47bb-0310-9956-ffa450edef68
2011-02-19 10:13:50 +00:00
Marco Risaliti 714b091780 Remove an unused variable/import in EntityDataAssert (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1069072 13f79535-47bb-0310-9956-ffa450edef68
2011-02-09 20:36:18 +00:00
Marco Risaliti 8db113dee2 Add a @SuppressWarning("serial") in EntityFindOptions (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068649 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:34:48 +00:00
Marco Risaliti 650214e0fe Add a @SuppressWarning("serial") in ByteWrapper (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068647 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:34:11 +00:00
Marco Risaliti 402fa9441d Add a @SuppressWarning("serial") in GenericTransactionException (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068646 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:33:24 +00:00
Marco Risaliti d5eb73c6ac Remove unused import in SQLUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068644 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:32:51 +00:00
Marco Risaliti b0087a4e99 Add a @SuppressWarning("serial") in SerializeException (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068643 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:31:47 +00:00
Marco Risaliti a5bfa1cca0 Add a @SuppressWarning("serial") in ModelRelation (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068642 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:30:59 +00:00
Marco Risaliti 860fbdff0e Add a @SuppressWarning("serial") in ModelKeyMap (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068641 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:30:33 +00:00