Simon's suggestion is a good one. As far as I know, you can use the AsyncAppender your 
eyes closed. There are no problems with flow control or buffering or simultaneous 
thread access. 

The only problem is that AsyncAppender uses an internal thread which is not welcome by 
EJB. Ceki

At 09:57 08.02.2001 -0800, you wrote:
>Well, there are a couple of issues with this approach, I think(please correct me if 
>I'm wrong). First, there seem to be some flow-control issue; I need to deal with the 
>cases where the buffer is full. Secondly, I don't think it will work with several 
>threads accessing it at the same time?
>
>Roger 
>
>>>> [EMAIL PROTECTED] 02/08/01 03:16AM >>>
>How about using the AsyncAppender in combination with the JMSAppender?
>This seems to be just what it was designed for.....
>
>> -----Original Message-----
>> From: Roger Kjensrud [SMTP:[EMAIL PROTECTED]] 
>> Sent: Wednesday, February 07, 2001 8:16 PM
>> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED] 
>> Subject:      Re: Separate InitialContext
>> 
>> 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.InitialContextFac
>> toryImpl
>> 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] 
>> 
>>  << File: JMSLogger.java >>  << File: ATT280717.txt >> 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED] 
>For additional commands, e-mail: [EMAIL PROTECTED] 
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

----
Ceki Gülcü           e-mail: [EMAIL PROTECTED] (preferred)
av. de Rumine 5              [EMAIL PROTECTED]
CH-1005 Lausanne          
Switzerland            Tel: ++41 21 351 23 15


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

Reply via email to