-
1. Re: Configuration Errors
trustin May 9, 2009 1:07 AM (in response to dmlloyd)If the configuration is not processed concurrently (is it even possible?), the easiest way to implement this feature could be using ThreadLocal.
-
2. Re: Configuration Errors
dmlloyd May 11, 2009 10:47 AM (in response to dmlloyd)I don't see how that might help though - the binding occurs with JAXB so by the time a deployer gets ahold of the data, it's already in an object model, so any location info would have already been lost.
-
3. Re: Configuration Errors
trustin May 15, 2009 4:37 AM (in response to dmlloyd)Ah, we are using JAXB. I thought we are something like SAX. Sorry about the noise.
Then, what about improving JBoss JAXB itself to maintain a complete map that maps an object property to the location of the XML file? For example:
Location l = map.getLocation(object, "bindAddress");
String path = l.getPath();
int lineno = l.getLineNumber();
int column = l.getColumn();
..
This map and location information could be written generic enough so that it can be used with different configuration file formats, as long as the configuration parser (JAXB implementation in the case above) puts the appropriate information when it processes the configuration file.
I hope my idea makes sense this time. :)