Can I create multiple statements from a single jdbc Connection and execute them in different threads simultaneously ?. I am asking this Q bcoz, I am writing a servlet which has a static Connection object which other instances/thread of servlet will use to access oracle DB. Servlet should handle 200-300 users during peak hours. OR I should control creating statements out of Connection. what are advantages and disadvantages with each options. note: some of the columns of table are of type LONG RAW, and I am reading them via streams. thanks in advance [This message has been edited by gmpatil (edited January 31, 2000).]
You can create mutiple statements from one connection. But from the point of view of data integrity, you'd better synchronize the usage of connection. Also another important issue is do NOT forget to close your statements generated by connection. Otherwise each statement will occupy an open cursor in database and soon your application will fail!