commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <>
Subject Re: [CONFIGURATION] ClassPropertiesConfiguration
Date Tue, 07 Dec 2004 14:19:53 GMT
Emmanuel Bourg <> writes:

>Henning P. Schmiedehausen wrote:

>> Nah! We went this road in torque with the id generators and along lies
>> madness! Please don't try to "sweeten" the locator names by
>> introducing human readable names into the XML syntax.

>What's wrong with that ? From a user point of view it's easier to have 
>short names than fully qualified class names. Hibernate uses this 
>approach in its mapping file, I find this quite nice. Of course it's 
>still possible to use the class name instead.

You lock yourself into a very small number of possible field
values. And you confuse your users (IMHO) by allowing two types of
parameters (readable names and class names) in a single attribute.

If you look at the Torque OM templates where the type of ID generator
is determined ("native", "sequence", "idbroker" and so on), you will
see, that you end up with a huge mess.

Where does Hibernate allow short-cuts / human readable names? The only
place that I can remember is the fact that you can omit the packages
for the class <-> table mappings if you supply a default package with
the mapping itself. That would be no problem (then there would just be
a typo in your example because you've written "classpath" instead of
"ClassPathLocator" (the o.a.c.c.locator could be the default package).

>> I'd very much prefer
>> <properties locatorClass="org.apache.commons.configuration.locator.ClassPathLocator">
>>   <param name="fileName" value="" />
>> </properties>
>> over that. Using attributes locks us into a defined set of fields by the DTD. 

>Err... but we don't have any DTD for the configuration descriptor ;)

We might get one some day. :-)

Hibernate got that right, BTW:

<ResourceParams name="jdbc/quickstart">

  <!-- DBCP database connection settings -->

instead of

<ResourceParams name="jdbc/quickstart" factory="org.apache.commons.dbcp.BasicDataSourceFactory"
url="jdbc:postgresql://localhost/quickstart" />


Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH        +49 9131 50 654 0

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

What is more important to you...
   [ ] Product Security
or [ ] Quality of Sales and Marketing Support
              -- actual question from a Microsoft customer survey

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message