We are using jooq-codegen-maven to generate all the DB pojos/daos/etc for our DB and that works great (Postgress is our DB). The question is now to now best/properly use those in a vertx application.
Since all the DAOs require a Configuration parameter I simply created that via DefaultConfiguration configured with connection parameters to our DB. I'm not setting anything except the SQLDialect and the DB connection parameters. We also set the Vertx instance on each DAO before use. Then we create DAOs in our vertx verticles tending to reuse DAO instances as much as possible/practical. Our code assumes that both the Configuration (which was set in the DAO) and DAO instances are valid as long as needed. E.g. Configuration & DAO instances are generally created once per handler (where a handler handles a set of vertx routes). However we are now seeing that in some cases we are getting SQL errors that say 'This connection has been closed'. The app will work find for some time then we get these errors and have to restart the app to resolve. So my question is what am I doing wrong? What is the best way to configure things so that we never get SQL connection issues? Also I'm not doing anything with transactions yet but I would like to know how to add that if we need to in the future. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" 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.
