Can someone help me understand how the EntityManager is attached to the current thread? I spawn a new thread myself and tried to publish an event using
eventBus.publish(). And I am getting the following exception. Thanks in advance for the help.
**Caused by: javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call**