I think you posted it to the C# list: [EMAIL PROTECTED] I have a Java project that uses this code:
public class DaoConfig { private static final DaoManager daoManager; static { try { String resource = "com/salientsystems/wdms/dao/dao.xml"; Reader reader = Resources.getResourceAsReader(resource); daoManager = DaoManagerBuilder.buildDaoManager(reader); } catch (Exception e) { throw new RuntimeException("Could not initialize DaoConfig. Cause: " + e); } } public static DaoManager getDaomanager() { return daoManager; } } --- "Bolinger, Gregg D" <[EMAIL PROTECTED]> wrote: > Thanks, but I really don't understand what you are doing here. I > guess I > should have mentioned I am doing this in Java. > > The following code is what I need a single instance of versus having > it > in every DAO. > > String resource = "path/to/SqlMapConfig.xml"; > Reader reader = Resources.getResourceAsReader(resource); > SqlMapClient sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); > > > Gregg > > -----Original Message----- > From: Ron Grabowski [mailto:[EMAIL PROTECTED] > Sent: Monday, January 03, 2005 2:18 PM > To: ibatis-user-cs@incubator.apache.org > Subject: Re: Storing an SqlMapClient > > One of our base classes includes this code: > > public class BaseSqlMapDao : IDao > { > > protected SqlMapper GetLocalSqlMap() > { > return IBatisNet.DataMapper.Mapper.Instance(); > } > > } > > --- "Bolinger, Gregg D" <[EMAIL PROTECTED]> wrote: > > > Can someone suggest the best way to store an SqlMapClient after it > is > > built so that it doesn't have to be done for every request. I am > > using > > iBatis in a wep app. > > > > > > > > Thanks. > > > > > > > > Gregg > > > > > > >