|
|
|
HIbernate3 cache provider. Some extra logging needs to be removed before I submit it to their JIRA.
There is one issue that needs to be addressed for this (it needs testing!).
Since the current OSCache does not provide a public removeEntry() method, the Hibernate3 OSCache I modified calls flush(key) on remove(key). This will lead all the caches to flush that entry, and then send unnecessary updates. I think it should actually get removed, for instance if an object is deleted. If as I suggested removeEntry is made public, I can change OSCache to call removeEntry instead of flush, which will solve this issue. What is the current rationale for make ing removeEntry protected? Please let me know if you are still looking at this. I am going to look at your code now. The remove can probably be public but I need to go over all the use cases. I cannot commit any of it until I have full unit tests, so it might take me a while if I'm witing them. Thanks for the contributions!
Yes I am still watching this, and in fact it is a good week for me to contemplate this again. Of course unit tests take a long time: if there is any help I can give, please tell me.
I am going to try and get this in 2.2. The first thing I'd like to do is make removeEntry public and add your listener as an option for people to use. Hopefully, other people will take interest and we can see more clearly the impact of this functionality.
That sounds like a great idea. Let me know what I can do. I should submit a new Hibernate OSCache file that uses the remove, for one.
Cool. I should be able to do something on this by week end but this is targeted for the 2.2 release.
removeEntry(String key) has been made public and exposed in the GeneralCacheAdministrator. This is in CVS HEAD.
Could you also make public for the removeEntry(String, String)? In the UpdatingJavaGroupsListener.java, it needs to call: cache.removeEntry(((String) message.getData()),CLUSTER_ORIGIN );
Also, if you could integrate the code from UpdatingJavaGroupsListener.java to the super class, it would be perfect. Then I don't need to write subclasses.
I think this patch is really important as more and more users are using Hibernate in conjunction with OSCache. Without this patch, Hibernate does not work in clustering environments with OSCache. Would it be possible to include this for 2.2 final ?
| ||||||||||||||||||||||||||||||||||||||||||||||||||
Also, the Cache class with the 2 removeEntry methods made public, so the above class can work.