Overview
Features
Download
Documentation
Community
Add-Ons & Services

Login Timeout SessionPool

Please post support and help requests here.

Login Timeout SessionPool

Postby giuliosporti » 24 Jan 2013, 13:15

Hi guys,

I am using SQL Server by ODBC Driver with Poco::Data::SessionPool.
If connection string is wrong and I try to link to SQL Server the first time, example:

Code: Select all
...

_ptDBOptB = new Poco::Data::SessionPool("ODBC", strConnString);

Poco::Data::Session tSess(_ptDBOptB->get());

...


I receive an exception "Poco::Data::ConnectionFailedException" and that is right. But I have noticed that the Login Timeout is higher.
Is it possible reduce the Login Timeout? The "get" method in SessionPool doesn't have a Timeout parameter:

Code: Select all
...

Poco::Data::Session tSess(_ptDBOptB->get(TIMEOUT));

...


How could I set a Timeout in Connection Pool?

Thanks
Giulio.
giuliosporti
 
Posts: 11
Joined: 11 Jun 2012, 12:15

Re: Login Timeout SessionPool

Postby alex » 26 Jan 2013, 19:19

giuliosporti wrote:Is it possible reduce the Login Timeout?

Unfortunately, no. Data::Session timeout defaults to 60 seconds and that is not exposed through either SessionPool constructor or as a property. I don't have time for it right now, but if you file a feature request on GitHub, I will look into at some point in the future. If you provide a sound patch and send a pull request, timeframe could be shorter.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Login Timeout SessionPool

Postby giuliosporti » 28 Jan 2013, 09:42

Ok.

Thank you very much.

Giulio.
giuliosporti
 
Posts: 11
Joined: 11 Jun 2012, 12:15


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests