Announcement Announcement Module
Collapse
No announcement yet.
Creating multiple datasources at runtime Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating multiple datasources at runtime

    I am new to the spring framework and so far love it. My application does not know anything about how many datasources will be needed or what the properties of those sources will be until runtime. Right now we are using a homegrown connection pooling mechanism but I would really like to turn this over to spring. My searching has led to solutions on switching the datasources at runtime but I haven't seen anything on their creation/injection into the framework.

    Thanks in advance for any pointers/suggestions on how to accomplish this..

  • #2
    My application does not know anything about how many datasources will be needed or what the properties of those sources will be until runtime.
    Wondered about this situation, could you expand your requirement to understand why you need work in rumtime (if is possible) with many DB?, I mean the bold part above

    Comment


    • #3
      Sure, I'll try to explain the situation I am in.

      My clients each have their own linux server and db2 database. They are able to create/remove/modify facilities as needed. These facilities have their own database schema and the maintenance is done outside of the java system from legacy code running on the db2 server instance. So when someone logs into my server they are presented with a list of facilities they have access to. When they select a facility a new pool of connections for that facility is created. So basically, the database connection details are externally described (and modifiable) in the database itself.

      I hope I have explained the situation clearly.

      Thanks.

      Comment

      Working...
      X