>* Does the log() implementation write directly to an underlying file,
> or does it just queue messages to an in-memory buffer that is
> flushed asynchronously by a background thread?.
>
Craig,
I've got an application that has to log some high level events (log in, document
views, etc.) My appLog() method currently inserts these events directly into the
Oracle database and is unsynchronized. I've been thinking about replacing this with a
system like you describe above, but am not sure about the synchronization/performance
issues. Do you have some recommendations?
What I was thinking was to have the appLog() method add the events into a List (I'm
using 1.1 collections) and then a timed process drain the List and write the events to
the database.
If I did it this way, would I have to synchronize adding elements to the List? Should
the background process lock the List and copy it to a new List for processing?
List tempList = listOfEvents; //listOfEvents is List used to log events
listOfEvents = new ArrayList();
Thanks,
Randy
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html