The checked exception behavior was explicit and on-purpose; it is in-line
with what the EJB containers do: a checked exception represents a failure
from which some recovery is possible, as opposed to a runtime exception
which leaves the system in an unknown state (therefore, rolling back the
transaction makes sense).

But if you are unhappy, you can *easily* roll your own annotation and
worker; the code is ridiculously simple.



On Fri, Sep 6, 2013 at 1:21 PM, Martin Kersten
<martin.kersten...@gmail.com>wrote:

> Hi there,
>
>    here is the CommitAfter freak again. I need this to be fixed asap. I
> have all the code ready but the JIRA issue
> https://issues.apache.org/jira/browse/TAP5-2159 is not moving.
>
> I am very unpleased with the situation. Since its the same problem I had
> 2008 and it was not fixed and I did a rant back there too.
>
> Lets recap the description of the @CommitAfter annotation:
>
> >> Marks a method of a service (or a component method) as transactional:
> the active transaction should
> commit<
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/hibernate/HibernateSessionManager.html#commit%28%29
> >after
> invoking the method. Runtime exceptions will abort the transaction,
> checked exceptions will *also commit* the transaction. <<
>
> So please let us fix this once and for all.
>
> I also have some code to protect others from doing some of the dangerous
> stuff like using a session to store information in a read only mode
> (FLUSH_NEVER, connection=readonly) and also I have @ReadOnlyTransaction and
> @WriteTransaction to be used instead of @CommitAfter to be more strict. It
> should not break the behavior of @CommitAfter (after it is fixed to the
> behavior it was intended to do).
>
> So please, give me a call and I will commit this and this issue is gone
> once and for all. I cant stand Tapestry to be flawed this way.
>
>
> Just give me a call and we get this done in a evening. I will do most of
> the work so go ahead. This is free as in free.
>
>
> Cheers,
>
> Martin (Kersten)
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Reply via email to