Results 1 to 5 of 5

Thread: Pluggable Spring-based Components

  1. #1
    Join Date
    Dec 2005
    Posts
    3

    Default Pluggable Spring-based Components

    I'm building a plugg-able architecture comprised of a runtime 'platform' that provides the majority of services, and a plugin API that supports the addition of plugins post-deployment. I need the plugins to be able to reference beans defined in the 'platform'.

    My plan was to have the 'platform' discover all the Spring config files defined by plugins at startup and build a single ApplicationContext comprised of all the beans defined by all plugins, specifying the ApplicationContext of the 'platform' as its parent.

    Does this make sense? Is there a better/easier way? Does anyone have experience building pluggable architectures using Spring?

    Thanks.
    -Mitch Christensen

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Although I don't think its been released yet, have you looked into Spring OSGI?

  3. #3
    Join Date
    Dec 2005
    Posts
    3

    Default

    I think ultimately this is exactly what I was looking for. I was introduced to OSGI back when I was writing an Eclipse RCP application. It's a very nice framework, but a bit of a heavywieght.

    Unfortunately I've got schedule constraints that force me to work with what I have.

    I guess my question is whether the existance of Spring OSGI implies that what I am trying to do is going to be difficult or impossible?

  4. #4
    Join Date
    Dec 2005
    Posts
    3

    Default

    ...also, OSGI supports hot-deployment, which is less important to me. I'm fine with restarting my app to activate a new plugin.

  5. #5
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    If all you want to do is load lots of context files then thats pretty simple. This thread a couple of days ago talked about the same thing. The other thing with yours is the location being dynamic. Resources do support wildcards though.

    http://forum.springframework.org/showthread.php?t=33648
    http://www.springframework.org/docs/...resource-paths

Posting Permissions

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