A Dangerous fix. But if I had to speculate: I imagine conn.close() is synchronized. Secondly, I imagine its logged. Cause this to be a warning (not be logged) and there should be a performance increase.. Cause conn.close() to not be synchronized (haven't looked...just a guess) and there should be a performance increase. close() probably doesn't need to be synchronized necessarily. (again, just guesses).
-Andy On Mon, 2002-04-08 at 03:38, neil wrote: > I've been load testing my cocoon app with jmeter and I think I've found a > SQLTransformer bug. > My (MS SQL Server) JDBC driver was complaining about attempts to use various > objects after they had been closed (Connections, ResultSets and Statements). > > In Query.execute() I think this bit should be removed: > } finally { > conn.close(); > conn = null; // To make sure we don't use this > connection again. > } > > as it's incorrect to close the connection before you've finished with the > ResultSets, Statements etc. > The connection is closed later when SQLTransformer.executeQuery() calls > Query.close() anyway. > > I know Connection.close() doesn't really close the connection to the DB > (because its a pooled connection it just allows it to be recycled), but I > think its reuse under load does cause problems. By removing these lines I > was able to get my app to work correctly under heavy loads on a dual CPU > Windows 2000 box. > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > -- http://www.superlinksoftware.com http://jakarta.apache.org/poi - port of Excel/Word/OLE 2 Compound Document format to java http://developer.java.sun.com/developer/bugParade/bugs/4487555.html - fix java generics! The avalanche has already started. It is too late for the pebbles to vote. -Ambassador Kosh --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>