-
1. Re: How to disable transactions when rendering an error page
christian.bauer Sep 26, 2007 1:24 PM (in response to igx89)Redirect to an error page that is not rendered by the JSF servlet and not intercepted by the Seam servlet filter.
-
2. Re: How to disable transactions when rendering an error page
igx89 Sep 26, 2007 1:29 PM (in response to igx89)There's no way around that? I'd like to take advantage of displaying messages from annotated exception classes (see 5.3.3/4 in the documentation), but avoiding JSF would seem to prevent that from being possible.
-
3. Re: How to disable transactions when rendering an error page
christian.bauer Sep 26, 2007 1:31 PM (in response to igx89)Actually, any page that is not rendered by the JSF servlet should be fine. The Seam servlet web-filter does not start transactions (ie. you need to call UserTransaction in a custom servlet if you want that).
I don't know what an "annotated exception class" is. -
4. Re: How to disable transactions when rendering an error page
christian.bauer Sep 26, 2007 1:32 PM (in response to igx89)If you mean pages.xml, then don't use that for a database error but let it bubble up to the web.xml exception handler.
-
5. Re: How to disable transactions when rendering an error page
igx89 Sep 26, 2007 1:33 PM (in response to igx89)See 5.3.3 in the documentation
-
6. Re: How to disable transactions when rendering an error page
igx89 Sep 26, 2007 1:39 PM (in response to igx89)Also, if <core:init debug="true"/> is set in components.xml, an infinite loop would seem to be unavoidable, since it causes jboss-seam-debug-2.0.0.CR1.jar!/META-INF/debug.xhtml to be rendered on every error. Not a huge deal since the developer will usually realize an infinite loop is going on when the page goes blank and their server log starts exploding in size, but still a pain (and a potential put-off for less experienced developers).
-
7. Re: How to disable transactions when rendering an error page
igx89 Sep 26, 2007 1:41 PM (in response to igx89)"christian.bauer@jboss.com" wrote:
If you mean pages.xml, then don't use that for a database error but let it bubble up to the web.xml exception handler.
Wouldn't that prevent me from using a catch-all handler? I really, really don't want to have to explicitly list every single possible exception that might be thrown from my app... :/ -
8. Re: How to disable transactions when rendering an error page
pmuir Sep 26, 2007 2:28 PM (in response to igx89)I would assume Christian means handle *just* the connection error that way.
-
9. Re: How to disable transactions when rendering an error page
igx89 Sep 26, 2007 2:33 PM (in response to igx89)But if what he's saying that exceptions "bubble up to the web.xml exception handler" is true, then wouldn't a catch-all in pages.xml stop any exception handler in web.xml from being triggered?
-
10. Re: How to disable transactions when rendering an error page
christian.bauer Sep 26, 2007 3:36 PM (in response to igx89)Yes, that's the case. Exception handling is very very weak in JSF and hence also in Seam. This is a big issue to solve that is on the mid-term TODO list.
-
11. Re: How to disable transactions when rendering an error page
igx89 Sep 26, 2007 4:00 PM (in response to igx89)Ok, thanks a lot for the replies. If there are/when there are JIRA issues for this, could you let me know? Thanks :)