You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jason Dillon (JIRA)" <de...@geronimo.apache.org> on 2006/09/12 21:48:25 UTC

[jira] Commented: (GERONIMO-2396) DatabaseInitializationGBean to run db scripts on startup

    [ http://issues.apache.org/jira/browse/GERONIMO-2396?page=comments#action_12434245 ] 
            
Jason Dillon commented on GERONIMO-2396:
----------------------------------------

Why not leverage Ant's SQL task to do this?

 * http://ant.apache.org/manual/CoreTasks/sql.html

It is trivial to programatically invoke an Ant task.

> DatabaseInitializationGBean to run db scripts on startup
> --------------------------------------------------------
>
>                 Key: GERONIMO-2396
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2396
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: databases
>    Affects Versions: 1.2
>            Reporter: David Jencks
>         Assigned To: David Jencks
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: GERONIMO-2396.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira