Hi
I am reading
JDBC 3 Specs and found the enhancement "Reuse of prepared statements by connection pools" it is not clear to me and when I search it on google it create more confusion to me.
First thing what is in my mind is when we use preparedStatement as
/*************************************************/
1 - PreparedStatement ps = conn.prepareStatement(SQL);
2 - ps.setInt(1 , Intarg);
3 - ps.executeQuery();
4 - ps.close();
5 - conn.close();
/**************************************************/
The SQL in line 1 is parse and cashe. But after reading new material it seems to be that the SQL is cashed until the ps.close() is not called. And once the ps.close() and conn.close() is called the code is start execution from the start.
I dont know that every thing is clear or not. but for simplicity think as the above five line is in procedure.
Then the ps is built every time from the start or reuse when it call repetedly. Keep in mind that line 4 and line 5 is executed before the function return.
Any effort is really appreciated
Thank You