On Tue, Mar 11, 2008 at 3:30 AM, James Carman <[EMAIL PROTECTED]> wrote: > Okay, so it's common to do your own request cycle implementation. I > didn't realize that. In Tapestry, RequestCycle wasn't something you > monkeyed around with much.
yep, its pretty common. > So, you're saying that I would store my exception handler "registry" > as metadata entries on the Application class? I would maybe store my > Map<Class,IRuntimeExceptionHandler>? What would the MetaDataKey be? you would create your own, preferrably inner private, subclass of MetaDataKey and use that. that way no body but you can access those entries. > I just don't want to force users to subclass a custom WebApplication > class. thus my suggestion of using metadata > I'd rather have the IRuntimeRequestHandlers registered with > IRequestCycleSettings (or the IExceptionSettings, maybe?). well, another thing here is that there are two ways of setting this up. one way is to push handlers into the request cycle, another way is to have request cycle lookup the handlers from some registry. if i were using spring, as i assume you are, i would create a registry bean for the handlers that would live in spring context and collect all the beans. the request cycle would then simply lookup this registry bean and iterate over registered handlers. this is kinda why we try not to put things like this into core. implementations vary a lot based on how your architecture is setup and forcing one particular way makes code for others inelegant... -igor --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]