DisconnectedMode & Pooling
Posted: Fri 21 Feb 2014 15:27
Hello again,
I'm trying to connect to PostgreSQL with DisconnectedMode and Pooling. Without success
Can anyone tell me what I'm doing wrong?
I created this simple application to test the Pooling:
A simple form with three buttons. After pressing the first one, this code retrieves the data from the first table:
When you press the second, the code retrieves the data from the second table:
And likewise for the third table.
TUniConnection connects to and disconnects from the database when you press any of these buttons.
The following log comes from dbMonitor:
Why TUniConnection hangs up immediately after downloading the data?
Configuration:
One TUniConnection, with the following options:
And three similar TUniTable with such options:
Thanks in advance and sorry for my language 
-----
c++ Builder XE2 update 4
UniDAC 4.1.6
I'm trying to connect to PostgreSQL with DisconnectedMode and Pooling. Without success
Can anyone tell me what I'm doing wrong?
I created this simple application to test the Pooling:
A simple form with three buttons. After pressing the first one, this code retrieves the data from the first table:
Code: Select all
if (utTable1->Active)
utTable1->Close();
utTable1->Open();
Code: Select all
if (utTable2->Active)
utTable2->Close();
utTable2->Open();
TUniConnection connects to and disconnects from the database when you press any of these buttons.
The following log comes from dbMonitor:
Code: Select all
2014-02-21 16:19:47 n/a UniDAC monitoring is started Complete
2014-02-21 16:19:49 0,140 Connect: postgres@localhost Complete
2014-02-21 16:19:49 0,625 SQL Execute: SELECT * FROM table1 Complete
2014-02-21 16:19:50 0,000 Disconnect: postgres@localhost Complete
2014-02-21 16:19:53 0,000 Connect: postgres@localhost Complete
2014-02-21 16:19:53 0,016 SQL Execute: SELECT * FROM table2 Complete
2014-02-21 16:19:53 0,000 Disconnect: postgres@localhost Complete
2014-02-21 16:19:55 0,016 Connect: postgres@localhost Complete
2014-02-21 16:19:55 0,000 SQL Execute: SELECT * FROM table3 Complete
2014-02-21 16:19:55 0,000 Disconnect: postgres@localhost Complete
2014-02-21 16:20:00 n/a UniDAC monitoring is finished Complete
Configuration:
One TUniConnection, with the following options:
Code: Select all
DisconnectedMode = true;
Pooling = true;
TPoolingOptions->ConnectionLifetime = 30000;
TPoolingOptions->MaxPoolSize = 100;
TPoolingOptions->MinPoolSize = 5;
TPoolingOptions->Validate = true;
Code: Select all
CachedUpdates = true;
TableName = table1; (2 and 3 for the two other)
SQL is "SELECT * FROM table1" (2 and 3).
-----
c++ Builder XE2 update 4
UniDAC 4.1.6