Rollback all persisted data in multithreading if one thread got exception in Hibernate

I want to Rollback all persisted data in multithreading if one thread got exception in Hibernate

Are you attempting to use the same Session or EntityManager across multiple threads?