Hi John!
Thanks for the reply. I added the following to my server runtime
initialization, but it does not seem to affect long running queries in any way?
Should I be implementing more logic to handle the actual messages?
------------------
Module m = new Module() {
@Override
public void configure( Binder binder ) {
MapBuilder<Object> props = binder.bindMap(
Constants.PROPERTIES_MAP );
props.put( Constants.JDBC_MAX_QUEUE_WAIT_TIME, 1000 );
}
};
builder.addModule( m );
------------------
Cheers,
- hugi
> On 9. sep. 2016, at 14:06, John Huss <[email protected]> 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 <[email protected]> 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
>>
>>
>>
>>