Hi
@Erel,
in your thread
Building webserver with b4J, you state: "An alternative for a connections pool is a process global SQL variable. However for it to work properly all the handlers should be single threaded handlers."
1. So my current setup should be considered wrong since I have multi-threaded handlers and a single process global SQL var. Can we consider it a bit less wrong because that SQL var is used exclusively in a code module which performs all the DB related actions (including calling subs from DBUtils) or concurrent activations of handlers will end up in a shared, intermixed and dangerous use of the var?
2. Adopting the pool strategy, should I simply substitute the SQL var with its pool counterpart adding the pool object release after the already done cursor release?
3. Looking at your DBUtils module, I see that you use transactions only in some subs while others don't not embed code in an explicit transaction. Do you advice to always start an explicit transaction in the code calling DB-related functions?
I mean something like this:
a. acquire connection from the pool
b. start transaction
c. call DB related sub (this could have its own explicit transaction and alway open/close its own cursor, if needed)
d. stop transaction
e. release pool object
TIA