-
1. Re: How do I serialized an POJO stored in the cache
ben.wang Nov 10, 2006 3:54 AM (in response to patlap)If you do "removeObject", it should give you back the original POJO. Later on, you can do another "putObject" again (as a merge, so to speak).
-
2. Re: How do I serialized an POJO stored in the cache
patlap Nov 10, 2006 9:41 AM (in response to patlap)I did a quick test and it is still giving me the aspectized pojo. This is the proof.
The XML representation of my obj in different stage of execution:before to store it in the cache: <com.cae.launchpad.core.dao.Student> <school>ULLAVAL</school> <courses class="linked-hash-set"> <com.cae.launchpad.core.dao.Course> <title>Spring</title> <instructor>Ben</instructor> <room>505</room> </com.cae.launchpad.core.dao.Course> </courses> <name>Pat</name> </com.cae.launchpad.core.dao.Student> Once in the cache: (notice the courses field is aspectized) <com.cae.launchpad.core.dao.Student> <school>ULLAVAL</school> <courses class="AOPClassProxy$0"/> <name>Pat</name> </com.cae.launchpad.core.dao.Student> ONce removed from the cache: (notice the courses field is still aspectized) <com.cae.launchpad.core.dao.Student> <school>ULLAVAL</school> <courses class="AOPClassProxy$0"/> <name>Pat</name> </com.cae.launchpad.core.dao.Student>
-
3. Re: How do I serialized an POJO stored in the cache
patlap Nov 13, 2006 8:25 AM (in response to patlap)Hi guys,
I think my observation (XML representation of the POJO) might be too complicated. I just wanted to express the fact that removing the object from the cache does not give me back the original POJO like expected according to Ben.
Is someone has some ideas???
I am a bit surprise that not that many people seems to have this requirement!
I am sort of counting on that !
thanks -
4. Re: How do I serialized an POJO stored in the cache
ben.wang Nov 15, 2006 3:20 AM (in response to patlap)Sorry, I didn't see your post untill now. Yes, I have tried to reproduce your step. Obviously it is a bug in 1.4 release.
Here is the Jira:
http://jira.jboss.com/jira/browse/JBCACHE-847
Current, 1.4.1 is in beta mode, so GA should come out in about 2 weeks timeframe. If you are in a hurry, you can also try to build the code after I do the fix (the next two days). -
5. Re: How do I serialized an POJO stored in the cache
patlap Nov 15, 2006 7:18 AM (in response to patlap)I would suggest that if you could add a method that will allow me to get back the original pojo (copy of) without removing the POJO from the cache, it would be create!!!!!
Is this a possible ??? -
6. Re: How do I serialized an POJO stored in the cache
ben.wang Nov 15, 2006 8:39 AM (in response to patlap)Do you want PojoCache to introduce the Cloneable interface such that you can clone the POJO?
But if removeObject can do the job, is there still a need to so? -
7. Re: How do I serialized an POJO stored in the cache
patlap Nov 15, 2006 8:50 AM (in response to patlap)The ability to clone the POJO and get the not aspectized copy of it would be ideal. In fact, when I want a copy, I don't necessarily want to remove it from the cache and I definitely don't want the aspectized version of it (since I should not be concerned about aspectization).
PS: Event though cloning the POJO will full fill my requirement, I still think that removing the POJO from the cache should give back the not aspectized version of the POJO so that I think it is still a bug that need to be addressed. -
8. Re: How do I serialized an POJO stored in the cache
ben.wang Nov 15, 2006 9:59 PM (in response to patlap)Well, actually, if you want to get aound it, you can implement Cloneable in your POJO and clone it yourself.
PS: yes, it is a bug that I will fix soon. -
9. Re: How do I serialized an POJO stored in the cache
ben.wang Nov 16, 2006 8:22 AM (in response to patlap)The fix is in 1.4.1CR1. Will come out soon.
-
10. Re: How do I serialized an POJO stored in the cache
esspe Dec 18, 2006 2:11 PM (in response to patlap)Hi,
we are also having the serialization problem and unfortunately there is no rc for 1.4.1 by now. Is there a chance to get the fixed version soon ?