TransactionalCoreSessionWrapper was here to make sure that if an exception was raised in the core, the transaction would be set rollback-only. This was introduced for compatibility with previous behavior when Nuxeo was running client-server in RMI and the server-side session had to rollback when this was the case.
Note that in any case we already set the transaction rollback-only if there is an exception that bubbles up to the NuxeoRequestControllerFilter / WebEngineFilter / DownloadServlet / RestletServlet / WIRequestFilter ... (and other locations that start a transaction then run Nuxeo code).
It also introduces a surprising behavior for code that does try / catch and catches a low-level exception (like "doc not found") where the transaction is set rollback-only without the code being really aware of it.
-> Remove this wrapper and behavior
In addition, JIT-compiling TransactionalCoreSessionWrapper.invoke makes Java 8 crash (see attached traces), so this class is really a problem for this reason alone.