| <?php | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); | |
| $App = new App(); | |
| $Nav = new Nav(); | |
| $Menu = new Menu(); | |
| include($App->getProjectCommon()); | |
| # All on the same line to unclutter the user's desktop' | |
| #***************************************************************************** | |
| # | |
| # configandargs.php | |
| # | |
| #**************************************************************************** | |
| # | |
| # Begin: page-specific settings. Change these. | |
| $pageTitle = "OSEE Database Connection Information"; | |
| $pageKeywords = "OSEE, Open, System, Engineering, Environment, Eclipse, Define, ATS, OTE, Application Framework, Install"; | |
| $pageAuthor = "Roberto E. Escobar; Ryan D. Brooks"; | |
| # Paste your HTML content between the EOHTML markers! | |
| $html = <<<EOHTML | |
| <div id="midcolumn"> | |
| <h3>$pageTitle</h3> | |
| <p>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 <b><i>osee.connection.info.uri</i></b> and <b><i>osee.db.connection.id</i></b> jvm arguments on launch. | |
| See <a href="configandargs.php">configuration and arguments</a> for more information. | |
| </p> | |
| <div style="border-width:thin;border:solid;padding:0.2em;width:140%""> | |
| <pre> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <DbConnection> | |
| <DatabaseInfo id="<font color="green">postgresqlInfo</font>"> | |
| <DatabaseHome key="#DBHOME#" value="<b>DATABASE HOME LOCATION</b>" /> | |
| <DatabaseName key="#DBNAME#" value="<b>DATABASE NAME</b>" /> | |
| <DatabaseType key="#TYPE#" value="postgresql" /> | |
| <Prefix key="#PREFIX#" value="jdbc:postgresql" /> | |
| <UserName key="#USERNAME#" value="<b>DATABASE USERNAME</b>" /> | |
| <Password key="#PASSWORD#" value="<b>DATABASE PASSWORD</b>" /> | |
| <Host key="#HOST#" value="@AvailableDbServices.hostAddress" /> | |
| <Port key="#PORT#" value="@AvailableDbServices.port" /> | |
| </DatabaseInfo> | |
| <ConnectionDescription id="<font color="blue">postgresql</font>" > | |
| <Driver>org.postgresql.Driver</Driver> | |
| <Url>#PREFIX#://#HOST#:#PORT#/#DBHOME##DBNAME#</Url> | |
| </ConnectionDescription> | |
| <AvailableDbServices> | |
| <Server id="<b>ANY NAME</b>" dbInfo="<font color="green">postgresqlInfo</font>" | |
| hostAddress="<b>DATABASE IP ADDRESS</b>" port="<b>DATABASE PORT</b>" | |
| connectsWith="<font color="blue">postgresql</font>" isProduction="false" /> | |
| </AvailableDbServices> | |
| </DbConnection> | |
| </pre> | |
| </div> | |
| <p>The sample file above is used to define PostgreSql connections but it can be changed easily to define oracle or derby connections. | |
| </p> | |
| A description of the entries follows: | |
| <ul> | |
| <li><b>Database Info:</b> | |
| <p>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: | |
| <ul> | |
| <li><b>DATABASE HOME LOCATION:</b> not used therefore remove the value field from this attribute</li> | |
| <li><b>DATABASE NAME:</b> OSEE</li> | |
| <li><b>DATABASE USERNAME:</b> osee</li> | |
| <li><b>DATABASE PASSWORD:</b> osee</li> | |
| </ul> | |
| </p> | |
| </li> | |
| <li><b>Connection Description:</b> | |
| <p>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. | |
| </p> | |
| </li> | |
| <li><b>Available Database Services:</b> | |
| <p>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 <b><i>osee.db.connection.id</i></b> argument. | |
| When using a local OSEE PostgreSql install, the attributes on a server entry should be set to the following: | |
| <ul> | |
| <li><b>id:</b> any meaningful name to identify this entry</li> | |
| <li><b>hostAddress:</b> localhost</li> | |
| <li><b>port:</b> 5432 (the default PostgreSql port)</li> | |
| <li><b>isProduction:</b> false unless you want to prevent clients from initializing the database</li> | |
| </ul> | |
| </p> | |
| </li> | |
| </ul> | |
| </div> | |
| EOHTML; | |
| # Generate the web page | |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); | |
| ?> |