Results 1 to 3 of 3

Thread: Why isnt there a close method on ApplicationContext

  1. #1
    Join Date
    Mar 2005
    Location
    Detroit, MI
    Posts
    7

    Default Why isnt there a close method on ApplicationContext

    Hello there,

    Howdy. I'm wondering why only ConfigurableApplicationContext has close() method but not ApplicationContext interface.

    I'm writing some JMX MBeans to start and stop remote servers and I need to cast the ApplicationContext interface to a GenericApplicationContext which isnt a good thing to do.

    What was the thought behind leaving this method in ApplicationContext interface.

    Any thoughts are greatly appreciated.

    Thanks,
    Venkatesh
    Thanks,
    Venkat

  2. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    Well, ApplicationContext is only meant to be used for accessing application context functionality, not for managing its lifecycle. ConfigurableApplicationContext essentially adds lifecycle support.

    Why do you have to cast to GenericApplicationContext? Casting to ConfigurableApplicationContext should be perfectly sufficient...

    Juergen

  3. #3
    Join Date
    Mar 2005
    Location
    Detroit, MI
    Posts
    7

    Default

    Thank you Juergen for your reply.

    Venkatesh
    Thanks,
    Venkat

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. PerformanceMonitorInterceptor
    By tnist in forum AOP
    Replies: 3
    Last Post: Aug 24th, 2005, 01:39 PM
  5. Replies: 8
    Last Post: Dec 7th, 2004, 06:13 PM

Posting Permissions

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