I generally don't critique design patterns (let he who is without bad design patterns cast the first stone), but permanently holding a single database connection open is a Bad Idea(tm). Some downsides:
- your code is inherently single-threaded.
- if you change to make it 1 thread = 1 db connection, you have a lot of unnecessarily open db connections.
- if you restart your db server, you get a failure in your app.
- if you have a network failure, you get a failure in your app.
I'll also add what Serge implied, that sharing a single connection among multiple threads screws up transaction semantics and could easily lead to data corruption.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]