[jboss-jira] [JBoss JIRA] Created: (JBCACHE-757) Problem updating cyclic reference

J?rn Eyrich (JIRA) jira-events at jboss.com
Wed Aug 30 07:33:45 EDT 2006


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: Manik Surtani


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