Announcement Announcement Module
No announcement yet.
Pluggable Spring-based Components Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

    -Mitch Christensen

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


    • #3
      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
        ...also, OSGI supports hot-deployment, which is less important to me. I'm fine with restarting my app to activate a new plugin.


        • #5
          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.