That's correct, and to be fair, I'm not exactly using it that way. But here's what I'm trying to do. We use Castor to generate the classes for our configuration layer. The base product has a schema with various base simple and complex types. Then we offer layered products, which each have their own schema. I'd like the schema for the layered products to live in the tree for the layered products, and reference the schema for the base product. This is straightforward enough, but it means that each layered product needs its own castorbuilder.properties with all the stuff from the base version AND the specific properties for the layered product as well.I assume you are trying to create source code and compile "on-the-fly" or "dynamically"? The typical use of the source generator, either manually or in a build-script, shouldn't cause problems because the source generator wouldn't be used from an application server.
This seems like a good strategy. I would suggest that you add another step for system properties as well. This turns out to be surprisingly useful in embedding one app within another.Here is what currently happens (or what we intend to happen) with the CVS version:1. load properties from JAR (defaults) 2. load properties from {JAVA_HOME}\lib (globally overridden defaults) 3. load properties from local config file, if it exists.
Its not just multiple source generators in the same JVM, its also an organizational philosophy. Setting up the classpath so that my o/e/c/b/castorbuilder.properties is ahead of the JAR is error-prone. I'd like to be able to just set the specific properties I need, either through a local config file or through system properties. The strategy you outline above makes a lot of sense; could source generator just use the same code to get its properties too?Now with the SourceGenerator it's all static, so using muliple source generators in the same JVM that require different configurations could cause problems.
Great, will do. Thanks!If you would like to help out on this issue please add yourself to the cc list on bugs 897 and 1070 and we can keep the thread going there for tracking purposes.
--
Brian Goetz
Quiotix Corporation
[EMAIL PROTECTED] Tel: 650-843-1300 Fax: 650-324-8032
http://www.quiotix.com
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
