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

  • Creating multiple datasources?

    I'm confused how to create multiple datasources with Roo ? I know you have persistenceUnit and transactionUnit you could provide when using the persistence command... but I don't see how to create multiple datasource definitions? Do I have to do this manually?

    (Been googling some but not finding much help. Not a big deal to manually take care of but trying to do things "the roo" way.)

  • #2
    I wiped out previous blog entry since is not what you are looking for...
    Last edited by delgad9; Jan 18th, 2012, 07:27 PM. Reason: Clean up


    • #3

      I am using environment property in pom.xml and filter goal to filter persistence.xml, application.xml and to determine which properties file is used.

      But this is switch datasource, not multiple.
      I can suggest you more detail if needed.



      • #4
        I have no problem using properties for settings, I'm just concerned with allowing roo to auto-generate the necessary text in the multiple files without having to manually edit them. In fact, I'd even like an option to provide the datasource id for the initial persistence setup. By default it uses id="datasource" and it creates your properties file datasource.username etc... but it makes more sense since sometimes you have multiple datasources to allow an id name in the command so that it will make it with id="fooBarDatasource" etc.