From bb73aea67b5b4e6f48245704436254d192864dec Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 16 Jun 2016 15:27:23 +1000 Subject: [PATCH] Fix memcache session data cache module --- .../modules/sessions/session-data-cache/xmemcached.mod | 2 +- .../jetty/memcached/session/MemcachedSessionDataMap.java | 4 ++-- .../sessions/session-data-cache/session-caching-store.xml | 6 ++++-- .../jetty/server/session/CachingSessionDataStore.java | 6 ++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod b/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod index a4fcc564cab..53b74ed3770 100644 --- a/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod +++ b/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod @@ -10,7 +10,7 @@ maven://org.slf4j/slf4j-api/1.6.6|lib/xmemcached/slf4j-api-1.6.6.jar [lib] lib/jetty-memcached-sessions-${jetty.version}.jar -lib/xmemcached +lib/xmemcached/*.jar [license] Xmemcached is an open source project hosted on Github and released under the Apache 2.0 license. diff --git a/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java b/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java index fa7aa2358a7..01fd626b1f5 100644 --- a/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java +++ b/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java @@ -46,8 +46,8 @@ public class MemcachedSessionDataMap implements SessionDataMap /** - * @param host - * @param port + * @param host address of memcache server + * @param port address of memcache server */ public MemcachedSessionDataMap(String host, String port) { diff --git a/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml b/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml index d2491448e8d..d419be79d1f 100644 --- a/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml +++ b/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml @@ -8,7 +8,9 @@ - + + + @@ -17,7 +19,7 @@ - + diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java index cb64e0e745f..216e239e764 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java @@ -21,7 +21,7 @@ package org.eclipse.jetty.server.session; import java.util.Set; -import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.component.ContainerLifeCycle; /** * CachingSessionDataStore @@ -42,7 +42,7 @@ import org.eclipse.jetty.util.component.AbstractLifeCycle; * possible that failures can result in cache inconsistency. * */ -public class CachingSessionDataStore extends AbstractLifeCycle implements SessionDataStore +public class CachingSessionDataStore extends ContainerLifeCycle implements SessionDataStore { /** @@ -64,7 +64,9 @@ public class CachingSessionDataStore extends AbstractLifeCycle implements Sessio public CachingSessionDataStore (SessionDataMap cache, SessionDataStore store) { _cache = cache; + addBean(_cache,true); _store = store; + addBean(_store,true); }