Author: nzamosenchuk
Date: 2010-02-08 05:10:44 -0500 (Mon, 08 Feb 2010)
New Revision: 1712
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-481: added check for null-value.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-02-08
08:38:18 UTC (rev 1711)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-02-08
10:10:44 UTC (rev 1712)
@@ -265,10 +265,19 @@
{
throw new RepositoryConfigurationException("Cache configuration not
found");
}
+
+ // create cache using custom factory
+ ExoJBossCacheFactory<Serializable, Object> factory;
+
+ if (transactionService != null)
+ {
+ factory = new ExoJBossCacheFactory<Serializable, Object>(cfm,
transactionService.getTransactionManager());
+ }
+ else
+ {
+ factory = new ExoJBossCacheFactory<Serializable, Object>(cfm);
+ }
- // create cache using custom factory
- ExoJBossCacheFactory<Serializable, Object> factory =
- new ExoJBossCacheFactory<Serializable, Object>(cfm,
transactionService.getTransactionManager());
this.cache = new BufferedJBossCache(factory.createCache(wsConfig.getCache()));
this.itemsRoot = Fqn.fromElements(ITEMS);