Skip to content

Commit

Permalink
KNL-1243 circular dependency between old memory service, ETS, UDS cau…
Browse files Browse the repository at this point in the history
…ses NPE on startup

git-svn-id: https://source.sakaiproject.org/svn/kernel/trunk@308936 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
Aaron Zeckoski committed Apr 28, 2014
1 parent d597b54 commit 21bcb62
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ public void init()

M_log.info(this + ".init() - period: " + m_period / 1000 + " batch: " + m_batchWrite + " checkDb: " + m_checkDb);

this.post(this.newEvent("server.start", serverConfigurationService().getString("version.sakai", "unknown") + "/" + serverConfigurationService().getString("version.service", "unknown"), false));
String sakaiVersion = serverConfigurationService().getString("version.sakai", "unknown") + "/" + serverConfigurationService().getString("version.service", "unknown");
M_log.info("Server Start: serverId="+serverConfigurationService().getServerId()+",serverInstance="+serverConfigurationService().getServerInstance()+",serverIdInstance="+serverConfigurationService().getServerIdInstance()+",version="+sakaiVersion);
//this.post(this.newEvent("server.start", sakaiVersion, false));

// initialize the caching server, if enabled
initCacheServer();
Expand Down Expand Up @@ -724,6 +726,13 @@ public Object readSqlResultRecord(ResultSet result)
* Initializes the events cache, if enabled
*/
private void initCacheServer() {
boolean legacyCaching = serverConfigurationService().getBoolean("memory.use.legacy", false); // TODO remove this after 10 merge
if (legacyCaching) {
M_log.warn("Legacy memory service is incompatible with event caching, you must use the new memory service (memory.use.legacy=false) with memory.cluster.enabled=true, using legacy (DB based) event propagation instead");
cachingEnabled = false;
return;
}
// remove down to and including this line
cachingEnabled = serverConfigurationService().getBoolean("memory.cluster.enabled", false);
if (cachingEnabled) {
eventCache = memoryService().newCache("org.sakaiproject.event.impl.ClusterEventTracking.eventsCache");
Expand Down

0 comments on commit 21bcb62

Please sign in to comment.