-
1. Re: removeObject do not fully remove when working with FileC
ben.wang Jan 2, 2007 2:53 AM (in response to emailmsgbox)What removeObject operation sequence did you try? I have one unit test already that tests this. But I don't see the problem that you described.
-
2. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 2, 2007 3:43 AM (in response to emailmsgbox)I'm not sure your meaning by
removeObject operation sequence
but the scenario is simple,I use MBean is invoke the following calls
first invocation : setTest(44, testData )
second invocation : getTest(44)
and thread invocation : delTest(44)
with version 1.4.0.SP1
after that the in FileCache location is clean
with version 1.4.1.CR1
after that the in FileCache location I can still the remains of the cached object -
3. Re: removeObject do not fully remove when working with FileC
ben.wang Jan 2, 2007 7:46 AM (in response to emailmsgbox)So did you try to use the same JBoss Cache version before and after? Like I said, I have a test that do a removeObject. Then the cache is restarted, a getObject retrieve POJO correctly.
-
4. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 3, 2007 10:17 AM (in response to emailmsgbox)I lost you there.
I did the same test on 1.4.0.SP1 and 1.4.1.CR1
I have a MBean with tree methods one creates on the cache the object TestData.The second removes the object. and getObject
The scenario is simple , I create and when remove (no restart this time)
With 1.4.0.SP1 there is no "leftovers" in the file system.
But with 1.4.1.CR1 there ARE "leftovers" in the file system.
With a simple Object like TestData after delete the getObject returns null on both versions .
But with a complicated Object its partially removes it , and you get a strange -
5. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 9, 2007 3:09 AM (in response to emailmsgbox)Were you able to duplicate it?
thanks -
6. Re: removeObject do not fully remove when working with FileC
ben.wang Jan 9, 2007 3:17 AM (in response to emailmsgbox)No, I can't. Can you give me a junit test case then? What do you mean by complicated object? Like a Person object that has address field?
-
7. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 9, 2007 8:21 AM (in response to emailmsgbox)sorry. I do not have a Junit Test case
I double checked the code I send. It happening
A complicated Object is an object that holds a Map of object that also hold Maps -
8. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 11, 2007 7:10 AM (in response to emailmsgbox)New Discovery!!
I tried the new version 1.4.1GA and it still the folder used by the FileCache was not fully remove
up till now I was using the JBoss cache object as followstatic PojoCacheIfc myCache; //locate te jboss-cache service MBeanServer server = MBeanServerLocator.locate(); myCache = (PojoCacheIfc ) MBeanProxyExt.create( PojoCacheMBean.class, CACHE_SRV, server); and the method used was myCache.removeObject(fqn)
so I tried the followingstatic PojoCacheMBean myCache; MBeanServer server = MBeanServerLocator.locate(); myCache = (PojoCacheMBean ) MBeanProxyExt.create( PojoCacheMBean.class, CACHE_SRV, server); with the method myCache.remove(fqn)
and... behold a fully removal with no "leftovers" in the file system !!
again: winXP jboss404 JBoss-cache 1.4.1GA JGroups 2.4.1 javassist3.4 jboss-aop 1.5.2
As I understand I should be using PojoCacheIfc interface not PojoCacheMBean
what am I missing? -
9. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 15, 2007 1:05 PM (in response to emailmsgbox)Was it something I said?
-
10. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 17, 2007 4:52 AM (in response to emailmsgbox)this is taken from Interface PojoCacheIfc doc API
Interface for PojoCache. User should use this interface directly to access the public APIs.
please explain what am I missing? -
11. Re: removeObject do not fully remove when working with FileC
ben.wang Jan 17, 2007 9:43 AM (in response to emailmsgbox)Sorry, I missed your ealier post. However, I still can't reproduce your problem after running thru it again. I have actually created and checked in a unit test to simulate your condition but it is working.
-
12. Re: removeObject do not fully remove when working with FileC
ben.wang Jan 17, 2007 9:45 AM (in response to emailmsgbox)Oh, can you try it outside the AS then (without using the MBeanProxy, of course)? My unit test runs standalone.
-
13. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 21, 2007 10:00 AM (in response to emailmsgbox)It did not reoccurred on a standalone
bottom line
removeObject(Fqn) - bad behavior
remove(Fqn)- works ok
also can you explain what interface API should be used ? PojoCacheIfc or PojoCacheMBean ? since PojoCacheIfc does not have exists(Fqn) -
14. Re: removeObject do not fully remove when working with FileC
emailmsgbox Jan 21, 2007 10:30 AM (in response to emailmsgbox)It did not reoccurred on a standalone
bottom line
removeObject(Fqn) - bad behavior
remove(Fqn)- works ok
also can you explain what interface API should be used ? PojoCacheIfc or PojoCacheMBean ? since PojoCacheIfc does not have exists(Fqn)