Politecnico di Torino

Software Engineering Group

 
 

Orion J2EE server installation

Download Orion server 1.5.2 from here.

Then install Orion:

1. unzip the file in the UNIK-HOME/PLATFORM/orion folder

2. launch  "java -jar orion.jar"

3. test the welcome page with a browser

4. copy tools.jar from the JDK/lib in the folder orion in order to enable JSP.

5. Create your own server certificate (e.g. using keygen tool in JDK) and call it UNIKkeystore; this must be created using the admin password contained in the principals.xml file, and in the service-console-document.xml file.

6. Now you have to copy some files from the orion-sub folder, in the platform/orion folder:

-  in folder application-deployments copy the SUB folder and the principals.xml file

- in folder applications  copy the SUB folder (it contains the EJB, servlet, JSP)

- in folder config copy the created UNIKkeystore and the secure-web-site.xml file

- in folder database copy the SUB folder

- in folder lib copy the ORBacus libraries (OB.jar,OBNaming.jar, OBUtil.jar) 

- in folder orion copy these files: ejbassembler.config , earassembler.config , nullPIPPO_IOR, service-console-document.xml , Service Console.config

6. Now you have to modify some configuration files in the config folder:

- in application.xml file, after the first web-module, add the path of the classes folder, e.g.:

     <library path="UNIK-HOME/NIPS/Classes" />

in default-web-site.xml file, in the <web-site> tag, insert:

     <web-app application="SUB" name="SUB-web" root="/unik" />

in principals.xml, in the user tag, modify the default password and delete the string  deactivated="true"

in server.xml, delete this line if it is present;

      <principals path="./principals.xml" /> 

then, after the <web-site> tag, add this line for https:

      <web-site path="./secure-web-site.xml" />

add this line before the end of file, to define the path of the deployed application

      <application name="SUB" path="../applications/SUB" />

Then copy the secure-web-site.xml from the downloaded package in the config folder; replace "XXXXXX" with the admin password that you used to create the UNIKKeystore, and then do the same in service-console-document.xml and in orion.xml (in NIPS/Common/Config folder) files.

in data-sources.xml add the following lines:

<data-source

class="com.evermind.sql.DriverManagerDataSource"

name="SUB"

location="jdbc/subCoreDB"

xa-location="jdbc/xa/subXADS"

ejb-location="jdbc/subDB"

connection-driver="org.hsql.jdbcDriver"

username="sa"

password=""

url="jdbc:HypersonicSQL:./database/SUB/subdb"

inactivity-timeout="30"

/>

In order to connect the J2EE server to the SUB CORBA server, follows these steps:

-  in the file ....Orion\applications\SUB\SUB-web\WEB-INF\web.xml

insert the CORBA name service name and port instead of localhost:10000, like this:

<context-param>

<param-name>name-service</param-name>

<param-value>corbaloc:iiop:localhost:10000/NameService</param-value>

</context-param>

- if you modify JSP pages you have to copy the new version in:

   .....\Orion\applications\SUB\SUB-web\WEB-INF\jsp

- if you modify the EJBs name or parameters you have to delete this folder:

      ....\Orion\application-deployments\SUB\SUB-ejb

- and to delete just the content of this folder:

      ...\Orion\database\SUB

- remember that the certificate for the secure web-site is in the file   ....\Orion\config\UNIKkeystore

This file has been created with the keygen tool provided by the JDK. Look at the Java tools documentation to learn how to do it.

- Now look at the file UNIK-HOME\NIPS\Common\Config\mailer.xml

   and set the name of your SMTP server, used by the Phone Logger service.

- then in the file UNIK-HOME\NIPS\Common\Config\orion.xml

   modify the Orion server reference and put the name of the naming server instead of localhost

    <SERVER>ormi://localhost/SUB</SERVER>

remember that user and password must correspond to the ones in the orion configuration files, the same used to generate the UNIKKeystore.


Please note that the file UNIK-HOME\PLATFORM\Orion\applications\SUB\META-INF\application.xml define two modules of the application: 

- EJB are in the folder UNIK-HOME\PLATFORM\Orion\applications\SUB\SUB-ejb

- servlet,JSP are in the folderUNIK-HOME\PLATFORM\Orion\applications\SUB\SUB-web

Moreover, in UNIK\PLATFORM\Orion\applications\SUB\SUB-ejb\META-INF\ejb-jar.xml there is the EJB definition and in UNIK\PLATFORM\Orion\applications\SUB\SUB-web\META-INF\web.xml there are the servlet and JSP definitions.

After you have launched the UNIK servers you can test if the Subscription service is OK, opening your browser at the page:

http://yourserver:portnumber/unik

where yourserver is the name of the server where you have deployed orion and portnumber is the listening port (usually 80); if you want to test the secure web-site, then type:  

https://yourserver:81/unik  

Then look at the configuration of the SUB server to edit service properties.

 

Author: Paolo Falcarin

Last update: 5 August 2002 18:00 CET