Results 1 to 2 of 2

Thread: ClassLoader.getResources() failed: Alternative parent ApplicationContext loading?

  1. #1
    Join Date
    May 2006
    Posts
    1

    Default ClassLoader.getResources() failed: Alternative parent ApplicationContext loading?

    I'm using Spring configured beans at the business and persistence layer of my app. Now I want to wire that beans together with two web application contexts so that each web application has it's own root context but only one shared (singleton) application context.

    The application is packaged as an EAR. I know that it could configured through the ContextLoaderListener in web.xml - but I'm using the Sun Application Server 7. This appserver does not load the bean configuration files (refBeanFactory.xml, ...) with EJBClassLoader.getResources() because this method is not implemented by the vendor :-( But the Spring PathMatchingResourcePatternResolver class find all resources via the ClassLoader.getResources() method.

    Are there other approaches to get a shared application context without using ClassLoader.getResources()?

    Thanks!

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    You can use JNDI to store application contexts in a 'well known' location; see ContextJndiBeanFactoryLocator.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •