jtuc...@objektfabrik.de wrote:
Herby,
I am not aware of any automatic reconnect tools. Kepping a DB connection
alive after an image is closed is surely not desired and chances are the
DB will close the inactive session eventually anyways.
Hm. When I though about it, image save / load cycle is just one example
of losing a connection to db. So the question is more on "how to manage
possible disconnections / reconnections"?
So it's probably best to make the DB connections reconnect on demand.
That means that whenever you open a session, check if a DB connection is
available or establish a new one otherwise.
Hm, I though that once I open a session it does actually connect on
demand (it has Login, system and all the information for it). Does it
actually mean that if I want to stay connected I must do `session login`
before each `session inUnitOfWorkDo:`?
There are many scenarios that can lead to the loss of a DB connection
that you usually cannot influence (network connection drops, DB server
has some error condition etc.) , so this is a good idea anyways.
As written above, I thought glorp manages this kind of reconnection
itself. If not, can someone point me to the some example where this is
managed? I am asking because in Glorp book I did not find anything about
this (I have read it).
Thanks, Herby
HTH
Joachim
Am 01.08.17 um 22:29 schrieb Herby Vojčík:
Hello!
ZnServers have its own register mechanism by which they listen when
they are tagged as such after image save and load.
I wonder if there is some way to connect to database in Glorp and then
"keep the connection" between image save/load. Or how is this managed
notmally in apps that use databases? Is image "preconfigured" with
live self-healing connection or does some special piece of startup
code be installed so it runs after deployment and image start?
Thanks, Herby