Announcement Announcement Module
Collapse
No announcement yet.
Reloading file system contexts within a web context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reloading file system contexts within a web context

    We've got a fairly standard application-context.xml that imports several classpath sub-contexts.

    Currently our database connections and memcached configurations are in custom XML outside of the WAR. We'd like to move this configuration to Spring, but keep them outside of the WAR for possibly reloading w/o deploying a new WAR and/or bouncing the container. Using the standard <import resource="file:/path/to/memcached.xml"/> doesn't allow for reloading.

    Is this possible? I've been playing around with extending FileSystemXmlApplicationContext with the WebApplicationContext as the parent context but haven't really had any luck. I've exposed the refresh method via JMX, and it reloads the external XML context, but the parent context doesn't have access to the beans in the child. Is there a way to have the child context delegate up to the parent context for everything except refresh()?

    Thanks for any input, direction or ideas.

  • #2
    for database configuration you can use jndi. This is the best thing to do for your case. I Think

    Comment


    • #3
      Originally posted by shadowLaw View Post
      for database configuration you can use jndi. This is the best thing to do for your case. I Think
      Totally agree.

      Comment


      • #4
        If we were using standard javax.sql.DataSources, I'd agree. I guess I could do some sort of wrapper around a DataSource and expose it w/ our custom API...

        Comment

        Working...
        X