EHC ❯ Removed dependency for commons-collections.jar
-
Bug
-
Status: Closed
-
-
Resolution: Fixed
-
-
-
drb
-
Reporter: sourceforgetracker
-
September 21, 2009
-
0
-
Watchers: 0
-
September 22, 2009
-
September 22, 2009
Description
Hi
This is a patch for the bug about not being able to run on IBM WebSphere using JDK1.4 and still require the commons-collection.jar in the classpath. Even though EHCache will use java.util.LinkedHashMap and not anything from commons-collection.
Basically I have moved the inner class SpoolingLRUMap to a seperate class and uses reflection to instanciate this class. Using reflection avoids having import statements to any org.apache.commons.collection.
This works nicely on IBM WebSphere 5.1 running on JDK1.4. I have tried to use the EHCache with both:
- java.util.LinkedHashMap
- org.apache.commons.collections.LRUMap (disabling the JDK14 check in MemoryStore.java)
I have attached a diff and the two .java files.
I hope you would consider adding this patch to a future release avoid the need for commons-collections totally for JDK14 environments.
We do not use Hibernate and the cache is used in the ejb.jar and not in the .war file. So classpath issues here is a bit more tricky. Especially when there is also hot-deployment. That is why I changed the Class.ForName(“xxx”) to use a j2ee friendly strategy. See the source.
Thanks for a still in-development cache framework. OSCache seems to have dropped it pace and that is why I changed to EHCache instead.
/Claus
You can contact me at:
cib_rejse AT yahoo.dk
Where AT is the @ char
Sourceforge Ticket ID: 1031772 - Opened By: nobody - 21 Sep 2004 09:23 UTC
Re-opening so that I can properly close out these issues and have correct Resolution status in Jira