This method should only called in the
Synchronization#afterCompletion(int) method.
It is responsible for cleaning up the Command Scoped EntityManager (CSEM) instance, but
only when
the CSEM is an
internal one, and not one supplied (and managed) by the user.
If the CSEM is (internally) managed, then this method will take the necessary actions in order to make sure that a
new CSEM can be generated at the beginning of the next operation or command on the persistent
KieSession.
if the CSEM is supplied (and managed) by the user, this method will do nothing with the CSEM.