DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27438>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27438 JDBCAppender doesn't release connection in case of failure ------- Additional Comments From [EMAIL PROTECTED] 2004-03-31 08:52 ------- Hi Clement, actually such an implementation is very likely to be completely replaced in the future ... hence I don't know how much could be useful spending our time fixing this. Anyway, just for fun ... it was my understanding that JDBCAppender has been designed such that the (client) programmer can override _getConnection_ "to link with your connection pooling system" _closeConnection_ "to return the connection to a pool, or to clean up the resource" For in production applications it not feasible opening and closing a new connection for each attempt to write a log event ... for instance, *** I can get/release connection from a connection pool/connector in all my applications --> hence protected void closeConnection(Connection con) { _my_conn_pool.release(conn); } protected Connection getConnection() .... *** I can subclass JDBCAppender such that it handles 1 ad hoc connection --> public class MyJDBCAppender extends JDBCAppender public JDBCAppender(Connection conn) { ... } in both cases, i shouldn't close connection directly .... this was the reason because i focused on closeConnection(con); //never reached though it's empty in the father class. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
