Bug 991444 - EJB2 CMP wrong cache access if optimistic-locking=true
EJB2 CMP wrong cache access if optimistic-locking=true
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ER1
: EAP 6.2.0
Assigned To: wfink
Jan Martiska
Depends On:
  Show dependency treegraph
Reported: 2013-08-02 08:10 EDT by wfink
Modified: 2017-10-09 20:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When optimistic locking was configured for EJB2 Entity Beans, cached entity beans were never being found in the cache. This occurred because the cache lookup was being performed using the wrong identifier. The entity primary key was being used to locate the correct transaction cache instead of the transaction identifier. This has been corrected and cache access for EJB2 Entity Beans now works as expected when optimistic locking is enabled.
Story Points: ---
Clone Of:
Last Closed: 2013-12-15 11:22:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
wfink: needinfo+

Attachments (Terms of Use)

  None (edit)
Description wfink 2013-08-02 08:10:55 EDT
If entities are read from the cache, and if the ejb3 entity-bean is configured for optimistic-locking, the implementation of TransactionLocalEntityCache is used.

The methods to find entities access an internal Map where the key is the Tx-Id.
But the check is done by use the entity-PKey instead of the Tx-Id.
The PKey must be used later if the transactional cache is selected.
Comment 2 wfink 2013-08-05 03:32:49 EDT
PR send:
Comment 3 Ivo Studensky 2013-10-04 06:12:07 EDT
It has been already merged, thus moving this to ON_QA.
Comment 4 Jan Martiska 2013-10-07 06:42:22 EDT
Verified in EAP 6.2.0.ER4.
Comment 5 Scott Mumford 2013-11-25 19:07:35 EST
Hi Wolf

Can you please provide more information about this bug, for release notes purposes?

I can see your description of the situation, but I'm not able to ascertain if this was a bug (that presented unexpected and unwanted behavior in the product) or if it is a request to optimize the product in some way.

The Doc Text field above is a pre-formatted template that outlines the requirements for a complete release note. 

If you could provide the required information, it would be greatly appreciated.

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