tag:blogger.com,1999:blog-5874979429188093780.post1787350653905863711..comments2024-03-18T06:46:54.352+01:00Comments on Andrej Baranovskij Blog: How to Control Long SQL Execution Time in ADF BC with VO TimeoutAndrej Baranovskijhttp://www.blogger.com/profile/04468230464412457426noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-5874979429188093780.post-10863926285711378412012-11-29T21:30:02.476+01:002012-11-29T21:30:02.476+01:00Hi Andrejus,
I have an issue here.
1. I execute...Hi Andrejus, <br /><br />I have an issue here.<br /><br />1. I executed a query and got results back, results rendered as table.<br />2. I executed a long running query now. The query times out and the message in the catch block is shown. (Which looks good from the UI). But when I checked the logs I see an SQLSyntaxErrorException, and the printed query has 2 where clause. Something like WHERE ORDER_NUMBER = :fbkKy__0 is appened and the value for fbkKy__0 seems to be the primary key value for the first row of the results shown in step 1. Any idea how I can get rid of this error?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-86101353821773671482012-11-29T19:52:26.146+01:002012-11-29T19:52:26.146+01:00Thanks for update :) I like your new sample soluti...Thanks for update :) I like your new sample solution much more comparing to the previous one.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-2995803426912588012012-11-29T19:20:33.238+01:002012-11-29T19:20:33.238+01:00I posted a sample application that implements a Ca...I posted a sample application that implements a Cancel button that cancels the query from the UI. It can be downloaded here<br />http://dkleppinger.blogspot.com/2012/11/how-to-cancel-long-running-query-from.html<br />Don Kleppingerhttps://www.blogger.com/profile/02266023115878336856noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-78360506017558494632012-01-16T08:01:02.326+01:002012-01-16T08:01:02.326+01:00Yes, but this is different use case. Who would lik...Yes, but this is different use case. Who would like to press Cancel button in different tab :)<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-57053844439344248382012-01-16T04:38:33.827+01:002012-01-16T04:38:33.827+01:00Since PS2 ADF will process requests on the same Se...Since PS2 ADF will process requests on the same Session concurrently if they are not on the same page. ie. In a different browser window or browser tab or running within a Frame. That is what I experimented with and it does work. I was able to immediately cancel a long running query running in a different window. The Other window would return immediately with the "User canceled query" message.Don Kleppingerhttps://www.blogger.com/profile/02266023115878336856noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-11367119994741718032012-01-14T13:00:20.371+01:002012-01-14T13:00:20.371+01:00It will not work to process multitasking request, ...It will not work to process multitasking request, means you can press Cancel button - but it will be processed only after query request will be finished. I was testing this, it doesn't work in ADF even with pure JavaScript implementation.<br /><br />VO instance should be accessed through AM module, otherwise there might be problems on stress test environment, when AM pooling will be activated.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-74409175613674341152012-01-14T00:19:59.694+01:002012-01-14T00:19:59.694+01:00I did some experimenting on how to force a query t...I did some experimenting on how to force a query to be canceled from the UI and wrote about it here.<br /><br />http://dkleppinger.blogspot.com/2012/01/how-to-cancel-long-running-query-from.htmlDon Kleppingerhttps://www.blogger.com/profile/02266023115878336856noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-25678725029002945632012-01-13T08:15:30.250+01:002012-01-13T08:15:30.250+01:00If i remember correctly, SqlStmtException was not ...If i remember correctly, SqlStmtException was not propagated to UI and application was in broken stage. Thats the reason of using JboException.Andrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-26102752675427357192012-01-12T23:35:36.006+01:002012-01-12T23:35:36.006+01:00We have the statement-timeout set to 5 minutes in ...We have the statement-timeout set to 5 minutes in the jdbc-connection-pool-params settings which sets the timeout for every query but the UI was broken after we displayed the timeout message and clicking anywhere on the page would cause a fatal exception. Re-throwing a different JboException fixed this.Don Kleppingerhttps://www.blogger.com/profile/02266023115878336856noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-41533974174834278572012-01-12T23:25:38.558+01:002012-01-12T23:25:38.558+01:00Good post. I was searching for a way to prevent th...Good post. I was searching for a way to prevent the UI from getting broken after a timeout and this did the trick. What I don't understand is why throwing a JBOException instead of allowing the SQLStmtException to propagate fixed the problem because SQLStmtException is a JBOException. Ahh the mysteries of ADF...Don Kleppingerhttps://www.blogger.com/profile/02266023115878336856noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-58715345849162232882011-09-19T12:19:59.626+02:002011-09-19T12:19:59.626+02:00You can retrieve SQL exception text in the same me...You can retrieve SQL exception text in the same method, and re-throw new JboException or update existing one.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-20773058724456641132011-09-18T21:32:08.417+02:002011-09-18T21:32:08.417+02:00you wrote in this screenshot
http://3.bp.blogspot....you wrote in this screenshot<br />http://3.bp.blogspot.com/-fO-90hiIJP4/TkLL8vBCrNI/AAAAAAAAFTs/WnKlcuFN-8o/s1600/10.png<br /><br /><br />in executeForQueryCollection method<br />if sqlse.getErrorCode().equals("27126")<br /><br />This is the sql Error Code I Mean<br /><br />I want to know how I catch the sql Error returnedTilhttps://www.blogger.com/profile/17336556642731696725noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-16751710049670024332011-09-18T17:40:09.256+02:002011-09-18T17:40:09.256+02:00What is 27126 error code?
AndrejusWhat is 27126 error code?<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-37319243306667833132011-09-18T14:46:07.941+02:002011-09-18T14:46:07.941+02:00Great post but i want to know
how to get the SQL ...Great post but i want to know <br />how to get the SQL Error code in order to override it.<br />how you got 27126 error code.Tilhttps://www.blogger.com/profile/17336556642731696725noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-64338852027000224772011-09-08T07:19:31.850+02:002011-09-08T07:19:31.850+02:00Hi Maiko,
Very true. However in most of the cases...Hi Maiko,<br /><br />Very true. However in most of the cases DBA's are from different team, and they are not exactly happy to adjust DB settings based on development request. Also it might be there are different systems using same DB, and it may require different SQL execution time. Of course, both options are good, but I believe its quite powerful to control SQL execution from ADF app itself as well.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-70423796564387338912011-09-08T07:07:26.147+02:002011-09-08T07:07:26.147+02:00Good post, but I'd rather set a resource quota...Good post, but I'd rather set a resource quota in the database itself - this way no matter where the SQL statement is being issued from it will be controlled at a single point.<br /><br />http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/authoriz.htm#i1009538<br /><br />[]s<br />MaikoMaiko Rochahttps://www.blogger.com/profile/17589428760474682504noreply@blogger.com