Attached is my modified JMSAppender. Include the following properties in your 
properties/xml file:

log4j.appender.A1=com.cj.foundation.log4j.JMSLogger
log4j.appender.A1.TopicBindingName=testtopic
log4j.appender.A1.TopicConnectionFactoryBindingName=TopicConnectionFactory
log4j.appender.A1.InitialContextFactory=com.swiftmq.jndi.InitialContextFactoryImpl
log4j.appender.A1.ProviderUrl=smqp://localhost:4001/timeout=10000
log4j.appender.A1.TimeToLive=120000

The performance tests I've done on the JMS logging shows it is far slower than writing 
to a file. The reason being that the appender does not return until the JMS server 
acknowledges persisting the log message(this assumes using persistence when 
publishing). The logging time for JMS ranged from 10ms to 50ms on a Win2k 650MHz box 
with SwiftMq. We're thinking of using JMS for logging exceptions only and using files 
for tracing and general debug. I'm currently working on a way to log to different 
files for different JVMs. This is necessary for application servers where the same 
application can be run in several JVM on the same box at the same time. 

Roger


>>> [EMAIL PROTECTED] 02/05/01 12:42AM >>>
Roger Kjensrud wrote:
> 
> I extended the JMSAppender and included the url and the initial context
> factory in the config and it works just fine. If there is any interest I can
> post the extended JMSAppender for others to use.
> 
> I'm using SwiftMQ, and I notice that the publishing of the LoggingEvent
> takes quite a bit longer than for example logging to file. Does anyone else
> has any experience with the performance of using the JMSAppender or logging
> to JMS in general?
> 
> Thanks,
> Roger

Post it Roger! I would like to see an example configuration on that. Do
you have already made any exp with the performance of that?

Regards
Armin Rauch

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


JMSLogger.java

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

Reply via email to