Hello everyone,
I couldn't resist :-) and added the "last minute" new feature to JPetStore which demonstrates few things such as using MailSender, and implementing AfterReturningAdvice.
There is now a org.springframework.samples.jpetstore.aspect.SendOrderConfirmationEmailAdvice class which sends confirmation email with the order info to a customer using MailSender helper. This advice is of type MethodAfterReturningAdvice and fires after PetstoreFacade.insertOrder(Order) successfully returns, meaning that the Order has been successfully persisted.
Look at applicationContext.xml for bean definitions.
Regards,
Dmitriy.
|