Results 1 to 4 of 4

Thread: Null ApplicationContext subclassing ApplicationObjectSupport

  1. #1
    Join Date
    Sep 2004
    Posts
    15

    Default 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
    Rgds,

    Ultan

  2. #2
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    Are yoiu sure this object is being created inside an ApplicationContext, and not a plain BeanFactory?
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

  3. #3
    Join Date
    Sep 2004
    Posts
    15

    Default

    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)
    Rgds,

    Ultan

  4. #4
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    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...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Replies: 2
    Last Post: Oct 17th, 2005, 08:41 PM
  2. Replies: 2
    Last Post: Oct 13th, 2005, 02:47 PM
  3. Replies: 4
    Last Post: Sep 27th, 2005, 11:31 PM
  4. Replies: 3
    Last Post: May 16th, 2005, 07:04 AM
  5. Strange Data Access Error
    By webifyit in forum Data
    Replies: 2
    Last Post: Dec 28th, 2004, 11:06 AM

Posting Permissions

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