Should I close Connections from DbManager.getConnection()?

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

JohnnyD
Posts: 128
Joined: 29 Oct 2007, 22:13

Should I close Connections from DbManager.getConnection()?

Postby JohnnyD » 29 Nov 2012, 21:28

Since DbManager implements some sort of pooling, does this mean I should NOT close the returned connection when I'm done with it?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Should I close Connections from DbManager.getConnection(

Postby rjgtav » 29 Nov 2012, 23:07

Hi,
Yes you must close the connections in order to return them to the pool. Please make sure that you do always close the connections after using them, otherwise you might exhaust the pool and every DB call will fail.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
JohnnyD
Posts: 128
Joined: 29 Oct 2007, 22:13

Re: Should I close Connections from DbManager.getConnection(

Postby JohnnyD » 30 Nov 2012, 09:48

Thanks for the quick answer!

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 58 guests