For info. Note: forwarded message attached.

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
--- Begin Message ---
Hi!
I needed an option in the JMSAppender to set the TimeToLive-Value on
the TopicPublisher so logs do expire. I added it simply myself and
would like to ask if you could integrate it in the CVS tree, so it is
in the next version of Log4J. Simply added:

public class JMSAppender extends AppenderSkeleton {
...
  long timeToLive = 0;
...
  /**
    Modification to set the TTL on JMS Messages published to a topic
    (in ms)
  **/
  public void setTimeToLive(long ttl) {
    this.timeToLive = ttl;
  }
  
  /**
    Returns the TTL for the associated TopicPublisher
    published messages
  **/
  public long getTimeToLive() {
    return this.timeToLive;
  }
...
  public void activateOptions() {
...
    topicPublisher = topicSession.createPublisher(topic);
      
    if (this.timeToLive > 0)
      topicPublisher.setTimeToLive(this.timeToLive);
...
  }
...
}


Thank you,
Marc.


--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to