|
From: Bill B. <bb...@re...> - 2008-08-21 00:28:39
|
Christian Bauer wrote: > On Aug 20, 2008, at 02:23 , Bill Burke wrote: > >> What I think I'm going to do is let exceptions perculate up to the >> dispatcher and write a method to handle all exceptions. Seam can >> then just override the method that does exception handling at the >> dispatcher level. > > That's the same then as writing an ExceptionMapper right now, for Seam > integration. That's why I wrote that I need it to bubble OUT of the > dispatcher. > Its not the same because I need certain contextual data set (and eventually cleaned) for MessageBodyWriters to work. Also, WebApplicationException throws a wrench in things as well as it contains a Response that could be marshalled by MessageBodyWriters. Finally, MessageBodyWriters themselves can throw WebApplicationException. As long as the request isn't committed, I have to try and write out that response. All the above logic is not encapsulatable very well within an SPI. Which is why I want dispatcher to be self-contained and not have anything "bubble OUT". >> I also will pull Response writing into dispatcher as well as both >> resources, providers, and ExceptionMappers can throw >> WebApplicationException which has its own Response. > > Out of dispatcher please. > See above. There is a non-trivial amount of logic for response handling. So, if you don't like dispatcher the way it turns out, feel free to write your own dispatcher. I have my own requirements and schedule to deal with. -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |