Hi!
It is very useful to have the possibility to set the default
expiration time on messages published to a topic by the JMSAppender.
Here is a short patch to provide this possibility. Perhaps someone
could revise and commit it.
cvs diff JMSAppender.java (in directory D:\jakarta-log4j\src\java\org\apache\log4j\net)
Index: JMSAppender.java
===================================================================
RCS file:
/home/cvspublic/jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java,v
retrieving revision 1.14
diff -r1.14 JMSAppender.java
106a107
> long timeToLive = 0;
158a160,174
> Set the TTL on JMS Messages published to a topic so
> they expire (in ms)
> **/
> public void setTimeToLive(long ttl) {
> this.timeToLive = ttl;
> }
>
> /**
> Returns the default TTL for the associated TopicPublisher
> **/
> public long getTimeToLive() {
> return this.timeToLive;
> }
>
> /**
215a232,236
> if (this.timeToLive > 0) {
> LogLog.debug("Setting default TTL for messages.");
> topicPublisher.setTimeToLive(this.timeToLive);
> }
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]