Page 1 of 1

Enabling pooling with entitydac

Posted: Sun 23 Aug 2020 11:43
by darnocian
I'm using EntityDAC with UniDAC and postgres.

On UniDAC, it is clear as to how to use pooling - just enable the property...

However, on EntityDac using the TEntityConnection, I'm not sure.

Any advice on how to do this without recreating connections every time?

Maybe by overloading one of the factory methods for creating a connection, which could use a pooled TUniConnection?

Re: Enabling pooling with entitydac

Posted: Wed 26 Aug 2020 14:50
by MaximG
EntityDAC doesn't support connection pooling. You can leave your suggestions at our UserVoice page (https://devart.uservoice.com/forums/240996-entitydac), and if there are many votes for your suggestion, we will implement it.

Re: Enabling pooling with entitydac

Posted: Tue 05 Jan 2021 14:39
by claudio.piffer
Hi darnocian

if you use UniDAC you can enable the pool directly in the creation of the UniDACConnection.

I include the EntityDAC.DataProvider.UniDAC.pas source in my project and I changed the

constructor TUniDACConnectionProvider.Create(DataProvider: TDataProvider);

setting the FUniConnection.Pooling := True (I also set MinPoolSize/MaxPoolSize properties)

Best Regards

Re: Enabling pooling with entitydac

Posted: Wed 06 Jan 2021 17:01
by MaximG
Yes, you can use this approach with pooled connections.