• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Accessing spring beans across different application context files

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic