|
From: Bruce M. <br...@mc...> - 2003-04-30 02:11:14
|
Configuration loading within a container such as JBoss, tomcat, etc requires a certain amount of extra work. The module loading system, by default relies on babeldoc inspecting the classpath, looking for jar files which are babeldoc modules. Now in a container there is no classpath (well there is, but its the system classpath and the classes are loaded using another classloader). So there is a system property (babeldoc.scandir) that you can set that tells babeldoc to scan a directory wherein all the babeldoc module jars are store and it will set up the configuration loading accordingly. Now the whole key to the property file based configuration (so-called Simple Configuration) is that the all the configuration property files in the jar files get merged together (well, this is effect). The order in which they are merged depends on the module dependency. So the config/i18n/messages.properties in the core module is the last in the merge list, then the config/i18n.messages.properties in sql. This is the means whereby a property in the sql module may override a property in the core module. Its quite byzantine and may get addressed at some time in the future. Why dont you join the babeldoc-devel mailing lists - its fairly low volume - its a good venue to get your questions answered. regards, Bruce. On Tuesday 29 April 2003 08:11 pm, Ken Geis wrote: > Bruce McDonald wrote: > > Now, onto the issue about Exceptions - we are working on exceptions. Can > > you give me examples - stack dumps of where you are getting bad messages > > and I can work on it. > > Some of the bad messages I'm getting, I don't know where they are coming > from. For example (these were not necessarily consecutive): > > 2003-04-29 16:30:23,312 INFO [com.babeldoc] > 2003-04-29 16:30:23,312 DEBUG [com.babeldoc] > 2003-04-29 16:30:23,312 WARN [com.babeldoc] > 2003-04-29 16:30:23,312 INFO [STDOUT] null > > It's also a mix of System.err/System.out printing and logging. That's > OK for now. > > One that really could have helped me was in ServiceFactory. I have > babeldoc_core.jar and babeldoc-scanner.jar in my JBoss SAR file. Each > has a service/query.properties. I was trying to use an entry for the > scanner, but the classloader found the core one first. The solution was > to create a third file that merged the two and that the classloader > would find first. But I think that logs should have helped me figure > out the problem. Perhaps just log an error when a service is requested > and not found. It would probably be a bad idea to do the same with > ConfigService. I can see legitimate cases for requesting a > configuration key that does not exist. > > > Ken |