Nope, that's correct... the Configuration class is unaware of the methods by which it is created.
We might be able to add a method to to SqlSessionFactory that would allow you to pass in a Configuration instance and a Reader... Please file a Jira ticket for the request and we'll see what we can do in the next feature release. Clinton On Wed, Nov 11, 2009 at 6:40 PM, Jonathan Gold <jgold...@gmail.com> wrote: > I'm new to iBatis, and decided to learn to use iBatis3. > > It seemed from the PDF doc that I should be able to programmatically > configure > everything, but I can't find a way to add mappers specified in an xml file > to a > configuration. That is, what I would like to do is something like the > following: > > Configuration c = new Configuration(); > //... set various c things > > Mapper m = loadMapperFromXml( ".../path/to/mapper.xml" ); > c.addMapper( m ); > > SqlSessionFactory ssf = new SqlSessionFactoryBuilder.build( c ); > > But there doesn't seem to be any way to do that. The best I can come up > with for > the moment is to build an XML doc in memory, serialize it to a byte[] and > wrap > that in a Reader, and then pass that to the > SqlSessionFactoryBuilder.build() > method. > > Am I overlooking things? > > jon > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-java-h...@ibatis.apache.org > >