Glorp: how to reconnect after image shutdown / load?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Glorp: how to reconnect after image shutdown / load?

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

Reply | Threaded
Open this post in threaded view
|

Re: Glorp: how to reconnect after image shutdown / load?

jtuchel
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.

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.

There are many scenarios that can lead to the los 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.


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
>
>


--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:[hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1