db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject complete initialisation of database maps
Date Wed, 14 Jun 2006 12:55:24 GMT

Hi,

Greg Monroe has submitted a contribution,
http://issues.apache.org/jira/browse/TORQUE-22 , which adds information to
the database map. It also contains a feature to initialize all Database
maps at once (in contrast to the current lazy initialisation: A table is
added to the database map when its peer class is loaded). The feature works
as follows:
- The user fetches a database map and calls its initialize() method (I
don't rembember if the method name is really initialize....)
- The initialize method asks a generated class in the package
org.apache.torque.linkage to initialize the database map.
- This class extends a generated class in the maps package which adds all
TableMaps to the databaseMap.

If the user does not call the DatabaseMap.initialize() method (which was
also added in the patch), the current lazy initialisation procedure is
used.

I am not too happy with this solution (it's quite complicated, it links the
runtime classes to the generated classes, and it uses reflection for this
linking, which makes the link hard to detect and difficult to debug).
However, I do not know a better solution, so I am content with it. If noone
objects, I am going to commit it. So speak up now or be silent forever.....

     Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message