Hi, you can call the addEventListeners method of the hibernate session to register a listener for the current transaction.
On Tuesday, July 18, 2017 at 11:41:38 PM UTC-7 yateam wrote: > Hello, > > is there any way to schedule some action after UnitOfWork commit is done? > For example, I want to send an email only if the transaction is > successful. How would I do it if a Jersey resource is wrapped with > @UnitOfWork? > I could think of a workaround, where you put events in some sort of an > EventBus, and if a request transaction is successful, then those events > would execute. But maybe you experienced something like that and know best > practices applicable to Dropwizard? > > Thanks! > -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/8307306a-deac-47f6-bbd9-4d5c946706a4n%40googlegroups.com.
