Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-2396

DatabaseInitializationGBean to run db scripts on startup

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2
    • 2.1
    • databases
    • Security Level: public (Regular issues)
    • None

    Description

      I put together a gbean that will run an sql script when it starts. It has a "testSQL" so you can make it run only if the testSQL fails so you can e.g. do select * from MyTable where 1=2 to see if MyTable exists.

      This is pretty crude but seems useful: I stuck it in my daytrader plan instead of the gbean that copied a premade derby db out of the car file.

      I put it in connector since it needs a connector interface – ConnectionFactorySource. This seems to me like absolutely the wrong place but I don't see a better place. Anyway I hope we can find a happy home for some improved version of this class.

      Attachments

        1. GERONIMO-2396.patch
          4 kB
          David Jencks

        Activity

          People

            djencks David Jencks
            djencks David Jencks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: