tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karsten Ohme <>
Subject Re: @ApplicationException(rollback=true) ignored from external API
Date Wed, 25 Jun 2008 23:42:07 GMT
David Blevins schrieb:
> On Jun 25, 2008, at 9:38 AM, <> 
> <> wrote:
>> I run a test which provokes an application exception. The exception is
>> defined in the same module and annotated with
>> @ApplicationException(rollback=true). The Exception is rolled back.
>> Fine.
>> Another test checks also an exception. The exception is not from an EJB
>> module, but from an imported API. The exception has the same annotation,
>> but the transaction is not rolled back. It seams to me that the
>> annotation in this class is ignored.
> We definitely don't check the annotations at runtime, simply because you 
> can override them via the deployment descriptor so the "merged" set of 
> meta data is the only safe thing to execute against at runtime (not if 
> we expect to pass the tck anyway ;).  But as you point out we just check 
> the module itself for @ApplicationException annotated classes.

I don't have them annotated in the deployment descriptor. This would be 
very uncomfortable, because each module which uses the exception from 
the other module would have to do this.

> Hmm...
> Is the annotated exception class listed in any of the throws clauses of 
> the business interface methods in module B?

Yes, it is.

>  (where module A has the 
> exception class, module B does not)
> If so, we could expand our support to looking there too in addition to 
> scraping the module jar.

Would be nice.

> -David

View raw message