cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Reconnecting automatically after DB downtime
Date Mon, 29 Feb 2016 10:57:40 GMT
Probably a DataSource configuration. I am using DB urls like this:

jdbc:mysql://127.0.0.1/db?connectTimeout=0&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8

and also add "validationQuery" parameter to my pool config. Both ensure reconnects are transparent.

Andrus

> On Feb 29, 2016, at 1:53 PM, Hugi Thordarson <hugi@karlmenn.is> wrote:
> 
> Hi all.
> We had some DB problems last night (MariaDB with the ConnectorJ driver). As soon as I
had started the DB back up, our EOF applications were up and running, but the Cayenne apps
were still down and required a restart to start running again.
> 
> Is there any way to tell Cayenne to reconnect to the DB after an event like this? 
> 
> Cheers,
> - hugi
> 
> // Hugi Thordarson
> // http://www.loftfar.is/
> // s. 895-6688


Mime
View raw message