Closed Aaqu closed 1 year ago
I would say that version B is best because it means your application will not "cache" a bad connection pool if the initial connect rejected for some reason and it will also reconnect a pool that gets closed by accident.
The docs already provide some guidance on pool management; this has the benefit of removing the pool reference when it is closed.
Powiedziałbym, że wersja B jest najlepsza, ponieważ oznacza, że aplikacja nie będzie "buforować" złej puli połączeń, jeśli początkowe połączenie zostanie odrzucone z jakiegoś powodu, a także ponownie połączy pulę, która zostanie przypadkowo zamknięta.
Thank for clarifying that
How version ConnectionPool for mssql is better and why if not both uses are wrong? I don't want create redundant or new ConnectionPools each time.
I use
close()
only when I close applications, here understand documentation.version A
version B
Software versions