[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1110) Pojo returns null values after a local detach, even when values were set locally.
Jason T. Greene (JIRA)
jira-events at lists.jboss.org
Wed Jun 20 21:54:52 EDT 2007
[ http://jira.jboss.com/jira/browse/JBCACHE-1110?page=comments#action_12366251 ]
Jason T. Greene commented on JBCACHE-1110:
------------------------------------------
Thanks for the patch. This problem should only occur when a different node (lets call it Node B) calls updates before the node calling detach (Node A), and Node A does not read field values after Node B's changes and before it calls detach. I agree that detach() should refresh the object state before releasing it.
Your patch is good, the only thing that needs to change is that inMemorySubstitution() needs to be used instead of reflection when setting the field so that if the TX rolls back the field changes are reversed.
-Jason
> Pojo returns null values after a local detach, even when values were set locally.
> -----------------------------------------------------------------------------------
>
> Key: JBCACHE-1110
> URL: http://jira.jboss.com/jira/browse/JBCACHE-1110
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: PojoCache
> Affects Versions: 2.0.0.CR2
> Reporter: Vincent Marquez
> Assigned To: Jason T. Greene
> Fix For: 2.0.0.GA, 2.0.0.CR3
>
> Attachments: DetachTest.java, JBCACHE-1110.patch.txt
>
>
> After detaching a Pojo from the cache, any fields that were null before attaching it, remain null, even if values were set locally while it was attached. This is due to the CachedFieldInterceptor being removed, and not having data copied over from the cache.
> Apologies if this is not a bug, but it seems peculiar that I could read a pojo locally and get one value, detach it, then get another, even though its values were set locally.
--
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