I would like for my mailAbonne method to be fully transactional. I noticed that even on a MailException being thrown the data is persisted by the dao (dao.persistMailingAbonnee(ma);). What's wrong with my configuration?
Can anyone please help?
Thanks in advance,
But that isn't the Exception you are catching, unless MailSendException is a subclass of the Exception type that you are catching.
Joined: Apr 24, 2004
I managed to isolate the problem. I now know it has nothing to do with the java mail api.
Here is my method:
I deliberately throw a RuntimeException from the envoyerMail method and it hangs where it is noted //here. I also know that Spring does create the beans properly and advises them propertly according to the @Transactional annotation because it says so in the logs. It is as if my method wouldn't manage to rethow the RuntimeException...
What could I be getting wrong?