Re: Is it thread-safe to pool the PreparedStatement?
Carfield Yim <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
> at a time. This means that, while reading the > ResultSet response to a SELECT query put forth > through a particular PreparedStatement, you can't > send another query through the same > PreparedStatement because the existing ResultSet > will be closed automatically. So your So what will happen if this is the case? Is it all depend on driver? > PreparedStatement pool needs to ensure exclusive > access to a single thread until the thread is > done with the statement, before returning the > statement back to the pool. Sounds like that kind > of assurance might not be there. > Probably not... actually that is not a pool, it is a HashMap() with SQL as key and PreparedStatement as value. =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com