Hi people, I'm beginning to deploy the JDBCAccessLogValve among my web applications until I noticed, that there are some considerations to be made. IMHO there have to be made some adaptations to prohibit that database errors or -slowness interferes with tomcat and thus disturbs or even prohibts the user experience.
So decoupling adding and storing of the log entry should lead to a much faster (to user experience) asynchronous model. 1.) Speed: I think including a queue to which the calling thread just appends the log record and then continues serving the user is much more efficient than the current implementation. Without this the user has to wait for the database to finish writing the access log. On a heavily used system or a multi user system this can be long time, as this method is called for each http access and the database access itself is synchronized, too. 2.) Scalability and error handling: If the database connection fails or drops for a short period of time (for example due to a database restart), then the valve's connection will be either closed or in an invalid state, so the prepared statements and they will will never recover. Thus Tomcat becomes totally unresponsive and won't serve any HTTP requests anymore, as all requests are interrupted by the database exceptions caused by inconsistent connection and pstmt objects. Thanks for any insight Bye, Lev. -- Levent Guendogdu <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]