Generates a web site customized for mobile devices.
Project is part of a series on Polyglot programming. Each article in the series describes the process of implementing and enhancing the project application, in a different computer language. This is an implementation of the "book club" project using Java, Spring, Hibernate, Java Persistence API (JPA),H2 Database, Jetty Web Server and Maven/JUnit automated tests.
A corresponding repository will house a Clojurescript client fot the "book club" project.
$> mvn clean install cargo:deploy
Code licensed under [GNU General Public License, version 2] (http://www.gnu.org/licenses/gpl-2.0.html")
Written by Lorin M Klugman
Installation and documentiation for H2 is located here: H2 Database
The H2 console is an interactive gui application. Run:
$ h2> sh bin/h2.sh
You can use the H2 console to restore a corrupted database file, backup, restore or simply view your database contents.
To backup the database schema only:
Run the h2 interactive console
Complete the connect dialog THe H2 console is displayed
Paste or type the following command into the h2 console
Script nodata to 'PATH-TO-SCHEMA-SQL-FILE'
Note: PATH-TO-SCHEMA-SQL-FILE is a new file location, determined by you. E.G. $HOME/backup/book-jpa-db-sql
- Click "Run" The h2 console displays the execution details
To recreate a database instance from the backup schema sql file:
Run the h2 interative console
Complete the connect dialog by entering the new database path location. Note the path must exist, a new file is created.
JDBC URL: jdbc:h2:~/temp/sample
Creates a "sample.mv.db" file in the $HOME/temp directory.
- Now recreate the schema (tables, constraints, etc). The H2 console is displayed. Enter the following command:
RUNSCRIPT from 'PATH-TO-SCHEMA-SQL-FILE'
Simply from the linux command line: $> java -cp h2*.jar org.h2.tools.RunScript -url "jdbc:h2:~PATH-TO-DATABASE-FILE" -script "~PATH-TO-SCHEMAL-SQL-FILE"