Handle all exceptions for stored proc out param retrieval in SharedEntityManagerCreator
Prior to this commit, the EntityManager was not closed in SharedEntityManagerCreator.DeferredQueryInvocationHandler's invoke(Object, Method, Object[]) method if an invocation of getOutputParameterValue(*) threw an exception other than IllegalArgumentException, which could lead to a connection leak. This commit addresses this by catching RuntimeException instead of IllegalArgumentException. Closes gh-30161
This commit is contained in:
parent
ae70bf7c38
commit
24b359d519
|
|
@ -430,7 +430,7 @@ public abstract class SharedEntityManagerCreator {
|
|||
entry.setValue(storedProc.getOutputParameterValue(key.toString()));
|
||||
}
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
catch (RuntimeException ex) {
|
||||
entry.setValue(ex);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue