Description
In class JpaInterceptor the method postCallWithException calls Coordination.fail() but not Coordination.end():
@Override public void postCallWithException(ComponentMetadata cm, Method m, Throwable ex, Object preCallToken) { LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), m.getName(), ex); if (preCallToken != null) { ((Coordination)preCallToken).fail(ex); } }
However, the javadoc of Coordination.fail() states:
If this Coordination has been {@link #push() pushed} onto a thread local Coordination stack, this Coordination is not removed from the stack. The creator of this Coordination must still call {@link #end()} on this Coordination to cause it to be removed from the thread local Coordination stack.
This is causing issues for subsequent calls to jpa service because the coordination is not removed from the stack.
The method postCallWithException should be implemented like this:
@Override public void postCallWithException(ComponentMetadata cm, Method m, Throwable ex, Object preCallToken) { LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), m.getName(), ex); if (preCallToken != null) { Coordination coordination = (Coordination)preCallToken; coordination.fail(ex); coordination.end(); } }
Attachments
Issue Links
- links to