jpa query.getResultList() get stucked, with no error -
i have strange case, have write simple code query db in jpa2.0
every things seems good, when code hits query.getresultlist();
it stuck, , not respond, glassfish server gets 20% of cpu
and nothing happen, not generate error or log.
what wrong?
i using glassfish, eclipselink, netbeans
this code:
public list<?> getdata(entitymanager em,class entityclass){ query query=em.createquery("select entity tblpromotions entity"); return query.getresultlist(); }
thanks in advance
try debugging it, stuck? (kill or ctrl c print stack trace, or use debugger)
also turn logging on finest.
it database lock, since read, must using sort of serialized transaction isolation, bad idea.
how amy objects in table, taking long time.
Comments
Post a Comment