Connection pooling setup

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
oleg0k
Devart Team
Posts: 91
Joined: Wed 11 Mar 2020 08:28

Re: Connection pooling setup

Post by oleg0k » Tue 30 Jun 2020 15:35

Hello,
You can leave your suggestions at our UserVoice page ( https://devart.uservoice.com/forums/104 ... y_id=18939 ),
and if there are many votes for your suggestion, we will consider the possibility to implement it.
Please send us an example demonstrating the incorrect behavior, along with the DDL scripts for creating and populating the database objects, through the contact form on our website:
https://devart.com/company/contactform.html

wbr, Oleg
Devart Team

andrefm
Posts: 31
Joined: Wed 23 Oct 2013 10:02

Re: Connection pooling setup

Post by andrefm » Thu 16 Jul 2020 00:36

I added the request for multiple connection pools in one application to UserVoice, but I would appreciate any feedback and suggestions on how I could try to implement this as I believe this change won't happen any time soon from DevArt side.
Thank you

oleg0k
Devart Team
Posts: 91
Joined: Wed 11 Mar 2020 08:28

Re: Connection pooling setup

Post by oleg0k » Fri 24 Jul 2020 11:09

Hello,
We appreciate you taking the time to post your suggestion on UserVoice, but we cannot guarantee that it will be implemented anytime soon, since we have many features and improvements on the roadmap. We'll consider adding the requested feature once your suggestion receives more upvotes.

wbr, Oleg
Devart Team

darnocian
Posts: 5
Joined: Sun 23 Aug 2020 11:07

Re: Connection pooling setup

Post by darnocian » Wed 26 Aug 2020 13:44

I just have a related issue... trying to figure out how connection + connection pool + transactions would work in a multithreaded environment.... rather than just on a gui with relatively static components...

I would have assumed a component decomposition:
- connnection pool
- connection connected to connection pool (active = true it is not in 'free' pool and in use, active=false it is back in 'free' pool)
- transaction is associated with a connection. with pooling enabled on a connection, I don't know what 'pooling' actually means... is there some thread tracking taking place via tls variables?

anyone done multitheeading with transactions?

oleg0k
Devart Team
Posts: 91
Joined: Wed 11 Mar 2020 08:28

Re: Connection pooling setup

Post by oleg0k » Wed 02 Sep 2020 11:20

Hello,

Connection pooling reduces the amount of time a user must wait to establish a connection to the database and increases performance. It has nothing to do with transactions. Read more in our tutorial: https://www.devart.com/unidac/docs/work_pooling.htm
It seems like you're getting an exception because a transaction is started for the first thread and then it becomes active for all other threads. If you need a separate transaction for each thread, you should create an instance of TUniTransaction for each thread and control it programatically. Some servers do not allow creating several transactions per connection, in which case you need to create a separate TUniConnection for each thread.

wbr, Oleg
Devart Team

Post Reply