Results 1 to 3 of 3

Thread: Can application context display more than 1 error at once?

  1. #1
    Join Date
    Nov 2004
    Location
    Washington, DC
    Posts
    9

    Default Can application context display more than 1 error at once?

    Is it possible for an applicatioon context that has an invalid configuration to display multiple errors at once rather than only a single error? What I would like to do is, assuming the XML file has a valid format, figure out *each* bean that is invalid and display *all* of those beans.

    If it is not possible, how would you suggest I go about implementing such functionality, and would the Spring team be interested in including this functionality in the Spring core? I can certainly write it and implement it.

    My use case is this:
    - We allow users to define multiple databases, one of which is chosen when the user logs in (kind of like Apache's BugZilla or Rational's ClearQuest). We are building a GUI that allows users to graphically add databases which our app internally stores in a Spring application context. We would like to aggregate all the problems with the databases in the application context at once. This would be useful to detect, for example, if the network was down vs. just a single database is down.

    I was thinking perhaps a new interface would be beneficial. Maybe

    DebuggableApplicationContext extends ConfigurableApplicationContext {
    /** Returns a Map of bean names to exceptions that lists the problems that would be encountered if the application context were to have its refresh() method called */
    Map testBeanDefinitions();
    }

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Interesting idea. Probably best to discuss on the Spring Developer mailing list.

    There are certainly some technical challenges here, as one failure may make it impossible to even attempt to initialize other beans. But it may be possible to continue in some circumstances.

    Rgds
    Rod
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Nov 2004
    Location
    Washington, DC
    Posts
    9

    Default

    Quote Originally Posted by Rod Johnson
    Probably best to discuss on the Spring Developer mailing list.
    Thanks Rod... will post there...

Similar Threads

  1. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  2. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  3. Replies: 6
    Last Post: May 8th, 2005, 11:09 AM
  4. Questioning the core component
    By Martin Kersten in forum Swing
    Replies: 6
    Last Post: Feb 21st, 2005, 03:45 AM
  5. Hierarchical application context in J2EE app
    By cmgharris in forum Container
    Replies: 2
    Last Post: Sep 13th, 2004, 04:13 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
  •