This kind of design will give you nothing but headache. - The connection will be longer open than needed. - You must do hard work to close the connections at all - You have hardly control about the number of connections
I prefer to manage the connections outside of my dao's. My DAO's get the connection as a parameter. > -----Ursprüngliche Nachricht----- > Von: Christian J. Dechery [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 11. Juni 2002 16:42 > An: [EMAIL PROTECTED] > Betreff: Re: problem with connections not closing... > > > but I can't close the connection in each query... the > connection is used by other objects... > I have a DAO for each class that needs access to the DB... > but some of these DAOs are Singletons, so several objects can > use one DAO and one connection to the db... so I can't just > close it whenever I want... > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>