jeudi 4 octobre 2018

Thread pool connection vs Singleton design pattern to get a single database connection

I am really getting confused between these 2 now as below : 1. is the returning of only a Singleton instance to a db connection during the entire run time of a JAVA app 2. is the concept of Thread pool connections in general... I mean if we are planning to have only a singleton instance to a db connection obj, why even have a concept of pools, though i do get what exactly a poll is used for? Are these 2 not very opposite concepts, or am i mixing up anything here...?

Aucun commentaire:

Enregistrer un commentaire