Announcement Announcement Module
No announcement yet.
Customizing bean definitions from a database Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customizing bean definitions from a database

    I've seen several posts to address bean definition from a database issue, JdbcBeanDefinitionReader, but as I've read in the Jira this issue has been discontinued.

    Our problem is:

    We need to make our application customizable by third party vendors/partners. Today we configure all of our spring beans in several applicationContext.xml files. Our application must support that third party vendors/partners could substitute our beans with his customized beans. Simply changing the xml (for a different implementation) is not an option because if it is customized, we will not have the third party vendors/partners classes as we package the ear or the war file. And if we need to update the client's version with a new one, the customized classes (and xml configurations) will be overwritten.
    At a first look, we thought that the bean configuration could be put in the database (that's why we looked at JdbcBeanDefinitionReader), this would resolve our problem of overwriting the beans configuration xml file. But this would not resolve the overwriting of the class files itself. So we also thought that we could put theses classes, packaged in a jar file, and put this jar file in the database. What we would need, is to configure spring's classloader with a custom classloader (that we already developed and tested), that uses the database (specific table) appended to the classpath.

    Is this a good approach ? If not, is there a better solution for our problem ?
    If it is a good approach, how could we use the JdcbBeanDefinitionReader (or a customized version) and how could we change springs classloader when it creates the beans ?
    Hope to hear back from the community.

    Thanks a lot.



  • #2
    no ideas ? Are we way out of league here ?