Results 1 to 4 of 4

Thread: Reloading file system contexts within a web context

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Default 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. #2
    Join Date
    Nov 2008
    Location
    Tunisia
    Posts
    67

    Default

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

  3. #3
    Join Date
    Apr 2010
    Posts
    2

    Default

    Quote 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.

  4. #4
    Join Date
    Apr 2010
    Posts
    2

    Default

    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...

Posting Permissions

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