I've downloaded and successfully installed the adminapp web application on Tomcat. I particularly like the fact that adminapp automatically creates the database tables for you when running the application.
I would like to adopt the same thing for my own webapplication, and was looking through the adminapp source code to see how it was done. I notice that the database tables aren't created when the application is first loaded, but waits until the first attempt to save a user or role. I also checked in the catalina.log file and could see that hbm2dll and SchemaExport are being called, but I couldn't find any references to them in the source code.
Can some kind soul point me to the code that checks if the database is created and then creates it? Is there some built in configuration setting that activates this functionality?
Any help greatly appreciated,
Scott
|