activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [3/4] activemq-artemis git commit: Log the protocol module name on boot
Date Thu, 07 May 2015 19:35:07 GMT
Log the protocol module name on boot


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/a176a542
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/a176a542
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/a176a542

Branch: refs/heads/master
Commit: a176a542aa1272731c583eae8a64163c72b127de
Parents: 77efc95
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Thu May 7 14:37:34 2015 +0100
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu May 7 14:59:46 2015 -0400

----------------------------------------------------------------------
 .../core/protocol/proton/ProtonProtocolManagerFactory.java  | 8 ++++++++
 .../protocol/hornetq/HornetQProtocolManagerFactory.java     | 8 ++++++++
 .../protocol/openwire/OpenWireProtocolManagerFactory.java   | 7 +++++++
 .../core/protocol/stomp/StompProtocolManagerFactory.java    | 8 ++++++++
 .../core/protocol/core/impl/CoreProtocolManagerFactory.java | 9 +++++++++
 .../core/remoting/server/impl/RemotingServiceImpl.java      | 8 ++++----
 .../activemq/artemis/core/server/ActiveMQServerLogger.java  | 4 ++--
 .../artemis/spi/core/protocol/ProtocolManagerFactory.java   | 2 ++
 8 files changed, 48 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
index 541a4b4..dc9c20f 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ProtonProtocolManagerFactory.java
@@ -29,6 +29,8 @@ public class ProtonProtocolManagerFactory extends AbstractProtocolManagerFactory
 {
    private static final String AMQP_PROTOCOL_NAME = "AMQP";
 
+   private static final String MODULE_NAME = "artemis-amqp-protocol";
+
    private static String[] SUPPORTED_PROTOCOLS = {AMQP_PROTOCOL_NAME};
 
    @Override
@@ -49,4 +51,10 @@ public class ProtonProtocolManagerFactory extends AbstractProtocolManagerFactory
    {
       return SUPPORTED_PROTOCOLS;
    }
+
+   @Override
+   public String getModuleName()
+   {
+      return MODULE_NAME;
+   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
b/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
index 956fdb7..3ba12ea 100644
--- a/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-hornetq-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/HornetQProtocolManagerFactory.java
@@ -28,6 +28,8 @@ public class HornetQProtocolManagerFactory extends CoreProtocolManagerFactory
 {
    public static final String HORNETQ_PROTOCOL_NAME = "HORNETQ";
 
+   private static final String MODULE_NAME = "artemis-hornetq-protocol";
+
    private static String[] SUPPORTED_PROTOCOLS = {HORNETQ_PROTOCOL_NAME};
 
    public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor>
incomingInterceptors, List<Interceptor> outgoingInterceptors)
@@ -43,4 +45,10 @@ public class HornetQProtocolManagerFactory extends CoreProtocolManagerFactory
    {
       return SUPPORTED_PROTOCOLS;
    }
+
+   @Override
+   public String getModuleName()
+   {
+      return MODULE_NAME;
+   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
index 8e88ea1..256c2db 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java
@@ -29,6 +29,8 @@ public class OpenWireProtocolManagerFactory extends AbstractProtocolManagerFacto
 {
    public static final String OPENWIRE_PROTOCOL_NAME = "OPENWIRE";
 
+   private static final String MODULE_NAME = "artemis-openwire-protocol";
+
    private static String[] SUPPORTED_PROTOCOLS = {OPENWIRE_PROTOCOL_NAME};
 
    public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor>
incomingInterceptors, List<Interceptor> outgoingInterceptors)
@@ -48,4 +50,9 @@ public class OpenWireProtocolManagerFactory extends AbstractProtocolManagerFacto
       return SUPPORTED_PROTOCOLS;
    }
 
+   @Override
+   public String getModuleName()
+   {
+      return MODULE_NAME;
+   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
index 713df84..23e5d0f 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java
@@ -27,6 +27,8 @@ public class StompProtocolManagerFactory extends AbstractProtocolManagerFactory<
 {
    public static final String STOMP_PROTOCOL_NAME = "STOMP";
 
+   private static final String MODULE_NAME = "artemis-stomp-protocol";
+
    private static String[] SUPPORTED_PROTOCOLS = {STOMP_PROTOCOL_NAME};
 
    public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<StompFrameInterceptor>
incomingInterceptors, List<StompFrameInterceptor> outgoingInterceptors)
@@ -46,4 +48,10 @@ public class StompProtocolManagerFactory extends AbstractProtocolManagerFactory<
       return SUPPORTED_PROTOCOLS;
    }
 
+   @Override
+   public String getModuleName()
+   {
+      return MODULE_NAME;
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
index aa9e2a5..f33909f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java
@@ -29,6 +29,8 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<I
 {
    private static String[] SUPPORTED_PROTOCOLS = {ActiveMQClient.DEFAULT_CORE_PROTOCOL};
 
+   private static final String MODULE_NAME = "artemis-server";
+
    /**
     * {@inheritDoc} *
     * @param server
@@ -55,4 +57,11 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory<I
    {
       return SUPPORTED_PROTOCOLS;
    }
+
+   @Override
+   public String getModuleName()
+   {
+      return MODULE_NAME;
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/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 d2a76aa..6cfd226 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
@@ -146,7 +146,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
       //i know there is only 1
       this.flushExecutor = flushExecutor;
 
-      ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0]);
+      ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0],
coreProtocolManagerFactory.getModuleName());
       this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0],
                            coreProtocolManagerFactory.createProtocolManager(server, coreProtocolManagerFactory.filterInterceptors(incomingInterceptors),
                                                                             coreProtocolManagerFactory.filterInterceptors(outgoingInterceptors)));
@@ -161,9 +161,9 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
                String[] protocols = next.getProtocols();
                for (String protocol : protocols)
                {
-                  ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol);
+                  ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol, next.getModuleName());
                   protocolMap.put(protocol, next.createProtocolManager(server, next.filterInterceptors(incomingInterceptors),
-                                                                       next.filterInterceptors(outgoingInterceptors)));
+                        next.filterInterceptors(outgoingInterceptors)));
                }
             }
          }
@@ -176,7 +176,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
             String[] protocols = protocolManagerFactory.getProtocols();
             for (String protocol : protocols)
             {
-               ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol);
+               ActiveMQServerLogger.LOGGER.addingProtocolSupport(protocol, protocolManagerFactory.getModuleName());
                protocolMap.put(protocol, protocolManagerFactory.createProtocolManager(server,
incomingInterceptors, outgoingInterceptors));
             }
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index ba24356..e746022 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -265,8 +265,8 @@ public interface ActiveMQServerLogger extends BasicLogger
    void timedOutWaitingCompletions(String bridgeName, long numberOfMessages);
 
    @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 221043, value = "Adding protocol support {0}", format = Message.Format.MESSAGE_FORMAT)
-   void addingProtocolSupport(String protocolKey);
+   @Message(id = 221043, value = "Protocol module found: [{1}]. Adding protocol support for:
{0}", format = Message.Format.MESSAGE_FORMAT)
+   void addingProtocolSupport(String protocolKey, String moduleName);
 
    @LogMessage(level = Logger.Level.INFO)
    @Message(id = 221045, value = "libaio is not available, switching the configuration into
NIO", format = Message.Format.MESSAGE_FORMAT)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a176a542/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
index a319452..fdf5b18 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManagerFactory.java
@@ -42,4 +42,6 @@ public interface ProtocolManagerFactory<P extends BaseInterceptor>
    List<P> filterInterceptors(List<BaseInterceptor> interceptors);
 
    String[] getProtocols();
+
+   String getModuleName();
 }


Mime
View raw message