Kevin, Some queries are never return due to the big data size so that we need a mechanism to make it unblocked with a timeout.
Regards, Yu Wang On Tue, May 28, 2013 at 9:48 PM, Kevin Sutter <kwsut...@gmail.com> wrote: > Hi Yu Wang, > I'm not clear on what you are trying to demonstrate. The OpenJPA junit > bucket does have some tests for the various timeout hints and their usage > with finders and queries. If you can further explain what your expected > results should be (via a junit?), it would be helpful. Thanks, > > Kevin > > > On Mon, May 27, 2013 at 1:12 AM, yu wang <wangy...@gmail.com> wrote: > > > * > > I found * > > *javax.persistence.query.timeout > > does not work. > > > > query = manager.createNativeQuery(sql, Mybean.class); > > > > query.setHint("openjpa.FetchPlan.LockTimeout", new > Integer(30000)); > > query.setHint("javax.persistence.lock.timeout", new > > Integer(30000)); > > query.setHint("javax.persistence.query.timeout", new > > Integer(30000)); > > > > if (TsamLogger.isInfoEnabled(log)) { > > start_time = System.currentTimeMillis(); > > } > > reslist = query.getResultList(); > > > > * > > *Regards, > > Yu Wang > > * > > ** > > >