B4J Question About SQL Thread Pool of Connections with MySQL/MariaDB.

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I've noticed that when I open a connection from the pool, even if I close it after doing the work, the database holds the process until wait_timeout be expired.
The result is that if I want to execute sequentially several procedures that need to open the database, the previous connection remains open and there is opened another one to do the next job.
The SQL object I use, is global for each web socket connection thread.
After noticed that, I want to ask if it's a good practice to do the following:
B4X:
If Not(SQL.IsInitialized) Then SQL = Pool.GetConnection
Thank you in advance!
 
Top