summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/persistency
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/persistency')
-rw-r--r--src/main/java/com/c2kernel/persistency/ClusterStorageManager.java6
-rw-r--r--src/main/java/com/c2kernel/persistency/XMLClusterStorage.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
index 6ca5502..402c466 100644
--- a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
+++ b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
@@ -40,7 +40,7 @@ public class ClusterStorageManager {
* This property is usually process specific, and so should be in the server/client.conf and not the connect file.
*/
public ClusterStorageManager() throws ClusterStorageException {
- Object clusterStorageProp = Gateway.getProperty("ClusterStorage");
+ Object clusterStorageProp = Gateway.getProperties().getObject("ClusterStorage");
if (clusterStorageProp == null || clusterStorageProp.equals("")) {
throw new ClusterStorageException("ClusterStorageManager.init() - no ClusterStorages defined. No persistency!");
}
@@ -236,7 +236,7 @@ public class ClusterStorageManager {
if (result != null) { // got it!
// store it in the cache
if (sysKeyMemCache == null) { // create cache if needed
- boolean useWeak = Gateway.getProperty("Storage.useWeakCache","false").equals("true");
+ boolean useWeak = Gateway.getProperties().getBoolean("Storage.useWeakCache", false);
Logger.msg(7,"ClusterStorageManager.put() - Creating "+(useWeak?"Weak":"Strong")+" cache for entity "+sysKeyIntObj);
sysKeyMemCache = useWeak?new WeakCache<String, C2KLocalObject>():new SoftCache<String, C2KLocalObject>(0);
synchronized (memoryCache) {
@@ -276,7 +276,7 @@ public class ClusterStorageManager {
if (memoryCache.containsKey(sysKeyIntObj))
sysKeyMemCache = memoryCache.get(sysKeyIntObj);
else {
- boolean useWeak = Gateway.getProperty("Storage.useWeakCache","false").equals("true");
+ boolean useWeak = Gateway.getProperties().getBoolean("Storage.useWeakCache", false);
Logger.msg(7,"ClusterStorageManager.put() - Creating "+(useWeak?"Weak":"Strong")+" cache for entity "+sysKeyIntObj);
sysKeyMemCache = useWeak?new WeakCache<String, C2KLocalObject>():new SoftCache<String, C2KLocalObject>(0);
synchronized (memoryCache) {
diff --git a/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java b/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java
index 056fe28..f63dac6 100644
--- a/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java
+++ b/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java
@@ -18,7 +18,7 @@ public class XMLClusterStorage extends ClusterStorage {
@Override
public void open() throws ClusterStorageException {
- String rootProp = Gateway.getProperty("XMLStorage.root");
+ String rootProp = Gateway.getProperties().getProperty("XMLStorage.root");
if (rootProp == null)
throw new ClusterStorageException("XMLClusterStorage.open() - Root path not given in config file.");