Bug 780072 - (SOA-2438) business_ruleservice_stateful QS doesn't work as expected
business_ruleservice_stateful QS doesn't work as expected
Status: CLOSED WORKSFORME
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.1.0.ER3
Unspecified Unspecified
high Severity high
: ---
: 5.2.0 GA
Assigned To: tcunning
http://jira.jboss.org/jira/browse/SOA...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-19 07:41 EDT by Lukáš Petrovický
Modified: 2011-11-15 12:08 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-15 12:08:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
server.log (153.22 KB, text/plain)
2010-10-19 08:17 EDT, Lukáš Petrovický
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SOA-2438 None Closed business_ruleservice_stateful QS doesn't work as expected 2012-05-25 01:03:32 EDT

  None (edit)
Description Lukáš Petrovický 2010-10-19 07:41:44 EDT
project_key: SOA

After the second message is sent, business_ruleservice_stateful QS should set the discount on the second order to 10 %. Instead, the following is seen in server.log, stating that the discount is actually 0 %.

2010-10-19 13:12:56,924 INFO  [STDOUT] (pool-37-thread-1) set discount of 0.0 on order 2 for customer user1
2010-10-19 13:12:56,924 INFO  [STDOUT] (pool-37-thread-1) set discount of 0.0 on order 1 for customer user1
2010-10-19 13:12:56,924 INFO  [STDOUT] (pool-37-thread-1) Customer user1 now has a shopping total of 129.84
2010-10-19 13:12:56,925 INFO  [STDOUT] (pool-37-thread-1) set discount of 0.0 on order 2 for customer user1
2010-10-19 13:12:56,925 INFO  [STDOUT] (pool-37-thread-1) Customer user1 now has a shopping total of 129.84

The time the third message is sent, the discount is actually set to 10 %, with this in the server.log:

2010-10-19 13:37:19,701 INFO  [STDOUT] (pool-28-thread-1) set discount of 0.0 on order 3 for customer user1
2010-10-19 13:37:19,701 INFO  [STDOUT] (pool-28-thread-1) set discount of 0.0 on order 2 for customer user1
2010-10-19 13:37:19,701 INFO  [STDOUT] (pool-28-thread-1) set discount of 0.0 on order 1 for customer user1
2010-10-19 13:37:19,702 INFO  [STDOUT] (pool-28-thread-1) Customer user1 now has a shopping total of 194.76
2010-10-19 13:37:19,702 INFO  [STDOUT] (pool-28-thread-1) set discount of 10.0 on order 3 for customer user1
2010-10-19 13:37:19,702 INFO  [STDOUT] (pool-28-thread-1) set discount of 10.0 on order 3 for customer user1
2010-10-19 13:37:19,702 INFO  [STDOUT] (pool-28-thread-1) Customer user1 now has a shopping total of 194.76
2010-10-19 13:37:19,702 INFO  [STDOUT] (pool-28-thread-1) Customer user1 now has a shopping total of 194.76

It seems as if a different Customer instance is picked when the rules are fired the second time - the instance that still has the discount set to 0 %. This would suggest some faulty behavior wrt. classloading, perhaps even SOA-2419.
Comment 1 Kevin Conner 2010-10-19 08:06:37 EDT
Very unlikely to be SOA-2419 unless you redeployed, and even then I suspect that no rules would fire.

I have just ran the same QS and seen the discount applied on the second invocation, can you describe what you have done and add your server.log file?
Comment 2 Lukáš Petrovický 2010-10-19 08:16:29 EDT
Started the SOA-P production config (absolutely clean, just unzipped), deployed the QS, and then "ant runtest". I should perhaps add that I am using OpenJDK:

OpenJDK Runtime Environment (IcedTea6 1.9.1) (fedora-44.1.9.1.fc14-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b06, mixed mode)

server.log coming in a minute.
Comment 3 Lukáš Petrovický 2010-10-19 08:17:02 EDT
Attachment: Added: server.log
Comment 4 Kevin Conner 2010-10-19 10:16:27 EDT
Assigned to me for investigation
Comment 5 tcunning 2011-07-08 14:37:08 EDT
Link: Added: This issue is related to JBESB-3628
Comment 6 tcunning 2011-08-04 14:58:34 EDT
The discount is only applied when the order total *before* the new order is added in is $100 or above.    So in other words, if you change Order1's total to 99.99, no discount on order 2, because the total before Order2 is $99.99.   Change Order1's total to 100.00, you get a 10% discount on Order2.

I'll add some text clarifying this and add expected results to the readme.txt.
Comment 7 tcunning 2011-08-04 15:20:22 EDT
Added expected results to readme.
Comment 8 David Le Sage 2011-09-07 21:57:14 EDT
Release Notes Docs Status: Added: Not Required
Writer: Added: dlesage

Note You need to log in before you can comment on or make changes to this bug.