It is, hopefully, temporary. We ran into some OSGi issues because some of the
javax.transaction classes are in the JDK and some are in GlassFish. We think we
know how to fix it and we're testing the fix. Our intent is that this
subpackage will go away before the final release, and everything will be in the
javax.transaction package.
Antonio Goncalves wrote on 02/09/13 01:33:
> 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
> <mailto: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 <mailto: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: new TransactionalException
> Date: Mon, 4 Feb 2013 15:14:36 -0500
> From: Paul Parkinson <paul.parkinson_at_oracle.com
> <mailto:paul.parkinson_at_oracle.com>>
> Reply-To: users_at_jta-spec.java.net <mailto:users_at_jta-spec.java.net>
> To: users_at_jta-spec.java.net <mailto: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
> EJBTransactionRequiredException 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>