ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reub...@sonic.net
Subject Re: datasource form class file
Date Tue, 11 Oct 2005 22:09:22 GMT
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



Mime
View raw message