Hi Brian,

Thanks for your response (and sorry for the verboseness of the previous posts). 
=)  

I'm actually getting the object from the cache each time using the getObject() 
call.

// Put object in CacheA and then replace it in CacheB
  | MerchantDailyAccount pojoA = new MerchantDailyAccount(1); // dailySpend=1
  | cacheA.putObject("/test", pojoA);
  | 
  | MerchantDailyAccount pojoB = new MerchantDailyAccount(900); // 
dailySpend=900
  | cacheB.putObject("/test", pojoB);
  | 
  | 
  | // Re-retrieve the object from CacheA
  | MerchantDailyAccount cachedPojoA = cacheA.getObject("/test");
  | 
  | // This test always fails for me.  The value of dailySpend in pojoA 
  | // actually turns out to be 0, the default value in the object
  | assertEquals(1, pojoA.dailySpend);
  | 
  | 
  | // Then update the object on CacheA
  | pojoA.setDailySpend(128.0);
  | 
  | 
  | // Re-retrieve the POJOs from CacheA and CacheB
  | MerchantDailyAccount updatedPojoA = cacheA.getObject("/test");
  | MerchantDailyAccount updatedPojoB = cacheB.getObject("/test");
  | 
  | 
  | assertEquals(128.0, pojoA.dailySpend); // this one will pass
  | assertEquals(128.0, pojoB.dailySpend); // this one will always fail.  
dailySpend will equal 900

I see the correct values being passed from CacheA to CacheB in the logs (and 
vice versa).  The values just aren't being populated in the objects.

The really odd thing that I can consistently produce is that instead of 
updating the dailySpend by calling setDailySpend() (as in the code above), if I 
just increment the value by 0.50, for example, via an internal method in 
MerchantDailyAccount, it'll actually change the value to 900.5, which is what I 
would expect.  So, it seems the replicated values are actually getting across, 
they just aren't getting assigned to the fields in the object.

I'm going to try JBoss Cache 1.4 and see if that fixes it.  Otherwise, I'm 
stumped.

Thanks!
Michael


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953837#3953837

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953837

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to