From torque-dev-return-6820-apmail-db-torque-dev-archive=db.apache.org@db.apache.org Wed Jun 14 12:55:49 2006 Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 47124 invoked from network); 14 Jun 2006 12:55:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Jun 2006 12:55:49 -0000 Received: (qmail 68309 invoked by uid 500); 14 Jun 2006 12:55:47 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 68266 invoked by uid 500); 14 Jun 2006 12:55:46 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 68230 invoked by uid 99); 14 Jun 2006 12:55:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2006 05:55:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2006 05:55:45 -0700 Received: from [192.168.15.18] (helo=www.seitenbau.net) by router.seitenbau.net with esmtp (Exim 4.43) id 1FqUu4-0006Ah-Jf for torque-dev@db.apache.org; Wed, 14 Jun 2006 14:55:24 +0200 Subject: complete initialisation of database maps To: torque-dev@db.apache.org X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: Thomas Fischer Date: Wed, 14 Jun 2006 14:55:24 +0200 X-MIMETrack: Serialize by Router on www/seitenbau(Release 7.0.1|January 17, 2006) at 14.06.2006 02:55:23 PM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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