Dear All,

 

I would like to know that what is the best practice or efficient way to
create  javax.sql.DataSource object

 

A)     Following is my practice.

-          Using DBCP, I created javax.sql.DataSource and connection object
for each call to method in my class.

-          Right now I am facing oracle session blocking problem.

 

B)      I am going to implement following practice

-          Creating only one object of javax.sql.DataSource using singleton
pattern for whole application.

-          Using that single javax.sql.DataSource object I will create
connection object of each method call and close the connection after
transaction is finished.

 

Please advise me on B) practice.  Is there anything I am missing or how does
B) impact on my DB transaction.

 

Thanks and Regards,

 

Milan Dalsaniya

BIPL

 

Reply via email to