openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Trelle <>
Subject Timeout for fetching data?
Date Wed, 02 Nov 2011 08:37:55 GMT
Is there a (n Open)JPA timeout for fetching large data sets?

Let's say I have a query that selects all rows from a table holding 2.4
million rows. The SELECT itself takes only about 30ms, but fetching the data
over the wire takes about 2 minutes in our test environment.

I did some tests and learned that the standard JPA query timeout configured
by a query hint ...

   query.setHint("javax.persistence.query.timeout", new Integer(3000));

... (which calls Statement#setQueryTimeout on the JDCB layer) is a timeout
that applies to the processing time to compute the set of rows to be
fetched. This is very fast for simple SELECTs. The time needed for fetching
the data is not covered by this timeout.

We want to have a timeout for the overall execution of a query (computing
the data set + fetching the data over the wire). Is there some configuration
for the latter? Will JTA provide something in that direction?

We are using OpenJPA 2.1.1 w/ DB2 V9 and a non-JTA datasource.


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message