diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index f68e7294c9d..73bd7458865 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -793,5 +793,10 @@ jetty-nosql ${project.version} + + org.eclipse.jetty.memcached + jetty-memcached-sessions + ${project.version} + diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/etc/sessions/gcloud/session-store.xml b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/etc/sessions/gcloud/session-store.xml index f56510075ce..b36ecda743d 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/etc/sessions/gcloud/session-store.xml +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/etc/sessions/gcloud/session-store.xml @@ -9,7 +9,7 @@ - + diff --git a/jetty-infinispan/src/main/config/etc/sessions/infinispan/default.xml b/jetty-infinispan/src/main/config/etc/sessions/infinispan/default.xml index 818248a62b7..755137daeb5 100644 --- a/jetty-infinispan/src/main/config/etc/sessions/infinispan/default.xml +++ b/jetty-infinispan/src/main/config/etc/sessions/infinispan/default.xml @@ -18,7 +18,7 @@ - + diff --git a/jetty-infinispan/src/main/config/etc/sessions/infinispan/remote.xml b/jetty-infinispan/src/main/config/etc/sessions/infinispan/remote.xml index 309c61c0d32..0f55ad09ab1 100644 --- a/jetty-infinispan/src/main/config/etc/sessions/infinispan/remote.xml +++ b/jetty-infinispan/src/main/config/etc/sessions/infinispan/remote.xml @@ -20,7 +20,7 @@ - + diff --git a/jetty-memcached/jetty-memcached-sessions/pom.xml b/jetty-memcached/jetty-memcached-sessions/pom.xml index 6655864b0c2..0f517077c41 100644 --- a/jetty-memcached/jetty-memcached-sessions/pom.xml +++ b/jetty-memcached/jetty-memcached-sessions/pom.xml @@ -25,6 +25,7 @@ org.slf4j slf4j-simple 1.7.9 + test org.eclipse.jetty diff --git a/jetty-memcached/jetty-memcached-sessions/src/main/config/etc/sessions/session-data-cache/xmemcached.xml b/jetty-memcached/jetty-memcached-sessions/src/main/config/etc/sessions/session-data-cache/xmemcached.xml new file mode 100644 index 00000000000..2b957f62760 --- /dev/null +++ b/jetty-memcached/jetty-memcached-sessions/src/main/config/etc/sessions/session-data-cache/xmemcached.xml @@ -0,0 +1,10 @@ + + + + + + + + + + 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 new file mode 100644 index 00000000000..a4fcc564cab --- /dev/null +++ b/jetty-memcached/jetty-memcached-sessions/src/main/config/modules/sessions/session-data-cache/xmemcached.mod @@ -0,0 +1,22 @@ +[description] +Memcache cache for SessionData + +[depends] +session-store + +[files] +maven://com.googlecode.xmemcached/xmemcached/2.0.0|lib/xmemcached/xmemcached-2.0.0.jar +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 + +[license] +Xmemcached is an open source project hosted on Github and released under the Apache 2.0 license. +https://github.com/killme2008/xmemcached +http://www.apache.org/licenses/LICENSE-2.0.html + + +[xml] +etc/sessions/session-data-cache/xmemcached.xml diff --git a/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMapFactory.java b/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMapFactory.java index 7991285b53b..e67bef94516 100644 --- a/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMapFactory.java +++ b/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMapFactory.java @@ -60,13 +60,13 @@ public class MemcachedSessionDataMapFactory implements SessionDataMapFactory - public int getExpiry() + public int getExpirySec() { return _expiry; } - public void setExpiry(int expiry) + public void setExpirySec(int expiry) { _expiry = expiry; } diff --git a/jetty-nosql/src/main/config/etc/sessions/mongo/session-store.xml b/jetty-nosql/src/main/config/etc/sessions/mongo/session-store.xml index c458050b85b..c9176d3a8ca 100644 --- a/jetty-nosql/src/main/config/etc/sessions/mongo/session-store.xml +++ b/jetty-nosql/src/main/config/etc/sessions/mongo/session-store.xml @@ -9,7 +9,7 @@ - + diff --git a/jetty-server/src/main/config/etc/sessions/file/session-store.xml b/jetty-server/src/main/config/etc/sessions/file/session-store.xml index e6e3c71b78f..356c9ff1dd3 100644 --- a/jetty-server/src/main/config/etc/sessions/file/session-store.xml +++ b/jetty-server/src/main/config/etc/sessions/file/session-store.xml @@ -9,7 +9,7 @@ - + diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml index 9f8f198496c..30fde60af63 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml @@ -9,7 +9,7 @@ - + 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 new file mode 100644 index 00000000000..49561b78766 --- /dev/null +++ b/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jetty-server/src/main/config/modules/session-store-cache.mod b/jetty-server/src/main/config/modules/session-store-cache.mod new file mode 100644 index 00000000000..e9a170b823e --- /dev/null +++ b/jetty-server/src/main/config/modules/session-store-cache.mod @@ -0,0 +1,24 @@ +[description] +Enables caching of SessionData in front of a SessionDataStore. + + +[depend] +session-store +sessions/session-data-cache/${session-data-cache} + + +[xml] +etc/sessions/session-data-cache/session-caching-store.xml + + +[ini] +session-data-cache=xmemcached + +[ini-template] + +## Session Data Cache type: xmemcached +session-data-cache=xmemcached +#jetty.session.memcached.host=localhost +#jetty.session.memcached.port=11211 +#jetty.session.memcached.expirySec= +