Juliana: The configuration depends on the context where you run the application. In your case, if you run from your MVC project then you should have your xml files in the MVC, not the persistence library. The same if you run it in a console application, you should have your xml files in the directory of the application, because iBatis open the files per directory inside the context.
A feasible option in which you can have all inside the persistence library is to embed the xml files (embedded resource propertie of each xml file). With this, the xml get compiled in your persistance library. In order to do this, you must code your own Mapper class in which at the moment of configuring himself (InitMapper() method) it load the embedded files: XmlDocument sqlMapConfig = Resourcs.GetEmbeddedResourceAsXmlDocument("Config.sqlMap.config, Your.Library.Assemblie"); Check the following link http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+an+embedded+sqlMap.config+file ------------------ La configuración depende mucho del contexto donde corras la aplicación. En tu caso, si lo corres desde tu proyecto MVC deberías tener los xml en el MVC y no en la librería. Lo mismo si lo corres en consola, debes dejarlos en el directorio de la consola ya que iBatis abre los archivos por directorio, dentro del contexto. Una opción para que puedas tenerlo todo dentro de la librería y te olvides de los archivos, es que todos tus XML tengan la propiedad "embedded resource". Con eso, los xml se compilan dentro de tu librería de persistencia. Para esto, debes crear tu propia clase Mapper, en la cual al momento de configurarse (método InitMapper()) cargue los archivos embedidos: XmlDocument sqlMapConfig = Resourcs.GetEmbeddedResourceAsXmlDocument("Config.sqlMap.config, Your.Library.Assemblie"); Revisa el siguiente link donde explican todo paso a paso: http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+an+embedded+sqlMap.config+file 2009/11/17 Juliana Machado <juliana.machado...@hotmail.com>: > > Hi! > > Sorry my poor english ... > > I have 2 projects: mvc application and another with the persistence database > (library). I need to have the configuration files ibatis (sqlmap, providers, > xmls) also in the application to MVC all work? Because I can run locally > ibatis when put into this project mvc, but not when put in the library. > > Thanks! :) > -- > View this message in context: > http://old.nabble.com/asp.net-mvc-x-library-x-ibatis-tp26389285p26389285.html > Sent from the iBATIS - User - Cs mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-cs-h...@ibatis.apache.org > > -- Juan Pablo Araya 787 76 034 --------------------------------------------------------------------- To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-cs-h...@ibatis.apache.org