• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Spring ApplicationContext loading no Servlet Context

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using Spring, what is the recommended approach of loading ApplicationContext in a class where Servlet Context isn�t available? We have a service layer and all service objects are created through a BusinessServiceFactory. Temporarily I�m using FileSystemXmlApplicationContext, however I need a file system independent solution. I tried to use XmlWebApplicationContext, however it throws an exception(BeanFactory not initialized - call 'refresh' before accessing beans via the context). I called refresh on XmlWebApplicationContext and it throws another exception (Cannot resolve ServletContextResource without ServletContext). Could you please provide me or point me to some example, I couldn�t find it anywhere.
Thanks,
Luciana
 
reply
    Bookmark Topic Watch Topic
  • New Topic