Repository: activemq-artemis Updated Branches: refs/heads/master 0e8eff7ef -> 7a432afff
ARTEMIS-91 Separated out interface for ServiceRegistry. Provided a getter in the ActiveMQServer interface. Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8aa598f5 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8aa598f5 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8aa598f5 Branch: refs/heads/master Commit: 8aa598f594ad04e8db871029f25b87dcaa02be3a Parents: 0e8eff7 Author: John D. Ament <johndam...@apache.org> Authored: Wed Jun 10 22:48:48 2015 -0400 Committer: John D. Ament <johndam...@apache.org> Committed: Wed Jun 10 22:48:48 2015 -0400 ---------------------------------------------------------------------- .../server/impl/RemotingServiceImpl.java | 2 +- .../artemis/core/server/ActiveMQServer.java | 2 + .../artemis/core/server/ServiceRegistry.java | 61 +++++++++ .../core/server/impl/ActiveMQServerImpl.java | 3 +- .../core/server/impl/ConnectorsService.java | 1 + .../core/server/impl/ServiceRegistry.java | 127 ------------------ .../core/server/impl/ServiceRegistryImpl.java | 128 +++++++++++++++++++ .../server/SuppliedThreadPoolTest.java | 7 +- .../core/config/impl/ConnectorsServiceTest.java | 5 +- .../server/impl/RemotingServiceImplTest.java | 5 +- 10 files changed, 204 insertions(+), 137 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java index 9133858..c5680ee 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java @@ -52,10 +52,10 @@ import org.apache.activemq.artemis.core.server.ActiveMQComponent; import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServerLogger; +import org.apache.activemq.artemis.core.server.ServiceRegistry; import org.apache.activemq.artemis.core.server.cluster.ClusterConnection; import org.apache.activemq.artemis.core.server.cluster.ClusterManager; import org.apache.activemq.artemis.core.server.impl.ServerSessionImpl; -import org.apache.activemq.artemis.core.server.impl.ServiceRegistry; import org.apache.activemq.artemis.core.server.management.ManagementService; import org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry; import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java index 6f738ca..307c375 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java @@ -78,6 +78,8 @@ public interface ActiveMQServer extends ActiveMQComponent Configuration getConfiguration(); + ServiceRegistry getServiceRegistry(); + RemotingService getRemotingService(); StorageManager getStorageManager(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServiceRegistry.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServiceRegistry.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServiceRegistry.java new file mode 100644 index 0000000..c1710b6 --- /dev/null +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServiceRegistry.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.core.server; + +import org.apache.activemq.artemis.api.core.Interceptor; +import org.apache.activemq.artemis.api.core.Pair; +import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration; + +import java.util.Collection; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ScheduledExecutorService; + +/** + * A holder for common services leveraged by the broker. + */ +public interface ServiceRegistry +{ + ExecutorService getExecutorService(); + + void setExecutorService(ExecutorService executorService); + + ScheduledExecutorService getScheduledExecutorService(); + + void setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService); + + void addConnectorService(ConnectorServiceFactory connectorServiceFactory, ConnectorServiceConfiguration configuration); + + void removeConnectorService(ConnectorServiceConfiguration configuration); + + Collection<Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> getConnectorServices(); + + void addIncomingInterceptor(String name, Interceptor interceptor); + + void removeIncomingInterceptor(String name); + + Collection<Interceptor> getIncomingInterceptors(); + + Interceptor getIncomingInterceptor(String name); + + void addOutgoingInterceptor(String name, Interceptor interceptor); + + Interceptor getOutgoingInterceptor(String name); + + void removeOutgoingInterceptor(String name); + + Collection<Interceptor> getOutgoingInterceptors(); +} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java index 840c7e7..11caee4 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java @@ -102,6 +102,7 @@ import org.apache.activemq.artemis.core.server.QueueCreator; import org.apache.activemq.artemis.core.server.QueueFactory; import org.apache.activemq.artemis.core.server.ServerSession; import org.apache.activemq.artemis.core.server.ServerSessionFactory; +import org.apache.activemq.artemis.core.server.ServiceRegistry; import org.apache.activemq.artemis.core.server.cluster.BackupManager; import org.apache.activemq.artemis.core.server.cluster.ClusterManager; import org.apache.activemq.artemis.core.server.cluster.Transformer; @@ -343,7 +344,7 @@ public class ActiveMQServerImpl implements ActiveMQServer this.parentServer = parentServer; - this.serviceRegistry = serviceRegistry == null ? new ServiceRegistry() : serviceRegistry; + this.serviceRegistry = serviceRegistry == null ? new ServiceRegistryImpl() : serviceRegistry; } // life-cycle methods http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java index e1157ac..6a0bcdc 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java @@ -31,6 +31,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServerLogger; import org.apache.activemq.artemis.core.server.ConnectorService; import org.apache.activemq.artemis.core.server.ConnectorServiceFactory; import org.apache.activemq.artemis.core.server.ActiveMQComponent; +import org.apache.activemq.artemis.core.server.ServiceRegistry; import org.apache.activemq.artemis.utils.ClassloadingUtil; import org.apache.activemq.artemis.utils.ConfigurationHelper; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistry.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistry.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistry.java deleted file mode 100644 index 849bf4f..0000000 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistry.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.activemq.artemis.core.server.impl; - -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; - -import org.apache.activemq.artemis.api.core.Interceptor; -import org.apache.activemq.artemis.api.core.Pair; -import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration; -import org.apache.activemq.artemis.core.server.ConnectorServiceFactory; - -public class ServiceRegistry -{ - private ExecutorService executorService; - - private ScheduledExecutorService scheduledExecutorService; - - /* We are using a List rather than HashMap here as ActiveMQ Artemis allows multiple instances of the same class to be added - * to the interceptor list - */ - private Map<String, Interceptor> incomingInterceptors; - - private Map<String, Interceptor> outgoingInterceptors; - - private Map<String, Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> connectorServices; - - public ServiceRegistry() - { - this.incomingInterceptors = new ConcurrentHashMap<String, Interceptor>(); - this.outgoingInterceptors = new ConcurrentHashMap<String, Interceptor>(); - this.connectorServices = new ConcurrentHashMap<String, Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>>(); - } - - public ExecutorService getExecutorService() - { - return executorService; - } - - public void setExecutorService(ExecutorService executorService) - { - this.executorService = executorService; - } - - public ScheduledExecutorService getScheduledExecutorService() - { - return scheduledExecutorService; - } - - public void setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService) - { - this.scheduledExecutorService = scheduledExecutorService; - } - - public void addConnectorService(ConnectorServiceFactory connectorServiceFactory, ConnectorServiceConfiguration configuration) - { - connectorServices.put(configuration.getConnectorName(), new Pair<>(connectorServiceFactory, configuration)); - } - - public void removeConnectorService(ConnectorServiceConfiguration configuration) - { - connectorServices.remove(configuration.getConnectorName()); - } - - public Collection<Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> getConnectorServices() - { - return connectorServices.values(); - } - - public void addIncomingInterceptor(String name, Interceptor interceptor) - { - incomingInterceptors.put(name, interceptor); - } - - public void removeIncomingInterceptor(String name) - { - incomingInterceptors.remove(name); - } - - public Collection<Interceptor> getIncomingInterceptors() - { - return Collections.unmodifiableCollection(incomingInterceptors.values()); - } - - public Interceptor getIncomingInterceptor(String name) - { - return incomingInterceptors.get(name); - } - - public void addOutgoingInterceptor(String name, Interceptor interceptor) - { - outgoingInterceptors.put(name, interceptor); - } - - public Interceptor getOutgoingInterceptor(String name) - { - return outgoingInterceptors.get(name); - } - - public void removeOutgoingInterceptor(String name) - { - outgoingInterceptors.remove(name); - } - - public Collection<Interceptor> getOutgoingInterceptors() - { - return Collections.unmodifiableCollection(outgoingInterceptors.values()); - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java new file mode 100644 index 0000000..5a58b41 --- /dev/null +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.core.server.impl; + +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ScheduledExecutorService; + +import org.apache.activemq.artemis.api.core.Interceptor; +import org.apache.activemq.artemis.api.core.Pair; +import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration; +import org.apache.activemq.artemis.core.server.ConnectorServiceFactory; +import org.apache.activemq.artemis.core.server.ServiceRegistry; + +public class ServiceRegistryImpl implements ServiceRegistry +{ + private ExecutorService executorService; + + private ScheduledExecutorService scheduledExecutorService; + + /* We are using a List rather than HashMap here as ActiveMQ Artemis allows multiple instances of the same class to be added + * to the interceptor list + */ + private Map<String, Interceptor> incomingInterceptors; + + private Map<String, Interceptor> outgoingInterceptors; + + private Map<String, Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> connectorServices; + + public ServiceRegistryImpl() + { + this.incomingInterceptors = new ConcurrentHashMap<>(); + this.outgoingInterceptors = new ConcurrentHashMap<>(); + this.connectorServices = new ConcurrentHashMap<>(); + } + + public ExecutorService getExecutorService() + { + return executorService; + } + + public void setExecutorService(ExecutorService executorService) + { + this.executorService = executorService; + } + + public ScheduledExecutorService getScheduledExecutorService() + { + return scheduledExecutorService; + } + + public void setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService) + { + this.scheduledExecutorService = scheduledExecutorService; + } + + public void addConnectorService(ConnectorServiceFactory connectorServiceFactory, ConnectorServiceConfiguration configuration) + { + connectorServices.put(configuration.getConnectorName(), new Pair<>(connectorServiceFactory, configuration)); + } + + public void removeConnectorService(ConnectorServiceConfiguration configuration) + { + connectorServices.remove(configuration.getConnectorName()); + } + + public Collection<Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> getConnectorServices() + { + return connectorServices.values(); + } + + public void addIncomingInterceptor(String name, Interceptor interceptor) + { + incomingInterceptors.put(name, interceptor); + } + + public void removeIncomingInterceptor(String name) + { + incomingInterceptors.remove(name); + } + + public Collection<Interceptor> getIncomingInterceptors() + { + return Collections.unmodifiableCollection(incomingInterceptors.values()); + } + + public Interceptor getIncomingInterceptor(String name) + { + return incomingInterceptors.get(name); + } + + public void addOutgoingInterceptor(String name, Interceptor interceptor) + { + outgoingInterceptors.put(name, interceptor); + } + + public Interceptor getOutgoingInterceptor(String name) + { + return outgoingInterceptors.get(name); + } + + public void removeOutgoingInterceptor(String name) + { + outgoingInterceptors.remove(name); + } + + public Collection<Interceptor> getOutgoingInterceptors() + { + return Collections.unmodifiableCollection(outgoingInterceptors.values()); + } +} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java index f0cc953..23c5f02 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java @@ -24,10 +24,11 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import org.apache.activemq.artemis.core.server.ServiceRegistry; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; -import org.apache.activemq.artemis.core.server.impl.ServiceRegistry; +import org.apache.activemq.artemis.core.server.impl.ServiceRegistryImpl; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -36,13 +37,11 @@ public class SuppliedThreadPoolTest extends ActiveMQTestBase { private ActiveMQServer server; - private Thread serverThread; - private ServiceRegistry serviceRegistry; @Before public void setup() throws Exception { - serviceRegistry = new ServiceRegistry(); + serviceRegistry = new ServiceRegistryImpl(); serviceRegistry.setExecutorService(Executors.newFixedThreadPool(1)); serviceRegistry.setScheduledExecutorService(Executors.newScheduledThreadPool(1)); server = new ActiveMQServerImpl(null, null, null, null, serviceRegistry); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java index a9de6b1..518be5b 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import org.apache.activemq.artemis.core.server.ServiceRegistry; import org.apache.activemq.artemis.tests.unit.core.config.impl.fakes.FakeConnectorServiceFactory; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.core.config.Configuration; @@ -27,7 +28,7 @@ import org.apache.activemq.artemis.core.config.ConnectorServiceConfiguration; import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.server.ConnectorService; import org.apache.activemq.artemis.core.server.impl.ConnectorsService; -import org.apache.activemq.artemis.core.server.impl.ServiceRegistry; +import org.apache.activemq.artemis.core.server.impl.ServiceRegistryImpl; import org.apache.activemq.artemis.tests.unit.core.config.impl.fakes.FakeConnectorService; import org.junit.Before; import org.junit.Test; @@ -43,7 +44,7 @@ public class ConnectorsServiceTest extends ActiveMQTestBase { // Setup Configuration configuration = new ConfigurationImpl(); - serviceRegistry = new ServiceRegistry(); + serviceRegistry = new ServiceRegistryImpl(); } /** http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8aa598f5/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/RemotingServiceImplTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/RemotingServiceImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/RemotingServiceImplTest.java index eead0e8..ea67663 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/RemotingServiceImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/RemotingServiceImplTest.java @@ -24,11 +24,12 @@ import java.util.List; import org.apache.activemq.artemis.api.core.Interceptor; import org.apache.activemq.artemis.api.core.TransportConfiguration; +import org.apache.activemq.artemis.core.server.ServiceRegistry; import org.apache.activemq.artemis.tests.unit.core.remoting.server.impl.fake.FakeInterceptor; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl; -import org.apache.activemq.artemis.core.server.impl.ServiceRegistry; +import org.apache.activemq.artemis.core.server.impl.ServiceRegistryImpl; import org.junit.Before; import org.junit.Test; @@ -45,7 +46,7 @@ public class RemotingServiceImplTest @Before public void setUp() throws Exception { - serviceRegistry = new ServiceRegistry(); + serviceRegistry = new ServiceRegistryImpl(); configuration = new ConfigurationImpl(); configuration.setAcceptorConfigurations(new HashSet<TransportConfiguration>()); remotingService = new RemotingServiceImpl(null, configuration, null, null, null, null, null, serviceRegistry);