Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 61202 invoked by uid 99); 10 Feb 2005 17:55:41 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp002.mail.ukl.yahoo.com (HELO smtp002.mail.ukl.yahoo.com) (217.12.11.33) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 10 Feb 2005 09:55:40 -0800 Received: from unknown (HELO ?10.0.0.11?) (krisajenkins@81.178.1.69 with login) by smtp002.mail.ukl.yahoo.com with SMTP; 10 Feb 2005 17:55:37 -0000 Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.6]); Thu, 10 Feb 2005 17:55:37 +0000 Message-ID: <420BA019.6000802@yahoo.co.uk> Date: Thu, 10 Feb 2005 17:55:37 +0000 From: Kris Jenkins User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ibatis-user-java@incubator.apache.org Subject: Re: late DS selection References: <420B9CAE.3050601@friendvu.com> In-Reply-To: <420B9CAE.3050601@friendvu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked Oh my God! Have you asked your DBAs to set up a 4th database, which tells you which table is where, when? Or a 5th database, which tells you which database contains the master list of which table is on which database? Or have you tried shooting your DBAs? My first suggestion (outside of bullet therapy) would be, does your database support links to remote objects? For example, if you were using Oracle, you could just work on one database instance and create synonyms to the remote objects. It would be much easier to maintain. Heck, you could even put the responsibility for maintaining the synonyms on your DBAs. That'd show 'em. :-) Iff your db supports it, of course... Kris friendVU admin wrote: > (I can create a static sqlmap factoryinstance to have it select a > datasource before inst, but how to go the other way, have a map select > a static data source?). > > I have a bunch of maps (sql commands). > And a bunch of data source to different dbs. > > I want to select late what data source to use based on a map name. Ideas? > > Idealy I can add an xml element to the statements, ex > and then in the sqlmap helper write > if (sqlmap.getDS(mapName)=="main" ) then { > // execute map with main data source staticly bound > > The thing is that sometimes a table moves from one db to another for > good resons mostly, (it just does, the 3 dba's hate me I am sure of it). > > So... ideas how to hack? As I write this... I could create a xml > properties files of map name/data source... but that is 2 files to > maintain. I guess I will do that.... but if somone can save me, please > do. > Show me some love! > > .V > > > -- Kris Jenkins Email: kris@jenkster.com Blog: http://cafe.jenkster.com/ Wiki: http://wiki.jenkster.com/