[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-697) PojoCache Collection sub-field when detached will revert back to the original reference

Ben Wang (JIRA) jira-events at jboss.com
Fri Jul 14 13:30:11 EDT 2006


    [ http://jira.jboss.com/jira/browse/JBCACHE-697?page=comments#action_12339615 ] 
            
Ben Wang commented on JBCACHE-697:
----------------------------------

At the same token, when I do:

cache.attach(id, map); 

map = cache.detach(id); // getting back original reference.

> PojoCache Collection sub-field when detached will revert back to the original reference
> ---------------------------------------------------------------------------------------
>
>                 Key: JBCACHE-697
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-697
>             Project: JBoss Cache
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: PojoCache
>            Reporter: Ben Wang
>         Assigned To: Ben Wang
>             Fix For: POJOCache
>
>
> In PojoCache 1.4, when a Pojo has a Collection sub-object, it will dynamically replace the reference with a corresponding ClassProxy one such that we can intercept the Collection APIs. This is in attached state. When the POJO is detached, we would simply keep the ClassProxy reference but rather point the interceptor to the original reference. This works fine except when the POJO is meant for remoting as ClassProxy is not Serializable and not for direct manipulation.
> The solution is when a POJO is detached, it will dynamically swap back the original reference and discard the ClassProxy. This way, it is semantically similar to a regular POJO as well. There will be no issue of Remoting, as an example.

-- 
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