Hi all!  I had a question about the lifetime of dao instances created using 
DBI.onDemand in DropWizard JDBI.  Currently, I am creating the instances 
once during the initialization of my DropWizard application and persisting 
them for the lifetime. Is this the proper way to use onDemand, or should I 
get a new DAO instance every time I want to run a query?  


I have observed a situation where if you're running Dropwizard inside a 
Docker & let it idle for a day or so, my dao instances aren't reopening 
connections to the RDBMS - I just see "connection is closed" errors, as if 
jdbi is attempting to execute queries against a connection that's closed.

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to