If you catch an unchecked exception e.g. RuntimeException
, the transaction will not be rolled back.
By default, if your method exits because of an unchecked exception, then the transaction will be rolled back. Checked exceptions by default will not trigger rollback.