Return-Path: Delivered-To: apmail-continuum-dev-archive@www.apache.org Received: (qmail 14458 invoked from network); 19 Nov 2008 04:28:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2008 04:28:44 -0000 Received: (qmail 25871 invoked by uid 500); 19 Nov 2008 04:28:52 -0000 Delivered-To: apmail-continuum-dev-archive@continuum.apache.org Received: (qmail 25828 invoked by uid 500); 19 Nov 2008 04:28:52 -0000 Mailing-List: contact dev-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list dev@continuum.apache.org Received: (qmail 25817 invoked by uid 99); 19 Nov 2008 04:28:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 20:28:52 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [61.9.168.137] (HELO nskntmtas01p.mx.bigpond.com) (61.9.168.137) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2008 04:27:27 +0000 Received: from nskntotgx02p.mx.bigpond.com ([121.218.166.153]) by nskntmtas01p.mx.bigpond.com with ESMTP id <20081119042810.YQAZ18010.nskntmtas01p.mx.bigpond.com@nskntotgx02p.mx.bigpond.com> for ; Wed, 19 Nov 2008 04:28:10 +0000 Received: from [10.0.0.1] (really [121.218.166.153]) by nskntotgx02p.mx.bigpond.com with ESMTP id <20081119042809.JRLF1284.nskntotgx02p.mx.bigpond.com@[10.0.0.1]> for ; Wed, 19 Nov 2008 04:28:09 +0000 Message-Id: From: Brett Porter To: dev@continuum.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: Database compatibility checking step during startup Date: Wed, 19 Nov 2008 15:28:03 +1100 References: X-Mailer: Apple Mail (2.929.2) X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150205.492395D9.00F8,ss=1,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org There's actually a version tracked in the modello metadata database table for this purpose already. The tricky part is how to do the conversion - that seems to need to be done outside of modello because of the complexity of having multiple versions (see what it did to the data management :) I think if you init normally, but don't load any data, then check that table for the right version, you can decide to upgrade it before loading any data. You'll need to lock the store accesses while that occurs. I expect we'd use some other migration tool like has been discussed recently for the task. - Brett On 19/11/2008, at 12:19 AM, Napoleon Esmundo C. Ramirez wrote: > Hello everyone, > > Deng and I talked about putting a database compatibility check. I > filed > CONTINUUM-1980 to track this new feature. In summary, it states that > Continuum should be able to detect when it has been started with an > incompatible database and prompt the user to take the appropriate > action. > This should work transparently if all goes well, and will just display > recommendations in the UI if any problem occurred. > > By intent, the checking should take place before the database > connection is > initialized. But since the database connection happens during the > components' initialization, it is suggested that the JdoFactory for > the > continuum database be removed in the application.xml and is instead > replaced > with a wrapper component that initializes the database connection > explicitly--not on component initialization. This new component can > be used > by a database-checking interceptor in the webapp or it can be > applied to > other modules like the redback users database. > > For now, aside from the new interceptor and component suggested to > be added > to continuum, the impact I can see is that the following will have > to point > to the new component: > - org.apache.maven.continuum.management.StoreUtilities > - org.apache.maven.continuum.management.JdoDataManagementTool > - org.apache.maven.continuum.management.LegacyJdoDataManagementTool > > Currently, they require the the continuum JdoFactory: > /** > * @plexus.requirement role="org.codehaus.plexus.jdo.JdoFactory" > role-hint="continuum" > */ > > But I think these components don't need the JdoFactory right away, > so I > think we can delay the initialization of the database connection > component > to give way to checking during startup. > > > What do you think? Any comments are greatly appreciated. > > Cheers! > Nap -- Brett Porter brett@apache.org http://blogs.exist.com/bporter/