OSEE Database Connection Information

To define a custom database connection for the application server, a path to an xml with the following format is required when launching the application server. This path will need to be specified using the osee.connection.info.uri and osee.db.connection.id jvm arguments on launch. See configuration and arguments for more information.

	<?xml version="1.0" encoding="UTF-8"?>
	<DbConnection>
	
	<DatabaseInfo id="postgresqlInfo">
		<DatabaseHome key="#DBHOME#" value="DATABASE HOME LOCATION" />
		<DatabaseName key="#DBNAME#" value="DATABASE NAME" />
		<DatabaseType key="#TYPE#" value="postgresql" />
		<Prefix key="#PREFIX#" value="jdbc:postgresql" />
		<UserName key="#USERNAME#" value="DATABASE USERNAME" />
		<Password key="#PASSWORD#" value="DATABASE PASSWORD" />
		<Host key="#HOST#" value="@AvailableDbServices.hostAddress" />
		<Port key="#PORT#" value="@AvailableDbServices.port" />
	</DatabaseInfo>

	<ConnectionDescription id="postgresql" >
		<Driver>org.postgresql.Driver</Driver>
		<Url>#PREFIX#://#HOST#:#PORT#/#DBHOME##DBNAME#</Url>		
	</ConnectionDescription>

	<AvailableDbServices>
		<Server id="ANY NAME" dbInfo="postgresqlInfo"
			hostAddress="DATABASE IP ADDRESS" port="DATABASE PORT"
			connectsWith="postgresql" isProduction="false" />
	</AvailableDbServices>
	</DbConnection>
	

The sample file above is used to define PostgreSql connections but it can be changed easily to define oracle or derby connections.

A description of the entries follows:
  • Database Info:

    This entry describes the database to connect to by defining the database name, database home location and user name (or schema) and password to use during connection. When using the OSEE PostgreSql installation instructions, the fields should be set to the following:

    • DATABASE HOME LOCATION: not used therefore remove the value field from this attribute
    • DATABASE NAME: OSEE
    • DATABASE USERNAME: osee
    • DATABASE PASSWORD: osee

  • Connection Description:

    This entry describes how the database connection url should be assembled. At connection time, the fields enclosed in ## are substituted with the information defined in the database info section. There shouldn't be a need to change this unless you want to connect to a database other than PostgreSQL.

  • Available Database Services:

    This section contains entries for each database server and connection option needed at launch time. An entry is referenced at launch time by calling out the entry id in the osee.db.connection.id argument. When using a local OSEE PostgreSql install, the attributes on a server entry should be set to the following:

    • id: any meaningful name to identify this entry
    • hostAddress: localhost
    • port: 5432 (the default PostgreSql port)
    • isProduction: false unless you want to prevent clients from initializing the database