"Fossies" - the Fresh Open Source Software Archive
Member "opensaf-5.21.09/java/INSTALL" (31 May 2021, 6771 Bytes) of package /linux/misc/opensaf-5.21.09.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard
) with prefixed line numbers.
Alternatively you can here view
the uninterpreted source code file.
1 --- Java AIS API for Opensaf ---
3 1. Introduction
5 The Java AIS API for OpenSAF provides the programming interfaces for Java
6 developers to access the AIS services. Currently provided interfaces are:
7 - AMF - Availability Management Framework version B.01.01.
8 - CLM - Cluster Membership version B.01.01
10 2. Prerequisites
12 Java2SE JDK 1.5 or higher for compilation, JRE for execution
14 JUnit 3.2.8 - junit.jar provided with the package
16 3. Directory structure
18 ais_api - the SA Forum Java AIS interfaces
19 ais_api_impl - implementation of the interfaces
20 ais_api_native - the native binding library between OpenSAF and the Java
22 ais_api_test - tests
24 4. Installation
26 Step 1. Compile and install OpenSAF
27 OpenSAF needs to be configured with the "--enable-java" option.
28 Follow the instructions in the OpenSAF INSTALL file to compile and install it.
29 The artifacts created are the following:
30 - ais_api_impl/bin/opensaf_ais_api.jar - archive containing the compiled
31 AIS Java API and the OpenSAF implementation.
32 - ais_api_impl_native/.libs/libjava_ais_api_native.so.x.x.x - the native binding
34 These files get installed with the distribution (rpm or make install).
36 Step 2. Build the test project
37 Currently the test project is not compiled with the Java interfaces.
38 Go to the ais_api_test directory.
39 Issue "ant build-jar".
40 If the command succeeds, the opensaf_ais_api_test.jar. This file contains the
41 AIS interfaces, the OpenSAF implementation and the test classes.
43 5. Running the tests
45 5.1 Preparation
47 After building the test project jar file, go to the configandscript dir.
48 Execute the following steps:
49 sh gendeploypack.sh
50 sudo sh installjtests.sh
51 The last step is needed to be executed as root because the script copies files to
52 the /opt/aistest by default. If you need a different target directory, the scripts
53 can be parameterized as follows:
55 gendeploypack.sh [install_dir] [deploy_pack_dir]
56 install_dir - the directory where the application is installed. This
57 will be the same on all nodes of the cluster and needs to be an
58 absolute path. Default: /opt/aistest
59 deploy_pack_dir - directory where the current deployment is stored.
60 The install script uses this directory as source. Default: deploy
61 It is IMPORTANT to note that this script cannot be run from any other
64 installjtests.sh [deploy_pack_dir]
65 deploy_pack_dir - the directory where the current deployment is stored.
66 The files from this directory are copied to the installation directory.
68 To distribute the deployment in the cluster, use the <deploy_pack_dir>.tar.gz
69 file that is created by the gendeploypack.sh script.
71 Run the sudo setupcontroller.sh command on the controller node(s) you will use.
72 This sets up the AppConfig for OpenSAF and resets the PSSV to use the XML source.
74 5.2 Running the CLM tests
76 The CLM tests can be run manually.
78 Before running the CLM tests, make sure that OpenSAF is running on the node
79 where you plan to execute them. This can be either payload or controller.
81 The main class for the CLM tests is the org.opensaf.ais.clm.test.AllTests class.
82 This class and all the other test classes are packaged in the
83 opensaf_ais_api_test.jar archive. To ease the execution, there is a utility script
84 in the ais_api_test/configandscripts directory called runClmTests.sh. Use this to
85 execute CLM tests.
87 The main class uses the junit.textui.TestRunner to execute the tests and results
88 are printed to the stdout.
90 Now, Java CLM AIS API supports B.04.01 specifications, fill the required
91 version attribute values in properties file(java/ais_api_test/src/org/
92 opensaf/ais/version.properties) to test the corrosponding version
93 implementation. By default test code tests B.04.01 functionality.
95 Notice: in virtualized environments the timing diffences can cause some of the
96 time constrained tests to fail. These are not a real failures and they occur only
100 5.3 Running the AMF tests
101 The AMF tests cannot be run manually and AMF has to be configured properly
102 for the tests.
104 Provided AMF configuration (ais_api_test/configandscripts/AppConfig.xml.template)
108 | |--amfTestSU1 --> node PL_2_3
109 | | `--amfTestComp
110 | `--amfTestSU2 --> node PL_2_3
111 | `--amfTestComp
118 | |--amfAdditionalTestSU1 --> node PL_2_3
119 | | `--amfAdditionalTestComp
120 | `--amfAdditionalTestSU2 --> node PL_2_4
121 | `--amfAdditionalTestComp
125 amfTestComp = org.opensaf.ais.amf.test.AmfTestComponent
126 This type of component only registers and reacts to callbacks.
128 amfAdditionalTestComp = org.opensaf.ais.amf.test.AmfTestRunner
129 This type of component registers with the AMF, and every time a CSI is
130 assigned to it, it executes the test suite.
132 This configuration may need to be adjusted to your current system.
134 The components will generate output to the <install_dir>/log directory.
136 5.4 Debug mode execution
137 By default the native library is copiled with trace messages turned off.
138 To turn them on, edit the trace.h file and remove the NDEBUG definition.
139 After this compile the library again with the make command and rebuild the
140 deployment configuration (Sec 5.1)
142 6. Using the Java projects with Eclipse
143 Optionally start a new workspace.
144 Create three new Java projects from Ant file.
145 Ant file: ais_api/build.xml
146 Ant file: ais_api_impl/build.xml
147 Ant file: ais_api_test/build.xml
148 Check link to the build file in the system each time in the dialog box.
149 Setup java 1.5 or 1.6 compliance in the project settings for all projects.
150 Setup build path for ais_api_impl: ais_api
151 Setup build path for ais_api_test: ais_api, ais_api_impl
153 7. Creating components
154 User applications need the opensaf_ais_api.jar on the class path and the
155 java_ais_api_native.so.xxx library on the LD_LIBRARY_PATH. Examples for
156 start scripts are the runClmTest.sh and the java_comp_inst.sh.
158 To enable portability, use only functions provided by the Java AIS APIs.