openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Luis Cetina <maxtorz...@gmail.com>
Subject Re: How to define a timeout for nativeQuery by OpenJPA 1.2.2
Date Wed, 29 May 2013 11:29:31 GMT
Why you dont paginate the information?
El 29/05/2013 00:00, "yu wang" <wangyumi@gmail.com> escribió:

> 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 <kwsutter@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 <wangyumi@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
> > > *
> > > **
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message