Skip to content

Instantly share code, notes, and snippets.

@jbrunemann
Last active December 16, 2015 01:09
Show Gist options
  • Save jbrunemann/5352681 to your computer and use it in GitHub Desktop.
Save jbrunemann/5352681 to your computer and use it in GitHub Desktop.
Work around for ColdFusion 10.0 Bug 3327626: Another CacheManager with same name '_ORM_........' already exists in the same VM.
<cfscript>
component
{
public void function onError(required any exception, string eventName) output=true
{
if (structKeyExists(arguments.exception, "type") and arguments.exception.type eq "net.sf.ehcache.CacheException" and structKeyExists(arguments.exception, "message") and arguments.exception.message contains "Another CacheManager with same name")
{
var cacheMan_obj = createObject("java", "net.sf.ehcache.CacheManager").getCacheManager("_ORM_" & this.name);
cacheMan_obj.shutdown();
}
}
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment