>
> I'm sorry, I disagree. It's called Commit*After*, so I read that as the
> commit is done *after* the method call. It's not CommitWithin. :)


By using "module" I meant my piece of code:) Somebody - it was not me! -
have called the function before being sure, that the transaction is
committed. Or (s)he did not now, that CommitAfter commits after the hole
function being executed.

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 beforeTransactionCompletion. Have you ever used it with Tapestry? I
think that I would have to have the queue with pending email-events and
serve/send them properly in afterTransactionCompletion. What do you think?

2016-02-24 22:35 GMT+01:00 Thiago H de Paula Figueiredo <thiag...@gmail.com>
:

> On Wed, 24 Feb 2016 17:23:36 -0300, g kuczera <gkucz...@gmail.com> 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 method.
>>
>> Am I right?
>>
>
> I'm sorry, I disagree. It's called Commit*After*, so I read that as the
> commit is done *after* the method call. It's not CommitWithin. :)
>
> Also, I completely agree with what Kalle said. If the annotation, which is
> a convenience for simple scenarios, doesn't fit your scenario, don't use
> it. Instead, you can use the HibernateSessionManager.commit() directly.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to