Re: Calling method after CommitAfter call

2016-02-24 Thread g kuczera
> > But I think a JPA hook would be a better choice. The Interceptor hooks > happen for *all* the transactions in your SessionFactory, and JPA hooks are > more fine-grained. I am not really into JPA thing, but if I understand well I have to add the whole new configuration (in AppModule), as

Re: Calling method after CommitAfter call

2016-02-24 Thread Thiago H de Paula Figueiredo
On Wed, 24 Feb 2016 19:33:13 -0300, g kuczera wrote: I will try tomorrow the HibernateSessionManager.commit. But what do you think, guys, about Hibernate Interceptor? It has something similar to what Kalle mentioned, afterTransactionCompletion and

Re: Calling method after CommitAfter call

2016-02-24 Thread Thiago H de Paula Figueiredo
On Wed, 24 Feb 2016 17:23:36 -0300, g kuczera wrote: Hi guys, Hi! It looks that the above module is badly designed. It does not matter that there is the CommitAfter annotation, if I call the methods which assume that everything is commited from within the commiting

Re: Calling method after CommitAfter call

2016-02-24 Thread Kalle Korhonen
On Wed, Feb 24, 2016 at 12:27 PM, g kuczera wrote: > Sorry for not editing the post properly, I accidentally sent it by pressing > the space few times (first time using the fullscreen editing on gmail). > > So, the question is if the hibernate Interceptor is the way to go? Do

Re: Calling method after CommitAfter call

2016-02-24 Thread g kuczera
Sorry for not editing the post properly, I accidentally sent it by pressing the space few times (first time using the fullscreen editing on gmail). So, the question is if the hibernate Interceptor is the way to go? Do you have any other idea how to be 100% sure that my method from observer will

Calling method after CommitAfter call

2016-02-24 Thread g kuczera
Hi guys, I embedded the ApplicationSubmitForm (component) in my Page. If it is successfully validated, the onSuccessFromNewApplicationForm method is called: private Set observers; @CommitAfter public void onSuccessFromNewApplicationForm() { Application application = new Application();