1. To start the HSQLDB server, open up a command line, change into your WORKDIR(C:\jee_workplace\test), and run the command: java -classpath lib/hsqldb.jar org.hsqldb.Server
2. gui tool: java -cp lib/hsqldb.jar org.hsqldb.util.DatabaseManager Type: HSQL Database Engine Server jdbc:hsqldb:hsql://localhost (from democal.properties) sa ?? )
3. (You?ll also find some new files in your WORKDIR, starting with test?these are the files used by HSQLDB to store your data. If you want to start with a fresh database, delete the files between restarts of the server.)
4. Exporting the database schema (automatic generation): (prerequisites: domain model classes and mapping-metadata-in-XML or Annotations-in-Java) using an ant task: taskdef name=”hibernatetool” and target name=”schemaexport”.
5. database browser: ant task: target name=”dbmanager”
October 31, 2008
start the HSQLDB server
October 10, 2008
Bedework setup, deploy notes & log
Running the quickStart:
1. open cmd and go: cd C:\java_3rd_party\bedework\quickstart-3.4.1.1
2. ant.bat
3. open database: ant hsqldb (use gui tool: cd C:\java_3rd_party\bedework\quickstart-3.4.1.1\hsqldb-1.7.3.3\lib java -cp hsqldb.jar org.hsqldb.util.DatabaseManager Type: HSQL Database Engine Server jdbc:hsqldb:hsql://localhost:8887 (from democal.properties) sa “” try SELECT * FROM bw_calendars)
4. open a new cmd window, go: cd C:\java_3rd_party\bedework\quickstart-3.4.1.1 and do: ant tomcatstart; wait to see ([java] INFO: Server startup in 22455 ms)
5. open http://localhost:8080/bedework/
Own Deployment:
1. (optional) setting bedework.build.properties under folder: C:\Documents and Settings\xxzhao; if not setting, system will use: democal.properties and democal.options.xml under folder: C:\netbeansWork\my_quickstart-3.4.1.1\bedework\config\configs
2. democal.properties: for deployment use. To decide: which app to install? etc…
3. democal.options.xml: for use in runtime. e.g. <name>bedework</name> <tzid>America/New_York</tzid> <systemid>demobedework@cal.mysite.edu</systemid>
4. stylesheets and associated template images and resources: ?app.<name>.root?, ?app.<name>.cal.suite? in the config file (e.g. C:\netbeansWork\my_quickstart-3.4.1.1\bedework\config\configs\myconfig.properties).
5. modify “personal web client” app(webapps): org.bedework.app.UserCal.tomcat.context.xml=war/META-INF/usercontext.xml; C:\netbeansWork\my_quickstart-3.4.1.1\bedework\projects\webapps\webclient\war\META-INF C:\netbeansWork\my_quickstart-3.4.1.1\bedework\build: for hibernate dialect
6. create a schema: The deploy process created a zip file in the C:\netbeansWork\my_quickstart-3.4.1.1\bedework\dist directory, which can be unwrapped to run the schema build. Run bwrun schema: produces a file ?schema.sql?. Then do: bwrun schema-export: to create all the tables and constraints
7. initialize the database: bwrun initdb -ndebug -indexroot path-for-lucene
8. To dump the database data use bwrun dump <filename> To restore the data use: bwrun restore <filename> -ndebug -indexroot path-for-lucene
9. __newThread__: use this res file: C:\netbeansWork\my_quickstart-3.4.1.1\bedework\dist\dumpres.zip extract it to: C:\netbeansWork\my_quickstart-3.4.1.1\xxz\dumpres
10. stop hsqldb, rename hsqldb-1.7.3.3/demo folder.
11. Restart HSQL, and Hypersonic will create a new, empty demo database: cd C:\netbeansWork\my_quickstart-3.4.1.1\ ant.bat ant hsqldb (use gui tool: cd C:\netbeansWork\my_quickstart-3.4.1.1\hsqldb-1.7.3.3\lib java -cp hsqldb.jar org.hsqldb.util.DatabaseManager Type: HSQL Database Engine Server url: jdbc:hsqldb:hsql://localhost:8887 (from democal.properties) sa “” try SELECT * FROM bw_calendars) as you see, the database is empty, and a new “hsqldb-1.7.3.3/demo” folder is created.
12. to insert data, under dumpres folder: bwrun.bat schema-export so the structure is established, yet no data.
13. Finally, initialize the database with dumpres/data/initbedework.xml: bwrun.bat initdb this takes some time…… Elapsed time: 0:19 (full version: bwrun.bat initdb -ndebug -indexroot path-for-lucene)
14. build: in cd C:\netbeansWork\my_quickstart-3.4.1.1: ant clean.deploy.debug (takes some time: Total time: 2 minutes 53 seconds) (or doing it without debug: ant clean.deploy) This will create a number of WAR files in <bedwork>/dist/ including for example: cal.war, caladmin.war, and ucal.war in C:\netbeansWork\my_quickstart-3.4.1.1 do: ant tomcatstart (INFO: Server startup in 35950 ms) now it’s deployed: goto: http://localhost:8080/bedework
15. continue from here: 30 of 49 of the manual