These tutorials are no longer maintained. Some of these tutorials continue to be maintained for the lecture Advanced Concepts in Software Engineering.
- Make sure Eclipse with JBoss Tools Plug-in is installed properly (tutorial).
- HSQLDB's connection string should include shutdown=true on JBoss AS to ensure the database is closed correctly. This is needed to overcome the limitation of in-process HSQLDBs supporting just one, its creating thread.
- Alternatively (No need to stop JBoss server): Start HSQLDB as a dedicated instance and change JDBC connection strings accordingly.
Creating a Database Connection for In-Process HSQLDB
- Open the "Data Source Explorer" view and create a new Database Connection.
- Choose HSQLDB from the list of Connection Profile Types and provide a name, e.g. Library.
- Next, add a New Driver Definition and specify hsqldb.jar in the JAR List tab.
- Enter the database name and specify the location of the database files, e.g. file:/tmp/jboss/standalone/data/hypersonic/localDB.
Creating a Database Connection for Dedicated HSQLDB
Steps 1-3 also apply when using a dedicated HSQLDB. In step 4 specify the database name and the address/location of HSQLDB, e.g. hsql://localhost/dedicatedDB.
- In-Process HSQLDB only: Stop JBoss to shutdown HSQLDB.
- Right-click on connection and select "Connect".
- Right-click on connection and select "Open SQL Scrapbook".
- Perform queries on HSQLDB.
- In-Process HSQLDB only: Right-click on connection and select "Disconnect", before starting JBoss again.