]
Manik Surtani updated JBCACHE-268:
----------------------------------
Fix Version/s: (was: 2.0.0.GA)
PojoCache InternalDelegate can return incorrect AOPInstance object
------------------------------------------------------------------
Key: JBCACHE-268
URL:
http://jira.jboss.com/jira/browse/JBCACHE-268
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: PojoCache
Affects Versions: PojoCache
Reporter: twundke
Assigned To: Ben Wang
The getAopInstance(Fqn) method of InternalDelegate currently uses a cache.peek() call to
find the AOPInstance object for an FQN. However, I've come across a situation where
multiple calls to this method for the same FQN will return different AOPInstance objects.
To be honest, I'm not sure of the exact situation in which this occurs as I
haven't delved deep enough. However, the basic idea is that I have an object graph in
the cache, all hanging off one particular root-level object. I then do a fairly major
addition/update to a number of children, but don't specifically update the root-level
object. After this update I find that InternalDelegate returns a new instance of the
AOPInstance class for the root object's FQN, which has now lost its POJO reference
etc. This in turn forces a re-creation of the root-level object, which loses a number of
transient references that I have set.
Note that my object graph has a number of circular references back to this root-level
object, so I suspect that the AOP machinery is for some reason updating this object during
the update of the children, thereby losing the original AOPInstance reference.
I've put in a quick fix locally that caches references to AOPInstance objects in a
HashMap, which follows the idea suggested in the comment for the method. This solves the
issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: