aspose file tools
The moose likes JDBC and the fly likes SQL Exception blocks everyone .... why Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "SQL Exception blocks everyone .... why" Watch "SQL Exception blocks everyone .... why" New topic
Author

SQL Exception blocks everyone .... why

Philip Pross
Ranch Hand

Joined: Jan 17, 2001
Posts: 76
Hello to all,
I have an some question towards SQL exception in JDBC, when there is an error trying to recieve infomation from a database it stops all access for everyone log on at the same time.
For example, if I try to insert a string in a field that doesn't exist or insert a string where an I should use an int, an sql excption will be throw, and it blocks there (for everyone). I'm using a connection pool for the connection to my database in each one of my servlets that also
"implements SingleThreadModel" .
Could it be because of the SingleThreadModel, or has it to do with the connection pool ???
All help is welcomed
Thanks ..... Phil
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1503
By implementing SingleThreadModel interafce you are making sure there will not be simultaneous access to teh DB. I will assume that is one of your problems right there.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Philip Pross
Ranch Hand

Joined: Jan 17, 2001
Posts: 76
Thanks for the reply Bosun, so from what you are saying is if there is one exeption in one servlet the others should work ..... but I just came to search for something and there was a general error on the servlet side, and for continuing with another servlet it blocked ???
 
 
subject: SQL Exception blocks everyone .... why
 
Threads others viewed
can you put multiple words in a database by using one statement
database connetion
jboss - mysql Table not found in statement
Null data issue
getting errors while running duke's bank application
IntelliJ Java IDE