|
|
Sponsor |
setQueryTimeOut(1) - not expected result...: msg#00272db.postgresql.jdbc
Hallo, assuming one has 2 users which try to lock the same record for edit at a time the one coming later should be informed of the situation, i like to do the following: //user1: stmt.setQueryTimeout(1);//wait just one second ResultSet rs=stmt.executeQuery("BEGIN;SELECT * FROM mytable FOR UPDATE OF mytable"); //user2: stmt.setQueryTimeout(1); ResultSet rs=stmt.executeQuery("BEGIN;SELECT * FROM mytable FOR UPDATE OF mytable"); (if timeoutinform user...) I would think, that the second user get's a query timeout on his query, but it does not seem to work. Instead the think seems to wait forever. Immediately after user1 does and "COMMIT;" the user2 get's his ResultSet. What am i doing wrong? Guido ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: a little disillusioned, Dave Cramer |
|---|---|
| Next by Date: | Re: getting primary key values for inserted records?, Guido Fiala |
| Previous by Thread: | Bug receiving NotificationResponse Message v3, Hans Näther |
| Next by Thread: | Re: setQueryTimeOut(1) - not expected result..., Waldomiro |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|