You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "DeSantis, MJ Mark @ IS (7179)" <Ma...@L-3com.com> on 2006/02/02 19:33:08 UTC

JmsAppender bug?

I'm lost,
 
has anyone succesfully used the JmsAppender from the alpha-7 build?
 
perhaps I'm missing something but in the code for the activateOptions()
method of JmsAppender i see this 
 
 
if (this.topicConnection != null && this.topicSession != null &&
this.topicPublisher == null) {
    inOrder = true;
} else {
    inOrder = false;
}
 
the field inOrder only gets set true if topicConnection is not null, and if
topicSession is not null, and if topicPublisher IS null! the inOrder field
is used in the append method as follows:
 
public void append(LoggingEvent event) {
    if (!inOrder) {
        return;
    }
 
    //.....send message
}
 
So if the topicPublisher field was not null then the inOrder field gets set
to false and the append method would do nothing as it returns immediately.
 
I think activateOptions() if statement needs to read:
 
if (this.topicConnection != null && this.topicSession != null &&
this.topicPublisher != null) {
 
 
 
Perhaps I'm missing something.
 
Could someone look into this if possible, or let me know that my logic is
wrong, or something.
 
 
Mark