Bug 1009615 - EJB2 CMP Entities are not synchronized to the DB under special circumstances (business logic inside the EntityBean)
EJB2 CMP Entities are not synchronized to the DB under special circumstances ...
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ER3
: EAP 6.2.0
Assigned To: wfink
Jan Martiska
Depends On:
Blocks: 1010886 1012664
  Show dependency treegraph
Reported: 2013-09-18 13:29 EDT by wfink
Modified: 2017-10-09 20:26 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1010886 (view as bug list)
Last Closed: 2013-12-15 11:55:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description wfink 2013-09-18 13:29:34 EDT
If a entity method is called via the component interface and inside this method actions are called which force a database synchronization, i.e. ejbSelect... or finder, a following change to this entity might not persist to the database if a ejbSelect or finder is called.

This will be temporary an inconsistent state.


EntityA {
  abstract void setAttrib1(int attrib);
  abstract void setAttrib2(int attrib);
  abstract void ejbSelect1(...);

  public void update(...) {
    ejbSelect1(...);  // the attrib1 will be flushed to the DB
    setAttrib2(...);  // this attrib might not flushed until there is no other CMP entity method invoked

As workaround the setter can be called via the LocalObject, i.e.
Comment 4 Jan Martiska 2013-10-07 04:17:49 EDT
Verified in EAP 6.2.0.ER4.

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