This closes #4168
This commit is contained in:
commit
37c7da4e50
|
@ -221,7 +221,7 @@ public class DBOption extends OptionalLocking {
|
||||||
|
|
||||||
protected void initializeJournal(Configuration configuration) throws Exception {
|
protected void initializeJournal(Configuration configuration) throws Exception {
|
||||||
this.config = configuration;
|
this.config = configuration;
|
||||||
executor = Executors.newFixedThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newFixedThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
executorFactory = new OrderedExecutorFactory(executor);
|
executorFactory = new OrderedExecutorFactory(executor);
|
||||||
|
|
||||||
scheduledExecutorService = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), new ThreadFactory() {
|
scheduledExecutorService = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), new ThreadFactory() {
|
||||||
|
|
|
@ -127,8 +127,7 @@ public final class ActiveMQThreadFactory implements ThreadFactory {
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ActiveMQThreadFactory defaultThreadFactory() {
|
public static ActiveMQThreadFactory defaultThreadFactory(String callerClassName) {
|
||||||
String callerClassName = Thread.currentThread().getStackTrace()[2].getClassName();
|
|
||||||
return new ActiveMQThreadFactory(callerClassName, false, null);
|
return new ActiveMQThreadFactory(callerClassName, false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ public final class UUIDGenerator {
|
||||||
public static byte[] getHardwareAddress() {
|
public static byte[] getHardwareAddress() {
|
||||||
try {
|
try {
|
||||||
// check if we have enough security permissions to create and shutdown an executor
|
// check if we have enough security permissions to create and shutdown an executor
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory(UUIDGenerator.class.getName()));
|
||||||
executor.shutdownNow();
|
executor.shutdownNow();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
// not enough security permission
|
// not enough security permission
|
||||||
|
@ -261,7 +261,7 @@ public final class UUIDGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static byte[] findFirstMatchingHardwareAddress(List<NetworkInterface> ifaces) {
|
private static byte[] findFirstMatchingHardwareAddress(List<NetworkInterface> ifaces) {
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(ifaces.size(), ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newFixedThreadPool(ifaces.size(), ActiveMQThreadFactory.defaultThreadFactory(UUIDGenerator.class.getName()));
|
||||||
Collection<Callable<byte[]>> tasks = new ArrayList<>(ifaces.size());
|
Collection<Callable<byte[]>> tasks = new ArrayList<>(ifaces.size());
|
||||||
|
|
||||||
for (final NetworkInterface networkInterface : ifaces) {
|
for (final NetworkInterface networkInterface : ifaces) {
|
||||||
|
|
|
@ -48,14 +48,14 @@ public class ReferenceCounterTest extends Assert {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReferenceWithExecutor() throws Exception {
|
public void testReferenceWithExecutor() throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
internalTestReferenceNoExecutor(executor);
|
internalTestReferenceNoExecutor(executor);
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReferenceValidExecutorUsed() throws Exception {
|
public void testReferenceValidExecutorUsed() throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
LatchRunner runner = new LatchRunner();
|
LatchRunner runner = new LatchRunner();
|
||||||
ReferenceCounterUtil counter = new ReferenceCounterUtil(runner, executor);
|
ReferenceCounterUtil counter = new ReferenceCounterUtil(runner, executor);
|
||||||
counter.increment();
|
counter.increment();
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class ClientThreadPoolsTest {
|
||||||
|
|
||||||
ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
|
ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
|
||||||
|
|
||||||
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory());
|
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
ActiveMQClient.injectPools(poolExecutor, scheduledThreadPoolExecutor);
|
ActiveMQClient.injectPools(poolExecutor, scheduledThreadPoolExecutor);
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class JDBCSequentialFileFactoryTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
Map<String, Object> dataSourceProperties = new HashMap<>();
|
Map<String, Object> dataSourceProperties = new HashMap<>();
|
||||||
if (useAuthentication) {
|
if (useAuthentication) {
|
||||||
user = "testuser";
|
user = "testuser";
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
|
||||||
|
|
||||||
private final FailoverEventListener failoverListener = new FailoverEventListenerImpl(this);
|
private final FailoverEventListener failoverListener = new FailoverEventListenerImpl(this);
|
||||||
|
|
||||||
private final ExecutorService failoverListenerExecutor = Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory());
|
private final ExecutorService failoverListenerExecutor = Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
private final Version thisVersion;
|
private final Version thisVersion;
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class MessageServiceManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (threadPool == null)
|
if (threadPool == null)
|
||||||
threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
timeoutTaskInterval = configuration.getTimeoutTaskInterval();
|
timeoutTaskInterval = configuration.getTimeoutTaskInterval();
|
||||||
timeoutTask = new TimeoutTask(timeoutTaskInterval);
|
timeoutTask = new TimeoutTask(timeoutTaskInterval);
|
||||||
threadPool.execute(timeoutTask);
|
threadPool.execute(timeoutTask);
|
||||||
|
|
|
@ -123,9 +123,9 @@ public class InVMConnector extends AbstractConnector {
|
||||||
private static synchronized ExecutorService getInVMExecutor() {
|
private static synchronized ExecutorService getInVMExecutor() {
|
||||||
if (threadPoolExecutor == null) {
|
if (threadPoolExecutor == null) {
|
||||||
if (ActiveMQClient.getGlobalThreadPoolSize() <= -1) {
|
if (ActiveMQClient.getGlobalThreadPoolSize() <= -1) {
|
||||||
threadPoolExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), ActiveMQThreadFactory.defaultThreadFactory());
|
threadPoolExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), ActiveMQThreadFactory.defaultThreadFactory(InVMConnector.class.getName()));
|
||||||
} else {
|
} else {
|
||||||
threadPoolExecutor = new ActiveMQThreadPoolExecutor(0, ActiveMQClient.getGlobalThreadPoolSize(), 60L, TimeUnit.SECONDS, ActiveMQThreadFactory.defaultThreadFactory());
|
threadPoolExecutor = new ActiveMQThreadPoolExecutor(0, ActiveMQClient.getGlobalThreadPoolSize(), 60L, TimeUnit.SECONDS, ActiveMQThreadFactory.defaultThreadFactory(InVMConnector.class.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return threadPoolExecutor;
|
return threadPoolExecutor;
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class OperationContextUnitTest extends ActiveMQTestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCompleteTaskAfterPaging() throws Exception {
|
public void testCompleteTaskAfterPaging() throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
try {
|
try {
|
||||||
OperationContextImpl impl = new OperationContextImpl(executor);
|
OperationContextImpl impl = new OperationContextImpl(executor);
|
||||||
final CountDownLatch latch1 = new CountDownLatch(1);
|
final CountDownLatch latch1 = new CountDownLatch(1);
|
||||||
|
@ -93,7 +93,7 @@ public class OperationContextUnitTest extends ActiveMQTestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCompleteTaskStoreOnly() throws Exception {
|
public void testCompleteTaskStoreOnly() throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
try {
|
try {
|
||||||
OperationContextImpl impl = new OperationContextImpl(executor);
|
OperationContextImpl impl = new OperationContextImpl(executor);
|
||||||
final CountDownLatch latch1 = new CountDownLatch(1);
|
final CountDownLatch latch1 = new CountDownLatch(1);
|
||||||
|
@ -181,7 +181,7 @@ public class OperationContextUnitTest extends ActiveMQTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testCompletionLate(boolean storeOnly) throws Exception {
|
private void testCompletionLate(boolean storeOnly) throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
try {
|
try {
|
||||||
OperationContextImpl impl = new OperationContextImpl(executor);
|
OperationContextImpl impl = new OperationContextImpl(executor);
|
||||||
final CountDownLatch latch1 = new CountDownLatch(1);
|
final CountDownLatch latch1 = new CountDownLatch(1);
|
||||||
|
@ -250,8 +250,8 @@ public class OperationContextUnitTest extends ActiveMQTestBase {
|
||||||
@Test
|
@Test
|
||||||
public void testErrorNotLostOnPageSyncError() throws Exception {
|
public void testErrorNotLostOnPageSyncError() throws Exception {
|
||||||
|
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
ExecutorService pageSyncTimer = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService pageSyncTimer = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
class PageWriteErrorJob implements Runnable {
|
class PageWriteErrorJob implements Runnable {
|
||||||
final OperationContextImpl operationContext;
|
final OperationContextImpl operationContext;
|
||||||
|
@ -313,7 +313,7 @@ public class OperationContextUnitTest extends ActiveMQTestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCaptureExceptionOnExecutor() throws Exception {
|
public void testCaptureExceptionOnExecutor() throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
|
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
|
@ -358,7 +358,7 @@ public class OperationContextUnitTest extends ActiveMQTestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCaptureExceptionOnFailure() throws Exception {
|
public void testCaptureExceptionOnFailure() throws Exception {
|
||||||
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class PropertiesLoginModuleRaceConditionTest {
|
||||||
options.put("baseDir", temp.getRoot().getAbsolutePath());
|
options.put("baseDir", temp.getRoot().getAbsolutePath());
|
||||||
|
|
||||||
errors = new ArrayBlockingQueue<>(processorCount());
|
errors = new ArrayBlockingQueue<>(processorCount());
|
||||||
pool = Executors.newFixedThreadPool(processorCount(), ActiveMQThreadFactory.defaultThreadFactory());
|
pool = Executors.newFixedThreadPool(processorCount(), ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
callback = new JaasCallbackHandler(USERNAME, PASSWORD, null);
|
callback = new JaasCallbackHandler(USERNAME, PASSWORD, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ClusterConnectionImplMockTest extends ActiveMQTestBase {
|
||||||
tc.getParams().put(TransportConstants.LOCAL_ADDRESS_PROP_NAME, "localAddress");
|
tc.getParams().put(TransportConstants.LOCAL_ADDRESS_PROP_NAME, "localAddress");
|
||||||
tc.getParams().put(TransportConstants.LOCAL_PORT_PROP_NAME, "localPort");
|
tc.getParams().put(TransportConstants.LOCAL_PORT_PROP_NAME, "localPort");
|
||||||
|
|
||||||
ArtemisExecutor executor = ArtemisExecutor.delegate(Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory()));
|
ArtemisExecutor executor = ArtemisExecutor.delegate(Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
ClusterConnectionImpl cci = new ClusterConnectionImpl(
|
ClusterConnectionImpl cci = new ClusterConnectionImpl(
|
||||||
null, //final ClusterManager manager,
|
null, //final ClusterManager manager,
|
||||||
|
|
|
@ -182,8 +182,8 @@ public class ScheduledDeliveryHandlerTest extends Assert {
|
||||||
@Test
|
@Test
|
||||||
public void testScheduleNow() throws Exception {
|
public void testScheduleNow() throws Exception {
|
||||||
|
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(50, ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newFixedThreadPool(50, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
ScheduledThreadPoolExecutor scheduler = new ScheduledThreadPoolExecutor(1, ActiveMQThreadFactory.defaultThreadFactory());
|
ScheduledThreadPoolExecutor scheduler = new ScheduledThreadPoolExecutor(1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
// it's better to run the test a few times instead of run millions of messages here
|
// it's better to run the test a few times instead of run millions of messages here
|
||||||
|
|
|
@ -660,7 +660,7 @@ public abstract class ActiveMQTestBase extends Assert {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final OrderedExecutorFactory getOrderedExecutor() {
|
protected final OrderedExecutorFactory getOrderedExecutor() {
|
||||||
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
executorSet.add(executor);
|
executorSet.add(executor);
|
||||||
return new OrderedExecutorFactory(executor);
|
return new OrderedExecutorFactory(executor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class HierarchicalObjectRepositoryTest {
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
latch = new CountDownLatch(1);
|
latch = new CountDownLatch(1);
|
||||||
latch2 = new CountDownLatch(1);
|
latch2 = new CountDownLatch(1);
|
||||||
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
repo = new HierarchicalObjectRepository<>();
|
repo = new HierarchicalObjectRepository<>();
|
||||||
addToRepo(repo, A);
|
addToRepo(repo, A);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class CoreClientTest extends ActiveMQTestBase {
|
||||||
@Test
|
@Test
|
||||||
public void testCoreClientWithInjectedThreadPools() throws Exception {
|
public void testCoreClientWithInjectedThreadPools() throws Exception {
|
||||||
|
|
||||||
ExecutorService threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
ScheduledThreadPoolExecutor scheduledThreadPool = new ScheduledThreadPoolExecutor(10);
|
ScheduledThreadPoolExecutor scheduledThreadPool = new ScheduledThreadPoolExecutor(10);
|
||||||
|
|
||||||
ServerLocator locator = createNonHALocator(false);
|
ServerLocator locator = createNonHALocator(false);
|
||||||
|
|
|
@ -606,7 +606,7 @@ public class ClusteredGroupingTest extends ClusterTestBase {
|
||||||
session.close();
|
session.close();
|
||||||
|
|
||||||
// need thread pool to service both consumers and producers plus a thread to cycle nodes
|
// need thread pool to service both consumers and producers plus a thread to cycle nodes
|
||||||
ExecutorService executorService = Executors.newFixedThreadPool(groups.size() * 2 + 1, ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executorService = Executors.newFixedThreadPool(groups.size() * 2 + 1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
final AtomicInteger producerCounter = new AtomicInteger(0);
|
final AtomicInteger producerCounter = new AtomicInteger(0);
|
||||||
final CountDownLatch okToConsume = new CountDownLatch(groups.size() + 1);
|
final CountDownLatch okToConsume = new CountDownLatch(groups.size() + 1);
|
||||||
|
|
|
@ -1830,15 +1830,15 @@ public class NIOJournalCompactTest extends JournalImplTestBase {
|
||||||
|
|
||||||
final AtomicLong seqGenerator = new AtomicLong(1);
|
final AtomicLong seqGenerator = new AtomicLong(1);
|
||||||
|
|
||||||
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
final ExecutorService ioexecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService ioexecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
OrderedExecutorFactory factory = new OrderedExecutorFactory(executor);
|
OrderedExecutorFactory factory = new OrderedExecutorFactory(executor);
|
||||||
|
|
||||||
OrderedExecutorFactory iofactory = new OrderedExecutorFactory(ioexecutor);
|
OrderedExecutorFactory iofactory = new OrderedExecutorFactory(ioexecutor);
|
||||||
|
|
||||||
final ExecutorService deleteExecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService deleteExecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
final JournalStorageManager storage = new JournalStorageManager(config, EmptyCriticalAnalyzer.getInstance(), factory, iofactory);
|
final JournalStorageManager storage = new JournalStorageManager(config, EmptyCriticalAnalyzer.getInstance(), factory, iofactory);
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class JMSConsumer2Test extends BasicOpenWireTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
consumer.setMessageListener(new MessageListener() {
|
consumer.setMessageListener(new MessageListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(Message m) {
|
public void onMessage(Message m) {
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class AddressFullLoggingTest extends ActiveMQTestBase {
|
||||||
final ClientMessage message = session.createMessage(false);
|
final ClientMessage message = session.createMessage(false);
|
||||||
message.getBodyBuffer().writeBytes(new byte[1024]);
|
message.getBodyBuffer().writeBytes(new byte[1024]);
|
||||||
|
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService executor = Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
Callable<Object> sendMessageTask = new Callable<Object>() {
|
Callable<Object> sendMessageTask = new Callable<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public Object call() throws ActiveMQException {
|
public Object call() throws ActiveMQException {
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class MultipleProducersPagingTest extends ActiveMQTestBase {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
server = createServer(createBasicConfig()
|
server = createServer(createBasicConfig()
|
||||||
.setPersistenceEnabled(false)
|
.setPersistenceEnabled(false)
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class FileLockTimeoutTest extends ActiveMQTestBase {
|
||||||
server2.getConfiguration().setJournalLockAcquisitionTimeout(5000);
|
server2.getConfiguration().setJournalLockAcquisitionTimeout(5000);
|
||||||
|
|
||||||
// if something happens that causes the timeout to misbehave we don't want the test to hang
|
// if something happens that causes the timeout to misbehave we don't want the test to hang
|
||||||
ExecutorService service = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
ExecutorService service = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -43,9 +43,9 @@ public class SuppliedThreadPoolTest extends ActiveMQTestBase {
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
serviceRegistry = new ServiceRegistryImpl();
|
serviceRegistry = new ServiceRegistryImpl();
|
||||||
serviceRegistry.setExecutorService(Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory()));
|
serviceRegistry.setExecutorService(Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
serviceRegistry.setIOExecutorService(Executors.newFixedThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
serviceRegistry.setIOExecutorService(Executors.newFixedThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
serviceRegistry.setScheduledExecutorService(Executors.newScheduledThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory()));
|
serviceRegistry.setScheduledExecutorService(Executors.newScheduledThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
server = new ActiveMQServerImpl(createBasicConfig(), null, null, null, serviceRegistry);
|
server = new ActiveMQServerImpl(createBasicConfig(), null, null, null, serviceRegistry);
|
||||||
server.start();
|
server.start();
|
||||||
server.waitForActivation(100, TimeUnit.MILLISECONDS);
|
server.waitForActivation(100, TimeUnit.MILLISECONDS);
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class QueueImplTest extends ActiveMQTestBase {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
scheduledExecutor = new ScheduledThreadPoolExecutor(1);
|
scheduledExecutor = new ScheduledThreadPoolExecutor(1);
|
||||||
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class MultiThreadAsynchronousFileTest extends AIOTestBase {
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
pollerExecutor = Executors.newCachedThreadPool(new ActiveMQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), false, this.getClass().getClassLoader()));
|
pollerExecutor = Executors.newCachedThreadPool(new ActiveMQThreadFactory("ActiveMQ-AIO-poller-pool" + System.identityHashCode(this), false, this.getClass().getClassLoader()));
|
||||||
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -60,8 +60,8 @@ public class PageTest extends ActiveMQTestBase {
|
||||||
@Test
|
@Test
|
||||||
public void testLargeMessagePageWithNIO() throws Exception {
|
public void testLargeMessagePageWithNIO() throws Exception {
|
||||||
recreateDirectory(getTestDir());
|
recreateDirectory(getTestDir());
|
||||||
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService executor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
final ExecutorService ioexecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService ioexecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
OrderedExecutorFactory factory = new OrderedExecutorFactory(executor);
|
OrderedExecutorFactory factory = new OrderedExecutorFactory(executor);
|
||||||
OrderedExecutorFactory iofactory = new OrderedExecutorFactory(ioexecutor);
|
OrderedExecutorFactory iofactory = new OrderedExecutorFactory(ioexecutor);
|
||||||
final JournalStorageManager storageManager = new JournalStorageManager(
|
final JournalStorageManager storageManager = new JournalStorageManager(
|
||||||
|
|
|
@ -1387,7 +1387,7 @@ public class PagingStoreImplTest extends ActiveMQTestBase {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class DuplicateDetectionUnitTest extends ActiveMQTestBase {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
executor = Executors.newFixedThreadPool(10, ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newFixedThreadPool(10, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
factory = new OrderedExecutorFactory(executor);
|
factory = new OrderedExecutorFactory(executor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ public class DuplicateDetectionUnitTest extends ActiveMQTestBase {
|
||||||
|
|
||||||
PostOffice postOffice = new FakePostOffice();
|
PostOffice postOffice = new FakePostOffice();
|
||||||
|
|
||||||
ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), ActiveMQThreadFactory.defaultThreadFactory());
|
ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
journal = new JournalStorageManager(configuration, EmptyCriticalAnalyzer.getInstance(), factory, factory);
|
journal = new JournalStorageManager(configuration, EmptyCriticalAnalyzer.getInstance(), factory, factory);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class NettyAcceptorFactoryTest extends ActiveMQTestBase {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Acceptor acceptor = factory.createAcceptor("netty", null, params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), ActiveMQThreadFactory.defaultThreadFactory()), new HashMap<String, ProtocolManager>());
|
Acceptor acceptor = factory.createAcceptor("netty", null, params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), new HashMap<String, ProtocolManager>());
|
||||||
|
|
||||||
Assert.assertTrue(acceptor instanceof NettyAcceptor);
|
Assert.assertTrue(acceptor instanceof NettyAcceptor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,8 +96,8 @@ public class NettyAcceptorTest extends ActiveMQTestBase {
|
||||||
public void connectionReadyForWrites(Object connectionID, boolean ready) {
|
public void connectionReadyForWrites(Object connectionID, boolean ready) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
pool2 = Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), ActiveMQThreadFactory.defaultThreadFactory());
|
pool2 = Executors.newScheduledThreadPool(ActiveMQDefaultConfiguration.getDefaultScheduledThreadPoolMaxSize(), ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
pool3 = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
pool3 = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
NettyAcceptor acceptor = new NettyAcceptor("netty", null, params, handler, listener, pool2, pool3, new HashMap<String, ProtocolManager>());
|
NettyAcceptor acceptor = new NettyAcceptor("netty", null, params, handler, listener, pool2, pool3, new HashMap<String, ProtocolManager>());
|
||||||
|
|
||||||
addActiveMQComponent(acceptor);
|
addActiveMQComponent(acceptor);
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
executorService = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
executorService = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
||||||
|
@ -105,7 +105,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
};
|
};
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -123,7 +123,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
new NettyConnector(params, null, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
new NettyConnector(params, null, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
Assert.fail("Should throw Exception");
|
Assert.fail("Should throw Exception");
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
|
@ -131,7 +131,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
new NettyConnector(params, handler, null, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
new NettyConnector(params, handler, null, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
Assert.fail("Should throw Exception");
|
Assert.fail("Should throw Exception");
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
|
@ -159,7 +159,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -192,7 +192,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME,"server-ca-truststore.jks");
|
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME,"server-ca-truststore.jks");
|
||||||
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "securepass");
|
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "securepass");
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -225,7 +225,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path");
|
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path");
|
||||||
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password");
|
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password");
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -260,7 +260,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME,"server-ca-truststore.jks");
|
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME,"server-ca-truststore.jks");
|
||||||
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "securepass");
|
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "securepass");
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -293,7 +293,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
// forcing SSL parameters will "undo" the values set by the system properties; all properties will be set to default values
|
// forcing SSL parameters will "undo" the values set by the system properties; all properties will be set to default values
|
||||||
params.put(TransportConstants.FORCE_SSL_PARAMETERS, true);
|
params.put(TransportConstants.FORCE_SSL_PARAMETERS, true);
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -319,7 +319,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PATH_PROP_NAME, "client-keystore.jks");
|
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PATH_PROP_NAME, "client-keystore.jks");
|
||||||
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME, "securepass");
|
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME, "securepass");
|
||||||
|
@ -344,7 +344,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PATH_PROP_NAME, "client-keystore.jks");
|
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PATH_PROP_NAME, "client-keystore.jks");
|
||||||
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME, "securepass");
|
System.setProperty(NettyConnector.ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME, "securepass");
|
||||||
|
@ -375,7 +375,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
||||||
params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, "myBadCipherSuite");
|
params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, "myBadCipherSuite");
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -395,7 +395,7 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
|
||||||
params.put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "myBadProtocol");
|
params.put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "myBadProtocol");
|
||||||
|
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory()));
|
NettyConnector connector = new NettyConnector(params, handler, listener, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())));
|
||||||
|
|
||||||
connector.start();
|
connector.start();
|
||||||
Assert.assertTrue(connector.isStarted());
|
Assert.assertTrue(connector.isStarted());
|
||||||
|
@ -409,9 +409,9 @@ public class NettyConnectorTest extends ActiveMQTestBase {
|
||||||
BufferHandler handler = (connectionID, buffer) -> {
|
BufferHandler handler = (connectionID, buffer) -> {
|
||||||
};
|
};
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
final ExecutorService closeExecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService closeExecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
final ExecutorService threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
final ExecutorService threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
final ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory());
|
final ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
try {
|
try {
|
||||||
NettyConnector connector = new NettyConnector(params, handler, listener, closeExecutor, threadPool, scheduledThreadPool);
|
NettyConnector connector = new NettyConnector(params, handler, listener, closeExecutor, threadPool, scheduledThreadPool);
|
||||||
connector.start();
|
connector.start();
|
||||||
|
|
|
@ -69,9 +69,9 @@ public class SocksProxyTest extends ActiveMQTestBase {
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
closeExecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
closeExecutor = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory());
|
threadPool = Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
scheduledThreadPool = Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory());
|
scheduledThreadPool = Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
startSocksProxy();
|
startSocksProxy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,8 +77,8 @@ public class QueueImplTest extends ActiveMQTestBase {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
scheduledExecutor = Executors.newSingleThreadScheduledExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
scheduledExecutor = Executors.newSingleThreadScheduledExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
defaultServer = createServer(createDefaultConfig(1, false));
|
defaultServer = createServer(createDefaultConfig(1, false));
|
||||||
defaultServer.start();
|
defaultServer.start();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,9 @@ import org.apache.activemq.artemis.utils.actors.ArtemisExecutor;
|
||||||
|
|
||||||
public final class FakeQueueFactory implements QueueFactory {
|
public final class FakeQueueFactory implements QueueFactory {
|
||||||
|
|
||||||
private final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
private final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
private final ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory());
|
private final ExecutorService executor = Executors.newSingleThreadExecutor(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()));
|
||||||
|
|
||||||
private PostOffice postOffice;
|
private PostOffice postOffice;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue