Hi friends
I am having 5
jsp pages.each jsp page contains
one Javabeans in which database
connection and relevant results are fetched from the database and the results are returned to
the corresponding jsp page.so if i succesffuly logged into my application then for each jsp
page i am accessing the javabeans which will connect to the database connection and return the
valid results.this will make the response slow.
[i think for each request i am opening the database connection and fetch the results and
return the results to the corresponding jsp page and close the database connection this will
make the response time slow.am i correct???]
What i want to know is how can i make the database connection open whenever the user session
starts and connection remains open until the session is valid for the particular user.suppose
if the session is invalid then the database connection should be closed.
[bcos now if you access any jsp pages then the response time is quick compared to previous one.]
I dont want to open a database connection everytime if i am accessing the jsp page and closed
after the user leaves the page?is it possible thro' connection pooling???
I am using jdbc-odbc driver to connect to the database.is it possible to do like that???
if so...then plz tell me how to do that one???
Also which one is best to access the database records???
Servlets or in JavaBeans and why?
Also i am coming across one more problem which is better to use???Vector or Hashtable to fetch
the records from the database.more accurately which is faster?i know Vector is synchronized so
it is not faster compared to arrays.then is there any java.util.collection is there to increase
the fetching the data very fastly.
Thanks
Kumaran.S