logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DeSantis, MJ Mark @ IS (7179)" <Mark.J.DeSan...@L-3com.com>
Subject RE: JmsAppender bug?
Date Thu, 02 Feb 2006 21:10:05 GMT
Okay so after figuring out all the libs needed to compile log4j, and testing
the JmsAppender over and over over and over and over looking at Hermes and
chainsaw, there have been two bugs found (or at least they seem to be bugs -
perhaps they were intentional).

The first one was already discussed (see the original post).

The second was was that in the JmsAppender constructor the call to the
super() AppenderSkeleton was set to false which would always make the
appender inactive and thus unusable.

Anyway, I hope this helps anyone struggling with the jmsAppender. If the
developers would please make the changes for the next build I would

If any developers have comments about this I would really like to hear your
input. Please post.



-----Original Message-----
From: DeSantis, MJ Mark @ IS (7179) [mailto:Mark.J.DeSantis@L-3com.com] 
Sent: Thursday, February 02, 2006 12:33 PM
To: 'Log4J Users List'
Subject: 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) {
    //.....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.

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

View raw message