operations) throws XMLStreamException {
PathAddress address = storeAddress.append(StringTableResourceDefinition.PATH);
- ModelNode operation = Util.createAddOperation(address);
- operations.put(storeAddress.getParent().append(StoreResourceDefinition.WILDCARD_PATH).append(StringTableResourceDefinition.PATH), operation);
+ ModelNode operation = operations.get(address);
for (int i = 0; i < reader.getAttributeCount(); i++) {
XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
@@ -1664,8 +1662,7 @@ private void parseStoreWriteBehind(XMLExtendedStreamReader reader, PathAddress s
private void parseThreadPool(P pool, XMLExtendedStreamReader reader, PathAddress parentAddress, Map operations) throws XMLStreamException {
PathAddress address = parentAddress.append(pool.getPathElement());
- ModelNode operation = Util.createAddOperation(address);
- operations.put(address, operation);
+ ModelNode operation = operations.get(address);
for (int i = 0; i < reader.getAttributeCount(); i++) {
XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
@@ -1701,8 +1698,7 @@ private void parse
private
void parseScheduledThreadPool(P pool, XMLExtendedStreamReader reader, PathAddress parentAddress, Map operations) throws XMLStreamException {
PathAddress address = parentAddress.append(pool.getPathElement());
- ModelNode operation = Util.createAddOperation(address);
- operations.put(address, operation);
+ ModelNode operation = operations.get(address);
for (int i = 0; i < reader.getAttributeCount(); i++) {
XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
@@ -1827,6 +1823,8 @@ private void parseRemoteContainer(XMLExtendedStreamReader reader, PathAddress su
}
}
+ addRequiredChildOperations(address, RemoteCacheContainerResourceDefinition.REQUIRED_CHILDREN, operations);
+
while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
XMLElement element = XMLElement.forName(reader.getLocalName());
switch (element) {
@@ -1880,8 +1878,7 @@ private void parseRemoteContainer(XMLExtendedStreamReader reader, PathAddress su
private void parseConnectionPool(XMLExtendedStreamReader reader, PathAddress cacheAddress, Map operations) throws XMLStreamException {
PathAddress address = cacheAddress.append(ConnectionPoolResourceDefinition.PATH);
- ModelNode operation = Util.createAddOperation(address);
- operations.put(address, operation);
+ ModelNode operation = operations.get(address);
for (int i = 0; i < reader.getAttributeCount(); i++) {
XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
@@ -1958,8 +1955,7 @@ private void parseRemoteCluster(XMLExtendedStreamReader reader, PathAddress clus
private void parseRemoteCacheContainerSecurity(XMLExtendedStreamReader reader, PathAddress containerAddress, Map operations) throws XMLStreamException {
PathAddress address = containerAddress.append(SecurityResourceDefinition.PATH);
- ModelNode operation = Util.createAddOperation(address);
- operations.put(address, operation);
+ ModelNode operation = operations.get(address);
for (int i = 0; i < reader.getAttributeCount(); i++) {
XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
@@ -2002,4 +1998,19 @@ private static void readElement(XMLExtendedStreamReader reader, ModelNode operat
parser.parseAndSetParameter(definition, reader.getElementText(), operation, reader);
}
}
+
+ private static void addRequiredChildOperations(PathAddress parentAddress, Set children, Map operations) {
+ // WFLY-18401 Add required children to boot operations
+ for (PathElement child : children) {
+ PathAddress address = parentAddress.append(child);
+ operations.put(address, Util.createAddOperation(address));
+ }
+ }
+
+ private static void addRequiredSingletonChildOperations(PathAddress parentAddress, Set children, Map operations) {
+ // WFLY-18401 Add required singleton children to boot operations
+ for (PathElement child : children) {
+ operations.put(parentAddress.append(child.getKey()), Util.createAddOperation(parentAddress.append(child)));
+ }
+ }
}
diff --git a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/JDBCStoreResourceDefinition.java b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/JDBCStoreResourceDefinition.java
index 315797d882c6..96b7e2448a38 100644
--- a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/JDBCStoreResourceDefinition.java
+++ b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/JDBCStoreResourceDefinition.java
@@ -22,6 +22,7 @@
package org.jboss.as.clustering.infinispan.subsystem;
+import java.util.Set;
import java.util.function.UnaryOperator;
import org.infinispan.persistence.jdbc.common.DatabaseType;
@@ -78,12 +79,14 @@ public AttributeDefinition getDefinition() {
}
}
+ static final Set REQUIRED_CHILDREN = Set.of(StringTableResourceDefinition.PATH);
+
static class ResourceDescriptorConfigurator implements UnaryOperator {
@Override
public ResourceDescriptor apply(ResourceDescriptor descriptor) {
return descriptor.addAttributes(Attribute.class)
- .addRequiredChildren(StringTableResourceDefinition.PATH)
+ .addRequiredChildren(REQUIRED_CHILDREN)
;
}
}
diff --git a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/SharedStateCacheResourceDefinition.java b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/SharedStateCacheResourceDefinition.java
index 8f15b1b230bf..8a39962def67 100644
--- a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/SharedStateCacheResourceDefinition.java
+++ b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/SharedStateCacheResourceDefinition.java
@@ -22,6 +22,7 @@
package org.jboss.as.clustering.infinispan.subsystem;
+import java.util.Set;
import java.util.function.UnaryOperator;
import org.infinispan.Cache;
@@ -38,6 +39,8 @@
*/
public class SharedStateCacheResourceDefinition extends ClusteredCacheResourceDefinition {
+ static final Set REQUIRED_CHILDREN = Set.of(PartitionHandlingResourceDefinition.PATH, StateTransferResourceDefinition.PATH, BackupsResourceDefinition.PATH);
+
private static class ResourceDescriptorConfigurator implements UnaryOperator {
private final UnaryOperator configurator;
@@ -47,7 +50,7 @@ private static class ResourceDescriptorConfigurator implements UnaryOperator REQUIRED_SINGLETON_CHILDREN = Set.of(StoreWriteThroughResourceDefinition.PATH);
+
private final UnaryOperator configurator;
private final ResourceServiceConfiguratorFactory factory;
@@ -142,7 +145,7 @@ public ManagementResourceRegistration register(ManagementResourceRegistration pa
.addAttributes(Attribute.class)
.addAttributes(DeprecatedAttribute.class)
.addCapabilities(Capability.class)
- .addRequiredSingletonChildren(StoreWriteThroughResourceDefinition.PATH)
+ .addRequiredSingletonChildren(REQUIRED_SINGLETON_CHILDREN)
;
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this.factory);
new SimpleResourceRegistrar(descriptor, handler).register(registration);
diff --git a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/StoreServiceConfigurator.java b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/StoreServiceConfigurator.java
index c207017aa490..2362f77c04ce 100644
--- a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/StoreServiceConfigurator.java
+++ b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/StoreServiceConfigurator.java
@@ -28,6 +28,7 @@
import java.util.Properties;
import java.util.function.Consumer;
+import org.infinispan.commons.configuration.Combine;
import org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder;
import org.infinispan.configuration.cache.AsyncStoreConfiguration;
import org.infinispan.configuration.cache.ConfigurationBuilder;
@@ -98,7 +99,7 @@ public PersistenceConfiguration get() {
.withProperties(this.properties)
;
this.accept(builder);
- return builder.async().read(this.async.get()).persistence().create();
+ return builder.async().read(this.async.get(), Combine.DEFAULT).persistence().create();
}
boolean isPurgeOnStartup() {
diff --git a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/remote/RemoteCacheContainerResourceDefinition.java b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/remote/RemoteCacheContainerResourceDefinition.java
index 8c6b3044df0f..702c9bf8d3fd 100644
--- a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/remote/RemoteCacheContainerResourceDefinition.java
+++ b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/remote/RemoteCacheContainerResourceDefinition.java
@@ -23,6 +23,7 @@
package org.jboss.as.clustering.infinispan.subsystem.remote;
import java.util.EnumSet;
+import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.function.UnaryOperator;
@@ -228,6 +229,8 @@ public SimpleAttributeDefinitionBuilder apply(SimpleAttributeDefinitionBuilder b
}
}
+ public static final Set REQUIRED_CHILDREN = Set.of(ConnectionPoolResourceDefinition.PATH, ThreadPoolResourceDefinition.CLIENT.getPathElement(), SecurityResourceDefinition.PATH);
+
public RemoteCacheContainerResourceDefinition() {
super(WILDCARD_PATH, InfinispanExtension.SUBSYSTEM_RESOLVER.createChildResolver(WILDCARD_PATH));
}
@@ -241,7 +244,7 @@ public ManagementResourceRegistration register(ManagementResourceRegistration pa
.addAttributes(ListAttribute.class)
.addAttributes(DeprecatedAttribute.class)
.addCapabilities(Capability.class)
- .addRequiredChildren(ConnectionPoolResourceDefinition.PATH, ThreadPoolResourceDefinition.CLIENT.getPathElement(), SecurityResourceDefinition.PATH)
+ .addRequiredChildren(REQUIRED_CHILDREN)
.setResourceTransformation(RemoteCacheContainerResource::new)
;
ServiceValueExecutorRegistry executors = new ServiceValueExecutorRegistry<>();
diff --git a/clustering/infinispan/extension/src/main/resources/schema/jboss-as-infinispan_14_0.xsd b/clustering/infinispan/extension/src/main/resources/schema/jboss-as-infinispan_14_0.xsd
index 44c48d51f6ea..082058b8bae2 100644
--- a/clustering/infinispan/extension/src/main/resources/schema/jboss-as-infinispan_14_0.xsd
+++ b/clustering/infinispan/extension/src/main/resources/schema/jboss-as-infinispan_14_0.xsd
@@ -361,7 +361,7 @@
-
+
The timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.
diff --git a/clustering/infinispan/marshalling/pom.xml b/clustering/infinispan/marshalling/pom.xml
index 624b008d0bfa..d45ff3b7c7c1 100644
--- a/clustering/infinispan/marshalling/pom.xml
+++ b/clustering/infinispan/marshalling/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-infinispan-marshalling
diff --git a/clustering/infinispan/pom.xml b/clustering/infinispan/pom.xml
index 7cf74469b406..b84a49285b8a 100644
--- a/clustering/infinispan/pom.xml
+++ b/clustering/infinispan/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-infinispan
diff --git a/clustering/jgroups/api/pom.xml b/clustering/jgroups/api/pom.xml
index e2115cd382b4..d721e64850c4 100644
--- a/clustering/jgroups/api/pom.xml
+++ b/clustering/jgroups/api/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-jgroups-api
diff --git a/clustering/jgroups/extension/pom.xml b/clustering/jgroups/extension/pom.xml
index e3f696a4b868..925c6da4997e 100644
--- a/clustering/jgroups/extension/pom.xml
+++ b/clustering/jgroups/extension/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-jgroups-extension
diff --git a/clustering/jgroups/extension/src/main/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemSchema.java b/clustering/jgroups/extension/src/main/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemSchema.java
index ac7a37b38eaf..ec0585fb444c 100644
--- a/clustering/jgroups/extension/src/main/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemSchema.java
+++ b/clustering/jgroups/extension/src/main/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemSchema.java
@@ -25,7 +25,6 @@
import javax.xml.stream.XMLStreamException;
-import org.jboss.as.controller.LegacySubsystemURN;
import org.jboss.as.controller.SubsystemSchema;
import org.jboss.as.controller.xml.VersionedNamespace;
import org.jboss.dmr.ModelNode;
@@ -54,7 +53,7 @@ public enum JGroupsSubsystemSchema implements SubsystemSchema namespace;
JGroupsSubsystemSchema(int major, int minor) {
- this.namespace = new LegacySubsystemURN<>(JGroupsExtension.SUBSYSTEM_NAME, new IntVersion(major, minor));
+ this.namespace = SubsystemSchema.createLegacySubsystemURN(JGroupsExtension.SUBSYSTEM_NAME, new IntVersion(major, minor));
}
@Override
diff --git a/clustering/jgroups/pom.xml b/clustering/jgroups/pom.xml
index b929bf186479..79a745533616 100644
--- a/clustering/jgroups/pom.xml
+++ b/clustering/jgroups/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-jgroups
diff --git a/clustering/jgroups/spi/pom.xml b/clustering/jgroups/spi/pom.xml
index cf7ed80363a6..586dc1d1164c 100644
--- a/clustering/jgroups/spi/pom.xml
+++ b/clustering/jgroups/spi/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-jgroups-spi
diff --git a/clustering/marshalling/api/pom.xml b/clustering/marshalling/api/pom.xml
index deefc49acedb..518ad7771693 100644
--- a/clustering/marshalling/api/pom.xml
+++ b/clustering/marshalling/api/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-marshalling-api
diff --git a/clustering/marshalling/jboss/pom.xml b/clustering/marshalling/jboss/pom.xml
index f0ebfb910d4c..21e7bff7bd58 100644
--- a/clustering/marshalling/jboss/pom.xml
+++ b/clustering/marshalling/jboss/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-marshalling-jboss
diff --git a/clustering/marshalling/pom.xml b/clustering/marshalling/pom.xml
index 524455a241da..ef3c11cbb28a 100644
--- a/clustering/marshalling/pom.xml
+++ b/clustering/marshalling/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-marshalling
diff --git a/clustering/marshalling/protostream/pom.xml b/clustering/marshalling/protostream/pom.xml
index 6bbbbff7ceae..338a22d092ea 100644
--- a/clustering/marshalling/protostream/pom.xml
+++ b/clustering/marshalling/protostream/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-marshalling-protostream
diff --git a/clustering/marshalling/spi/pom.xml b/clustering/marshalling/spi/pom.xml
index 342138eefa73..0180195fd557 100644
--- a/clustering/marshalling/spi/pom.xml
+++ b/clustering/marshalling/spi/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-marshalling-spi
diff --git a/clustering/pom.xml b/clustering/pom.xml
index e8f942d22601..30edfe38ec58 100644
--- a/clustering/pom.xml
+++ b/clustering/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering
diff --git a/clustering/server/api/pom.xml b/clustering/server/api/pom.xml
index fc8204f31fbb..f69a049ff56e 100644
--- a/clustering/server/api/pom.xml
+++ b/clustering/server/api/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-server-api
diff --git a/clustering/server/extension/pom.xml b/clustering/server/extension/pom.xml
index d78bca5c9a7e..93b926aace20 100644
--- a/clustering/server/extension/pom.xml
+++ b/clustering/server/extension/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-server-extension
diff --git a/clustering/server/infinispan/pom.xml b/clustering/server/infinispan/pom.xml
index 4c6e7a41bfc0..99933a17fce0 100644
--- a/clustering/server/infinispan/pom.xml
+++ b/clustering/server/infinispan/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-server-infinispan
diff --git a/clustering/server/pom.xml b/clustering/server/pom.xml
index e69b8117de77..7c3e1638b61c 100644
--- a/clustering/server/pom.xml
+++ b/clustering/server/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-server
diff --git a/clustering/server/service/pom.xml b/clustering/server/service/pom.xml
index 2f892b6554b8..d0e1e206608b 100644
--- a/clustering/server/service/pom.xml
+++ b/clustering/server/service/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-server-service
diff --git a/clustering/server/spi/pom.xml b/clustering/server/spi/pom.xml
index 8f5b678f5580..409683efc7e8 100644
--- a/clustering/server/spi/pom.xml
+++ b/clustering/server/spi/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-server-spi
diff --git a/clustering/service/pom.xml b/clustering/service/pom.xml
index c933e88850fb..1eebfd938a90 100644
--- a/clustering/service/pom.xml
+++ b/clustering/service/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-service
diff --git a/clustering/singleton/api/pom.xml b/clustering/singleton/api/pom.xml
index 15f4caf666b1..091372cde142 100644
--- a/clustering/singleton/api/pom.xml
+++ b/clustering/singleton/api/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-singleton-api
diff --git a/clustering/singleton/extension/pom.xml b/clustering/singleton/extension/pom.xml
index b34af09f24ad..b1412326edce 100644
--- a/clustering/singleton/extension/pom.xml
+++ b/clustering/singleton/extension/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-singleton-extension
diff --git a/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/SingletonSubsystemSchema.java b/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/SingletonSubsystemSchema.java
index b5f4d4289503..7fdb46480512 100644
--- a/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/SingletonSubsystemSchema.java
+++ b/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/SingletonSubsystemSchema.java
@@ -25,7 +25,6 @@
import javax.xml.stream.XMLStreamException;
-import org.jboss.as.controller.LegacySubsystemURN;
import org.jboss.as.controller.SubsystemSchema;
import org.jboss.as.controller.xml.VersionedNamespace;
import org.jboss.dmr.ModelNode;
@@ -45,7 +44,7 @@ public enum SingletonSubsystemSchema implements SubsystemSchema namespace;
SingletonSubsystemSchema(int major, int minor) {
- this.namespace = new LegacySubsystemURN<>(SingletonExtension.SUBSYSTEM_NAME, new IntVersion(major, minor));
+ this.namespace = SubsystemSchema.createLegacySubsystemURN(SingletonExtension.SUBSYSTEM_NAME, new IntVersion(major, minor));
}
@Override
diff --git a/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/deployment/SingletonDeploymentSchema.java b/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/deployment/SingletonDeploymentSchema.java
index 5e29c0b519c9..f5fd4d748b85 100644
--- a/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/deployment/SingletonDeploymentSchema.java
+++ b/clustering/singleton/extension/src/main/java/org/wildfly/extension/clustering/singleton/deployment/SingletonDeploymentSchema.java
@@ -22,10 +22,12 @@
package org.wildfly.extension.clustering.singleton.deployment;
+import java.util.List;
+
import javax.xml.stream.XMLStreamException;
+import org.jboss.as.controller.xml.IntVersionSchema;
import org.jboss.as.controller.xml.VersionedNamespace;
-import org.jboss.as.controller.xml.VersionedURN;
import org.jboss.as.controller.xml.XMLElementSchema;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.server.deployment.jbossallxml.JBossAllSchema;
@@ -45,7 +47,7 @@ public enum SingletonDeploymentSchema implements XMLElementSchema namespace;
SingletonDeploymentSchema(int major, int minor) {
- this.namespace = new VersionedURN<>(VersionedURN.JBOSS_IDENTIFIER, this.getLocalName(), new IntVersion(major, minor));
+ this.namespace = IntVersionSchema.createURN(List.of(IntVersionSchema.JBOSS_IDENTIFIER, this.getLocalName()), new IntVersion(major, minor));
}
@Override
diff --git a/clustering/singleton/pom.xml b/clustering/singleton/pom.xml
index e12cda7f1fe1..f0180a7d5d0a 100644
--- a/clustering/singleton/pom.xml
+++ b/clustering/singleton/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-singleton
diff --git a/clustering/singleton/server/pom.xml b/clustering/singleton/server/pom.xml
index 1445097cc5dd..83539b89d636 100644
--- a/clustering/singleton/server/pom.xml
+++ b/clustering/singleton/server/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-singleton-server
diff --git a/clustering/singleton/service/pom.xml b/clustering/singleton/service/pom.xml
index c950019769a4..d0550b55b076 100644
--- a/clustering/singleton/service/pom.xml
+++ b/clustering/singleton/service/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-singleton-service
diff --git a/clustering/web/api/pom.xml b/clustering/web/api/pom.xml
index 72651e37e8ff..1f7fedcb3068 100644
--- a/clustering/web/api/pom.xml
+++ b/clustering/web/api/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-api
diff --git a/clustering/web/cache/pom.xml b/clustering/web/cache/pom.xml
index c790a1dfac9d..2497736fa264 100644
--- a/clustering/web/cache/pom.xml
+++ b/clustering/web/cache/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-cache
diff --git a/clustering/web/container/pom.xml b/clustering/web/container/pom.xml
index 4398e215b189..91de48efa196 100644
--- a/clustering/web/container/pom.xml
+++ b/clustering/web/container/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-container
diff --git a/clustering/web/extension/pom.xml b/clustering/web/extension/pom.xml
index 73b2c188c3a3..9e424313871f 100644
--- a/clustering/web/extension/pom.xml
+++ b/clustering/web/extension/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-extension
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemModel.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemModel.java
index 7c7a9d3abb54..11507aac71b8 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemModel.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemModel.java
@@ -36,10 +36,11 @@ public enum DistributableWebSubsystemModel implements SubsystemModel {
VERSION_1_0_0(1, 0, 0), // WildFly 17
*/
- VERSION_2_0_0(2, 0, 0), // WildFly 18-26
- VERSION_3_0_0(3, 0, 0), // WildFly 27
+ VERSION_2_0_0(2, 0, 0), // WildFly 18-26, EAP 7.4
+ VERSION_3_0_0(3, 0, 0), // WildFly 27-29
+ VERSION_4_0_0(4, 0, 0), // WildFly 30-present, EAP 8.0
;
- public static final DistributableWebSubsystemModel CURRENT = VERSION_3_0_0;
+ public static final DistributableWebSubsystemModel CURRENT = VERSION_4_0_0;
private final ModelVersion version;
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemSchema.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemSchema.java
index cfe766c5bd8d..0c5926c8414d 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemSchema.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebSubsystemSchema.java
@@ -22,9 +22,15 @@
package org.wildfly.extension.clustering.web;
-import org.jboss.as.controller.LegacySubsystemURN;
+import static org.jboss.as.controller.PersistentResourceXMLDescription.builder;
+
+import java.util.stream.Stream;
+
+import org.jboss.as.clustering.controller.Attribute;
import org.jboss.as.controller.PersistentResourceXMLDescription;
import org.jboss.as.controller.PersistentSubsystemSchema;
+import org.jboss.as.controller.SubsystemSchema;
+import org.jboss.as.controller.PersistentResourceXMLDescription.PersistentResourceXMLBuilder;
import org.jboss.as.controller.xml.VersionedNamespace;
import org.jboss.staxmapper.IntVersion;
@@ -35,15 +41,16 @@
public enum DistributableWebSubsystemSchema implements PersistentSubsystemSchema {
VERSION_1_0(1, 0), // WildFly 17
- VERSION_2_0(2, 0), // WildFly 18-26.1
- VERSION_3_0(3, 0), // WildFly 27
+ VERSION_2_0(2, 0), // WildFly 18-26.1, EAP 7.4
+ VERSION_3_0(3, 0), // WildFly 27-29
+ VERSION_4_0(4, 0), // WildFly 30-present, EAP 8.0
;
- static final DistributableWebSubsystemSchema CURRENT = VERSION_3_0;
+ static final DistributableWebSubsystemSchema CURRENT = VERSION_4_0;
private final VersionedNamespace namespace;
DistributableWebSubsystemSchema(int major, int minor) {
- this.namespace = new LegacySubsystemURN<>(DistributableWebExtension.SUBSYSTEM_NAME, new IntVersion(major, minor));
+ this.namespace = SubsystemSchema.createLegacySubsystemURN(DistributableWebExtension.SUBSYSTEM_NAME, new IntVersion(major, minor));
}
@Override
@@ -53,6 +60,33 @@ public VersionedNamespace getNamesp
@Override
public PersistentResourceXMLDescription getXMLDescription() {
- return DistributableWebXMLDescriptionFactory.INSTANCE.apply(this);
+ return builder(DistributableWebResourceDefinition.PATH, this.namespace).addAttributes(Attribute.stream(DistributableWebResourceDefinition.Attribute.class))
+ .addChild(this.getInfinispanSessionManagementResourceXMLBuilder())
+ .addChild(this.getHotRodSessionManagementResourceXMLBuilder())
+ .addChild(builder(InfinispanSSOManagementResourceDefinition.WILDCARD_PATH).addAttributes(Attribute.stream(InfinispanSSOManagementResourceDefinition.Attribute.class)))
+ .addChild(builder(HotRodSSOManagementResourceDefinition.WILDCARD_PATH).addAttributes(Attribute.stream(HotRodSSOManagementResourceDefinition.Attribute.class)))
+ .addChild(builder(LocalRoutingProviderResourceDefinition.PATH).setXmlElementName("local-routing"))
+ .addChild(builder(InfinispanRoutingProviderResourceDefinition.PATH).addAttributes(Attribute.stream(InfinispanRoutingProviderResourceDefinition.Attribute.class)).setXmlElementName("infinispan-routing"))
+ .build();
+ }
+
+ private PersistentResourceXMLBuilder getInfinispanSessionManagementResourceXMLBuilder() {
+ PersistentResourceXMLBuilder builder = builder(InfinispanSessionManagementResourceDefinition.WILDCARD_PATH).addAttributes(Stream.concat(Attribute.stream(InfinispanSessionManagementResourceDefinition.Attribute.class), Attribute.stream(SessionManagementResourceDefinition.Attribute.class)));
+ addAffinityChildren(builder).addChild(builder(PrimaryOwnerAffinityResourceDefinition.PATH).setXmlElementName("primary-owner-affinity"));
+ if (this.namespace.since(DistributableWebSubsystemSchema.VERSION_2_0)) {
+ builder.addChild(builder(RankedAffinityResourceDefinition.PATH).addAttributes(Attribute.stream(RankedAffinityResourceDefinition.Attribute.class)).setXmlElementName("ranked-affinity"));
+ }
+ return builder;
+ }
+
+ private PersistentResourceXMLBuilder getHotRodSessionManagementResourceXMLBuilder() {
+ return addAffinityChildren(builder(HotRodSessionManagementResourceDefinition.WILDCARD_PATH).addAttributes(Stream.concat(Attribute.stream(HotRodSessionManagementResourceDefinition.Attribute.class), Attribute.stream(SessionManagementResourceDefinition.Attribute.class))));
+ }
+
+ private static PersistentResourceXMLBuilder addAffinityChildren(PersistentResourceXMLBuilder builder) {
+ return builder
+ .addChild(builder(NoAffinityResourceDefinition.PATH).setXmlElementName("no-affinity"))
+ .addChild(builder(LocalAffinityResourceDefinition.PATH).setXmlElementName("local-affinity"))
+ ;
}
}
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebXMLDescriptionFactory.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebXMLDescriptionFactory.java
deleted file mode 100644
index 96945834781d..000000000000
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/DistributableWebXMLDescriptionFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2018, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.wildfly.extension.clustering.web;
-
-import static org.jboss.as.controller.PersistentResourceXMLDescription.builder;
-
-import java.util.function.Function;
-import java.util.stream.Stream;
-
-import org.jboss.as.clustering.controller.Attribute;
-import org.jboss.as.controller.PersistentResourceXMLDescription;
-import org.jboss.as.controller.PersistentResourceXMLDescription.PersistentResourceXMLBuilder;
-
-/**
- * XML description factory for the distributable-web subsystem.
- * @author Paul Ferraro
- */
-public enum DistributableWebXMLDescriptionFactory implements Function {
- INSTANCE;
-
- @Override
- public PersistentResourceXMLDescription apply(DistributableWebSubsystemSchema schema) {
- return builder(DistributableWebResourceDefinition.PATH, schema.getNamespace()).addAttributes(Attribute.stream(DistributableWebResourceDefinition.Attribute.class))
- .addChild(getInfinispanSessionManagementResourceXMLBuilder(schema))
- .addChild(getHotRodSessionManagementResourceXMLBuilder(schema))
- .addChild(builder(InfinispanSSOManagementResourceDefinition.WILDCARD_PATH).addAttributes(Attribute.stream(InfinispanSSOManagementResourceDefinition.Attribute.class)))
- .addChild(builder(HotRodSSOManagementResourceDefinition.WILDCARD_PATH).addAttributes(Attribute.stream(HotRodSSOManagementResourceDefinition.Attribute.class)))
- .addChild(builder(LocalRoutingProviderResourceDefinition.PATH).setXmlElementName("local-routing"))
- .addChild(builder(InfinispanRoutingProviderResourceDefinition.PATH).addAttributes(Attribute.stream(InfinispanRoutingProviderResourceDefinition.Attribute.class)).setXmlElementName("infinispan-routing"))
- .build();
- }
-
- private static PersistentResourceXMLBuilder getInfinispanSessionManagementResourceXMLBuilder(DistributableWebSubsystemSchema schema) {
- PersistentResourceXMLBuilder builder = builder(InfinispanSessionManagementResourceDefinition.WILDCARD_PATH).addAttributes(Stream.concat(Attribute.stream(InfinispanSessionManagementResourceDefinition.Attribute.class), Attribute.stream(SessionManagementResourceDefinition.Attribute.class)));
- addAffinityChildren(builder).addChild(builder(PrimaryOwnerAffinityResourceDefinition.PATH).setXmlElementName("primary-owner-affinity"));
- if (schema.since(DistributableWebSubsystemSchema.VERSION_2_0)) {
- builder.addChild(builder(RankedAffinityResourceDefinition.PATH).addAttributes(Attribute.stream(RankedAffinityResourceDefinition.Attribute.class)).setXmlElementName("ranked-affinity"));
- }
- return builder;
- }
-
- private static PersistentResourceXMLBuilder getHotRodSessionManagementResourceXMLBuilder(DistributableWebSubsystemSchema schema) {
- return addAffinityChildren(builder(HotRodSessionManagementResourceDefinition.WILDCARD_PATH).addAttributes(Stream.concat(Attribute.stream(HotRodSessionManagementResourceDefinition.Attribute.class), Attribute.stream(SessionManagementResourceDefinition.Attribute.class))));
- }
-
- private static PersistentResourceXMLBuilder addAffinityChildren(PersistentResourceXMLBuilder builder) {
- return builder
- .addChild(builder(NoAffinityResourceDefinition.PATH).setXmlElementName("no-affinity"))
- .addChild(builder(LocalAffinityResourceDefinition.PATH).setXmlElementName("local-affinity"))
- ;
- }
-}
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceDefinition.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceDefinition.java
index 44226dccba70..9281438dd664 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceDefinition.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceDefinition.java
@@ -30,6 +30,7 @@
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
import org.jboss.as.controller.registry.AttributeAccess.Flag;
+import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
import org.wildfly.clustering.infinispan.client.service.InfinispanClientRequirement;
@@ -43,7 +44,7 @@ static PathElement pathElement(String name) {
return PathElement.pathElement("hotrod-session-management", name);
}
- enum Attribute implements org.jboss.as.clustering.controller.Attribute, UnaryOperator {
+ public enum Attribute implements org.jboss.as.clustering.controller.Attribute, UnaryOperator {
REMOTE_CACHE_CONTAINER("remote-cache-container", ModelType.STRING) {
@Override
public SimpleAttributeDefinitionBuilder apply(SimpleAttributeDefinitionBuilder builder) {
@@ -54,7 +55,13 @@ public SimpleAttributeDefinitionBuilder apply(SimpleAttributeDefinitionBuilder b
}
},
CACHE_CONFIGURATION("cache-configuration", ModelType.STRING),
- ;
+ EXPIRATION_THREAD_POOL_SIZE("expiration-thread-pool-size", ModelType.INT) {
+ @Override
+ public SimpleAttributeDefinitionBuilder apply(SimpleAttributeDefinitionBuilder builder) {
+ return builder.setDefaultValue(new ModelNode(16));
+ }
+ },
+ ;
private final AttributeDefinition definition;
Attribute(String name, ModelType type) {
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceTransformer.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceTransformer.java
index 23734d0e237e..d45b2a3c1b9e 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceTransformer.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementResourceTransformer.java
@@ -25,6 +25,7 @@
import java.util.function.Consumer;
import org.jboss.as.controller.ModelVersion;
+import org.jboss.as.controller.transform.description.DiscardAttributeChecker;
import org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder;
/**
@@ -43,5 +44,9 @@ public void accept(ModelVersion version) {
ResourceTransformationDescriptionBuilder builder = this.parent.addChildResource(HotRodSessionManagementResourceDefinition.WILDCARD_PATH);
this.accept(version, builder);
+
+ builder.getAttributeBuilder()
+ .setDiscard(DiscardAttributeChecker.ALWAYS, HotRodSessionManagementResourceDefinition.Attribute.EXPIRATION_THREAD_POOL_SIZE.getName())
+ .end();
}
}
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementServiceConfigurator.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementServiceConfigurator.java
index a20a17f63ce1..678f7adea1ee 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementServiceConfigurator.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/HotRodSessionManagementServiceConfigurator.java
@@ -23,6 +23,7 @@
package org.wildfly.extension.clustering.web;
import static org.wildfly.extension.clustering.web.HotRodSessionManagementResourceDefinition.Attribute.CACHE_CONFIGURATION;
+import static org.wildfly.extension.clustering.web.HotRodSessionManagementResourceDefinition.Attribute.EXPIRATION_THREAD_POOL_SIZE;
import static org.wildfly.extension.clustering.web.HotRodSessionManagementResourceDefinition.Attribute.REMOTE_CACHE_CONTAINER;
import org.jboss.as.controller.OperationContext;
@@ -42,6 +43,7 @@ public class HotRodSessionManagementServiceConfigurator extends SessionManagemen
private volatile String containerName;
private volatile String configurationName;
+ private volatile int expirationThreadPoolSize;
HotRodSessionManagementServiceConfigurator(PathAddress address) {
super(address);
@@ -51,6 +53,7 @@ public class HotRodSessionManagementServiceConfigurator extends SessionManagemen
public ServiceConfigurator configure(OperationContext context, ModelNode model) throws OperationFailedException {
this.containerName = REMOTE_CACHE_CONTAINER.resolveModelAttribute(context, model).asString();
this.configurationName = CACHE_CONFIGURATION.resolveModelAttribute(context, model).asStringOrNull();
+ this.expirationThreadPoolSize = EXPIRATION_THREAD_POOL_SIZE.resolveModelAttribute(context, model).asInt();
return super.configure(context, model);
}
@@ -68,4 +71,9 @@ public String getContainerName() {
public String getConfigurationName() {
return this.configurationName;
}
+
+ @Override
+ public int getExpirationThreadPoolSize() {
+ return this.expirationThreadPoolSize;
+ }
}
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentSchema.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentSchema.java
index 41cbe72ff20d..5131c15070d8 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentSchema.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentSchema.java
@@ -22,10 +22,12 @@
package org.wildfly.extension.clustering.web.deployment;
+import java.util.List;
+
import javax.xml.stream.XMLStreamException;
+import org.jboss.as.controller.xml.IntVersionSchema;
import org.jboss.as.controller.xml.VersionedNamespace;
-import org.jboss.as.controller.xml.VersionedURN;
import org.jboss.as.controller.xml.XMLElementSchema;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.server.deployment.jbossallxml.JBossAllSchema;
@@ -41,11 +43,12 @@ public enum DistributableWebDeploymentSchema implements XMLElementSchema namespace;
DistributableWebDeploymentSchema(int major, int minor) {
- this.namespace = new VersionedURN<>(VersionedURN.JBOSS_IDENTIFIER, this.getLocalName(), new IntVersion(major, minor));
+ this.namespace = IntVersionSchema.createURN(List.of(IntVersionSchema.JBOSS_IDENTIFIER, this.getLocalName()), new IntVersion(major, minor));
}
@Override
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentXMLReader.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentXMLReader.java
index d4a80b5bddf2..6703bc59fee9 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentXMLReader.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/deployment/DistributableWebDeploymentXMLReader.java
@@ -67,6 +67,7 @@ public class DistributableWebDeploymentXMLReader implements XMLElementReader extends DistributableSessionManagementConfiguration, RemoteCacheConfiguration {
+ /**
+ * Returns the size of the thread pool used for processing expiration events from the remote Infinispan cluster.
+ * @return
+ */
+ int getExpirationThreadPoolSize();
}
diff --git a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/session/hotrod/HotRodSessionManagerFactoryServiceConfigurator.java b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/session/hotrod/HotRodSessionManagerFactoryServiceConfigurator.java
index ec5bb517d3e4..4bda5892c399 100644
--- a/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/session/hotrod/HotRodSessionManagerFactoryServiceConfigurator.java
+++ b/clustering/web/extension/src/main/java/org/wildfly/extension/clustering/web/session/hotrod/HotRodSessionManagerFactoryServiceConfigurator.java
@@ -84,14 +84,17 @@ public HotRodSessionManagerFactoryServiceConfigurator(HotRodSessionManagementCon
@Override
public ServiceConfigurator configure(CapabilityServiceSupport support) {
Integer maxActiveSessions = this.getMaxActiveSessions();
- NearCacheMode mode = (maxActiveSessions == null) || (maxActiveSessions == 0) ? NearCacheMode.DISABLED : NearCacheMode.INVALIDATED;
+ NearCacheMode mode = (maxActiveSessions != null) && (maxActiveSessions > 0) ? NearCacheMode.INVALIDATED : NearCacheMode.DISABLED;
String configurationName = this.configuration.getConfigurationName();
String templateName = (configurationName != null) ? configurationName : DefaultTemplate.DIST_SYNC.getTemplateName();
SessionAttributePersistenceStrategy strategy = this.getAttributePersistenceStrategy();
this.cacheConfigurator = new RemoteCacheServiceConfigurator<>(this.getServiceName().append("cache"), this.configuration.getContainerName(), this.getDeploymentName(), new Consumer() {
@Override
public void accept(RemoteCacheConfigurationBuilder builder) {
- builder.forceReturnValues(false).nearCacheMode(mode).templateName(templateName).transactionMode(TransactionMode.NONE).nearCacheFactory(new SessionManagerNearCacheFactory(maxActiveSessions, strategy));
+ builder.forceReturnValues(false).nearCacheMode(mode).templateName(templateName).transactionMode(TransactionMode.NONE);
+ if (mode.invalidated()) {
+ builder.nearCacheFactory(new SessionManagerNearCacheFactory(maxActiveSessions, strategy));
+ }
}
}).configure(support);
this.cache = new ServiceSupplierDependency<>(this.cacheConfigurator.getServiceName());
@@ -157,4 +160,9 @@ public RemoteCache getCache() {
public SpecificationProvider getSpecificationProvider() {
return this.factoryConfiguration.getSpecificationProvider();
}
+
+ @Override
+ public int getExpirationThreadPoolSize() {
+ return this.configuration.getExpirationThreadPoolSize();
+ }
}
diff --git a/clustering/web/extension/src/main/resources/org/wildfly/extension/clustering/web/LocalDescriptions.properties b/clustering/web/extension/src/main/resources/org/wildfly/extension/clustering/web/LocalDescriptions.properties
index b42cbeae3251..a4b6506831f7 100644
--- a/clustering/web/extension/src/main/resources/org/wildfly/extension/clustering/web/LocalDescriptions.properties
+++ b/clustering/web/extension/src/main/resources/org/wildfly/extension/clustering/web/LocalDescriptions.properties
@@ -27,6 +27,7 @@ distributable-web.affinity.ranked.max-routes=The maximum number of routes to enc
distributable-web.hotrod-session-management=HotRod-based session management provider
distributable-web.hotrod-session-management.remote-cache-container=The name of the remote cache container associated with this provider
distributable-web.hotrod-session-management.cache-configuration=The name of cache configuration on the remote cache container.
+distributable-web.hotrod-session-management.expiration-thread-pool-size=Configures the number of threads dedicated to processing expiration events from the remote Infinispan cluster.
distributable-web.single-sign-on-management.add=Adds a distributable single sign-on management provider
distributable-web.single-sign-on-management.remove=Removes a distributable single sign-on management provider
diff --git a/clustering/web/extension/src/main/resources/schema/distributable-web_4_0.xsd b/clustering/web/extension/src/main/resources/schema/distributable-web_4_0.xsd
new file mode 100644
index 000000000000..8b9cd7c9ed71
--- /dev/null
+++ b/clustering/web/extension/src/main/resources/schema/distributable-web_4_0.xsd
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
+
+
+ References an existing session management provider
+
+
+
+
+ Defines a deployment specific Infinispan cache-based session management provider
+
+
+
+
+ Defines a deployment specific HotRod remote cache-based session management provider
+
+
+
+
+
+
+
+
+ References the name of an existing session management provider
+
+
+
+
+
+
+
+ Defines the granularity of cache entry mapping for the attributes of a session.
+
+
+
+
+ Indicates the marshalling implementation used for serializing attributes of a session.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Web requests will have an affinity for the primary owner of a given session.
+ Behaves the same as local-affinity if the backing cache is not distributed nor replicated.
+
+
+
+
+
+
+ Web requests will have an affinity for the first available node in a list comprised of: primary owner, backup nodes, local node (if not a primary nor backup owner).
+ Behaves the same as local-affinity if the cache is not distributed, nor replicated.
+ Must be explicitly supported by the load balancer.
+
+
+
+
+
+
+
+
+ References a cache-container defined by the Infinispan subsystem.
+
+
+
+
+
+ References a cache within the associated cache-container.
+ If unspecified, the default cache of the associated cache-container is assumed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Web requests not have an affinity for any particular server.
+ Intended for use cases where web session state is not maintained within the application server.
+
+
+
+
+
+
+ Web requests have an affinity for the member that last handled a given session.
+ This option corresponds to traditional sticky session behavior.
+
+
+
+
+
+
+ References a remote-cache-container defined by the Infinispan subsystem.
+
+
+
+
+ References a named configuration on the remote server.
+
+
+
+
+ Configures the number of threads dedicated to processing expiration events from the remote Infinispan cluster.
+
+
+
+
+
+
+
+
+
+
+
+ Stores all session attributes within a single cache entry.
+ Generally more expensive than ATTRIBUTE granularity, but preserves any cross-attribute object references.
+
+
+
+
+
+
+ Stores each session attribute within a separate cache entry.
+ Generally more efficient than SESSION granularity, but does not preserve any cross-attribute object references.
+
+
+
+
+
+
+
+
+
+
+
+ Session attributes will be marshalled using JBoss Marshalling.
+
+
+
+
+
+
+ Session attributes will be marshalled using ProtoStream.
+
+
+
+
+
+
+
+
+
+
+
+ Web requests not have an affinity for any particular server.
+ Intended for use cases where web session state is not maintained within the application server.
+
+
+
+
+
+
+ Web requests have an affinity for the member that last handled a given session.
+ This option corresponds to traditional sticky session behavior.
+
+
+
+
+
+
+
+
+
+ The delimiter used to separate ranked routes within the session ID.
+
+
+
+
+ The maximum number of routes to append to the session ID.
+
+
+
+
+
+
+
+
+
+ Identifies an immutable session attribute class.
+
+
+
+
+
+
+
+
+
+
diff --git a/clustering/web/extension/src/main/resources/schema/wildfly-distributable-web_4_0.xsd b/clustering/web/extension/src/main/resources/schema/wildfly-distributable-web_4_0.xsd
new file mode 100644
index 000000000000..0322c5f1736a
--- /dev/null
+++ b/clustering/web/extension/src/main/resources/schema/wildfly-distributable-web_4_0.xsd
@@ -0,0 +1,297 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines an Infinispan cache-based session management provider
+
+
+
+
+ Defines a deployment specific HotRod remote cache-based session management provider
+
+
+
+
+
+
+ Defines an Infinispan cache-based single sign-on management provider
+
+
+
+
+ Defines an HotRod remote cache-based single sign-on management provider
+
+
+
+
+
+
+ Configures support for local routing
+
+
+
+
+ Configures support for cluster-aware routing
+
+
+
+
+
+
+ Identifies the default session management provider for distributable web applications
+
+
+
+
+ Identifies the default single sign-on management provider
+
+
+
+
+
+
+
+ Uniquely identifies this session management provider.
+
+
+
+
+ Defines the granularity of cache entry mapping for the attributes of a session.
+
+
+
+
+ Indicates the marshalling implementation used for serializing attributes of a session.
+
+
+
+
+
+
+
+ Uniquely identifies this single sign-on management provider.
+
+
+
+
+
+
+
+
+
+
+
+
+ Web requests will have an affinity for the primary owner of a given session.
+ Behaves the same as local-affinity if the backing cache is not distributed nor replicated.
+
+
+
+
+
+
+ Web requests will have an affinity for the first available node in a list comprised of: primary owner, backup nodes, local node (if not a primary nor backup owner).
+ Behaves the same as local-affinity if the cache is not distributed, nor replicated.
+ Must be explicitly supported by the load balancer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Web requests not have an affinity for any particular server.
+ Intended for use cases where web session state is not maintained within the application server.
+
+
+
+
+
+
+ Web requests have an affinity for the member that last handled a given session.
+ This option corresponds to traditional sticky session behavior.
+
+
+
+
+
+
+
+
+ Configures the number of threads dedicated to processing expiration events from the remote Infinispan cluster.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ References a cache-container defined by the Infinispan subsystem.
+
+
+
+
+
+ References a cache within the associated cache-container.
+ If unspecified, the default cache of the associated cache-container is assumed.
+
+
+
+
+
+
+
+
+ References a remote-cache-container defined by the Infinispan subsystem.
+
+
+
+
+ References a named configuration on the remote server.
+
+
+
+
+
+
+
+
+
+ Stores all session attributes within a single cache entry.
+ Generally more expensive than ATTRIBUTE granularity, but preserves any cross-attribute object references.
+
+
+
+
+
+
+ Stores each session attribute within a separate cache entry.
+ Generally more efficient than SESSION granularity, but does not preserve any cross-attribute object references.
+
+
+
+
+
+
+
+
+
+
+
+ Session attributes will be marshalled using JBoss Marshalling.
+
+
+
+
+
+
+ Session attributes will be marshalled using ProtoStream.
+
+
+
+
+
+
+
+
+
+
+
+ Web requests not have an affinity for any particular server.
+ Intended for use cases where web session state is not maintained within the application server.
+
+
+
+
+
+
+ Web requests have an affinity for the member that last handled a given session.
+ This option corresponds to traditional sticky session behavior.
+
+
+
+
+
+
+
+
+
+ The delimiter used to separate ranked routes within the session ID.
+
+
+
+
+ The maximum number of routes to append to the session ID.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-4.0.xml b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-4.0.xml
new file mode 100644
index 000000000000..b43cd9b9546d
--- /dev/null
+++ b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-4.0.xml
@@ -0,0 +1,7 @@
+
+
+
+ java.util.Locale
+ java.util.UUID
+
+
diff --git a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-hotrod-4.0.xml b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-hotrod-4.0.xml
new file mode 100644
index 000000000000..a12f44c20665
--- /dev/null
+++ b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-hotrod-4.0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-infinispan-4.0.xml b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-infinispan-4.0.xml
new file mode 100644
index 000000000000..dac8aae85402
--- /dev/null
+++ b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/deployment/distributable-web-infinispan-4.0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ java.util.Locale
+ java.util.UUID
+
+
diff --git a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/distributable-web-4.0.xml b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/distributable-web-4.0.xml
new file mode 100644
index 000000000000..018650d689a1
--- /dev/null
+++ b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/distributable-web-4.0.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-2_0_0.xml b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-2_0_0.xml
index 4d5fb642e032..c351373c0df5 100644
--- a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-2_0_0.xml
+++ b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-2_0_0.xml
@@ -1,11 +1,11 @@
-
+
-
+
diff --git a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-reject.xml b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-reject.xml
index 41a83fd53666..1fe9641c838f 100644
--- a/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-reject.xml
+++ b/clustering/web/extension/src/test/resources/org/wildfly/extension/clustering/web/wildfly-distributable-web-transform-reject.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/clustering/web/hotrod/pom.xml b/clustering/web/hotrod/pom.xml
index 713f13a57753..d83332d36c69 100644
--- a/clustering/web/hotrod/pom.xml
+++ b/clustering/web/hotrod/pom.xml
@@ -31,7 +31,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-hotrod
diff --git a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionAttributesFactoryConfiguration.java b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionAttributesFactoryConfiguration.java
index 6d020a64e793..63ceebcbaa1d 100644
--- a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionAttributesFactoryConfiguration.java
+++ b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionAttributesFactoryConfiguration.java
@@ -22,7 +22,6 @@
package org.wildfly.clustering.web.hotrod.session;
-import org.wildfly.clustering.ee.cache.CacheProperties;
import org.wildfly.clustering.ee.hotrod.HotRodConfiguration;
import org.wildfly.clustering.web.cache.session.SessionAttributesFactoryConfiguration;
@@ -35,9 +34,4 @@
* @param attributes serialized form type
*/
public interface HotRodSessionAttributesFactoryConfiguration extends SessionAttributesFactoryConfiguration, HotRodConfiguration {
-
- @Override
- default CacheProperties getCacheProperties() {
- return HotRodConfiguration.super.getCacheProperties();
- }
}
diff --git a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactory.java b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactory.java
index 289324692c3f..fac36582fa3b 100644
--- a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactory.java
+++ b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactory.java
@@ -22,8 +22,7 @@
package org.wildfly.clustering.web.hotrod.session;
-import java.io.IOException;
-import java.nio.ByteBuffer;
+import java.time.Duration;
import java.time.Instant;
import java.util.Collection;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -36,15 +35,12 @@
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.annotation.ClientCacheEntryExpired;
import org.infinispan.client.hotrod.annotation.ClientListener;
-import org.infinispan.client.hotrod.event.ClientCacheEntryCustomEvent;
-import org.infinispan.commons.io.UnsignedNumeric;
-import org.infinispan.commons.marshall.Marshaller;
+import org.infinispan.client.hotrod.event.ClientCacheEntryExpiredEvent;
import org.wildfly.clustering.Registrar;
import org.wildfly.clustering.Registration;
import org.wildfly.clustering.context.DefaultExecutorService;
import org.wildfly.clustering.context.DefaultThreadFactory;
import org.wildfly.clustering.ee.Remover;
-import org.wildfly.clustering.ee.hotrod.HotRodConfiguration;
import org.wildfly.clustering.web.LocalContextFactory;
import org.wildfly.clustering.web.cache.session.CompositeSessionFactory;
import org.wildfly.clustering.web.cache.session.CompositeSessionMetaDataEntry;
@@ -54,7 +50,7 @@
import org.wildfly.clustering.web.cache.session.SessionAttributesFactory;
import org.wildfly.clustering.web.cache.session.SessionCreationMetaDataEntry;
import org.wildfly.clustering.web.cache.session.SessionMetaDataFactory;
-import org.wildfly.clustering.web.cache.session.SimpleSessionCreationMetaData;
+import org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData;
import org.wildfly.clustering.web.hotrod.logging.Logger;
import org.wildfly.clustering.web.session.ImmutableSession;
import org.wildfly.clustering.web.session.ImmutableSessionAttributes;
@@ -62,18 +58,22 @@
import org.wildfly.security.manager.WildFlySecurityManager;
/**
+ * Factory for creating a {@link org.wildfly.clustering.web.session.Session} backed by a set of {@link RemoteCache} entries.
* @author Paul Ferraro
+ * @param the marshalling context type
+ * @param the session attribute entry type
+ * @param the local context type
*/
-@ClientListener(converterFactoryName = "___eager-key-value-version-converter", useRawData = true) // References org.infinispan.server.hotrod.KeyValueVersionConverterFactory
-public class HotRodSessionFactory extends CompositeSessionFactory implements Registrar> {
+@ClientListener
+public class HotRodSessionFactory extends CompositeSessionFactory implements Registrar> {
- private final RemoteCache> creationMetaDataCache;
+ private final RemoteCache> creationMetaDataCache;
private final RemoteCache accessMetaDataCache;
- private final ImmutableSessionMetaDataFactory> metaDataFactory;
- private final ImmutableSessionAttributesFactory attributesFactory;
+ private final ImmutableSessionMetaDataFactory> metaDataFactory;
+ private final ImmutableSessionAttributesFactory attributesFactory;
private final Remover attributesRemover;
private final Collection> listeners = new CopyOnWriteArraySet<>();
- private final ExecutorService executor = Executors.newCachedThreadPool(new DefaultThreadFactory(this.getClass()));
+ private final ExecutorService executor;
private final boolean nearCacheEnabled;
/**
@@ -83,14 +83,15 @@ public class HotRodSessionFactory extends CompositeSessionFactory> metaDataFactory, SessionAttributesFactory attributesFactory, LocalContextFactory localContextFactory) {
+ public HotRodSessionFactory(HotRodSessionFactoryConfiguration config, SessionMetaDataFactory> metaDataFactory, SessionAttributesFactory attributesFactory, LocalContextFactory localContextFactory) {
super(metaDataFactory, attributesFactory, localContextFactory);
this.metaDataFactory = metaDataFactory;
this.attributesFactory = attributesFactory;
this.attributesRemover = attributesFactory;
this.creationMetaDataCache = config.getCache();
this.accessMetaDataCache= config.getCache();
- this.creationMetaDataCache.addClientListener(this, null, new Object[] { Boolean.TRUE });
+ this.executor = Executors.newFixedThreadPool(config.getExpirationThreadPoolSize(), new DefaultThreadFactory(this.getClass()));
+ this.creationMetaDataCache.addClientListener(this);
this.nearCacheEnabled = this.creationMetaDataCache.getRemoteCacheContainer().getConfiguration().remoteCaches().get(this.creationMetaDataCache.getName()).nearCacheMode().enabled();
}
@@ -106,51 +107,42 @@ public void close() {
}
@ClientCacheEntryExpired
- public void expired(ClientCacheEntryCustomEvent event) {
- RemoteCache> creationMetaDataCache = this.creationMetaDataCache;
+ public void expired(ClientCacheEntryExpiredEvent event) {
+ RemoteCache> creationMetaDataCache = this.creationMetaDataCache;
RemoteCache accessMetaDataCache = this.accessMetaDataCache;
- ImmutableSessionMetaDataFactory> metaDataFactory = this.metaDataFactory;
- ImmutableSessionAttributesFactory attributesFactory = this.attributesFactory;
+ ImmutableSessionMetaDataFactory> metaDataFactory = this.metaDataFactory;
+ ImmutableSessionAttributesFactory attributesFactory = this.attributesFactory;
Remover attributesRemover = this.attributesRemover;
Collection> listeners = this.listeners;
boolean nearCacheEnabled = this.nearCacheEnabled;
+ String id = event.getKey().getId();
Runnable task = new Runnable() {
@Override
public void run() {
- ByteBuffer buffer = ByteBuffer.wrap(event.getEventData());
- byte[] key = new byte[UnsignedNumeric.readUnsignedInt(buffer)];
- buffer.get(key);
- byte[] value = buffer.remaining() > 0 ? new byte[UnsignedNumeric.readUnsignedInt(buffer)] : null;
- if (value != null) {
- buffer.get(value);
- }
- Marshaller marshaller = creationMetaDataCache.getRemoteCacheContainer().getConfiguration().marshaller();
- String id = null;
- try {
- SessionCreationMetaDataKey creationKey = (SessionCreationMetaDataKey) marshaller.objectFromByteBuffer(key);
- id = creationKey.getId();
- @SuppressWarnings("unchecked")
- SessionCreationMetaDataEntry creationEntry = (value != null) ? (SessionCreationMetaDataEntry) marshaller.objectFromByteBuffer(value) : new SessionCreationMetaDataEntry<>(new SimpleSessionCreationMetaData(Instant.EPOCH));
- // Ensure entry is removed from near cache
+ SessionCreationMetaDataEntry creationMetaDataEntry = creationMetaDataCache.withFlags(Flag.FORCE_RETURN_VALUE).remove(new SessionCreationMetaDataKey(id));
+ if (creationMetaDataEntry != null) {
+ // Ensure access metadata entry is removed from near cache
if (nearCacheEnabled) {
- creationMetaDataCache.withFlags(Flag.SKIP_LISTENER_NOTIFICATION).remove(creationKey);
+ accessMetaDataCache.withFlags(Flag.SKIP_LISTENER_NOTIFICATION).remove(new SessionAccessMetaDataKey(id));
}
- SessionAccessMetaData accessMetaData = accessMetaDataCache.withFlags(Flag.FORCE_RETURN_VALUE).remove(new SessionAccessMetaDataKey(id));
- if (accessMetaData != null) {
- V attributesValue = attributesFactory.findValue(id);
- if (attributesValue != null) {
- ImmutableSessionMetaData metaData = metaDataFactory.createImmutableSessionMetaData(id, new CompositeSessionMetaDataEntry<>(creationEntry, accessMetaData));
- ImmutableSessionAttributes attributes = attributesFactory.createImmutableSessionAttributes(id, attributesValue);
- ImmutableSession session = HotRodSessionFactory.this.createImmutableSession(id, metaData, attributes);
- Logger.ROOT_LOGGER.tracef("Session %s has expired.", id);
- for (Consumer listener : listeners) {
- listener.accept(session);
- }
- attributesRemover.remove(id);
+ AV attributesValue = attributesFactory.findValue(id);
+ if (attributesValue != null) {
+ // Fabricate a reasonable SessionAccessMetaData
+ SessionAccessMetaData accessMetaData = new SimpleSessionAccessMetaData();
+ Duration lastAccess = Duration.ofSeconds(1);
+ Duration sinceCreation = Duration.between(creationMetaDataEntry.getMetaData().getCreationTime(), Instant.now()).minus(lastAccess);
+ accessMetaData.setLastAccessDuration(sinceCreation, lastAccess);
+
+ // Notify session expiration listeners
+ ImmutableSessionMetaData metaData = metaDataFactory.createImmutableSessionMetaData(id, new CompositeSessionMetaDataEntry<>(creationMetaDataEntry, accessMetaData));
+ ImmutableSessionAttributes attributes = attributesFactory.createImmutableSessionAttributes(id, attributesValue);
+ ImmutableSession session = HotRodSessionFactory.this.createImmutableSession(id, metaData, attributes);
+ Logger.ROOT_LOGGER.tracef("Session %s has expired.", id);
+ for (Consumer listener : listeners) {
+ listener.accept(session);
}
+ attributesRemover.remove(id);
}
- } catch (IOException | ClassNotFoundException e) {
- Logger.ROOT_LOGGER.failedToExpireSession(e, id);
}
}
};
diff --git a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactoryConfiguration.java b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactoryConfiguration.java
new file mode 100644
index 000000000000..d020fa4ed732
--- /dev/null
+++ b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionFactoryConfiguration.java
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2023, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.wildfly.clustering.web.hotrod.session;
+
+import org.wildfly.clustering.ee.hotrod.HotRodConfiguration;
+
+/**
+ * Encapsulates the configuration of a {@link HotRodSessionFactory}.
+ * @author Paul Ferraro
+ */
+public interface HotRodSessionFactoryConfiguration extends HotRodConfiguration {
+ /**
+ * Returns the size of the thread pool used for processing expiration events from the remote Infinispan cluster.
+ * @return
+ */
+ int getExpirationThreadPoolSize();
+}
diff --git a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionManagerFactoryConfiguration.java b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionManagerFactoryConfiguration.java
index 1e1d3fe3bcd4..194abd234ffa 100644
--- a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionManagerFactoryConfiguration.java
+++ b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionManagerFactoryConfiguration.java
@@ -21,7 +21,6 @@
*/
package org.wildfly.clustering.web.hotrod.session;
-import org.wildfly.clustering.ee.hotrod.HotRodConfiguration;
import org.wildfly.clustering.web.session.SessionManagerFactoryConfiguration;
/**
@@ -31,5 +30,5 @@
* @param the local context type
* @author Paul Ferraro
*/
-public interface HotRodSessionManagerFactoryConfiguration extends SessionManagerFactoryConfiguration, HotRodConfiguration {
+public interface HotRodSessionManagerFactoryConfiguration extends SessionManagerFactoryConfiguration, HotRodSessionFactoryConfiguration {
}
diff --git a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionMetaDataFactory.java b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionMetaDataFactory.java
index 85e61c3b6b87..c8ae85e45156 100644
--- a/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionMetaDataFactory.java
+++ b/clustering/web/hotrod/src/main/java/org/wildfly/clustering/web/hotrod/session/HotRodSessionMetaDataFactory.java
@@ -23,7 +23,6 @@
package org.wildfly.clustering.web.hotrod.session;
import java.time.Duration;
-import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
@@ -34,6 +33,7 @@
import org.wildfly.clustering.ee.MutatorFactory;
import org.wildfly.clustering.ee.cache.CacheProperties;
import org.wildfly.clustering.ee.hotrod.HotRodConfiguration;
+import org.wildfly.clustering.ee.hotrod.RemoteCacheEntryMutator;
import org.wildfly.clustering.ee.hotrod.RemoteCacheMutatorFactory;
import org.wildfly.clustering.web.cache.session.CompositeSessionMetaData;
import org.wildfly.clustering.web.cache.session.CompositeSessionMetaDataEntry;
@@ -48,75 +48,76 @@
import org.wildfly.clustering.web.session.ImmutableSessionMetaData;
/**
+ * Factory for creating {@link SessionMetaData} backed by a pair of {@link RemoteCache} entries.
* @author Paul Ferraro
+ * @param the local context type
*/
-public class HotRodSessionMetaDataFactory implements SessionMetaDataFactory> {
+public class HotRodSessionMetaDataFactory implements SessionMetaDataFactory> {
private final RemoteCache, Object> cache;
- private final RemoteCache> creationMetaDataCache;
- private final MutatorFactory> creationMetaDataMutatorFactory;
+ private final RemoteCache> creationMetaDataCache;
private final RemoteCache accessMetaDataCache;
- private final MutatorFactory accessMetaDataMutatorFactory;
+ private final MutatorFactory> creationMetaDataMutatorFactory;
private final CacheProperties properties;
public HotRodSessionMetaDataFactory(HotRodConfiguration configuration) {
this.cache = configuration.getCache();
this.creationMetaDataCache = configuration.getCache();
- this.creationMetaDataMutatorFactory = new RemoteCacheMutatorFactory<>(this.creationMetaDataCache, new Function, Duration>() {
- @Override
- public Duration apply(SessionCreationMetaDataEntry entry) {
- return entry.getMetaData().getTimeout();
- }
- });
+ this.creationMetaDataMutatorFactory = new RemoteCacheMutatorFactory<>(this.creationMetaDataCache);
this.accessMetaDataCache = configuration.getCache();
- this.accessMetaDataMutatorFactory = new RemoteCacheMutatorFactory<>(this.accessMetaDataCache);
this.properties = configuration.getCacheProperties();
}
@Override
- public CompositeSessionMetaDataEntry createValue(String id, SessionCreationMetaData creationMetaData) {
- SessionCreationMetaDataEntry creationMetaDataEntry = new SessionCreationMetaDataEntry<>(creationMetaData);
+ public CompositeSessionMetaDataEntry createValue(String id, SessionCreationMetaData creationMetaData) {
+ SessionCreationMetaDataEntry creationMetaDataEntry = new SessionCreationMetaDataEntry<>(creationMetaData);
SessionAccessMetaData accessMetaData = new SimpleSessionAccessMetaData();
this.creationMetaDataMutatorFactory.createMutator(new SessionCreationMetaDataKey(id), creationMetaDataEntry).mutate();
- this.accessMetaDataMutatorFactory.createMutator(new SessionAccessMetaDataKey(id), accessMetaData).mutate();
+ this.createSessionAccessMetaDataMutator(new SessionAccessMetaDataKey(id), accessMetaData, creationMetaData).mutate();
return new CompositeSessionMetaDataEntry<>(creationMetaDataEntry, accessMetaData);
}
@Override
- public CompositeSessionMetaDataEntry findValue(String id) {
+ public CompositeSessionMetaDataEntry findValue(String id) {
SessionCreationMetaDataKey creationMetaDataKey = new SessionCreationMetaDataKey(id);
SessionAccessMetaDataKey accessMetaDataKey = new SessionAccessMetaDataKey(id);
- Set> keys = new HashSet<>(3);
- keys.add(creationMetaDataKey);
- keys.add(accessMetaDataKey);
// Use bulk read
- Map, Object> entries = this.cache.getAll(keys);
+ Map, Object> entries = this.cache.getAll(Set.of(creationMetaDataKey, accessMetaDataKey));
@SuppressWarnings("unchecked")
- SessionCreationMetaDataEntry creationMetaDataEntry = (SessionCreationMetaDataEntry) entries.get(creationMetaDataKey);
+ SessionCreationMetaDataEntry creationMetaDataEntry = (SessionCreationMetaDataEntry) entries.get(creationMetaDataKey);
SessionAccessMetaData accessMetaData = (SessionAccessMetaData) entries.get(accessMetaDataKey);
if ((creationMetaDataEntry != null) && (accessMetaData != null)) {
return new CompositeSessionMetaDataEntry<>(creationMetaDataEntry, accessMetaData);
}
+ // Any orphan entry should not be removed here - this would otherwise interfere with expiration listener
return null;
}
@Override
- public InvalidatableSessionMetaData createSessionMetaData(String id, CompositeSessionMetaDataEntry entry) {
+ public InvalidatableSessionMetaData createSessionMetaData(String id, CompositeSessionMetaDataEntry entry) {
boolean newSession = entry.getCreationMetaData().isNew();
+ boolean requireMutator = !this.properties.isTransactional() || !newSession;
- SessionCreationMetaDataKey creationMetaDataKey = new SessionCreationMetaDataKey(id);
- Mutator creationMutator = this.properties.isTransactional() && newSession ? Mutator.PASSIVE : this.creationMetaDataMutatorFactory.createMutator(creationMetaDataKey, new SessionCreationMetaDataEntry<>(entry.getCreationMetaData(), entry.getLocalContext()));
- SessionCreationMetaData creationMetaData = new MutableSessionCreationMetaData(entry.getCreationMetaData(), creationMutator);
+ SessionCreationMetaData creationMetaData = entry.getCreationMetaData();
+ if (requireMutator) {
+ SessionCreationMetaDataKey creationMetaDataKey = new SessionCreationMetaDataKey(id);
+ SessionCreationMetaDataEntry creationMetaDataEntry = new SessionCreationMetaDataEntry<>(creationMetaData, entry.getLocalContext());
+ Mutator mutator = this.creationMetaDataMutatorFactory.createMutator(creationMetaDataKey, creationMetaDataEntry);
+ creationMetaData = new MutableSessionCreationMetaData(creationMetaData, mutator);
+ }
- SessionAccessMetaDataKey accessMetaDataKey = new SessionAccessMetaDataKey(id);
- Mutator accessMutator = this.properties.isTransactional() && newSession ? Mutator.PASSIVE : this.accessMetaDataMutatorFactory.createMutator(accessMetaDataKey, entry.getAccessMetaData());
- SessionAccessMetaData accessMetaData = new MutableSessionAccessMetaData(entry.getAccessMetaData(), accessMutator);
+ SessionAccessMetaData accessMetaData = entry.getAccessMetaData();
+ if (requireMutator) {
+ SessionAccessMetaDataKey accessMetaDataKey = new SessionAccessMetaDataKey(id);
+ Mutator mutator = this.createSessionAccessMetaDataMutator(accessMetaDataKey, accessMetaData, creationMetaData);
+ accessMetaData = new MutableSessionAccessMetaData(entry.getAccessMetaData(), mutator);
+ }
return new CompositeSessionMetaData(creationMetaData, accessMetaData);
}
@Override
- public ImmutableSessionMetaData createImmutableSessionMetaData(String id, CompositeSessionMetaDataEntry entry) {
+ public ImmutableSessionMetaData createImmutableSessionMetaData(String id, CompositeSessionMetaDataEntry entry) {
return new CompositeSessionMetaData(entry.getCreationMetaData(), entry.getAccessMetaData());
}
@@ -126,4 +127,13 @@ public boolean remove(String id) {
this.creationMetaDataCache.remove(new SessionCreationMetaDataKey(id));
return true;
}
-}
+
+ private Mutator createSessionAccessMetaDataMutator(SessionAccessMetaDataKey key, SessionAccessMetaData value, SessionCreationMetaData creationMetaData) {
+ // Max-idle for expiration references session timeout from creation metadata entry
+ return new RemoteCacheEntryMutator<>(this.accessMetaDataCache, key, value, new Function<>() {
+ @Override
+ public Duration apply(SessionAccessMetaData accessMetaData) {
+ return creationMetaData.getTimeout();
+ }
+ });
+ }}
diff --git a/clustering/web/infinispan/pom.xml b/clustering/web/infinispan/pom.xml
index dcc4e0082927..9d5082e9b6d1 100644
--- a/clustering/web/infinispan/pom.xml
+++ b/clustering/web/infinispan/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-infinispan
diff --git a/clustering/web/pom.xml b/clustering/web/pom.xml
index 9a8d16e290b5..5d4d66797981 100644
--- a/clustering/web/pom.xml
+++ b/clustering/web/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web
diff --git a/clustering/web/service/pom.xml b/clustering/web/service/pom.xml
index 597b273961b6..fe51728c3b72 100644
--- a/clustering/web/service/pom.xml
+++ b/clustering/web/service/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-service
diff --git a/clustering/web/spi/pom.xml b/clustering/web/spi/pom.xml
index adb24ff585dc..fa2e643fa4c8 100644
--- a/clustering/web/spi/pom.xml
+++ b/clustering/web/spi/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-spi
diff --git a/clustering/web/undertow/pom.xml b/clustering/web/undertow/pom.xml
index dcf46627b02f..132fbe0076ed 100644
--- a/clustering/web/undertow/pom.xml
+++ b/clustering/web/undertow/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-web-undertow
diff --git a/clustering/weld/core/pom.xml b/clustering/weld/core/pom.xml
index 2a77b8850b79..e1f722da4cc8 100644
--- a/clustering/weld/core/pom.xml
+++ b/clustering/weld/core/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-weld-core
diff --git a/clustering/weld/ejb/pom.xml b/clustering/weld/ejb/pom.xml
index f28d06e107de..a78edab9101e 100644
--- a/clustering/weld/ejb/pom.xml
+++ b/clustering/weld/ejb/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-weld-ejb
diff --git a/clustering/weld/pom.xml b/clustering/weld/pom.xml
index 69ba5e40f75b..8098b5889a31 100644
--- a/clustering/weld/pom.xml
+++ b/clustering/weld/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-weld
diff --git a/clustering/weld/web/pom.xml b/clustering/weld/web/pom.xml
index 76192d1537ce..816a988f2154 100644
--- a/clustering/weld/web/pom.xml
+++ b/clustering/weld/web/pom.xml
@@ -33,7 +33,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-clustering-weld-web
diff --git a/connector/pom.xml b/connector/pom.xml
index f3aa5ed09ed6..07816bb7945a 100644
--- a/connector/pom.xml
+++ b/connector/pom.xml
@@ -32,7 +32,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-connector
WildFly: Connector Subsystem
diff --git a/connector/src/main/java/org/jboss/as/connector/metadata/api/common/Credential.java b/connector/src/main/java/org/jboss/as/connector/metadata/api/common/Credential.java
index fda01eb1f75f..d14e2dc9b841 100644
--- a/connector/src/main/java/org/jboss/as/connector/metadata/api/common/Credential.java
+++ b/connector/src/main/java/org/jboss/as/connector/metadata/api/common/Credential.java
@@ -18,6 +18,9 @@
import org.jboss.as.controller.security.CredentialReference;
import org.jboss.jca.common.api.metadata.common.SecurityMetadata;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* Extension of {@link org.jboss.jca.common.api.metadata.common.Credential} with added Elytron support.
*
@@ -29,6 +32,85 @@ public interface Credential extends org.jboss.jca.common.api.metadata.common.Cre
* A Tag.
*
*/
+ public enum Attribute
+ {
+ /** unknown attribute
+ *
+ */
+ UNKNOWN(null),
+ /**
+ * userName attribute
+ */
+ USER_NAME("user-name"),
+ /**
+ * password attribute
+ */
+ PASSWORD("password");
+
+ private String name;
+
+ /**
+ *
+ * Create a new Tag.
+ *
+ * @param name a name
+ */
+ Attribute(final String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName() {
+ return name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return name;
+ }
+
+ private static final Map MAP;
+
+ static {
+ final Map map = new HashMap<>();
+ for (Credential.Attribute element : values()) {
+ final String name = element.getLocalName();
+ if (name != null)
+ map.put(name, element);
+ }
+ MAP = map;
+ }
+
+ /**
+ * Set the value
+ * @param v The name
+ * @return The value
+ */
+ Credential.Attribute value(String v) {
+ name = v;
+ return this;
+ }
+
+ /**
+ *
+ * Static method to get enum instance given localName XsdString
+ *
+ * @param localName a XsdString used as localname (typically tag name as defined in xsd)
+ * @return the enum instance
+ */
+ public static Credential.Attribute forName(String localName) {
+ final Credential.Attribute element = MAP.get(localName);
+ return element == null ? UNKNOWN.value(localName) : element;
+ }
+ }
+
+
enum Tag
{
// new Elytron tag
@@ -55,10 +137,12 @@ enum Tag
/**
* userName tag
*/
+ @Deprecated
USER_NAME("user-name"),
/**
* password tag
*/
+ @Deprecated
PASSWORD("password"),
/**
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java
index a6c51fc365f1..33ab49619cf5 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java
@@ -203,6 +203,7 @@ public void initializeParsers(final ExtensionParsingContext context) {
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DATASOURCES_5_0.getUriString(), DataSourceSubsystemParser::new);
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DATASOURCES_6_0.getUriString(), DataSourceSubsystemParser::new);
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DATASOURCES_7_0.getUriString(), DataSourceSubsystemParser::new);
+ context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DATASOURCES_7_1.getUriString(), DataSourceSubsystemParser::new);
}
public static final class DataSourceSubsystemParser implements XMLStreamConstants, XMLElementReader>,
@@ -404,8 +405,8 @@ private void writeDS(XMLExtendedStreamWriter writer, boolean isXADataSource, Mod
REAUTHPLUGIN_PROPERTIES.isMarshallable(dataSourceNode);
if (securityRequired) {
writer.writeStartElement(DataSource.Tag.SECURITY.getLocalName());
- USERNAME.marshallAsElement(dataSourceNode, writer);
- PASSWORD.marshallAsElement(dataSourceNode, writer);
+ USERNAME.marshallAsAttribute(dataSourceNode, writer);
+ PASSWORD.marshallAsAttribute(dataSourceNode, writer);
SECURITY_DOMAIN.marshallAsElement(dataSourceNode, writer);
CREDENTIAL_REFERENCE.marshallAsElement(dataSourceNode, writer);
ELYTRON_ENABLED.marshallAsElement(dataSourceNode, writer);
@@ -443,8 +444,8 @@ private void writeDS(XMLExtendedStreamWriter writer, boolean isXADataSource, Mod
NO_RECOVERY.marshallAsAttribute(dataSourceNode, writer);
if (hasAnyOf(dataSourceNode, RECOVERY_USERNAME, RECOVERY_PASSWORD, RECOVERY_SECURITY_DOMAIN, RECOVERY_ELYTRON_ENABLED, RECOVERY_CREDENTIAL_REFERENCE)) {
writer.writeStartElement(Recovery.Tag.RECOVER_CREDENTIAL.getLocalName());
- RECOVERY_USERNAME.marshallAsElement(dataSourceNode, writer);
- RECOVERY_PASSWORD.marshallAsElement(dataSourceNode, writer);
+ RECOVERY_USERNAME.marshallAsAttribute(dataSourceNode, writer);
+ RECOVERY_PASSWORD.marshallAsAttribute(dataSourceNode, writer);
RECOVERY_ELYTRON_ENABLED.marshallAsElement(dataSourceNode, writer);
RECOVERY_AUTHENTICATION_CONTEXT.marshallAsElement(dataSourceNode, writer);
RECOVERY_SECURITY_DOMAIN.marshallAsElement(dataSourceNode, writer);
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesTransformers.java b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesTransformers.java
index 3973b3aa799b..2506596572bf 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesTransformers.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesTransformers.java
@@ -40,6 +40,7 @@
public class DataSourcesTransformers implements ExtensionTransformerRegistration {
+ private static final ModelVersion VERSION_7_0_0 = ModelVersion.create(7, 0, 0);
private static final ModelVersion EAP_7_4 = ModelVersion.create(6, 0, 0);
@Override
@@ -50,10 +51,14 @@ public String getSubsystemName() {
@Override
public void registerTransformers(SubsystemTransformerRegistration subsystemRegistration) {
ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(subsystemRegistration.getCurrentSubsystemVersion());
- get600TransformationDescription(chainedBuilder.createBuilder(subsystemRegistration.getCurrentSubsystemVersion(), EAP_7_4));
+
+ //no transformation here - just XML parsing change
+ chainedBuilder.createBuilder(subsystemRegistration.getCurrentSubsystemVersion(), VERSION_7_0_0).build();
+
+ get600TransformationDescription(chainedBuilder.createBuilder(VERSION_7_0_0, EAP_7_4));
chainedBuilder.buildAndRegister(subsystemRegistration, new ModelVersion[]{
- EAP_7_4
+ VERSION_7_0_0, EAP_7_4
});
}
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DsParser.java b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DsParser.java
index 5a8f13237015..dae676b390fd 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DsParser.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DsParser.java
@@ -1510,9 +1510,12 @@ private void parseXADataSource_7_0(XMLExtendedStreamReader reader, final List= 0) {
+ parseElytronSupportedRecoveryCredential_7_1(reader, node);
+ } else {
+ parseElytronSupportedRecoveryCredential(reader, node);
+ }
break;
}
case RECOVER_PLUGIN: {
@@ -1322,6 +1326,20 @@ protected void parseElytronSupportedRecovery(XMLExtendedStreamReader reader, Mod
private void parseSecuritySettings(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException, ParserException,
ValidateException {
+ for (Recovery.Attribute attribute : Recovery.Attribute.values()) {
+ switch (attribute) {
+ case NO_RECOVERY: {
+ String value = rawAttributeText(reader, NO_RECOVERY.getXmlName());
+ if (value != null) {
+ NO_RECOVERY.parseAndSetParameter(value, node, reader);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
boolean securtyDomainMatched = false;
while (reader.hasNext()) {
switch (reader.nextTag()) {
@@ -1440,7 +1458,6 @@ private void parseElytronSupportedSecuritySettings(XMLExtendedStreamReader reade
private void parseRecoveryCredential(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException, ParserException,
ValidateException {
-
while (reader.hasNext()) {
switch (reader.nextTag()) {
case END_ELEMENT: {
@@ -1485,6 +1502,76 @@ private void parseRecoveryCredential(XMLExtendedStreamReader reader, ModelNode n
throw ParseUtils.unexpectedEndElement(reader);
}
+ private void parseElytronSupportedRecoveryCredential_7_1(XMLExtendedStreamReader reader, ModelNode node)
+ throws XMLStreamException, ParserException, ValidateException {
+
+ for (Credential.Attribute attribute : Credential.Attribute.values()) {
+ switch (attribute) {
+ case USER_NAME: {
+ String value = rawAttributeText(reader, RECOVERY_USERNAME.getXmlName());
+ if (value != null) {
+ RECOVERY_USERNAME.parseAndSetParameter(value, node, reader);
+ }
+ break;
+ }
+ case PASSWORD: {
+ String value = rawAttributeText(reader, RECOVERY_PASSWORD.getXmlName());
+ if (value != null) {
+ RECOVERY_PASSWORD.parseAndSetParameter(value, node, reader);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ while (reader.hasNext()) {
+ switch (reader.nextTag()) {
+ case END_ELEMENT: {
+ if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.SECURITY
+ || Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.RECOVER_CREDENTIAL) {
+
+ return;
+ } else {
+ if (Credential.Tag.forName(reader.getLocalName()) == Credential.Tag.UNKNOWN) {
+ throw ParseUtils.unexpectedEndElement(reader);
+ }
+ }
+ break;
+ }
+ case START_ELEMENT: {
+ switch (Credential.Tag.forName(reader.getLocalName())) {
+ case CREDENTIAL_REFERENCE: {
+ RECOVERY_CREDENTIAL_REFERENCE.getParser().parseElement(RECOVERY_CREDENTIAL_REFERENCE, reader, node);
+ break;
+ }
+ case SECURITY_DOMAIN: {
+ String value = rawElementText(reader);
+ RECOVERY_SECURITY_DOMAIN.parseAndSetParameter(value, node, reader);
+ break;
+ }
+ case ELYTRON_ENABLED: {
+ String value = rawElementText(reader);
+ value = value == null? "true": value;
+ RECOVERY_ELYTRON_ENABLED.parseAndSetParameter(value, node, reader);
+ break;
+ }
+ case AUTHENTICATION_CONTEXT: {
+ String value = rawElementText(reader);
+ RECOVERY_AUTHENTICATION_CONTEXT.parseAndSetParameter(value, node, reader);
+ break;
+ }
+ default:
+ throw ParseUtils.unexpectedElement(reader);
+ }
+ break;
+ }
+ }
+ }
+ throw ParseUtils.unexpectedEndElement(reader);
+ }
+
private void parseElytronSupportedRecoveryCredential(XMLExtendedStreamReader reader, ModelNode node)
throws XMLStreamException, ParserException, ValidateException {
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Constants.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Constants.java
index b5da64277c61..f9996b1d78a5 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Constants.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Constants.java
@@ -567,7 +567,7 @@ public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceM
.build();
static SimpleAttributeDefinition RECOVERY_USERNAME = new SimpleAttributeDefinitionBuilder(RECOVERY_USERNAME_NAME, ModelType.STRING, true)
- .setXmlName(Credential.Tag.USER_NAME.getLocalName())
+ .setXmlName(Credential.Attribute.USER_NAME.getLocalName())
.setDefaultValue(new ModelNode())
.setAllowExpression(true)
.setMeasurementUnit(MeasurementUnit.NONE)
@@ -577,7 +577,7 @@ public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceM
.build();
static SimpleAttributeDefinition RECOVERY_PASSWORD = new SimpleAttributeDefinitionBuilder(RECOVERY_PASSWORD_NAME, ModelType.STRING, true)
- .setXmlName(Credential.Tag.PASSWORD.getLocalName())
+ .setXmlName(Credential.Attribute.PASSWORD.getLocalName())
.setDefaultValue(new ModelNode())
.setAllowExpression(true)
.setMeasurementUnit(MeasurementUnit.NONE)
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Namespace.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Namespace.java
index 99cd796d6e70..810be6300ce2 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Namespace.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/Namespace.java
@@ -49,12 +49,14 @@ public enum Namespace {
RESOURCEADAPTERS_6_1("urn:jboss:domain:resource-adapters:6.1"),
- RESOURCEADAPTERS_7_0("urn:jboss:domain:resource-adapters:7.0");
+ RESOURCEADAPTERS_7_0("urn:jboss:domain:resource-adapters:7.0"),
+
+ RESOURCEADAPTERS_7_1("urn:jboss:domain:resource-adapters:7.1");
/**
* The current namespace version.
*/
- public static final Namespace CURRENT = RESOURCEADAPTERS_7_0;
+ public static final Namespace CURRENT = RESOURCEADAPTERS_7_1;
private final String name;
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdapterSubsystemParser.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdapterSubsystemParser.java
index 6c8e96fe2815..d90a230f83f9 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdapterSubsystemParser.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdapterSubsystemParser.java
@@ -438,8 +438,8 @@ private void writeConDef(XMLExtendedStreamWriter streamWriter, ModelNode conDef,
|| conDef.hasDefined(RECOVERY_SECURITY_DOMAIN.getName())
|| conDef.hasDefined(RECOVERY_ELYTRON_ENABLED.getName())) {
streamWriter.writeStartElement(Recovery.Tag.RECOVER_CREDENTIAL.getLocalName());
- RECOVERY_USERNAME.marshallAsElement(conDef, streamWriter);
- RECOVERY_PASSWORD.marshallAsElement(conDef, streamWriter);
+ RECOVERY_USERNAME.marshallAsAttribute(conDef, streamWriter);
+ RECOVERY_PASSWORD.marshallAsAttribute(conDef, streamWriter);
RECOVERY_CREDENTIAL_REFERENCE.marshallAsElement(conDef, streamWriter);
RECOVERY_SECURITY_DOMAIN.marshallAsElement(conDef, streamWriter);
RECOVERY_ELYTRON_ENABLED.marshallAsElement(conDef, streamWriter);
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java
index a94a14c6be4e..968040efa2dd 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java
@@ -100,6 +100,7 @@ public void initializeParsers(final ExtensionParsingContext context) {
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.RESOURCEADAPTERS_6_0.getUriString(), resourceAdapterSubsystemParser);
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.RESOURCEADAPTERS_6_1.getUriString(), resourceAdapterSubsystemParser);
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.RESOURCEADAPTERS_7_0.getUriString(), resourceAdapterSubsystemParser);
+ context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.RESOURCEADAPTERS_7_1.getUriString(), resourceAdapterSubsystemParser);
}
}
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubSystemAdd.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubsystemAdd.java
similarity index 100%
rename from connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubSystemAdd.java
rename to connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubsystemAdd.java
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformers.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformers.java
index a715d5071cf3..26cfd8729d41 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformers.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformers.java
@@ -47,6 +47,8 @@
@MetaInfServices(ExtensionTransformerRegistration.class)
public class ResourceAdaptersTransformers implements ExtensionTransformerRegistration {
+ private static final ModelVersion VERSION_7_0_0 = ModelVersion.create(7, 0, 0);
+
@Override
public String getSubsystemName() {
return ResourceAdaptersExtension.SUBSYSTEM_NAME;
@@ -58,7 +60,9 @@ public void registerTransformers(SubsystemTransformerRegistration subsystemRegis
ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(currentModel);
- register700Transformers(chainedBuilder.createBuilder(currentModel, VERSION_6_1_0)); // 7.0.0 to 6.1.0 transformer
+ //no transformation here - just XML parsing change
+ chainedBuilder.createBuilder(subsystemRegistration.getCurrentSubsystemVersion(), VERSION_7_0_0).build();
+ register700Transformers(chainedBuilder.createBuilder(VERSION_7_0_0, VERSION_6_1_0)); // 7.0.0 to 6.1.0 transformer
register610Transformers(chainedBuilder.createBuilder(VERSION_6_1_0, VERSION_6_0_0)); // 6.1.0 to 6.0.0 transformer
chainedBuilder.buildAndRegister(subsystemRegistration, new ModelVersion[] { VERSION_6_1_0, VERSION_6_0_0 });
diff --git a/connector/src/main/resources/schema/wildfly-datasources_5_0.xsd b/connector/src/main/resources/schema/wildfly-datasources_5_0.xsd
index 7a4a445a36ef..0b80587a5421 100644
--- a/connector/src/main/resources/schema/wildfly-datasources_5_0.xsd
+++ b/connector/src/main/resources/schema/wildfly-datasources_5_0.xsd
@@ -898,24 +898,26 @@
-
-
-
-
+
+
+
+ sa-pass
]]>
-
-
-
-
-
-
-
- Credential to be used by the configuration.
-
-
-
+
+
+
+
+
+
+ Credential to be used by the configuration.
+
+
+
+
+
diff --git a/connector/src/main/resources/schema/wildfly-datasources_6_0.xsd b/connector/src/main/resources/schema/wildfly-datasources_6_0.xsd
index a65a92642cb3..f8e64cdf6b08 100644
--- a/connector/src/main/resources/schema/wildfly-datasources_6_0.xsd
+++ b/connector/src/main/resources/schema/wildfly-datasources_6_0.xsd
@@ -898,25 +898,27 @@
-
-
-
-
+
+
+
+ sa-pass
]]>
-
-
-
-
-
-
-
- Credential to be used by the configuration.
-
-
-
-
+
+
+
+
+
+
+ Credential to be used by the configuration.
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+ sa
]]>
-
-
-
+
+
+
+
@@ -908,14 +909,15 @@
+
+
+
+ Credential to be used by the configuration.
+
+
+
+
-
-
-
- Credential to be used by the configuration.
-
-
-
diff --git a/connector/src/main/resources/schema/wildfly-datasources_7_1.xsd b/connector/src/main/resources/schema/wildfly-datasources_7_1.xsd
new file mode 100644
index 000000000000..2ff6408b944d
--- /dev/null
+++ b/connector/src/main/resources/schema/wildfly-datasources_7_1.xsd
@@ -0,0 +1,1138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jdbc:hsqldb:hsql://localhost:1701
+ ]]>
+
+
+
+
+
+
+ org.hsqldb.jdbcDriver
+ ]]>
+
+
+
+
+
+
+ org.h2.jdbcx.JdbcDataSource
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UTF-8
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10
+ myhost.mydomain.com
+ 1557
+ mydb
+ myserver
+ ]]>
+
+
+
+
+
+
+ oracle.jdbc.xa.client.OracleXADataSource
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ 300
+ ]]>
+
+
+
+
+
+
+ 300
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 300
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ nowarn
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+ 1
+ ]]>
+
+
+
+
+
+
+ 1
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true.
+ Default is false
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+ Ex:
+ ]]>
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Credential to be used by the configuration.
+
+
+
+
+
+
+ HsqlDbRealm
+ ]]>
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+ HsqlDbContext
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.hsqldb.jdbcDriver
+ ]]>
+
+
+
+
+
+
+ oracle.jdbc.xa.client.OracleXADataSource
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/connector/src/main/resources/schema/wildfly-resource-adapters_7_1.xsd b/connector/src/main/resources/schema/wildfly-resource-adapters_7_1.xsd
new file mode 100644
index 000000000000..c8ff25516e66
--- /dev/null
+++ b/connector/src/main/resources/schema/wildfly-resource-adapters_7_1.xsd
@@ -0,0 +1,1137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ myra.rar
+ ]]>
+
+
+
+
+
+
+ org.jboss.ironjacamar.ra16out
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 300
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ ]]>
+
+
+
+
+
+
+ 1
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false.
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+ Ex:
+ ]]>
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+ true
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ HsqlDbRealm
+ ]]>
+
+
+
+
+
+
+ HsqlDbRealm
+ ]]>
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+ HsqlDbContext
+ ]]>
+
+
+
+
+
+
+
+ HsqlDbContext
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Credential to be used by the configuration.
+
+
+
+
+
+
+
+ HsqlDbRealm
+ ]]>
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+ HsqlDbContext
+ ]]>
+
+
+
+
+
+
+
+
+
+ sa
+ ]]>
+
+
+
+
+
+
+ sa-pass
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ApplicationDomain
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/connector/src/test/java/org/jboss/as/connector/subsystems/datasources/DatasourcesSubsystemTestCase.java b/connector/src/test/java/org/jboss/as/connector/subsystems/datasources/DatasourcesSubsystemTestCase.java
index d20f4a3db9ee..03561765a276 100644
--- a/connector/src/test/java/org/jboss/as/connector/subsystems/datasources/DatasourcesSubsystemTestCase.java
+++ b/connector/src/test/java/org/jboss/as/connector/subsystems/datasources/DatasourcesSubsystemTestCase.java
@@ -67,7 +67,7 @@ protected String getSubsystemXml() throws IOException {
@Override
protected String getSubsystemXsdPath() throws Exception {
- return "schema/wildfly-datasources_7_0.xsd";
+ return "schema/wildfly-datasources_7_1.xsd";
}
@Test
diff --git a/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubsystemTestCase.java b/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubsystemTestCase.java
index 375e178d3186..63e8ab60c7b1 100644
--- a/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubsystemTestCase.java
+++ b/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersSubsystemTestCase.java
@@ -52,7 +52,7 @@ protected String getSubsystemXml() throws IOException {
@Override
protected String getSubsystemXsdPath() throws Exception {
- return "schema/wildfly-resource-adapters_7_0.xsd";
+ return "schema/wildfly-resource-adapters_7_1.xsd";
}
@Override
@@ -91,6 +91,11 @@ public void testExpressionConfigElytron() throws Exception {
standardSubsystemTest("resource-adapters-pool-elytron-enabled.xml", "resource-adapters-pool-elytron-enabled-expression.xml", true);
}
+ @Test
+ public void testLegacyRecovery() throws Exception {
+ standardSubsystemTest("resource-adapters-legacy-recovery-parsing-7_0.xml", null, false);
+ }
+
protected AdditionalInitialization createAdditionalInitialization() {
return AdditionalInitialization.MANAGEMENT
diff --git a/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformersTestCase.java b/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformersTestCase.java
index 365f37dd71f8..3266ad773c39 100644
--- a/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformersTestCase.java
+++ b/connector/src/test/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersTransformersTestCase.java
@@ -62,12 +62,12 @@ public ResourceAdaptersTransformersTestCase() {
@Override
protected String getSubsystemXml() throws IOException {
- return readResource("resource-adapters-transform_7_0.xml");
+ return readResource("resource-adapters-transform_7_1.xml");
}
@Override
protected String getSubsystemXsdPath() {
- return "schema/wildfly-resource-adapters_7_0.xsd";
+ return "schema/wildfly-resource-adapters_7_1.xsd";
}
/**
@@ -103,7 +103,7 @@ public void test740transformers() throws Exception {
* @throws Exception if an error occurs during the kernel initialization or the subsystem transformation validation.
*/
private void testTransformer(final ModelTestControllerVersion controllerVersion) throws Exception {
- String subsystemXml = "resource-adapters-transform_7_0.xml";
+ String subsystemXml = "resource-adapters-transform_7_1.xml";
ModelVersion modelVersion = getResourceAdapterModel(controllerVersion);
KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()).setSubsystemXmlResource(subsystemXml);
KernelServices mainServices = initialKernelServices(builder, controllerVersion);
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/complextestcases/ra.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/complextestcases/ra.xml
index 22d6025a2611..f1825d5d10aa 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/complextestcases/ra.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/complextestcases/ra.xml
@@ -1,4 +1,4 @@
-
+
some.rar
@@ -45,14 +45,12 @@
5000
true
-
-
- sa
- sa-pass
+
+
HsqlDbRealm
-
-
- C
+
+
+ C
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled-expression.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled-expression.xml
index 99e9da5d409e..fb7aa2ee21cc 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled-expression.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled-expression.xml
@@ -1,4 +1,4 @@
-
+
@@ -178,9 +178,7 @@
${test.expr:false}
-
- ${test.expr:token}
- ${test.expr:token}
+
${test.expr:true}
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled.xml
index aad619a67ca9..6278430afe0f 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-elytron-enabled.xml
@@ -1,4 +1,4 @@
-
+
@@ -179,9 +179,7 @@
false
-
- token
- token
+
true
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full-expression.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full-expression.xml
index ddf2af075a42..e68c97e73ed4 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full-expression.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full-expression.xml
@@ -1,4 +1,4 @@
-
+
-
-
- ${test.expr:sa}
-
-
- ${test.expr:sa}
-
+
${test.expr:Property1}
@@ -162,26 +156,13 @@
-
-
- ${test.expr:sa}
-
-
- ${test.expr:sa}
-
+
${test.expr:Property1}
-
-
- ${test.expr:sa}
-
-
- ${test.expr:sa}
-
-
+
Property5
${test.expr:Property6}
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full.xml
index 4396fce562dc..7917dc9ee592 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-full.xml
@@ -1,4 +1,4 @@
-
+
@@ -46,13 +46,7 @@
-
-
- sa
-
-
- sa
-
+
Property1
@@ -160,26 +154,13 @@
-
-
- sa
-
-
- sa
-
+
Property1
-
-
- sa
-
-
- sa
-
-
+
Property5
Property6
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-minimal.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-minimal.xml
index 712b9fa2f27d..de4a4f85d4fd 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-minimal.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/datasources/datasources-minimal.xml
@@ -1,13 +1,10 @@
-
+
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
h2
-
- sa
- sa
-
+
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-full.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-full.xml
index 71a583db22ad..5199aa64f6b3 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-full.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-full.xml
@@ -1,4 +1,4 @@
-
+
archive
@@ -51,9 +51,7 @@
false
-
- userName
- pwd
+
token
@@ -105,10 +103,7 @@
false
-
- userName
- pwd
-
+
value
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-legacy-recovery-parsing-7_0.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-legacy-recovery-parsing-7_0.xml
new file mode 100644
index 000000000000..b8295c6efb07
--- /dev/null
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-legacy-recovery-parsing-7_0.xml
@@ -0,0 +1,17 @@
+
+
+
+ archive.rar
+
+
+
+
+ userName
+ pwd
+
+
+
+
+
+
+
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled-expression.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled-expression.xml
index e204b28a9f93..1ba3403b9ab4 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled-expression.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled-expression.xml
@@ -1,4 +1,4 @@
-
+
@@ -77,9 +77,7 @@
-
-
- ${test.expr:userName}
+
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled.xml
index 8155063a666f..3f8b9654999d 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-elytron-enabled.xml
@@ -1,4 +1,4 @@
-
+
@@ -77,9 +77,7 @@
-
-
- userName
+
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-expression.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-expression.xml
index b746c0db5e47..80cda446335e 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-expression.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool-expression.xml
@@ -1,4 +1,4 @@
-
+
@@ -83,11 +83,7 @@
-
-
- ${test.expr:userName}
-
- ${test.expr:pwd}
+
${test.expr:token}
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool.xml
index 057122d81815..2cc10b5f57d3 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-pool.xml
@@ -1,4 +1,4 @@
-
+
@@ -84,11 +84,7 @@
-
-
- userName
-
- pwd
+
token
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-transform_7_0.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-transform_7_1.xml
similarity index 94%
rename from connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-transform_7_0.xml
rename to connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-transform_7_1.xml
index 77d857ed6294..ef9eca07ccb7 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-transform_7_0.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-transform_7_1.xml
@@ -1,4 +1,4 @@
-
+
@@ -84,11 +84,7 @@
-
-
- ${test.expr:userName}
-
- ${test.expr:pwd}
+
${test.expr:token}
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool-expression.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool-expression.xml
index 47d01af93937..b501f3426963 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool-expression.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool-expression.xml
@@ -1,4 +1,4 @@
-
+
@@ -74,12 +74,7 @@
-
-
- ${test.expr:userName}
-
- ${test.expr:pwd}
-
+
${test.expr:value}
diff --git a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool.xml b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool.xml
index 9b16dcce3d73..fc072e8f324b 100644
--- a/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool.xml
+++ b/connector/src/test/resources/org/jboss/as/connector/subsystems/resourceadapters/resource-adapters-xapool.xml
@@ -1,4 +1,4 @@
-
+
@@ -74,11 +74,8 @@
-
+
- userName
-
- pwd
diff --git a/datasources-agroal/pom.xml b/datasources-agroal/pom.xml
index 3672f2ace7b1..0fe8d9699fd9 100644
--- a/datasources-agroal/pom.xml
+++ b/datasources-agroal/pom.xml
@@ -28,7 +28,7 @@
org.wildfly
wildfly-parent
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
../pom.xml
diff --git a/dist/pom.xml b/dist/pom.xml
index 3e9457ff2d84..b88d7d93803b 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -34,7 +34,7 @@
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
- 29.0.0.Beta1-SNAPSHOT
+ 30.0.0.Beta1-SNAPSHOT
wildfly-dist
@@ -51,9 +51,9 @@
import