[ http://issues.apache.org/jira/browse/DAYTRADER-14?page=all ]

Piyush Agarwal updated DAYTRADER-14:
------------------------------------

    Attachment: daytrader-14.patch.1019

Attaching the patch which will allow the creation of Daytrader database tables 
from within Daytrader configuration panels. The patch updates the Configuration 
panel to include a new link "Recreate Daytrader tables and indexes" which will 
automatically detect Derby, Db2 and Oracle databases and use the ddl that I 
have provided for those databases to drop and recreate the database. any other 
unsupported database ddl can be placed under 
<AppDeploypath>/web.war/dbscripts/other/Table.ddl and it will be picked up and 
used. Users will need to stop the Application and restart it after doing this 
step and then use the "Repopulate Daytrader Database" link to populate the 
newly created tables. The Stop and restart is needed to flush the cached ids 
from KeySequenceDirect and KeySequenceBean and prevent DuplicateKeyExceptions 
(refer to Daytrader-14 JIRA comments for more details).

With the implementation of this feature the createDB.sh script provided under 
the modules/derby can be changed to just create the empty database and no 
longer needs to run the modules/derby/src/sql/daytrader.sql to establish the 
tables. The README should be changed to instruct the users to use this new 
feature to establish their daytrader database tables. But I will leave that as 
an open item to be discussed and taken care of later.

> Include sql script in the ear and use a gbean to create tables etc
> ------------------------------------------------------------------
>
>                 Key: DAYTRADER-14
>                 URL: http://issues.apache.org/jira/browse/DAYTRADER-14
>             Project: DayTrader
>          Issue Type: Improvement
>          Components: EJB Tier
>    Affects Versions: 1.2
>            Reporter: David Jencks
>         Attachments: d-j-plan.xml, DAYTRADER-14.patch, daytrader-14.patch.1019
>
>
> You can use the DatabaseIntitializationGBean (GERONIMO-2396) in a g. plan and 
> include the sql script in the ejb module so the database will get created if 
> not already present. This is way better than the previous hack of including a 
> pre-built database in the car file.

-- 
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

        

Reply via email to