Re: Reconnecting automatically after DB downtime

2016-03-08 Thread Andrus Adamchik
Also pretty easy - define a custom DataSourceFactory: builder.addModule(b -> b.bind(DataSourceFactory.class).to(MyImpl.class)); Andrus > On Mar 8, 2016, at 3:20 AM, Hugi Thordarson wrote: > > Not quite done :). > > I have a project that uses multiple Cayenne models connected to multiple > da

Re: Reconnecting automatically after DB downtime

2016-03-08 Thread Hugi Thordarson
Not quite done :). I have a project that uses multiple Cayenne models connected to multiple databases. The connection information is currently stored in the models and I’m constructing the ServerRuntime like this: ServerRuntimeBuilder b = new ServerRuntimeBuilder( "Netbokhald" ); b.addConfig( "

Re: Reconnecting automatically after DB downtime

2016-03-08 Thread Hugi Thordarson
>>> Unless you use Bootique, or your own property-based config mechanism. >> >> Is bootique worth checking out? I’m just noticing it now for the first time >> and so happens I’m looking into a new basis for our web services/APIs >> (current favorite being spark framework). > > Definitely. Booti