You need to carefully follow the instructions in the section "Spring Inside an AAR". In particular, you need to make sure that the axis2-spring-*.jar is _not_ located in WEB-INF/lib, but inside the AAR(s).
Andreas On Mon, Apr 20, 2009 at 18:07, Kris82 <[email protected]> wrote: > > Hi, > > I have been successful in creating AAR with Spring and Hibernate in it with > the help of the Axis2 Spring POJO guide. Now my problem is if i have 2 or > more AAR's with Spring and Hibernate in it deployed in the same axis > container (i.e.; deployed in services folder) only one service works as it > is picking only one application context . Can you tell me how to resolve it > > To be more clear heres an example. I have here 2 aars(xyz and abc) with > spring and hibernate in it. These 2 services are deployed in the services > folder in Axis2 container with no errors. But when i try to test the > services only one service works but not both because the Axis2 container is > maintaining/loading only one applicationContext while startup or may be > overriding the applicationContext(appCtx = new > ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"}, > false)) > > Both the services work if i deploy them in 2 different Axis2 containers. > Hope u understood the problem. Can you please suggest me how to have many > aar files with its one copy of applicationContext availabel to them > > xyz.aar abc.aar > com org > --Simpleservice.class > --ComplexService > --SpringInIt.class > --XSpringInIt.class > com.repository org.repository > --DAO's.class > --DAO's.class > com.resources com.resources > --x.hbm.xml --y.hbm.xml > lib libs > --*.jar(all the jars needed to work) --jars > META-INF META-INF > --MANIFEST.MF --MANIFEST.MF > --services.xml > --services.xml > applicationContext.xml > --applicationContext.xml > > Thanks > Kris > -- > View this message in context: > http://www.nabble.com/How-to-run-Multiple-Spring-with-in-AAR-in-single-Axis-Container-tp23139715p23139715.html > Sent from the Axis - User mailing list archive at Nabble.com. > >
