From: | Guido Fiala <guido(dot)fiala(at)dka-gmbh(dot)de> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: setQueryTimeOut(1) - not expected result... |
Date: | 2004-01-29 07:24:16 |
Message-ID: | 200401290824.16434.guido.fiala@dka-gmbh.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Am Mittwoch, 28. Januar 2004 22:21 schrieben Sie:
> Guido Fiala wrote:
> > //user1:
> >
> > stmt.setQueryTimeout(1);//wait just one second
> > ResultSet rs=stmt.executeQuery("BEGIN;SELECT * FROM mytable FOR UPDATE OF
> > mytable");
>
> > What am i doing wrong?
>
> You are assuming that setQueryTimeout() is implemented :) Calling it
> does nothing in the current driver. This is on my list of things to fix,
As i really need this - maybe i could implement that feature myself and
contribute it here? I assume, it's not much more to set some IO-timeout on
the socket-read() after sending the query...
> but not near the top.
Mmmm, is there any possibility to stop that query using another thread in the
same application?
> On another note, it's generally a bad idea to use the transaction
> control primitives (BEGIN, COMMIT, ROLLBACK) directly -- use
> Connection.setAutoCommit(false) and Connection.commit() /
> Connection.rollback() instead.
Yes, but wouldn't i then need a lot of connections, one for each data display
in my application?
So far i could'nt really see a need of connection pooling in my app, when does
one start to need them?
Guido
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-01-29 08:03:35 | Re: setQueryTimeOut(1) - not expected result... |
Previous Message | Kris Jurka | 2004-01-28 23:07:46 | Re: Connection problem |