aspose file tools*
The moose likes Other Application Frameworks and the fly likes Accessing spring beans across different application context files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Accessing spring beans across different application context files" Watch "Accessing spring beans across different application context files" New topic
Author

Accessing spring beans across different application context files

somdatta kale
Greenhorn

Joined: Dec 31, 2008
Posts: 1
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

Joined: Feb 05, 2001
Posts: 17259
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: Accessing spring beans across different application context files