"[EMAIL PROTECTED]" wrote : "twalsh2" wrote : | | By "people" are you referring to the Hibernate team? | | | | Yes, I had a very long discussion with Gavin and Steve about a year ago about | why the thread local was a bad idea, and causes users problems :-)
Although to be fair, Hibernate doesn't just run in JBoss, so they have to deal with datasource implementations of dubious quality :-) e.g. Gavin told me that JBoss is the only thing that implements prepared statement caching properly. i.e. it resets the query configuration on "close()" | | public void close() throws SQLException | { | inUse.decrement(); | if (inUse.get() == 0) | { | if (cached.get() == false) | ps.close(); | else | { | // Reset the defaults | if (defaultMaxFieldSize != currentMaxFieldSize) | { | ps.setMaxFieldSize(defaultMaxFieldSize); | currentMaxFieldSize = defaultMaxFieldSize; | } | if (defaultMaxRows != currentMaxRows) | { | ps.setMaxRows(defaultMaxRows); | currentMaxRows = defaultMaxRows; | } | if (defaultQueryTimeout != currentQueryTimeout) | { | ps.setQueryTimeout(defaultQueryTimeout); | currentQueryTimeout = defaultQueryTimeout; | } | if (defaultFetchDirection != currentFetchDirection) | { | ps.setFetchDirection(defaultFetchDirection); | currentFetchDirection = defaultFetchDirection; | } | if (defaultFetchSize != currentFetchSize) | { | ps.setFetchSize(defaultFetchSize); | currentFetchSize = defaultFetchSize; | } | } | } | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911323#3911323 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911323 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user