|
From: Chris H. <ch...@op...> - 2005-02-02 14:11:37
|
On Wed, 2 Feb 2005, David Adler wrote: > The exception occurs with the DB2 UDB V8.2 JDBC driver. > > Although I haven't quite figured out the GeoTools Transaction architecture, > shouldn't this address the problem? > > Default commit processing should probably be defined by the DataStore. Yeah, the transaction architecture does address it. For transactions we pretty much never use autocommit (or at least we shouldn't, if it's still in there it's a bug), so that all transactions are truly atomic. The setting autocommit is a bit of a hack - in my opinion only needed because Postgres does weird stuff with how they let you get streaming result sets. So that hack being in there is _not_ for transactions - it's just for GetFeatures. So yeah, go ahead and file a bug - if it's messing up DB2 then my statement about it not hurting anyone is false, and so that should be removed from the base class. Chris > > At 06:25 PM 2/1/2005, Chris Holmes wrote: > > > > If the query to be executed does not perform a write operation, > > > Query::executeQuery issues conn.setAutoCommit(false). > > > > > > With some JDBC providers, this causes an exception when the connection is > > > closed but a commit has not performed. With the call to > > > setAutoCommit(false), when the result set and statement are closed, no > > > commit is performed and the subsequent attempt to close the connection > > fails. > > > > > > Am I doing something wrong? > > > > > > (note: the code includes the comment "for postgis streaming, but I don't > > > believe it hurts anyone" above the line where it sets autoCommit) > > > >Hmmm... So it is hurting someone? What jdbc provider are you using? Are > >you writing a new DataStore? If needed I can figure out a way to move > >that autocommit call down to postgis - I think it was just in a private > >method, or a method I didn't want to override just for that one call. > > > >It is kind of lame that postgres needs that - for some reason if you don't > >set that (and you also have to do some other random thing, fetch size less > >than 50 or some such), then the driver will put everything in memory, so > >that it's not actually streaming. > > > >Chris > > > > > > > > > > > > > > > > > > > >-- > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > >Tool for open source databases. Create drag-&-drop reports. Save time > >by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > >Download a FREE copy at http://www.intelliview.com/go/osdn_nl > >_______________________________________________ > >Geotools-gt2-users mailing list > >Geo...@li... > >https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > > > >-- > >No virus found in this incoming message. > >Checked by AVG Anti-Virus. > >Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 1/31/2005 > > > > -- |