Bug 1009615
| Summary: | EJB2 CMP Entities are not synchronized to the DB under special circumstances (business logic inside the EntityBean) | |||
|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | wfink | |
| Component: | EJB | Assignee: | wfink | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Martiska <jmartisk> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.0.1, 6.1.0, 6.1.1 | CC: | jawilson | |
| Target Milestone: | ER3 | |||
| Target Release: | EAP 6.2.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1010886 (view as bug list) | Environment: | ||
| Last Closed: | 2013-12-15 16:55:15 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1010886, 1012664 | |||
Verified in EAP 6.2.0.ER4. |
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. Example: EntityA { abstract void setAttrib1(int attrib); abstract void setAttrib2(int attrib); abstract void ejbSelect1(...); public void update(...) { setAttrib1(...); 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. ((EntityALocal)myEntityContext.getEJBLocalObject()).setAttrib2(...)