Revision a903034c
Added by Andreas Kohlbecker almost 6 years ago
src/main/java/eu/etaxonomy/cdm/service/CdmStore.java | ||
---|---|---|
213 | 213 |
commitTransaction(); |
214 | 214 |
return new EntityChangeEvent(mergedBean, changeEventType, view); |
215 | 215 |
} catch (HibernateException | IllegalStateException e){ |
216 |
session.clear();
|
|
216 |
// session.clear(); // #7558
|
|
217 | 217 |
throw e; |
218 | 218 |
} finally { |
219 | 219 |
try { |
220 |
session.close(); |
|
220 |
// session.close(); // #7558 |
|
221 |
session.clear(); |
|
221 | 222 |
} catch (HibernateException e2) { |
222 | 223 |
/* IGNORE HERE */ |
223 | 224 |
} |
... | ... | |
248 | 249 |
txStatus = null; |
249 | 250 |
} |
250 | 251 |
} catch (HibernateException e){ |
251 |
session.clear();
|
|
252 |
// session.clear(); // #7558
|
|
252 | 253 |
throw e; |
253 | 254 |
} finally { |
254 | 255 |
try { |
255 |
session.close(); |
|
256 |
// session.close(); // #7558 |
|
257 |
session.clear(); // #7558 |
|
256 | 258 |
} catch (HibernateException e2) { |
257 | 259 |
/* IGNORE HERE */ |
258 | 260 |
} |
... | ... | |
276 | 278 |
result.getExceptions().forEach(e -> messageBody.append("<li>").append(e.getMessage()).append("</li>")); |
277 | 279 |
messageBody.append("</ul>"); |
278 | 280 |
if(result.getExceptions().stream().anyMatch(e -> HibernateException.class.isAssignableFrom(e.getClass()))){ |
279 |
session.clear(); |
|
281 |
session.clear(); // #7558
|
|
280 | 282 |
} |
281 | 283 |
} |
282 | 284 |
if (!result.getRelatedObjects().isEmpty()) { |
Also available in: Unified diff
ref #7558 clearing only of the hibernate session after exceptions, no more session close