-
1. Re: database empty on restart
pranav Jul 2, 2003 7:07 AM (in response to pmalone)What all .xml files you have in the meta-inf folder for the ejb...? If you have jbosscmp-jdbc.xml file in it, then look into it, and under tag you will find a tag <remove-table>true</remove-table>, make its value as false. If you have a jaws.xml file, in that also change this setting...
May be you don;t have either of these two files...then do the following....
1. Move to your <JBOSS_HOME>/server/<server-type>/conf folder. (here <server-type> means all, default or minimal.
2. Under this folder you will find standardjbosscmp-jdbc.xml and standardjaws.xml files.
3. standardjaws.xml will have entry as following:
<default-entity>
<create-table>true</create-table>
<remove-table>true</remove-table> <tuned-updates>true</tuned-updates>
<read-only>false</read-only>
<time-out>300</time-out>
<row-locking>false</row-locking>
<read-ahead>false</read-ahead>
</default-entity>
make the <remove-table> tag value as false
4. standardjbosscmp-jdbc.xml will have entry as following:
java:/DefaultDS
<datasource-mapping>Hypersonic SQL</datasource-mapping>
<create-table>true</create-table>
<remove-table>true</remove-table> <read-only>false</read-only>
<time-out>300</time-out>
<pk-constraint>true</pk-constraint>
<fk-constraint>false</fk-constraint>
<row-locking>false</row-locking>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
<read-ahead>
on-load
<page-size>1000</page-size>
<eager-load-group>*</eager-load-group>
</read-ahead>
<list-cache-max>1000</list-cache-max>
....
In this one also change the value of <remove-table> to false...
Cheers... -
2. Re: database empty on restart
pmalone Jul 2, 2003 7:16 AM (in response to pmalone)Thanks,
That is it exactly. Actually I am gereating my EJB using xdoclet and the @jboss:remove-table remove="true" tag was indeed my problem. I changed this to "false", redeployed and hey presto it works.
Thanks again for a prompt and accurate response...