Announcement Announcement Module
Collapse
No announcement yet.
Null ApplicationContext subclassing ApplicationObjectSupport Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Null ApplicationContext subclassing ApplicationObjectSupport

    I'm doing somthing wrong here :

    If I subclass ApplicationObjectSupport and then in the subclass to a getApplicationContext() call shouldnt I receive the ApplicationContext object ?

    Doing this I get a null. Do I need to do anything in config to make sure that a constructor other than the default is called, because this is whats happening ?

    TIA

  • #2
    Are yoiu sure this object is being created inside an ApplicationContext, and not a plain BeanFactory?

    Comment


    • #3
      Im being dumb here then - is searchApplicationContext the only application context ? What about the others I define in the context param in the web.xml, or the view.xml I reference from the controller-servlet.xml file ?

      (If I move the bean config from views.xml to searchApplicationContext, I get the app context ref as expected)

      Comment


      • #4
        The context pointed to in web.xml is an ApplicationContext, yes. You'll have to clarify what you mean by searchApplicationContext. views.xml is I believe just a beanfactory, which is why you're getting the behaviour you describe...

        Comment

        Working...
        X