[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-763) Transaction rollback does not restore contents of collection of cached collections
Nitzan Niv (JIRA)
jira-events at jboss.com
Tue Oct 3 06:19:42 EDT 2006
[ http://jira.jboss.com/jira/browse/JBCACHE-763?page=all ]
Nitzan Niv updated JBCACHE-763:
-------------------------------
Attachment: TreeCacheAopDelegate.java
InternalDelegate.java
AOPInstance.java
The attached files resolve the rollback issue in 1.4.0SP1 and address the following issues:
1. The entry in the rollback list shares the instance of AOPInstance that is in the cache (and which can be modified be later operations), so it cannot be used for a rollack. The fix creates a new AOPInstance copy.
2. bulkRemove removes a set of objects from the cache and detaches them; however, its rollback operation re-inserts the objects to the cache without re-attaching them. There is a comment in the code hinting to this problem, but the bulkRemove optimization is still active. The fix bypasses the bulkRemove optimization.
3. putObject in TreeCacheAopDelegate does not correctly return the previous value from the cache.
> Transaction rollback does not restore contents of collection of cached collections
> ----------------------------------------------------------------------------------
>
> Key: JBCACHE-763
> URL: http://jira.jboss.com/jira/browse/JBCACHE-763
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: PojoCache
> Reporter: Nitzan Niv
> Assigned To: Ben Wang
> Fix For: 2.0.0
>
> Attachments: AOPInstance.java, InternalDelegate.java, PojoCollectionRollbackTest.java, TreeCacheAopDelegate.java
>
>
> In PojoCache, transaction rollback does not restore (by completely undoing modifications) the contents of a cached collection when the updated element is in itself a cached collection.
> 1. create 2 "data elements" in the cache which are Map instances.
> 2. create a "data elements container" in the cache which is a Map instance.
> 3. initalize the container with one data element.
> 4. in a transaction, replace the initial data element in the container with the other data element, and then rollback the transaction.
> After the rollback the element in the container is neither the new data element nor the old data element.
> It looks like the aopInstance reference in the internal CachedMapInterceptor is not restored by the rollback and contains null after it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list