mirror of
https://github.com/sismics/docs.git
synced 2025-12-13 01:36:18 +00:00
PDF handling, file upload progression
This commit is contained in:
@@ -105,21 +105,24 @@ public class RequestContextFilter implements Filter {
|
||||
} catch (Exception e) {
|
||||
ThreadLocalContext.cleanup();
|
||||
|
||||
log.error("An exception occured, rolling back current transaction", e);
|
||||
// IOException are thrown if the client closes the connection before completion
|
||||
if (!(e instanceof IOException)) {
|
||||
log.error("An exception occured, rolling back current transaction", e);
|
||||
|
||||
// If an unprocessed error comes up from the application layers (Jersey...), rollback the transaction (should not happen)
|
||||
if (em.isOpen()) {
|
||||
if (em.getTransaction() != null && em.getTransaction().isActive()) {
|
||||
em.getTransaction().rollback();
|
||||
}
|
||||
|
||||
try {
|
||||
em.close();
|
||||
} catch (Exception ce) {
|
||||
log.error("Error closing entity manager", ce);
|
||||
// If an unprocessed error comes up from the application layers (Jersey...), rollback the transaction (should not happen)
|
||||
if (em.isOpen()) {
|
||||
if (em.getTransaction() != null && em.getTransaction().isActive()) {
|
||||
em.getTransaction().rollback();
|
||||
}
|
||||
|
||||
try {
|
||||
em.close();
|
||||
} catch (Exception ce) {
|
||||
log.error("Error closing entity manager", ce);
|
||||
}
|
||||
}
|
||||
throw new ServletException(e);
|
||||
}
|
||||
throw new ServletException(e);
|
||||
}
|
||||
|
||||
ThreadLocalContext.cleanup();
|
||||
|
||||
Reference in New Issue
Block a user