i am writing the JDBC tier for application .
I am acquiring the connection object from pool and do the stuff and return the connection to pool and
Up until now, I am sharing connection object at method scope and executing exact one query.
but now i want to execute the two queries using same connection , so i have foll. doubts on my mind , please help solving same
- as connection is shared , after executing the first query , will it affect the execution of second query?
- First query has a resultSet and second query is excecuted and also has a resultSet, Will this affect the resultSet of former or later?
- If is yes to all then how many queries i can execute on a connection?
More info :
I am using
- MYSQL 5.5 Database and its driver
- Apache DBCP
NO
NO unless both have the same resultset 😉
Not applicable as the answer to previous question is a NO.( But still you can execute as many queries as you want )