diff --git a/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterAdminControllerCluster.java b/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterAdminControllerCluster.java index b019b3a3be7570543f7c40d282661b50ac81a75c..32a2caa96148ff9bc6899c1ae36812d12579e07d 100644 --- a/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterAdminControllerCluster.java +++ b/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterAdminControllerCluster.java @@ -118,7 +118,7 @@ public class ClusterAdminControllerCluster extends BasicController { mainVc = createVelocityContainer("cluster"); // information about the cluster nodes - mainVc.contextPut("own_nodeid", "This node is node: '"+clusBus.clusterConfig.getNodeId()+"'"); + mainVc.contextPut("own_nodeid", "This node is node: '"+clusBus.getClusterConfig().getNodeId()+"'"); nodeInfoVc = createVelocityContainer("nodeinfos"); Formatter f = Formatter.getInstance(ureq.getLocale()); @@ -196,7 +196,7 @@ public class ClusterAdminControllerCluster extends BasicController { return o1.getNodeId().compareTo(o2.getNodeId()); }}); nodeInfoVc.contextPut("stats",li); - nodeInfoVc.contextPut("thisNodeId", clusBus.clusterConfig.getNodeId()); + nodeInfoVc.contextPut("thisNodeId", clusBus.getClusterConfig().getNodeId()); mainVc.contextPut("eventBusListener", clusBus.toString()); mainVc.contextPut("busListenerInfos", clusBus.getBusInfosAsString()); } diff --git a/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterEventBus.java b/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterEventBus.java index 804cd51292189b8dcce63fbb6c257964f8d35686..80026c1087a2804f10189501c9abedde6bd73681 100644 --- a/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterEventBus.java +++ b/src/main/java/org/olat/commons/coordinate/cluster/jms/ClusterEventBus.java @@ -67,11 +67,11 @@ public class ClusterEventBus extends AbstractEventBus implements MessageListener //ores helper is limited to 50 character, so truncate it static final OLATResourceable CLUSTER_CHANNEL = OresHelper.createOLATResourceableType(ClusterEventBus.class.getName().substring(0, 50)); - ClusterConfig clusterConfig; + private ClusterConfig clusterConfig; // settings - long sendInterval = 1000; // 1000 miliseconds between each "ping/alive/info" message, can be set using spring - long jmsMsgDelayLimit = 5000; // max duration of ClusterInfoEvent send-receive time in ms + private long sendInterval = 1000; // 1000 miliseconds between each "ping/alive/info" message, can be set using spring + private long jmsMsgDelayLimit = 5000; // max duration of ClusterInfoEvent send-receive time in ms // counters private long latestSentMsgId = -1; @@ -467,7 +467,11 @@ public class ClusterEventBus extends AbstractEventBus implements MessageListener log.warn("Exception in stop ClusteredSearchProvider, ",e); } } - + + public ClusterConfig getClusterConfig() { + return clusterConfig; + } + /** * [used by spring] */ diff --git a/src/main/java/org/olat/core/commons/persistence/_spring/databaseCorecontext.xml b/src/main/java/org/olat/core/commons/persistence/_spring/databaseCorecontext.xml index badc9bae55ef23bda63f6a8905394933de093e76..dd8aecdb11331ef21915adca3a9b52f6287604a5 100644 --- a/src/main/java/org/olat/core/commons/persistence/_spring/databaseCorecontext.xml +++ b/src/main/java/org/olat/core/commons/persistence/_spring/databaseCorecontext.xml @@ -178,7 +178,7 @@ <prop key="hibernate.hikari.minimumIdle">4</prop> <prop key="hibernate.hikari.idleTimeout">1800000</prop> <prop key="hibernate.hikari.autoCommit">false</prop> - <prop key="hibernate.hikari.leakDetectionThreshold">120000</prop> + <prop key="hibernate.hikari.leakDetectionThreshold">${db.hibernate.hikari.leakDetectionThreshold:120000}</prop> <prop key="hibernate.hikari.transactionIsolation">TRANSACTION_READ_COMMITTED</prop> <prop key="hibernate.hikari.registerMbeans">true</prop> </props> @@ -226,4 +226,4 @@ </bean> -</beans> \ No newline at end of file +</beans> diff --git a/src/test/java/org/olat/shibboleth/manager/DifferenceCheckerTest.java b/src/test/java/org/olat/shibboleth/manager/DifferenceCheckerTest.java index ac5931ca86a6d2725843fd660203aba70a9f917b..37b136feb5880ea2ef6b7d0c983e7fec0c5cafb1 100644 --- a/src/test/java/org/olat/shibboleth/manager/DifferenceCheckerTest.java +++ b/src/test/java/org/olat/shibboleth/manager/DifferenceCheckerTest.java @@ -125,7 +125,7 @@ public class DifferenceCheckerTest { @Test public void shouldDeleteNullIfNotConfigured() { - when(shibbolethModuleMock.getDeleteIfNull().get(ATTRIBUTE_NAME)).thenThrow(Exception.class); + when(shibbolethModuleMock.getDeleteIfNull().get(ATTRIBUTE_NAME)).thenThrow(new RuntimeException()); boolean isDifferent = sut.isDifferent(ATTRIBUTE_NAME, null, OLAT_ONLY);