|
Re: Title: NullPointerException in Query.setHint with join-fetch/batch [message #758040 is a reply to message #758001] |
Mon, 21 November 2011 19:53 |
|
The issue is although the hint causes different queries to be used, the same expression is still used, causing the concurrency issue.
Can you set the hint in the named query instead of dynamically (otherwise you are really not sharing the same query). If you have some queries that use join fetch, and some the use batch, then create multiple different named queries. Or use a dynamic JPQL query instead of changing a static defined one.
You could also synchronize on the DatabaseQuery's ExpressionBuilder while setting the hint. Please log a bug to have the concurrency issue fixed.
You can disable the JPQL cache using,
session.getProject().setJPQLParseCacheMaxSize(0);
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.03378 seconds