Also, this doesn't really work for SQLTemplate queries - it will print the log and the time taken, but the SQL is just "null". Not sure if it works for EJBQL queries.
On Fri, Sep 9, 2016 at 9:06 AM John Huss <johnth...@gmail.com> wrote: > You can set the property in the module when creating your ServerRuntime: > > new Module() { > > @Override > > public void configure(Binder binder) { > > MapBuilder<Object> props = binder.bindMap(Constants.PROPERTIES_MAP); > > props.put(Constants.JDBC_MAX_QUEUE_WAIT_TIME, 8000); // 8 seconds > > } > > } > > This only will report AFTER the query finishes, so it not really valuable > if your query is really hung for a very long time. But for general > slowness it works. > > > > On Fri, Sep 9, 2016 at 8:42 AM Hugi Thordarson <h...@karlmenn.is> wrote: > >> Hi all, >> in EOF we could make the application log a warning if a DB query was >> taking more than a specified amount of time to complete. >> >> Is there any location where I could plug into Cayenne to do something >> similar? We’re deploying a reporting system for a large-ish database and I >> know some queries might be problematic—so I’d like to watch out for this as >> we deploy. >> >> Cheers, >> - hugi >> >> // Hugi Thordarson >> // http://www.loftfar.is/ >> // s. 895-6688 >> >> >> >>