logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject svn commit: r374949 - /logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java
Date Sun, 05 Feb 2006 00:01:39 GMT
Author: psmith
Date: Sat Feb  4 16:01:34 2006
New Revision: 374949

URL: http://svn.apache.org/viewcvs?rev=374949&view=rev
Log:
Fix for Bug #38512, JMSAppender does not mark itself as "active" after it's activateOptions
method is called.

This is because of 2 reasons:

1) the if check does an == check instead of a != check on the topicPublisher
2) After correct initialization,  it fails to call super.activateOptions() to flag it as active.

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java?rev=374949&r1=374948&r2=374949&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java Sat Feb  4 16:01:34
2006
@@ -234,10 +234,14 @@
        "Error while activating options for appender named [" + name + "].", e);
     }
     
-    if (this.topicConnection != null && this.topicSession != null && this.topicPublisher
== null) {
+    
+    if (this.topicConnection != null && this.topicSession != null && this.topicPublisher
!= null) {
       inOrder = true;
     } else {
       inOrder = false;
+    }
+    if(inOrder) {
+        super.activateOptions();
     }
   }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message