https://issues.apache.org/bugzilla/show_bug.cgi?id=51185
Bug #: 51185 Summary: Performance : DataSourceProxy#createPool should use more fine grained synchronisation Product: Tomcat 7 Version: trunk Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: p.moua...@ubik-ingenierie.com Classification: Unclassified Hello, I don't know if this is the right component. My Enhancement concerns new Tomcat JDBC POOL. Looking at code I think that DataSourceProxy#createPool should not be synchronized but use another private method that is synchronized and used only when creation is needed, something like that: /** * Sets up the connection pool, by creating a pooling driver. * @return Driver * @throws SQLException */ public ConnectionPool createPool() throws SQLException { if (pool != null) { return pool; } else { return pCreatePool(); } } /** * * @return * @throws SQLException */ private synchronized ConnectionPool pCreatePool() throws SQLException { if (pool != null) { return pool; } else { pool = new ConnectionPool(poolProperties); return pool; } } Currently since createPool() is called for lots of getters we get this synchro IMPACT without really needing it. Regards Philippe http://www.ubik-ingenierie.com -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org