I have done something like this before. I ended up having a spring config bundled in the jar file.
In your webapp/ear that you are including the jar in I configured spring to use multiple config files. have you tried that? On Thu, Jan 8, 2009 at 10:26 PM, Rick <ric...@gmail.com> wrote: > This is really more of a Spring question I guess, but I'll ask here first. > > I want to have all my persistence classes (services and daos) that use > ibatis to be bundled in a standalone jar that my war (or possibly > multiple wars in an ear) can use. I'm using Spring for > mSqlMapClientDaoSupport and all my tests run fine. The architecture is > such that I have a service class that can call one or several daos in > each method. All of these beans are defined in my > application-context.xml. > > In my webapp I'm also using Spring but I having difficulty > understanding how I set up things so that I can I have an isolated > application-context.xml file that loads for my persistence(ibatis) jar > and and another application-context.xml file for my webapp. Right now > I seem to have to delcare all the beans that my persistence jar is > using (services and daos) in my webapp application-xml. Isn't there a > way that I could get the beans defined in my persistence jar > initialized and then somehow used within my webapp classes? I'm > confused how to set this stuff up. Debating about just ditching using > Spring for my persistence jar. >