Apparently some containers have integration code which could attempt to release the resources managed by a LogicalConnectionManagedImpl concurrently. While this is IMO a bug in either the integration code or the user's code, it triggers an NPE in ORM which makes it a bit obscure. We can avoid the NPE with slightly more defensive code, which I plan to introduce with this patch. I still plan to throw an exception, just possibly hinting about the real cause. |