You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/11/13 11:23:31 UTC

[camel] 01/05: CAMEL-17190: Polished

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9939227a99e75e171b71b7262d561b66c6dd021f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 13 10:58:07 2021 +0100

    CAMEL-17190: Polished
---
 .../apache/camel/component/quickfixj/QuickfixjEngine.java   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java
index efb92da..a00cba8 100644
--- a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java
+++ b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEngine.java
@@ -93,13 +93,13 @@ public class QuickfixjEngine extends ServiceSupport {
     private LogFactory sessionLogFactory;
     private MessageFactory messageFactory;
     private final MessageCorrelator messageCorrelator = new MessageCorrelator();
-    private List<QuickfixjEventListener> eventListeners = new CopyOnWriteArrayList<>();
+    private final List<QuickfixjEventListener> eventListeners = new CopyOnWriteArrayList<>();
     private final String uri;
     private ObjectName acceptorObjectName;
     private ObjectName initiatorObjectName;
     private final SessionSettings settings;
     private final AtomicBoolean initialized = new AtomicBoolean();
-    private boolean lazy;
+    private final boolean lazy;
 
     public enum ThreadModel {
         ThreadPerConnector,
@@ -161,6 +161,9 @@ public class QuickfixjEngine extends ServiceSupport {
     void initializeEngine()
             throws ConfigError,
             FieldConvertError, JMException {
+
+        LOG.debug("Initializing QuickFIX/J Engine");
+
         if (messageFactory == null) {
             messageFactory = new DefaultMessageFactory();
         }
@@ -223,6 +226,8 @@ public class QuickfixjEngine extends ServiceSupport {
         } finally {
             Thread.currentThread().setContextClassLoader(ccl);
         }
+
+        LOG.debug("Initialized QuickFIX/J Engine acceptor: {}, initiator: {}", acceptor, initiator);
         initialized.set(true);
     }
 
@@ -233,6 +238,8 @@ public class QuickfixjEngine extends ServiceSupport {
 
     @Override
     protected void doStart() throws Exception {
+        LOG.debug("Starting QuickFIX/J Engine acceptor: {}, initiator: {}", acceptor, initiator);
+
         if (acceptor != null) {
             acceptor.start();
             if (jmxExporter != null) {
@@ -249,6 +256,8 @@ public class QuickfixjEngine extends ServiceSupport {
 
     @Override
     protected void doStop() throws Exception {
+        LOG.debug("Stopping QuickFIX/J Engine acceptor: {}, initiator: {}", acceptor, initiator);
+
         if (acceptor != null) {
             acceptor.stop();