Patches item #414023, was updated on 2001-04-05 08:00 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376687&aid=414023&group_id=22866 Category: None Group: None Status: Open Priority: 5 Submitted By: Bill Burke (patriot1burke) Assigned to: Nobody/Anonymous (nobody) Summary: rewrite minerva statement caching Initial Comment: I rewrote the statement caching in Minerva for a number of reasons:( tar attached) - Make the allowable open statements configurable from jboss.jcml - Consolidate statement caching logic into one class for less code duplication - To be able to keep track of all open statements a connection has so that we release prepared statements when a maximum of allowed open statements(plain Statements plus PreparedStatements) is reached. What did I change? - You can configure the maximum allowable open statements by putting in a property in the Properties tag in the XADataSourceLoader xml stuff in jboss.jcml <attribute name="Properties">MaxOpenStatements=99</attribute> "-1" value means caching is turned off "0" value means caching is unlimited - org.opentools.minerva.jdbc.StatementFactory contains all the logic for statement creation and caching. Prepared statements only are cached, but all open statements are counted. If a createStatement will put the open statements over MaxOpenStatements, then a prepared statement will be closed and released from the cache. - ConnectionInPool and XAClientConnection delegate to a StatementFactory for creating, preparing and closing statements. - there is no longer a psCaches HashMap contained in ConnectionInPool as a static variable. This is instead renamed to sfCaches and hold a hashmap of connections to StatementFactories. - XADataSourceImpl reads the properties and extracts MaxOpenStatements. I also remove MaxOpenStatements from the Properties so that the JDBC driver doesn't get screwed up by a property it doesn't understand. Tell me what you think, and if you need more information please let me know. I have tested the code with caching turned on and off and unlimited and it seems to work pretty good with the application we're writing to JBoss. Let me know if you think these changes are relevant. Regards, Bill ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376687&aid=414023&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
