Results 1 to 4 of 4

Thread: Remove object from springobjects

  1. #1
    Join Date
    Jun 2006
    Posts
    5

    Default Remove object from springobjects

    Hi,

    Is there a way to remove objects from the context at runtime?
    I only find a way to add objects in the context , but not to remove...

    De Fille
    Last edited by De Fille; 06-12-2006 at 10:00 AM.

  2. #2
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,
    It isn't possible to remove the object. It can get quite involved with the dependencies. What are you trying to do? Maybe there are other approaches that can be used.
    Cheers,
    Mark

  3. #3
    Join Date
    Jun 2006
    Posts
    5

    Default

    Hi,

    I'm building a framework where plugins are activated depending on the received types. These plugings are instantiated using Spring.
    My goal is that types can be added to the framework (add objects to the context) and that they can be removed also.

    Filip

  4. #4
    Join Date
    Sep 2004
    Location
    Belgrade, Serbia
    Posts
    613

    Default

    I just finished a similar framework (not quite the same thing, but quite similar) for a client, and the approach I took is that each plugin has its own context. This means that it can use objects from the root/framework context, but it clearly separates plugins from the framework itself and from the other plugins.

    I'm not sure if the similar approach would work in your specific case, but it might be worth investigating.

    - Aleks

Posting Permissions

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