This content has been marked as final.
Show 6 replies
-
1. Re: Add
alrubinger Nov 22, 2007 6:18 AM (in response to alrubinger)Damn you forum:
Topic - Add @ApplicationException to EJBContainer? -
2. Re: Add @ApplicationException to EJBContainer?
wolfc Nov 22, 2007 6:25 AM (in response to alrubinger)+1 for uglyness :-)
catch(Exception e) { if(container.isApplicationException(e))
boolean isApplicationException(Exception e) { return deployment.isApplicationException(e); }
So the interesting code is in Ejb3Deployment and Ejb3DescriptorHandler. -
3. Re: Add @ApplicationException to EJBContainer?
alrubinger Nov 22, 2007 6:52 AM (in response to alrubinger)OK, Ejb3Deployment is a better place for List<Class<?>> applicationExceptions.
1) Spec is silent on inheritance of @ApplicationException from parent to subclass.
2) How are we handling this:"EJB3 Specification 14.2.1" wrote:
Application exceptions that are checked exceptions may be defined as such by being listed in the throws clauses of the methods of the bean's business interface, home interface, component interface, and web service endpoint.
?
3) Is the metadata project merging annotations and XML into JBossAssemblyDescriptorMetaData, or do we have to scan for annotations separately?
S,
ALR -
4. Re: Add @ApplicationException to EJBContainer?
starksm64 Nov 22, 2007 2:17 PM (in response to alrubinger)"ALRubinger" wrote:
3) Is the metadata project merging annotations and XML into JBossAssemblyDescriptorMetaData, or do we have to scan for annotations separately?
Yes, the annotation processing deployer merges the annotations into the deployment attachment metadata view. Once that is fully checked into trunk we need to start going through and removing the duplicate processing from the ejb3 deployers. -
6. Re: Add @ApplicationException to EJBContainer?
wolfc Nov 23, 2007 4:52 AM (in response to alrubinger)On hindsight this is completely out of style with the current implementation.
For now the implementation should be:
EJBContainer:boolean isApplicationException(Exception e) { return hasAnnotation(e, ApplicationException.class); }
Ejb3DescriptorHandler:void addApplicationException(...) { 'scan assembly descriptor and addAnnotation' }
See addAssemblyAnnotations.
The EJBContainer.isApplicationException will always be the supported API.