Database install

Database files

The AstroGrid Community WebService uses an internal HsqlDB database to store its data.

The location of the database files is configured in a JNDI Resource entry in the server configuration. For details of how to configure this, see Service properties and Database properties.

The WebService needs to have read/write access to the database files. Make sure that the system account that Tomcat runs as can read and write files in this directory.

Database tables

The database tables are created internally the Community WebService.

However, at the moment, this process is not triggerd automatically, and you will need to initiate the process using the install toolkit.

The install toolkit contains an Ant task that calls the WebService and instructs it to create the database tables.

Once the Community WebService has been installed, re-start the Tomcat server, and then use the database.reset Ant task to trigger the creation of the database tables.

ant -f install.xml database.reset

Issuing this command on an existing installation will delete all the data from the database tables.

Database data

Once you have created the database tables, you need to populate the database with the initial data for the Community.

The install toolkit contains test data files for the following communities :

  • Cambridge (ivo://org.astrogrid.test.cam)
  • Leicester (ivo://org.astrogrid.test.le)
  • Edinburgh (ivo://org.astrogrid.test.roe)

The install toolkit contains an Ant task that uses the WebService interface to load the initial community data.

The Ant task uses the community identifier configured in the install.properties to select which data set to load.

# Local community name.
# Change this property to set the service identifier.
org.astrogrid.community.ident=org.astrogrid.test.xyz

The database.load Ant task will upload the test data into the Community service.

ant -f install.xml database.load

You need to have set the service identifier before you install the WebService. The installation process sets the service identifier in a JNDI property, and once this is configured the WebService will not allow you to load data for a different community.