Placed an ugly line in the other day:
catch(Exception e)
| {
| if(e.getClass().getAnnotation(ApplicationException.class)!=null)
| {
| ...handle AppException
| } else {
| ...handle Exception as normal
| }
This doesn't account for a couple things:
1) XML-defined ApplicationExceptions in ejb-jar.xml
assembly-descriptor/application-exceptions
2) Inheritance (is an exception whose parent is @ApplicationException also an Application
Exception?)
Would propose adding a List of Application Exceptions to EJBContainer, which I think would
entail:
1) An additional method in Ejb3DescriptorHandler,
"addApplicationExceptionAnnotations", to be called from
addAssemblyAnnotations().
2) Additional scanning for @ApplicationException at deployment time.
Tricky thing here is that Application Exceptions are global per deployment unit (JAR), and
would need to be referenced from all EJBs (Containers) in that unit.
Or is the matadata project making some of this moot by merging the annotations and XML
together into JBossAssemblyDescriptorMetaData, in which case we can skip the scanning step
2) above?
S,
ALR
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107047#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...