Results 1 to 3 of 3

Thread: Simple Spring Question.

  1. #1
    Join Date
    Sep 2005
    Location
    India
    Posts
    22

    Default Simple Spring Question.

    Hi All,
    I'm newbie to Spring.
    Say, bean xml is loaded and I get application context.
    After this if I want to change the bean definition. Is it possible?
    If yes, how?
    This is particulary required when my bean is "quartz.JobDetailBean" and I need to change the parameters to poll a device dynamically. say interval, repeatCount etc.)

    Any help is appreciated.
    thanks,
    anagha

  2. #2
    Join Date
    Dec 2004
    Location
    Asheville, NC
    Posts
    82

    Default

    Just an idea -- what if you implement your Spring bean as a JMX MBean, which can be modified on the fly? Then you can access your MBean via a JMX Agent (such as in JBoss) and modify the MBean's properties while it is running. I've never done this with Spring, but I imagine that it can be done.

    I hope this helps...


    --James

  3. #3
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default

    Of course, since a spring managed bean is still a bean, you can just change its properties at any time, especially a non-singleton.

    The problem is if this bean is part of "wiring" inside the context, how will dependent beans be updated or refreshed. One can use the method shown here http://forum.springframework.org/showthread.php?t=12401

    Another problem is that any changes to a bean definition's properties are not persisted directly by Spring yet.
    Last edited by robyn; May 14th, 2006 at 10:15 AM.

Similar Threads

  1. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  2. Replies: 3
    Last Post: Sep 29th, 2005, 03:30 PM
  3. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  4. Spring debugging question : IoC
    By etienno in forum Architecture
    Replies: 7
    Last Post: Apr 13th, 2005, 08:26 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 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
  •