The begin() method creates a new transaction and associates it with the current thread. This method belongs to the UserTransaction interface. The general form of this method is as follows:

public abstract void begin() throws IllegalStateException

This method will throw an IllegalStateException if the thread is already associated with a transaction.

  • Share/Bookmark