JPA query timeout

醉酒当歌 提交于 2020-01-07 05:10:57

问题


I am using Open JPA 2.0 - IBM implementation on WebSphere V8. I need to set query timeout at individual query level. How this can be achieved?

Using below hint will set timeout for all queries, but I need to control this for specific queries

javax.persistence.query.timeout


回答1:


Errm, perhaps ...

query.setHint("javax.persistence.query.timeout", timeout);


来源:https://stackoverflow.com/questions/13011829/jpa-query-timeout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!