Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 48928 invoked from network); 11 Oct 2005 22:09:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Oct 2005 22:09:45 -0000 Received: (qmail 38235 invoked by uid 500); 11 Oct 2005 22:09:44 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 38219 invoked by uid 500); 11 Oct 2005 22:09:43 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 38208 invoked by uid 99); 11 Oct 2005 22:09:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 15:09:43 -0700 Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.142.19.5] (HELO b.mail.sonic.net) (64.142.19.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 15:09:46 -0700 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.3/8.13.3) with ESMTP id j9BM9NZn023388 for ; Tue, 11 Oct 2005 15:09:23 -0700 Received: from 216.239.124.38 (SquirrelMail authenticated user reubenf) by webmail.sonic.net with HTTP; Tue, 11 Oct 2005 15:09:22 -0700 (PDT) Message-ID: <11885.216.239.124.38.1129068562.squirrel@webmail.sonic.net> In-Reply-To: <005501c5ceae$573e9e00$0201a8c0@etxea> References: <005501c5ceae$573e9e00$0201a8c0@etxea> Date: Tue, 11 Oct 2005 15:09:22 -0700 (PDT) Subject: Re: datasource form class file From: reubenf@sonic.net To: user-java@ibatis.apache.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N If I understand you correctly, you can do something like this: class Foo extends SqlMapClientDaoSupport { public Foo(DataSource ds) { super.setDataSource(ds); ClassPathResource cpr = new ClassPathResource("com/foo/dao/ibatisSQLMapsConfig.xml"); /* spring class*/ SqlMapClient smc = SqlMapClientBuilder.buildSqlMapClient(new FileReader(cpr.getFile())); super.setSqlMapClient(smc); > Hello i am using ibatis but i must to load the datasource form one class > file. > is this posible? > > i have one classfile that returns one datasource. is posible to use this > file to load the conection and datasource to the data base for ibatis? > thanks