|
From: Chris H. <ch...@op...> - 2005-02-01 23:25:03
|
> 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 > > > > -- |