Skip to content

Commit

Permalink
Merge branch 'main' into WFLY-17153-cont
Browse files Browse the repository at this point in the history
  • Loading branch information
bstansberry authored Sep 21, 2023
2 parents b04bdf0 + 1685d74 commit 8ad3b65
Show file tree
Hide file tree
Showing 594 changed files with 5,576 additions and 695 deletions.
7 changes: 7 additions & 0 deletions boms/standard-test-expansion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>${ee.maven.groupId}</groupId>
<artifactId>wildfly-standard-test-bom</artifactId>
<version>${ee.maven.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>com.github.tomakehurst</groupId>
Expand Down
68 changes: 9 additions & 59 deletions boms/standard-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,6 @@
<scope>test</scope>
</dependency>

<!-- TODO: jaxen needed? -->
<!--<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>${version.jaxen}</version>
<scope>test</scope>
<exclusions>
&lt;!&ndash; I kid you not &ndash;&gt;
<exclusion>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
</exclusion>
<exclusion>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
</exclusion>
<exclusion>
<groupId>maven-plugins</groupId>
<artifactId>maven-cobertura-plugin</artifactId>
</exclusion>
<exclusion>
<groupId>maven-plugins</groupId>
<artifactId>maven-findbugs-plugin</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
</exclusion>
</exclusions>
</dependency>-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -298,22 +264,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<version>${version.org.springframework.kafka}</version>
<scope>test</scope>
<exclusions>
<!--
This version pulls in a different version of Kafka from
our version of Kafka Clients
-->
<exclusion>
<groupId>org.apache.kafka</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.syslog4j</groupId>
<artifactId>syslog4j</artifactId>
Expand Down Expand Up @@ -403,15 +353,15 @@
</dependency>

<dependency>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
<version>${version.xom}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
<groupId>org.wildfly.glow</groupId>
<artifactId>wildfly-glow-core</artifactId>
<version>${version.org.wildfly.glow}</version>
</dependency>

<dependency>
<groupId>org.wildfly.glow</groupId>
<artifactId>wildfly-glow-maven-resolver</artifactId>
<version>${version.org.wildfly.glow}</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public List<Runnable> run(ExecutorService executor) {
};

public DefaultExecutorService(Class<?> targetClass, Function<ThreadFactory, ExecutorService> factory) {
super(factory.apply(new DefaultThreadFactory(targetClass)), DefaultContextualizerFactory.INSTANCE.createContextualizer(targetClass));
// Use thread group of current thread
super(factory.apply(new DefaultThreadFactory(targetClass, Thread.currentThread()::getThreadGroup)), DefaultContextualizerFactory.INSTANCE.createContextualizer(targetClass));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package org.wildfly.clustering.context;

import java.util.concurrent.ThreadFactory;
import java.util.function.Supplier;

import org.jboss.threads.JBossThreadFactory;
import org.wildfly.security.ParametricPrivilegedAction;
Expand All @@ -34,24 +35,33 @@
*/
public class DefaultThreadFactory extends ContextualThreadFactory<ClassLoader> {

private enum ThreadPoolFactory implements ParametricPrivilegedAction<ThreadFactory, Class<?>> {
private enum ThreadPoolFactory implements ParametricPrivilegedAction<ThreadFactory, Supplier<ThreadGroup>> {
INSTANCE;

@Override
public ThreadFactory run(Class<?> targetClass) {
return new JBossThreadFactory(new ThreadGroup(targetClass.getSimpleName()), Boolean.FALSE, null, "%G - %t", null, null);
public ThreadFactory run(Supplier<ThreadGroup> group) {
return new JBossThreadFactory(group.get(), Boolean.FALSE, null, "%G - %t", null, null);
}
}

public DefaultThreadFactory(Class<?> targetClass) {
this(WildFlySecurityManager.doUnchecked(targetClass, ThreadPoolFactory.INSTANCE), targetClass);
this(targetClass, new Supplier<>() {
@Override
public ThreadGroup get() {
return new ThreadGroup(targetClass.getSimpleName());
}
});
}

DefaultThreadFactory(Class<?> targetClass, Supplier<ThreadGroup> group) {
this(WildFlySecurityManager.doUnchecked(group, ThreadPoolFactory.INSTANCE), targetClass);
}

public DefaultThreadFactory(ThreadFactory factory) {
this(factory, factory.getClass());
}

public DefaultThreadFactory(ThreadFactory factory, Class<?> targetClass) {
private DefaultThreadFactory(ThreadFactory factory, Class<?> targetClass) {
super(factory, WildFlySecurityManager.getClassLoaderPrivileged(targetClass), ContextClassLoaderReference.INSTANCE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import java.util.stream.Stream;
Expand All @@ -45,6 +46,7 @@
* @author Paul Ferraro
*/
public class LocalScheduler<T> implements Scheduler<T, Instant>, Runnable {
private static final ThreadFactory THREAD_FACTORY = new DefaultThreadFactory(LocalScheduler.class);

private final ScheduledExecutorService executor;
private final ScheduledEntries<T, Instant> entries;
Expand All @@ -54,7 +56,7 @@ public class LocalScheduler<T> implements Scheduler<T, Instant>, Runnable {
private volatile Map.Entry<Map.Entry<T, Instant>, Future<?>> futureEntry = null;

public LocalScheduler(ScheduledEntries<T, Instant> entries, Predicate<T> task, Duration closeTimeout) {
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1, new DefaultThreadFactory(this.getClass()));
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1, THREAD_FACTORY);
executor.setKeepAliveTime(1L, TimeUnit.MINUTES);
executor.allowCoreThreadTimeOut(true);
executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.BiConsumer;
Expand Down Expand Up @@ -57,9 +58,10 @@
*/
@Listener
public class SchedulerTopologyChangeListener<I, K extends Key<I>, V> implements ListenerRegistrar {
private static final ThreadFactory THREAD_FACTORY = new DefaultThreadFactory(SchedulerTopologyChangeListener.class);

private final Cache<K, V> cache;
private final ExecutorService executor = Executors.newSingleThreadExecutor(new DefaultThreadFactory(SchedulerTopologyChangeListener.class));
private final ExecutorService executor = Executors.newSingleThreadExecutor(THREAD_FACTORY);
private final AtomicReference<Future<?>> scheduleTaskFuture = new AtomicReference<>();
private final Consumer<Locality> cancelTask;
private final BiConsumer<Locality, Locality> scheduleTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
Expand All @@ -55,11 +56,12 @@
* @author Paul Ferraro
*/
public class TimerScheduler<I, C> extends AbstractCacheEntryScheduler<I, ImmutableTimerMetaData> {
private static final ThreadFactory THREAD_FACTORY = new DefaultThreadFactory(TimerScheduler.class);

private final TimerFactory<I, C> factory;

public TimerScheduler(TimerFactory<I, C> factory, TimerManager<I, TransactionBatch> manager, Supplier<Locality> locality, Duration closeTimeout, TimerRegistry<I> registry) {
this(factory, manager, locality, closeTimeout, registry, new SortedScheduledEntries<>(), Executors.newSingleThreadExecutor(new DefaultThreadFactory(TimerScheduler.class)));
this(factory, manager, locality, closeTimeout, registry, new SortedScheduledEntries<>(), Executors.newSingleThreadExecutor(THREAD_FACTORY));
}

private TimerScheduler(TimerFactory<I, C> factory, TimerManager<I, TransactionBatch> manager, Supplier<Locality> locality, Duration closeTimeout, TimerRegistry<I> registry, ScheduledEntries<I, Instant> entries, ExecutorService executor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Predicate;
Expand Down Expand Up @@ -75,6 +76,7 @@ public class DefaultKeyAffinityService<K> implements KeyAffinityService<K>, Supp

static final int DEFAULT_QUEUE_SIZE = 100;
private static final Logger LOGGER = Logger.getLogger(DefaultKeyAffinityService.class);
private static final ThreadFactory THREAD_FACTORY = new DefaultThreadFactory(DefaultKeyAffinityService.class);

private final Cache<? extends K, ?> cache;
private final KeyGenerator<? extends K> generator;
Expand Down Expand Up @@ -139,7 +141,7 @@ public boolean isStarted() {

@Override
public void start() {
this.executor = Executors.newCachedThreadPool(new DefaultThreadFactory(this.getClass()));
this.executor = Executors.newCachedThreadPool(THREAD_FACTORY);
this.accept(this.cache.getAdvancedCache().getDistributionManager().getCacheTopology().getWriteConsistentHash());
this.cache.addListener(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@
*/
public class DefaultNonBlockingThreadFactory extends DefaultThreadFactory implements NonBlockingResource {

public DefaultNonBlockingThreadFactory(Class<?> targetClass) {
super(targetClass);
}

public DefaultNonBlockingThreadFactory(ThreadFactory factory) {
super(factory);
}

public DefaultNonBlockingThreadFactory(ThreadFactory factory, Class<?> targetClass) {
super(factory, targetClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
* @author Radoslav Husar
*/
public class ClientThreadPoolServiceConfigurator extends ComponentServiceConfigurator<ExecutorFactoryConfiguration> {
private static final ThreadFactory THREAD_FACTORY = new DaemonThreadFactory(DefaultAsyncExecutorFactory.THREAD_NAME);

private final ThreadPoolDefinition definition;

Expand All @@ -75,7 +76,7 @@ public ServiceConfigurator configure(OperationContext context, ModelNode model)
@Override
public ExecutorService getExecutor(Properties property) {
BlockingQueue<Runnable> queue = queueLength == 0 ? new SynchronousQueue<>() : new LinkedBlockingQueue<>(queueLength);
ThreadFactory factory = new DefaultThreadFactory(new DaemonThreadFactory(DefaultAsyncExecutorFactory.THREAD_NAME));
ThreadFactory factory = new DefaultThreadFactory(THREAD_FACTORY);
if (nonBlocking) {
factory = new DefaultNonBlockingThreadFactory(factory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
Expand Down Expand Up @@ -85,10 +86,11 @@ public class ChannelCommandDispatcherFactory implements AutoCloseableCommandDisp

static final Optional<Object> NO_SUCH_SERVICE = Optional.of(NoSuchService.INSTANCE);
static final ExceptionSupplier<Object, Exception> NO_SUCH_SERVICE_SUPPLIER = Functions.constantExceptionSupplier(NoSuchService.INSTANCE);
private static final ThreadFactory THREAD_FACTORY = new DefaultThreadFactory(ChannelCommandDispatcherFactory.class);

private final ConcurrentMap<Address, Node> members = new ConcurrentHashMap<>();
private final Map<Object, CommandDispatcherContext<?, ?>> contexts = new ConcurrentHashMap<>();
private final ExecutorService executorService = Executors.newCachedThreadPool(new DefaultThreadFactory(this.getClass()));
private final ExecutorService executorService = Executors.newCachedThreadPool(THREAD_FACTORY);
private final ServiceExecutor executor = new StampedLockServiceExecutor();
private final Map<GroupListener, ExecutorService> listeners = new ConcurrentHashMap<>();
private final AtomicReference<View> view = new AtomicReference<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;

Expand Down Expand Up @@ -66,6 +67,7 @@
*/
@ClientListener
public class HotRodSessionFactory<MC, AV, LC> extends CompositeSessionFactory<MC, AV, LC> implements Registrar<Consumer<ImmutableSession>> {
private static final ThreadFactory THREAD_FACTORY = new DefaultThreadFactory(HotRodSessionFactory.class);

private final RemoteCache<SessionCreationMetaDataKey, SessionCreationMetaDataEntry<LC>> creationMetaDataCache;
private final RemoteCache<SessionAccessMetaDataKey, SessionAccessMetaData> accessMetaDataCache;
Expand All @@ -90,7 +92,7 @@ public HotRodSessionFactory(HotRodSessionFactoryConfiguration config, SessionMet
this.attributesRemover = attributesFactory;
this.creationMetaDataCache = config.getCache();
this.accessMetaDataCache= config.getCache();
this.executor = Executors.newFixedThreadPool(config.getExpirationThreadPoolSize(), new DefaultThreadFactory(this.getClass()));
this.executor = Executors.newFixedThreadPool(config.getExpirationThreadPoolSize(), THREAD_FACTORY);
this.creationMetaDataCache.addClientListener(this);
this.nearCacheEnabled = this.creationMetaDataCache.getRemoteCacheContainer().getConfiguration().remoteCaches().get(this.creationMetaDataCache.getName()).nearCacheMode().enabled();
}
Expand Down
5 changes: 5 additions & 0 deletions connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions docs/src/main/asciidoc/_admin-guide/Management_Clients.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,6 @@ include::Default_HTTP_Interface_Security.adoc[leveloffset=+1]
include::Default_Native_Interface_Security.adoc[leveloffset=+1]



[[command-line-interface]]
== Command Line Interface

The Command Line Interface (CLI) is a management tool for a managed
domain or standalone server. It allows a user to connect to the domain
controller or a standalone server and execute management operations
available through the de-typed management model.

Details on how to use the CLI can be found in the
<<Command_Line_Interface,Command Line Interface page>>.

[[configuration-files]]
== Configuration Files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ This ability is useful when you need to configure JVM settings without specifyin
}
----

=== Other server properties that can be resolved as JVM options on domain mode

In addition to the aforementioned server properties, the Host Controller can resolve the following `jboss.server-xyz` properties as JVM options:

* jboss.server.name


== Standalone Server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,4 @@
<param name="jms-connection-factory" value="java:jboss/DefaultJMSConnectionFactory"/>
</feature>
</feature>
<!-- remote naming -->
<feature spec="subsystem.naming">
<feature spec="subsystem.naming.service.remote-naming"/>
</feature>
</feature-group-spec>
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature-group-spec name="remoting" xmlns="urn:jboss:galleon:feature-group:1.0">
<!-- TODO Temporary fork to override use of security-realms. -->
<feature spec="subsystem.remoting">
<feature spec="subsystem.remoting.configuration.endpoint">
<unset param="worker"/>
</feature>
<param name="worker" value="default"/>
<feature spec="subsystem.remoting.http-connector">
<param name="http-connector" value="http-remoting-connector"/>
<param name="connector-ref" value="default"/>
Expand Down
Loading

0 comments on commit 8ad3b65

Please sign in to comment.