Link to home
Start Free TrialLog in
Avatar of emily_my
emily_my

asked on

timeout mechanism in database component

i have a database component called JDBCController. i need some suggestions on timeout mechanism in this component. this is the problem that i faced:

let say i do a select statement (using say method executeQuery in JDBCController) to select a record. suppose if that particular record is locked by some other applications and it is never release the lock. the method executeQuery will also be blocked indefinitely. as such, it is important to make sure that any request will not be blocked indefinitely.

any suggestions on this?
ASKER CERTIFIED SOLUTION
Avatar of yongsing
yongsing

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emily_my
emily_my

ASKER

thanks yongsing,

is this method really effective? do you think it is better to also configure on the database side?
I have not tried it before, but you can always test it out. You can try configuring the database as well, but you should program your application such that it knows that a timeout has occurred when an SQLException is thrown.
Avatar of girionis
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to yongsing

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer