Author: nbelaevski
Date: 2010-07-12 14:50:30 -0400 (Mon, 12 Jul 2010)
New Revision: 17982
Modified:
root/core/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
Log:
Added explicit Class.forName(...) to check OsCache presence in classpath
Modified: root/core/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
===================================================================
---
root/core/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2010-07-12
18:26:58 UTC (rev 17981)
+++
root/core/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2010-07-12
18:50:30 UTC (rev 17982)
@@ -72,6 +72,16 @@
return properties;
}
+ public OSCacheCacheFactory() throws ClassNotFoundException {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ if (classLoader == null) {
+ classLoader = OSCacheCacheFactory.class.getClassLoader();
+ }
+
+ //try load cache class to check its presence in classpath
+ Class.forName(GeneralCacheAdministrator.class.getName(), false, classLoader);
+ }
+
public Cache createCache(FacesContext facesContext, String cacheName, Map<?, ?>
env) {
//TODO - handle cache name
Properties cacheProperties = new Properties();