Results 1 to 2 of 2

Thread: Persist Spring Configuration

  1. #1
    Join Date
    Sep 2008
    Posts
    1

    Default Persist Spring Configuration

    Hi, i am writing a simple server atm. For configuration purposes i took springframework. I have exposed some of my beans to my local MBeanServer. It works perfectly, and now it is possible to change server configuration on the fly. The only problem i have, i cant figure out how do i persist the changes i made to beans back in configuration xml...

    Any clue how i can do it?


    tnx a lot.

  2. #2
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    AFAIK spring doesn't offer such built-in facility. Also it would be rather complex to correctly change reference types (different interdependencies defined at container may be broken).

    However, it easy to do the stuff with the primitive or String/Class properties via the following:
    1. Customize spring-managed MBeans exposing in order to subscibe for their JMX notifications (check reference - JMX);
    2. Persist new property value every time MBean attribute is changed (e.g. via Preferences API)
    3. Introduce a separate bean post processor that reads stored properties data and updates bean properties accordingly;

Tags for this Thread

Posting Permissions

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