This content has been marked as final.
Show 2 replies
-
1. Re: RollbackInterceptor and third party classes
matt.drees Apr 16, 2008 8:27 AM (in response to cpopetz)I think the ability to indicate an existing/third-party exception should be treated as an ApplicationException is important.
Seam is already doing this for Converter and Validator exceptions:
RollbackInterceptor.java:
private boolean isSystemException(Exception e, boolean isJavaBean, Class<? extends Exception> clazz) { return isJavaBean && (e instanceof RuntimeException) && !clazz.isAnnotationPresent(APPLICATION_EXCEPTION) && !clazz.isAnnotationPresent(ApplicationException.class) && //TODO: this is hackish, maybe just turn off RollackInterceptor for @Converter/@Validator components !JSF.VALIDATOR_EXCEPTION.isInstance(e) && !JSF.CONVERTER_EXCEPTION.isInstance(e); }
I think this should be generalized.
Maybe it could be folded into existing exception handling blocks in pages.xml:
<exception class="javax.faces.ValidatorException" is-application-exception="true"/>
or
<exception class="javax.faces.ValidatorException"> <application-exception/> </exception>
Your second point seems reasonable to me, but I'm not experienced with transaction management.
-
2. Re: RollbackInterceptor and third party classes
matt.drees Apr 25, 2008 7:26 AM (in response to cpopetz)Submited a jira: http://jira.jboss.org/jira/browse/JBSEAM-2927