Bug 780072 (SOA-2438) - business_ruleservice_stateful QS doesn't work as expected
Summary: business_ruleservice_stateful QS doesn't work as expected
Keywords:
Status: CLOSED WORKSFORME
Alias: SOA-2438
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.1.0.ER3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0 GA
Assignee: tcunning
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-19 11:41 UTC by Lukáš Petrovický
Modified: 2011-11-15 17:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-15 17:08:06 UTC
Type: Bug


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2438 0 None Closed business_ruleservice_stateful QS doesn't work as expected 2012-05-25 05:03:32 UTC

Description Lukáš Petrovický 2010-10-19 11:41:44 UTC
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 12:06:37 UTC
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 12:16:29 UTC
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 12:17:02 UTC
Attachment: Added: server.log


Comment 4 Kevin Conner 2010-10-19 14:16:27 UTC
Assigned to me for investigation

Comment 5 tcunning 2011-07-08 18:37:08 UTC
Link: Added: This issue is related to JBESB-3628


Comment 6 tcunning 2011-08-04 18:58:34 UTC
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 19:20:22 UTC
Added expected results to readme.

Comment 8 David Le Sage 2011-09-08 01:57:14 UTC
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.