Justin Deoliveira ha scritto:
> Hi all,
> 
> Andrea and myself recently had a discussion in jira that we think should 
> probably take place on the wider list.
> 
> It has to do with CatalogListeners, and exceptions. The current behavior 
> of the catalog is to protect itself against listeners that throw 
> exceptions, and simply log the warning.
> 
> Sometimes this behavior is intended, for those listeners that are 
> "non-crucial". An example here would be the GWCListener. However for 
> some listeners this behavior is uwanted and the exception should be 
> thrown so that it can be reported to the user. Example here would be the 
> GeoServerPersister.
> 
> So we have a couple of options. It would be nice to hear what people prefer:
> 
> 1) enforce catalog listeners to be well behaved, and do not catch 
> exceptions thrown by listeners

This is the cleanest approach imho, you always get to know when things
go south. Downside, it might break operation, the current approach
allows some sort of graceful degradation (thought in some cases it's
not so graceful, restart GeoServer and your config is gone ;-) )

> 2) come up with a special exception class CatalogException that when 
> thrown by a listener will not be caught by the catalog.

This one is good if the programmer tries hard to foresee how things
can go wrong and what to do about it (stop the world or sweep under
the carpet?).

I'm open to both solutions, with a preference on the first

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to