Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing spring beans across different application context files

 
somdatta kale
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web application having axis2 web service deplyed as an ARR file. The application has an application specific applicationContext file and the web service has a service specific applicationContext file inside ARR file. I want to access spring beans from application spring file into service's spring applicationContext file. I used the <import> tag in service's spring file but not able to access it though.

WEB-INF/classes/myApplicationContext.xml
----
----
WEB-INF/services/myAxisService.arr!myServiceApplicationContext.xml
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So then you are saying that the .arr is in your classpath, and since the App Context xml, is at the root of the .arr file, I would expect, but not positive that just using the classpath: prefix and the xml file name would work. Like

classpath:myServiceApplicationContext.xml

instead of

WEB-INF/services/myAxisService.arr!myServiceApplicationContext.xml

Try it and let us know if it worked.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic