I found it pretty annoying that Ehcache always reminded me that there is an update to a newer version of its framework available. After searching the web I found an interesting thread in the Terracotta forum saying that the UpdateChecker is not only looking for updates. In addition it also submits information about the applications environment to Terracotta by default. And that is not a good thing in my opinion.
Here you can see youself: http://svn.terracotta.org/svn/ehcache/trunk/core/src/main/java/net/sf/ehcache/util/UpdateChecker.java
Fortunately you can disable this behavior by adding an Ehcache configuration to your Grails application. I have tested this with a Grails 1.2.0 application which includes Ehcache 1.7.1.
Simply place an ehcache.xml file in your <app-root>/grails-app/conf folder containing your Ehcache configuration. For this post I am using the configuration that ships with Ehcache as default (ehcache-failsafe.xml) and modify it.
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false">
<diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
/>
</ehcache>
With the attribute updateCheck=”false” in the root tag the haunting is gone.
XML Schema for Ehcache config can be found here: http://ehcache.org/ehcache.xsd
More Information about Ehcache configuration: http://ehcache.org/documentation/configuration.html
Nice to know this. Thanks for posting!
mucho appreciated!
Do you know how this can be done programmatically?
With todays release of Grails 1.2.2 this is nomore necessary. The Grails dev team disabled the UpdateChecker by default.
http://jira.codehaus.org/browse/GRAILS-5949
http://www.grails.org/1.2.2+Release+Notes
Pingback: Ehcache Java library’s UpdateChecker == spyware « Logiciel Libre
Wow, mucho badness, Terracotta! Thanks for sharing this, Sven.