users@javaee-spec.java.net

[javaee-spec users] [jsr342-experts] Re: Fwd: [jta-spec users] new TransactionalException

From: Antonio Goncalves <antonio.goncalves_at_gmail.com>
Date: Sat, 9 Feb 2013 10:33:10 +0100

Really strange to see a TransactionalException in the package
javax.transaction.*cdi*. Why CDI ? Hum... I'm going to read the spec and
check the JTA ML.

Antonio

On Tue, Feb 5, 2013 at 3:35 AM, Linda DeMichiel
<linda.demichiel_at_oracle.com>wrote:

> Forwarding at the request of the JTA spec lead.
>
> Exceptions thrown by the transaction interceptor need to be runtime
> exceptions to conform to the requirement of the interceptors spec
> that interceptors can only throw checked exceptions that are
> thrown by the method on which they interpose. This new exception
> also provides more consistency with the default settings for rollback
> and with EJB CMT behavior.
>
> Please review and follow up by posting either here or at
> users_at_jta-spec.java.net (or both). The current draft of the JTA 1.2
> spec can be downloaded at java.net/projects/jta-spec/**
> sources/spec-source-**repository/content/jta-1_2-**spec_v2.pdf?rev=4<http://java.net/projects/jta-spec/sources/spec-source-repository/content/jta-1_2-spec_v2.pdf?rev=4>
>
> thanks,
>
> -Linda
>
>
> -------- Original Message --------
> Subject: [jta-spec users] new TransactionalException
> Date: Mon, 4 Feb 2013 15:14:36 -0500
> From: Paul Parkinson <paul.parkinson_at_oracle.com>
> Reply-To: users_at_jta-spec.java.net
> To: users_at_jta-spec.java.net
>
>
>
> Hello,
>
> I wanted to explicitly call out a new TransactionalException that is in
> the latest rev of the spec, the javadoc for
> which is below.
>
> It serves as a RuntimeException extension wrapping exceptions thrown by
> the transactional interceptors and allows for
> closer alignment with the exception handling behavior that occurs in EJB
> (eg the runtime exceptions
> EJBTransactionRequiredExceptio**n and EJBException that result in
> transactions being marked for rollback) as a default.
>
> Please replies with any comments or questions if you would.
>
> Thanks,
> Paul
>
> Class TransactionalException
>
> public class javax.transaction.cdi.**TransactionalException extends
> java.lang.RuntimeException
> {
>
> public TransactionalException(String s, Throwable throwable); }
>
> RuntimeException used to rethrow Exceptions thrown from Transactional
> annotation interceptors implementation.
>
> This results in the transaction being marked for rollback by default.
>
> The original Exception is set as the nested exception and includes
> TransactionRequiredException for the case where a
> bean with TxType.MANDATORY is called outside a transaction context,
> InvalidTransactionException for the case where a
> bean with TxType.NEVER is called inside a transaction context, and various
> commit-time exceptions such as
> RollbackException, HeuristicMixedException, HeuristicRollbackException,
> SecurityException, IllegalStateException, and
> SystemException.
>
> Constructors
>
> TransactionalException
> public TransactionalException(String s, Throwable throwable)
>
> Create an TransactionalException with a given string and nested Throwable.
>
>
>
>
>


-- 
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org> |
Twitter<http://twitter.com/agoncal>|
LinkedIn <http://www.linkedin.com/in/agoncal> | Paris
JUG<http://www.parisjug.org> |
Devoxx France <http://www.devoxx.fr>