org.jgroups
diff --git a/clusterbench-ee10-web/src/main/webapp-granular/WEB-INF/jboss-web.xml b/clusterbench-ee10-web/src/main/webapp-granular/WEB-INF/jboss-web.xml
deleted file mode 100644
index 954d4168..00000000
--- a/clusterbench-ee10-web/src/main/webapp-granular/WEB-INF/jboss-web.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- ATTRIBUTE
-
-
-
diff --git a/clusterbench-ee10-web/src/main/webapp-granular/WEB-INF/web.xml b/clusterbench-ee10-web/src/main/webapp-granular/WEB-INF/web.xml
deleted file mode 100644
index 4ebfa624..00000000
--- a/clusterbench-ee10-web/src/main/webapp-granular/WEB-INF/web.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-
- index.html
-
-
- ${enable.security.start}
-
-
- All
- /*
-
-
- Admin
- User
-
-
-
-
- FORM
- ApplicationRealm
-
- /login.jsp
- /error.jsp
-
-
-
-
- Admin
-
-
- User
-
- ${enable.security.end}
-
-
diff --git a/clusterbench-ee10-web/src/main/webapp-granular/error.jsp b/clusterbench-ee10-web/src/main/webapp-granular/error.jsp
deleted file mode 100644
index 4c82ad8b..00000000
--- a/clusterbench-ee10-web/src/main/webapp-granular/error.jsp
+++ /dev/null
@@ -1,48 +0,0 @@
-<%@ page import="java.util.*" %>
-
-
-
- Authentication Error
-
-
-
- Authentication Error
- HTTP Request Headers Received:
-
- <% Enumeration enumeration = request.getHeaderNames();
- while (enumeration.hasMoreElements()) {
- String name= (String) enumeration.nextElement();
- String value = request.getHeader(name);
- %>
-
-
- <%=name %>
- |
-
- <%=value %>
- |
-
- <%
- }
- %>
-
- HTTP Request Headers Returned:
-
- <%
- for (String name1 : response.getHeaderNames()) {
- String value1 = response.getHeader(name1);
- %>
-
-
- <%=name1 %>
- |
-
- <%=value1 %>
- |
-
- <%
- }
- %>
-
-
-
\ No newline at end of file
diff --git a/clusterbench-ee10-web/src/main/webapp-granular/favicon.ico b/clusterbench-ee10-web/src/main/webapp-granular/favicon.ico
deleted file mode 100644
index d558523e..00000000
Binary files a/clusterbench-ee10-web/src/main/webapp-granular/favicon.ico and /dev/null differ
diff --git a/clusterbench-ee10-web/src/main/webapp-granular/index.html b/clusterbench-ee10-web/src/main/webapp-granular/index.html
deleted file mode 100644
index 98ecd09f..00000000
--- a/clusterbench-ee10-web/src/main/webapp-granular/index.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ClusterBench
-
-
-
-
- Hello World, Hello ClusterBench!
- Flavor
- EE10 -- Granular
-
- Usage
-
-
- Sources
-
- https://github.com/clusterbench/clusterbench
-
-
-
diff --git a/clusterbench-ee10-web/src/main/webapp-granular/login.jsp b/clusterbench-ee10-web/src/main/webapp-granular/login.jsp
deleted file mode 100644
index e674778b..00000000
--- a/clusterbench-ee10-web/src/main/webapp-granular/login.jsp
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/integration-tests/wildfly/src/test/java/org/jboss/test/clusterbench/it/wildfly/GranularServletIT.java b/integration-tests/wildfly/src/test/java/org/jboss/test/clusterbench/it/wildfly/GranularServletIT.java
new file mode 100644
index 00000000..5587c029
--- /dev/null
+++ b/integration-tests/wildfly/src/test/java/org/jboss/test/clusterbench/it/wildfly/GranularServletIT.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright The ClusterBench Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package org.jboss.test.clusterbench.it.wildfly;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.util.Arrays;
+import java.util.Optional;
+
+import org.apache.http.Header;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit5.ArquillianExtension;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+/**
+ * Test for {@link org.jboss.test.clusterbench.web.granular.GranularHttpSessionServlet}.
+ *
+ * @author Radoslav Husar
+ */
+@ExtendWith(ArquillianExtension.class)
+@RunAsClient
+public class GranularServletIT extends AbstractWildFlyIT {
+
+ @Test
+ public void test() throws Exception {
+ try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
+ HttpGet httpGet = new HttpGet("http://localhost:8080/clusterbench/granular");
+
+ try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
+ assertEquals(200, response.getStatusLine().getStatusCode());
+
+ String responseBody = EntityUtils.toString(response.getEntity());
+ assertEquals("0", responseBody);
+
+ // Also ensure session is created
+ Optional header = Arrays.stream(response.getAllHeaders()).filter(h -> Arrays.stream(h.getElements()).anyMatch(e -> e.getName().equals("JSESSIONID"))).findAny();
+ Assertions.assertTrue(header.isPresent());
+ }
+
+ try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
+ assertEquals(200, response.getStatusLine().getStatusCode());
+
+ String responseBody = EntityUtils.toString(response.getEntity());
+ assertEquals("1", responseBody);
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/scripts/infinispan-session-management-attribute.cli b/scripts/infinispan-session-management-attribute.cli
new file mode 100644
index 00000000..9ec9f5be
--- /dev/null
+++ b/scripts/infinispan-session-management-attribute.cli
@@ -0,0 +1,12 @@
+#
+# Copyright The ClusterBench Authors
+# SPDX-License-Identifier: Apache-2.0
+#
+
+# This script reconfigures the default session manager to use `ATTRIBUTE` granularity.
+
+batch
+/subsystem=distributable-web/infinispan-session-management=granular:add(cache-container=web, granularity=ATTRIBUTE)
+/subsystem=distributable-web/infinispan-session-management=granular/affinity=primary-owner:add()
+/subsystem=distributable-web:write-attribute(name=default-session-management, value=granular)
+run-batch