From d9ecd5e6bcc992f629cb65ac9e4507746cf210d7 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 20 Sep 2017 13:31:49 +1000 Subject: [PATCH] Issue #1818 --- .../etc/sessions/infinispan/default.xml | 1 + .../session-store-infinispan-embedded-910.mod | 33 +++++++++++++++++ .../session-store-infinispan-embedded.mod | 3 ++ .../infinispan-embedded.xml | 5 +++ .../session-store-infinispan-remote-910.mod | 35 +++++++++++++++++++ .../test-infinispan-sessions/pom.xml | 14 +++++++- .../session/ClusteredLastAccessTimeTest.java | 3 -- .../ClusteredSessionScavengingTest.java | 3 -- 8 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded-910.mod create mode 100644 jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded/infinispan-embedded.xml create mode 100644 jetty-infinispan/src/main/config/modules/session-store-infinispan-remote-910.mod 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 cdd7870b8e0..efc565e2fad 100644 --- a/jetty-infinispan/src/main/config/etc/sessions/infinispan/default.xml +++ b/jetty-infinispan/src/main/config/etc/sessions/infinispan/default.xml @@ -9,6 +9,7 @@ + /etc/infinispan-embedded.xml diff --git a/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded-910.mod b/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded-910.mod new file mode 100644 index 00000000000..96b6acb23e1 --- /dev/null +++ b/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded-910.mod @@ -0,0 +1,33 @@ +[description] +Enables session data store in a local Infinispan cache + +[tags] +session + +[provides] +session-store +session-store-infinispan-embedded + +[depend] +sessions + +[files] +maven://org.infinispan/infinispan-embedded/9.1.0.Final|lib/infinispan/infinispan-embedded-9.1.0.Final.jar +basehome:modules/session-store-infinispan-embedded/infinispan-embedded.xml|etc/infinispan-embedded.xml + + +[xml] +etc/sessions/infinispan/default.xml + +[lib] +lib/jetty-infinispan-${jetty.version}.jar +lib/infinispan/*.jar + +[license] +Infinispan is an open source project hosted on Github and released under the Apache 2.0 license. +http://infinispan.org/ +http://www.apache.org/licenses/LICENSE-2.0.html + +[ini-template] +#jetty.session.gracePeriod.seconds=3600 +#jetty.session.savePeriod.seconds=0 diff --git a/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded.mod b/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded.mod index 4addf799a61..1110aaadbd3 100644 --- a/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded.mod +++ b/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded.mod @@ -6,12 +6,15 @@ session [provides] session-store +session-store-infnispan-embedded [depend] sessions [files] maven://org.infinispan/infinispan-embedded/7.1.1.Final|lib/infinispan/infinispan-embedded-7.1.1.Final.jar +basehome:modules/session-store-infinispan-embedded/infinispan-embedded.xml|etc/infinispan-embedded.xml + [xml] etc/sessions/infinispan/default.xml diff --git a/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded/infinispan-embedded.xml b/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded/infinispan-embedded.xml new file mode 100644 index 00000000000..5adc356b1f6 --- /dev/null +++ b/jetty-infinispan/src/main/config/modules/session-store-infinispan-embedded/infinispan-embedded.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jetty-infinispan/src/main/config/modules/session-store-infinispan-remote-910.mod b/jetty-infinispan/src/main/config/modules/session-store-infinispan-remote-910.mod new file mode 100644 index 00000000000..36493531d38 --- /dev/null +++ b/jetty-infinispan/src/main/config/modules/session-store-infinispan-remote-910.mod @@ -0,0 +1,35 @@ +[description] +Enables session data store in a remote Infinispan cache + +[tags] +session + +[provides] +session-store +session-store-infinispan-remote + +[depend] +sessions + +[files] +maven://org.infinispan/infinispan-remote/9.1.0.Final|lib/infinispan/infinispan-remote-9.1.0.Final.jar +basehome:modules/session-store-infinispan-remote/ + +[xml] +etc/sessions/infinispan/remote.xml + +[lib] +lib/jetty-infinispan-${jetty.version}.jar +lib/infinispan/*.jar + +[license] +Infinispan is an open source project hosted on Github and released under the Apache 2.0 license. +http://infinispan.org/ +http://www.apache.org/licenses/LICENSE-2.0.html + + +[ini-template] +#jetty.session.infinispan.remoteCacheName=sessions +#jetty.session.infinispan.idleTimeout.seconds=0 +#jetty.session.gracePeriod.seconds=3600 +#jetty.session.savePeriod.seconds=0 diff --git a/tests/test-sessions/test-infinispan-sessions/pom.xml b/tests/test-sessions/test-infinispan-sessions/pom.xml index f13a308a84a..f4f5440330d 100644 --- a/tests/test-sessions/test-infinispan-sessions/pom.xml +++ b/tests/test-sessions/test-infinispan-sessions/pom.xml @@ -84,6 +84,12 @@ org.eclipse.jetty jetty-infinispan ${project.version} + + + org.infinispan + infinispan-core + + org.eclipse.jetty @@ -96,10 +102,16 @@ jetty-test-helper test + + org.infinispan + infinispan-core + 9.1.0.Final + test + org.infinispan infinispan-client-hotrod - 7.1.1.Final + 9.1.0.Final test diff --git a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java index 8523a38dfdc..14fd6b2e0d9 100644 --- a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java +++ b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java @@ -21,7 +21,6 @@ package org.eclipse.jetty.server.session; import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory; import org.eclipse.jetty.toolchain.test.JDK; import org.junit.AfterClass; -import org.junit.Assume; import org.junit.BeforeClass; public class ClusteredLastAccessTimeTest extends AbstractClusteredLastAccessTimeTest @@ -31,8 +30,6 @@ public class ClusteredLastAccessTimeTest extends AbstractClusteredLastAccessTime @BeforeClass public static void setup () throws Exception { - Assume.assumeFalse(JDK.IS_9); - __testSupport = new InfinispanTestSupport(); __testSupport.setUseFileStore(true); __testSupport.setup(); diff --git a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java index a148b22d6a0..538d6c15491 100644 --- a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java +++ b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java @@ -22,7 +22,6 @@ package org.eclipse.jetty.server.session; import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory; import org.eclipse.jetty.toolchain.test.JDK; import org.junit.AfterClass; -import org.junit.Assume; import org.junit.BeforeClass; /** @@ -37,8 +36,6 @@ public class ClusteredSessionScavengingTest extends AbstractClusteredSessionScav @BeforeClass public static void setup () throws Exception { - Assume.assumeFalse(JDK.IS_9); - __testSupport = new InfinispanTestSupport(); __testSupport.setUseFileStore(true); __testSupport.setup();