Ideally How many connections I have to open ?
Posted
by ranjith-kumar-u
on Stack Overflow
See other posts from Stack Overflow
or by ranjith-kumar-u
Published on 2010-05-18T19:24:28Z
Indexed on
2010/05/18
19:30 UTC
Read the original article
Hit count: 232
Hi All,
Recently I attended interview in java, the interviewer asked a question like below:
I have a request which go throgh A,B,C modules and response go back throgh A , in module A I need to talk to database and again in module C I need to talk to database, so in this situation how many connections you will open and where do you close those connections?
My Answer: I said that in module A I will open a connection and I will close it then and there, then control go to module B then module C, in module C again I will open one more connection and i will close it again. then he asked me again another question I want to open one connection per one request processing, how can i do this?
© Stack Overflow or respective owner