increase h2 lock timeout

This commit is contained in:
Benjamin Gamard 2019-02-07 15:17:38 +01:00
parent 94951c59f3
commit 8bd4d27d2f
2 changed files with 3 additions and 3 deletions

View File

@ -231,11 +231,11 @@ public class DocumentDao {
* @param document Document
*/
public void updateFileId(Document document) {
/*EntityManager em = ThreadLocalContext.get().getEntityManager();
EntityManager em = ThreadLocalContext.get().getEntityManager();
Query query = em.createNativeQuery("update T_DOCUMENT d set d.DOC_IDFILE_C = :fileId where d.DOC_ID_C = :id");
query.setParameter("fileId", document.getFileId());
query.setParameter("id", document.getId());
query.executeUpdate();*/
query.executeUpdate();
}

View File

@ -88,7 +88,7 @@ public final class EMF {
if (databaseUrl == null) {
props.put("hibernate.connection.driver_class", "org.h2.Driver");
props.put("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
props.put("hibernate.connection.url", "jdbc:h2:file:" + dbFile + ";CACHE_SIZE=65536");
props.put("hibernate.connection.url", "jdbc:h2:file:" + dbFile + ";CACHE_SIZE=65536;LOCK_TIMEOUT=10000");
props.put("hibernate.connection.username", "sa");
} else {
props.put("hibernate.connection.driver_class", "org.postgresql.Driver");