Skip to content

Commit

Permalink
ARTEMIS-5214 Ensuring stomp is loaded as a protocol on the server
Browse files Browse the repository at this point in the history
I have seen a CI test failing once because the protocol was not loaded,
then I saw it failing all the time on my IDE.

This will ensure the protocol is always loaded.
  • Loading branch information
clebertsuconic committed Dec 19, 2024
1 parent 5d49714 commit 505180d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.activemq.artemis.core.config.Configuration;
import org.apache.activemq.artemis.core.config.CoreAddressConfiguration;
import org.apache.activemq.artemis.core.protocol.stomp.Stomp;
import org.apache.activemq.artemis.core.protocol.stomp.StompProtocolManagerFactory;
import org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory;
import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory;
import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
Expand Down Expand Up @@ -204,6 +205,8 @@ protected ActiveMQServer createServer() throws Exception {
config.setPersistenceEnabled(true);

ActiveMQServer activeMQServer = addServer(ActiveMQServers.newActiveMQServer(config, defUser, defPass));
// make sure Stomp is loaded
activeMQServer.addProtocolManagerFactory(new StompProtocolManagerFactory());

if (isSecurityEnabled()) {
ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) activeMQServer.getSecurityManager();
Expand Down

0 comments on commit 505180d

Please sign in to comment.