[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-757) Problem updating cyclic reference
Ben Wang (JIRA)
jira-events at jboss.com
Wed Aug 30 11:53:45 EDT 2006
[ http://jira.jboss.com/jira/browse/JBCACHE-757?page=comments#action_12342359 ]
Ben Wang commented on JBCACHE-757:
----------------------------------
I have taken a look. The problem arises becuase of internal mapping is not canonical. For example, it would be ok, if you do:
main.reference = main2;
The reason is because the mapping starting from main (instead of main2). I don't have a quick fix in 1.4. However, this should not be a problem in 2.0 release since the internal mapping has been changed to a flat one.
Therefore, I am going to assign this to 2.0 to verify that it works.
> Problem updating cyclic reference
> ---------------------------------
>
> Key: JBCACHE-757
> URL: http://jira.jboss.com/jira/browse/JBCACHE-757
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: PojoCache
> Affects Versions: 1.4.0.SP1
> Reporter: Jörn Eyrich
> Assigned To: Ben Wang
>
> import org.jboss.cache.aop.PojoCache;
> import org.jboss.cache.aop.annotation.PojoCacheable;
> @PojoCacheable
> public class Main {
> public Main reference;
>
> public static void main(String[] args) throws Exception {
>
> PojoCache cache = new PojoCache();
> cache.startService();
>
> Main main = new Main();
> Main main2 = new Main();
> main.reference = main2;
> main2.reference = main;
>
> cache.putObject("/main",main);
> main2.reference = main; // <--
> System.out.println("Done...");
> }
> }
> results in:
> Exception in thread "main" java.lang.RuntimeException: PojoCache.putObject(): fqn: /main/reference/reference
> at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:478)
> at org.jboss.cache.aop.CacheInterceptor.invoke(CacheInterceptor.java:115)
> at org.jboss.aop.joinpoint.FieldWriteInvocation.invokeNext(FieldWriteInvocation.java:51)
> at Main.reference_w_$aop(Main.java)
> at Main.main(Main.java:21)
> Caused by: java.lang.IllegalStateException: AOPInstance.incrementRefCount(): source fqn: /main/reference/reference is already present.
> at org.jboss.cache.aop.AOPInstance.incrementRefCount(AOPInstance.java:92)
> at org.jboss.cache.aop.InternalDelegate.incrementRefCount(InternalDelegate.java:98)
> at org.jboss.cache.aop.ObjectGraphHandler.incrementRefCount(ObjectGraphHandler.java:212)
> at org.jboss.cache.aop.ObjectGraphHandler.setupRefCounting(ObjectGraphHandler.java:192)
> at org.jboss.cache.aop.ObjectGraphHandler.objectGraphPut(ObjectGraphHandler.java:88)
> at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:201)
> at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:731)
> at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:462)
> ... 4 more
--
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