tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: @ApplicationException(rollback=true) ignored from external API
Date Mon, 30 Jun 2008 20:34:49 GMT
On Jun 25, 2008, at 2:15 PM, David Blevins wrote:

> Is the annotated exception class listed in any of the throws clauses  
> of the business interface methods in module B?  (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.

I think we should check exception classes at runtime for the  
annotation.  Normally, this annotation is used for RuntimeExceptions  
which are not required to be listed, and therefore most likely not  
listed.  I also don't think this will add much processing to our  
exception handling code.

If you look at the containers, you will see that they all delegate to  
org.apache.openejb.core.CoreDeploymentInfo#getExceptionType to  
determine if the Exception is an application exception or not.  That  
method basically, checks a Map to determine if the exception was  
explicitly flagged as an application exception, and if not found in  
the map, it checks if the exception is a RuntimeException.  We could  
change that final check to look for an annotation on the class (and up  
the chain if not found).  Finally, once we make a determination about  
an exception class we should record that decision in the Map.  With  
the addition of recording the decision, this should only impact  
exception processing the first time we run into a new exception type.


View raw message