Hi!
First of all thanks for the reply.
I know that the two attributes I`m looking for are basically exlusive
but to make my point clearer here.

The first priority is failure-proof. Logging in to a database isn`t
actually a solution. A lot of information will be kept in database for
no reason at all - a simple file will just do.
By fast, I mean something that it will be  "lightweight" in comparison
with the whole transaction.
I was thinking of wrapping the logging procedure into an transaction
but I don`t really know how the flushing of the files and all that is
handled by the virtual machine(some form of caching can prevent any
move I make).

Anyway, thanks again for the idea. Btw, can you describe in detail the
database you are using for logging (principle / ideas / any thing will
do).



jon> "fast" and "failure-proof" are to a certain extent mutually exclusive.
jon> If you want to be absolutely sre about your logging, than the log record
jon> has to be written as part of the same transaction in which the event being
jon> logged is executed. The ACID semantics of transactions ensure that 
jon> the log and the action are either atomically executed, or not at all.

jon> Practically this is most easily achieved using databases. Since this is
jon> not acceptable to you, my advise would be to develop you own Log4J
jon> appender that logs a message to two files (on two different disks) and
jon> flushes after every write...

jon> ++Jos.es

jon> And thus it came to pass that costin wrote:
jon> (on Mon, Mar 24, 2003 at 11:54:49AM +0200 to be exact)

>>   Hi!
>> 
>>   I`ve approached this subject before on the list but I haven`t found
>>   any satisfactory responses.
>> 
>>   I have an application where logging is a HUGE priority. The usual
>>   e-commerce one, where every "action" has to be logged. Now my
>>   problem is this one.
>> 
>>   Logging has to be fast and most importantly failure-proof - (meaning
>>   that it will survive a power crash or any similar event - EJB alike).
>> 
>>   Now, the log4j suite is very flexible and elegant but I haven`t
>>   found any failure-proof proprieties. There is no guarantee that the
>>   logging will succeed if the power/network or what ever goes down.
>> 
>>   Makeing an EJB and logging everything in a database is not an option
>>   even though it has one of the propriety I`m looking for.
>> 
>>   I imagine that this is not an unsual problem and there have to be
>>   solutions to it. Can anyone give me a clue or point me to some
>>   resource...
>> 
>> 
>> --
>> Thanks,
>>  costin          
>> 
>> 
>> 
>> -------------------------------------------------------
>> This sf.net email is sponsored by:ThinkGeek
>> Welcome to geek heaven.
>> http://thinkgeek.com/sf
>> _______________________________________________
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> https://lists.sourceforge.net/lists/listinfo/jboss-user



--
Thanks,
 costin                            mailto:[EMAIL PROTECTED]



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to