On Thu, 2002-09-26 at 13:54, Pierre van Rooden wrote:
> Eduard Witteveen wrote:
> > Changed that also... can i check this in under the bugfix?
> Seems more like a HACK to me - you are adding a configuration file to 
> read/determine the database based on the driver.
> Sounds good, but please submit this to the list as a Hack, according to 
> the rules, with a clear explanation fo what it does.

CALL FOR:

Abstract
========
Autodetection of the mmbase-database-layer to use. When the property
"<property name="database">hsqldb</property>" is not specified in the
file config/module/mmbaseroot.xml, mmbase will select the
mmbase-database-config to use.
This hack i fully backwards compatible.

Working
=======
When the property cannot be found inside the mmbaseroot.xml, a util
class, called DatabaseLookup, will be used.

This class with get the followin information:
    -Directory containing all the database-implementation-configs
    (config/database/)
    -A java.sql.Connection implementation, which will be queried for
    jdbc and database information.
    -A lookup.xml, which contains filters for
    database-implementation-configs.

The DatabaseLookup will look inside the lookup.xml and when it matches a
filter(when multiple, the first will be used), the configuration
specified in this filter will be returned, and used by MMBase.java

Changes
=======
    -adding a database-lookup.dtd in config/dtd
    -adding a database-lookup.xml in config/database
    -adding a DatabaseLookup.java in org/mmbase/util
    -changing MMBase.java in org/mmbase/module/core

Benefids
========
I would like to see this changed for the following reasons:
    -Plug and Play (when jdbc.xml could be configured also automaticly,
    with something like let's say JNDI Resources, nothing has to be
    changed to run MMBase on a application-server, only need to define
    resources in application-server).
    -Fully backwards compatible
    -Possiblitly to handle specific jdbc/database combinations(when a
    specific combination has known errors)
    -It is known which database/jdbc combinations are used in
    combination with which mmbase-database-implementation.
    
Files
=====
Look in email thread

Remarks
=======
Not completely documented, this will be done if it can be checked-in
For more information, please ask
    
LINKS:

previous email in this thread

START OF CALL: 2002-09-26

END OF CALL:   2002-10-1

[_] +1 (YEA)

[_] +0 (ABSTAIN )

[_] -1 (NAY), because :

[_] VETO, because:

-- 
Eduard Witteveen Systeem Ontwikkelaar
Publieke Omroep,  Gateway C Kamer 101
+31(0)356772910 http://www.omroep.nl/
Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal

Reply via email to