You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2018/03/26 15:53:59 UTC
[openmeetings] branch master updated: [OPENMEETINGS-1836] tests
should be fixed
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push:
new ede1870 [OPENMEETINGS-1836] tests should be fixed
ede1870 is described below
commit ede1870e5aefbb10e0afad7d4fba242ecef3bd87
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Mon Mar 26 22:48:21 2018 +0700
[OPENMEETINGS-1836] tests should be fixed
---
.../org/apache/openmeetings/web/app/Application.java | 2 +-
.../org/apache/openmeetings/web/app/ClientManager.java | 17 +++++++++--------
.../apache/openmeetings/web/app/WhiteboardManager.java | 9 ++++++---
.../src/main/webapp/WEB-INF/classes/hazelcast.xml | 8 ++++----
4 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
index 93021d5..2c67458 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
@@ -153,7 +153,7 @@ public class Application extends AuthenticatedWebApplication implements IApplica
public static final String HASH_MAPPING = "/hash";
public static final String SIGNIN_MAPPING = "/signin";
public static final String NOTINIT_MAPPING = "/notinited";
- private final HazelcastInstance hazelcast = Hazelcast.getOrCreateHazelcastInstance(new XmlConfigBuilder().build());
+ final HazelcastInstance hazelcast = Hazelcast.getOrCreateHazelcastInstance(new XmlConfigBuilder().build());
private String xFrameOptions = HEADER_XFRAME_SAMEORIGIN;
private String contentSecurityPolicy = OpenmeetingsVariables.HEADER_CSP_SELF;
private ITopic<IClusterWsMessage> hazelWsTopic;
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
index 794375f..84468ea 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
@@ -19,7 +19,6 @@
package org.apache.openmeetings.web.app;
import static org.apache.openmeetings.core.util.WebSocketHelper.sendRoom;
-import static org.apache.openmeetings.web.app.Application.getHazelcast;
import java.util.ArrayList;
import java.util.Collection;
@@ -63,17 +62,19 @@ public class ClientManager implements IClientManager {
@Autowired
private ConferenceLogDao confLogDao;
+ @Autowired
+ private Application app;
- private static IMap<String, Client> map() {
- return getHazelcast().getMap(ONLINE_USERS_KEY);
+ private IMap<String, Client> map() {
+ return app.hazelcast.getMap(ONLINE_USERS_KEY);
}
- private static Map<String, String> mapBySid() {
- return getHazelcast().getMap(UID_BY_SID_KEY);
+ private Map<String, String> mapBySid() {
+ return app.hazelcast.getMap(UID_BY_SID_KEY);
}
- private static IMap<Long, Set<String>> rooms() {
- return getHazelcast().getMap(ROOMS_KEY);
+ private IMap<Long, Set<String>> rooms() {
+ return app.hazelcast.getMap(ROOMS_KEY);
}
@PostConstruct
@@ -276,7 +277,7 @@ public class ClientManager implements IClientManager {
return false;
}
- private static Client getByKeys(Long userId, String sessionId) {
+ private Client getByKeys(Long userId, String sessionId) {
Client client = null;
for (Map.Entry<String, Client> e : map().entrySet()) {
Client c = e.getValue();
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
index d12ff86..854af61 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
@@ -19,7 +19,6 @@
package org.apache.openmeetings.web.app;
import static org.apache.openmeetings.util.OpenmeetingsVariables.getDefaultLang;
-import static org.apache.openmeetings.web.app.Application.getHazelcast;
import java.util.Map;
import java.util.Map.Entry;
@@ -34,6 +33,7 @@ import org.apache.openmeetings.db.dto.room.Whiteboards;
import org.apache.openmeetings.db.manager.IWhiteboardManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.hazelcast.core.EntryEvent;
@@ -54,8 +54,11 @@ public class WhiteboardManager implements IWhiteboardManager {
private final Map<Long, Whiteboards> onlineWbs = new ConcurrentHashMap<>();
private static final String WBS_KEY = "WBS_KEY";
- private static IMap<Long, Whiteboards> map() {
- return getHazelcast().getMap(WBS_KEY);
+ @Autowired
+ private Application app;
+
+ private IMap<Long, Whiteboards> map() {
+ return app.hazelcast.getMap(WBS_KEY);
}
@PostConstruct
diff --git a/openmeetings-web/src/main/webapp/WEB-INF/classes/hazelcast.xml b/openmeetings-web/src/main/webapp/WEB-INF/classes/hazelcast.xml
index 65cc426..57cd2e4 100644
--- a/openmeetings-web/src/main/webapp/WEB-INF/classes/hazelcast.xml
+++ b/openmeetings-web/src/main/webapp/WEB-INF/classes/hazelcast.xml
@@ -32,28 +32,28 @@
</map>
<map name="ROOMS_KEY">
<near-cache>
- <eviction-policy>NONE</eviction-policy>
+ <eviction eviction-policy="NONE"/>
<in-memory-format>OBJECT</in-memory-format>
<cache-local-entries>true</cache-local-entries>
</near-cache>
</map>
<map name="UID_BY_SID_KEY">
<near-cache>
- <eviction-policy>NONE</eviction-policy>
+ <eviction eviction-policy="NONE"/>
<in-memory-format>OBJECT</in-memory-format>
<cache-local-entries>true</cache-local-entries>
</near-cache>
</map>
<map name="WBS_KEY">
<near-cache>
- <eviction-policy>NONE</eviction-policy>
+ <eviction eviction-policy="NONE"/>
<in-memory-format>OBJECT</in-memory-format>
<cache-local-entries>true</cache-local-entries>
</near-cache>
</map>
<map name="STREAM_CLIENT_KEY">
<near-cache>
- <eviction-policy>NONE</eviction-policy>
+ <eviction eviction-policy="NONE"/>
<in-memory-format>OBJECT</in-memory-format>
<cache-local-entries>true</cache-local-entries>
</near-cache>
--
To stop receiving notification emails like this one, please contact
solomax@apache.org.