[ https://issues.apache.org/jira/browse/TUSCANY-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amita Vadhavkar updated TUSCANY-863: ------------------------------------ Attachment: JIRA863-May16-Amita.txt Solved a couple of problems as below: 1) executeQuery() -> executeUpdate() for INSERT 2) executeUpdate() does not allow ", so changed column values in xml with ' 3) when a table has auto generated keys, INSERT statement can not specify values for those columns. And in INSERT without (col1, col2,...), there is no way for DBMS to know column<->data mapping, in these cases(as the values () clause does not specify values for all columns). To take care of this situation, <table> has given one more attribute <column> where user needs to specify comma separated list of columns which will be supplied in INSERT (i.e. some way to provide column<->data mapping). For these changes the below files are changed and test case pass with this. 1) CannedSampleDBConfig.xml, 2) DBConfig.xsd, 3) dbConfig.xml, 4) DBHelper.java, 5) DBDataHelper.java, 6) DBInitializer.java 7) readme.htm > CompanyWeb DAS Sample should create and initialize the canned database when > app is loaded by first time and db is not available > ------------------------------------------------------------------------------------------------------------------------------- > > Key: TUSCANY-863 > URL: https://issues.apache.org/jira/browse/TUSCANY-863 > Project: Tuscany > Issue Type: Improvement > Components: Java DAS Samples > Affects Versions: Java-DAS-Mx > Reporter: Luciano Resende > Assigned To: Luciano Resende > Fix For: Java-DAS-Mx > > Attachments: JIRA-863-Mar-2-Amita.jar, JIRA863-Apr13-Amita.zip, > JIRA863-Apr17-Patch-Amita.zip, JIRA863-dbsetup-patch-Apr23-Amita.txt, > JIRA863-dbsetup-patch-Apr23-Amita.txt, JIRA863-May16-Amita.txt > > > Today we rely on copying the java/das/samples/companyweb/dasttest database to > a tomcat installation, so the canned database is available for DAS sample app > companyweb. A better way for doing this would be to have a servlet (dbInit) > that would load on app startup and create necessary tables and populate it > with canned information if the db is not available. This would make > deployment easier, would avoid external dependencies on the sample > distribution, and would probably make it easier to execute htmlUnit multiple > times, as the htmlUnit could call the servlet to force refresh of the > database data. > For an example on how to do this, please take a look at dbInit servlet in > BigBank sample application : > https://svn.apache.org/repos/asf/incubator/tuscany/java/sampleapps/bigbank/account/src/main/java/bigbank/account/services/accountdb/AccountDBInit.java -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]