Oracle Mediator README
Description
The Oracle mediator constitutes the application server of the ICC system, with support from an Oracle database.
Currently, no other database is supported, though the current JDBC (Java DataBase Connectivity) interface should allow an integration with another database with minimal redevelopment effort. Please contact the ICC team for further information.
Requirements
The installation machine must have the Oracle 7.3.4 Client Software installed, including SQL*Net and the JDBC OCI driver, with access to an Oracle 7.3 Server. Additionally, this machine must have a web server installed as well as the Java Runtime Environment (JRE/JDK 1.1.5 or higher). The web server only needs to handle HTTP file transfer, the application server requires no CGI scripts or servlets.
Installation Procedure
The installation of the webtop mediator consist of three parts:
The preparation of the database; the installation of the project web interface; and the installation of the mediator application.
The same database can support more than one project installation. In this case, step 1 can be omitted in subsequent installations. Also, read the note at the end of step 2 in this regard.
Step 1
The necessary SQL statements and code are collected in a single directory:
*.sql SQL package declarations
*_body.sql SQL package bodies
project project initialization template
tables SQL statements for creating the tables
The preparation of the database includes the creation of tables and procedural packages, and the insertion into these tables of a minimum amount of project information.
The application server uses a single database user account to access and manage the project information in the database. For this purpose, create a user and note the username and password.
Using this account, create the database tables specified in the file tables, and the procedural packages declared in the files *.sql and *_body.sql. Start with the partners package, continue with the projects package, then create the other packages in any order.
Step 2
A template for the initialization of the project in the database is provided in the file project. Terms enclosed in angular brackets '<' '>' must be replaced by their appropriate value; all others must be typed exactly as provided. All string values must be quoted.
- create the collective persons others and non-partners 1
insert into person values (1, 'username', 'others');
insert into person values (2, 'username', 'non-partners');
- create a partner account for the administrator 2
insert into person values (3, 'username', <adminusername>);
insert into person values (3, 'fname', <firstname>);
insert into person values (3, 'name', <lastname>);
insert into person_identity values (3, <adminusername>, <password>);
- create a project team for the administrator 3
insert into person values (4, 'username', <adminteamname>);
insert into person values (4, 'project', <projectname>);
insert into person values (4, 'company', <companyname>);
insert into person values (4, 'location', <location>);
insert into person values (4, 'role', <teamrole>);
insert into person_team values (4, 3);
- create the project and assign the administrator as a project partner 4
insert into projects values (1, <projectname>, <title>, 3, '', '', 0, sysdate);
insert into proj_partners values (1, 3, '');
- create a minimal project organization 5
insert into proj_access values (1, 1, 'current', 'support', 'system', 'r');
insert into proj_access values (1, 2, 'current', 'support', 'system', 'r');
insert into proj_access values (1, 3, 'current', 'support', 'system', 'r-w');
- create at least this format document 6
insert into proj_2_file values (1, 1, 'current', 'support', 'system');
insert into files values (1, 'text', 'jpeg', 'JPEG image');
insert into file_type_value values (1, 'mimetype', 'image/jpeg');
insert into file_type_value values (1, 'suffix', 'jpg');
insert into file_category values (1, 'format');
insert into file_meta values (1, sysdate, 'creation', 3);
The following notes are important only when the same database and database user account are used for a second or subsequent installation:
1 This must be omitted.
2 This can be omitted if an existing partner account will be used. Otherwise, the number 3 must be replaced by an unused person identifier, and the adminusername must be a unique person username.
3 A new team must be created, with an unused person identifier and a unique person username. The number 3 in the last line refers to the administrator identifier.
4 A new project must be created, with an unused project identifier and a unique project name. The number 3 in both lines refers to the administrator identifier.
5 The first argument in each line refers to the project identifier; the number 3 in the last line refers to the administrator identifier.
6 A new format document must be created. The first argument in each line must be replaced by a unique document identifier; the second argument in the first line refers to the project identifier, the number 3 in the last line refers to the administrator identifier.
Step 3
The project web interface is installed as a single directory containing all the web support files. Minimally, this directory contains the following files and subdirectories:
classes/ Java archives
files/ file storage directory
html/ HTML support files
if-apl.html HTML file containing the Java interface applet
img/ GIF and JPEG support files
index.html HTML entry point
javascript/ JavaScript support files
middle-*.html HTML layout files
support/ Service delegates support space
This directory must be given the same name as the project and be accessible via HTTP through the local web server.
This directory will from here on be referred to as the web interface directory.
Step 4
All customization of the web interface is done through the specification of applet parameters in the file if-apl.html. The first parameter is required:
<param name=project value=projectname>
The next parameter specifies whether files can be uploaded into the file storage directory (files/). The value local activates the upload facility, any other value (or omitting this parameter) deactivates it:
<param name=upload value=local>
Note: the upload facility is only available to clients running within the same file system.
Step 5
The mediator application is a Java application running on the same machine as the web server and Oracle client software. It consists of the following files and subdirectory:
KeyGen.class key generation application class
OracleMediator.class mediator application class
icc/ Java support classes
keys/ key repository folder
mediator.bat application startup script (Windows)
mediator.sh application startup script (UNIX)
This directory should not be accessible via HTTP.
This directory will from here on be referred to as the mediator application directory.
Step 6
Two additional files in this directory must be generated using the KeyGen application.
For any other software component to be able to access the application server, it must authenticate itself with a digital key. For this purpose, the application server is also characterized with a key pair.
Run jre -cp . KeyGen within the mediator application directory to create two files named private.key and public.key.
Protect your private key by ensuring that only you have access to this file. However, do not move this file as the mediator application relies on it.
Step 7
The application startup script (mediator.sh or mediator.bat) must be modified to reflect your runtime environment. For UNIX, this would look like:
javapath/bin/jre -Dname=projectname
-Dbase=basepath -Dbaseurl="baseurl"
-Dsession_user=username -Dsession_pwd="password"
-Dsession_connect=servicename -cp javapath/lib/classes.zip:jdbcpath/lib/classes111.zip:.
Mediator &
Windows specifies different path and directory separator characters:
javapath\bin\jre -Dname=projectname
-Dbase=basepath -Dbaseurl="baseurl"
-Dsession_user=username -Dsession_pwd="password"
-Dsession_connect=servicename -cp javapath\lib\classes.zip;jdbcpath\lib\classes111.zip;.
Mediator
javapath should point to the JRE/JDK directory, e.g., F:\Progra~1\jdk116 (Windows)
jdbcpath should point to the Oracle JDBC directory, e.g., $ORACLE_HOME/jdbc (UNIX)
basepath should specify the parent directory of the web interface directory, e.g., /home/tanger/oracle/ if /home/tanger/oracle/projectname is the web interface directory.
baseurl should be the URL version of basepath, e.g., http://tanger.ethz.ch:3333/ if http://tanger.ethz.ch:3333/projectname/index.html provides access to the web interface.
username and password should authenticate to the database user account set up in step 1.
servicename should specify an Oracle Network Service.
Step 8
You are ready to start the mediator application. Run the script (or batch file) in the directory, and on the machine, it is installed:
mediator.sh (UNIX)
mediator (Windows)
Step 9
It is time for the project administrator to log onto the project interface (at baseurl/projectname/) and set up the project for the partners. For more information on how to set up the project, see the Project administrator help pages.
Step 10
Prepare the webtop mediator installation kit for distribution to the project partners. This kit has the following components:
classes/ webtop application directory
README installation guide
webtop/ webtop interface directory
The webtop mediator brings the system's functionality closer/faster to the client. It serves as a cache for project information from the database and provides local services.
Copy the project's public key into the webtop application directory and rename it after the project:
classes/projectname.key
Modify the application startup scripts classes/mediator.sh and classes\mediator.bat to reflect on the application server runtime environment. For UNIX, this script looks like:
javapath/bin/jre -Dname=projectname
-Dregister="registrationname" -Dbase=basepath
-Dbaseurl="baseurl" -Dserverhost=serverhost
-Dserverurl="serverurl"
-cp javapath/lib/classes.zip:. Mediator &
Windows specifies different path and directory separator characters:
javapath\bin\jre -Dname=projectname
-Dregister="registrationname" -Dbase=basepath
-Dbaseurl="baseurl" -Dserverhost=serverhost
-Dserverurl="serverurl"
-cp javapath\lib\classes.zip;. Mediator
Replace serverhost to specify the hostname of the mediator installation machine.
Replace serverurl to specify the URL version of the parent directory of the web interface directory, e.g., http://tanger.ethz.ch:3333/ if http://tanger.ethz.ch:3333/projectname/index.html provides access to the web interface.
The parameters registrationname, basepath, baseurl and javapath will be specified during the installation.
Security
For more information on the security aspects related to the mediator, take a look at the security section of the ICC system aspects document.
Customization
An initial customization was provided in step 4 with respect to file upload.
The mediator can also be extended with new services and delegates, programmed in Java. The ICC system development kit provides more information on how to write and install new services and delegates.
Furthermore, you can also customize the look and feel of the web interface. If you're familiar with HTML and JavaScript, you can modify the HTML support files (html/) in the web interface directory. However, if you want to make more than cosmetic changes, you should take a look at the client API in the ICC system development kit, which describes the interface API available from JavaScript.
|