I am writing a program which will have some workthreads visiting a database
My Questions is:
1.is it a proper idea if I establish a single connection then every
workthread share it? 2.in this case, should i treat the connection as a
3.if the connection be closed out of the program,for example , administrator
shut down the database.how can i detect it?
4.is it efficient if I establish a new connection in every visiting to
database(close it when finish)?
thanks a lot!