Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 904949

Summary: StaleObjectStateException: upon process signalling.
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Marek Baluch <mbaluch>
Component: JBossESBAssignee: tcunning
Status: CLOSED UPSTREAM QA Contact: Marek Baluch <mbaluch>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.3.1CC: oskutka, soa-p-jira
Target Milestone: CR1Keywords: Reopened
Target Release: 5.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:27:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marek Baluch 2013-01-28 09:00:16 UTC
Description of problem
----------------------
For a simple process with expects another message after an instance has been created the signal can be made just once. In case another instance is created then the attempt to signal will fail with a 

StaleObjectStateException: Row was updated or deleted by another transaction. 

Looks like the issue is related to the method:
public Environment getEnvironment(Map<String, Object> overrides);

This method creates a new Environment each time it's called which seems to be the source of the problem.


How reproducible
----------------
Use the attached quickstart.


Steps to Reproduce
------------------
1. ant deploy
2. ant runtest (first run is OK)
3. ant runtest (second run will FAIL)
  
Actual results: output from steps to reproduce 2 and 3
------------------------------------------------------
##### Starting process: 
[Empty].
Hello 1: Laurel
##### Process started: 
[Empty]
##### Signalling process: 
[Empty]
Hello 2: Hardy
##### Process signalled:

##### Starting process: 
[Empty].
Hello 1: Laurel
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)


Expected results: output from steps to reproduce 2 and 3
--------------------------------------------------------
##### Starting process: 
[Empty].
Hello 1: Laurel
##### Process started: 
[Empty]
##### Signalling process: 
[Empty]
Hello 2: Hardy
##### Process signalled:

##### Starting process: 
[Empty].
Hello 1: Laurel
##### Process started: 
[Empty]
##### Signalling process: 
[Empty]
Hello 2: Hardy
##### Process signalled:

Comment 1 Marek Baluch 2013-01-28 09:43:20 UTC
Created a duplicate by mistake. BZ had some "service not available" issues and the record was created twice.

Closing this one as duplicate.

*** This bug has been marked as a duplicate of bug 904952 ***

Comment 2 Marek Baluch 2013-02-15 09:27:25 UTC
Verified on 5.3.1.CR1.

Comment 8 Red Hat Bugzilla 2025-02-10 03:27:22 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.