-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreadme.jmpi
136 lines (88 loc) · 4.81 KB
/
readme.jmpi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Java Manageability Programming Interface - JMPI
Author: Adrian Schuur, [email protected] - 30 Apr 2004 -
First installment
This installment of JMPI has been committed to the 2.4 branch.
This installment has been build and tested on Suse 9.0 with Sun's j2sdk 1.4.2_04.
Environment settings
In order to build this support a few environment variables have to used.
The following script has been proven useful for setting up the build and execution environment.
You might need to adjust this to your system layout.
export PEGASUS_HOME=`pwd`
export PEGASUS_PLATFORM=LINUX_IX86_GNU
export PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=1
export PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=1
export PEGASUS_DEBUG=1
export JAVA_SDK=/usr/java/j2sdk1.4.2_04
export JAVA_SDKINC=$JAVA_SDK/include
export LD_LIBRARY_PATH=$PEGASUS_HOME/lib:$JAVA_SDK/jre/lib/i386/server:$JAVA_SDK/jre/lib/i386/native_threads:$JAVA_SDK/jre/lib/i386
export PATH=$JAVA_SDK/bin:$PATH
export CLASSPATH=$PEGASUS_ROOT/src/Pegasus/ProviderManager2/JMPI
export PATH=$PEGASUS_HOME/bin:$PATH
export PEGASUS_ROOT=$PEGASUS_HOME
export LD_ASSUME_KERNEL=2.2.5
cd $PEGASUS_HOME
There is now a new variable to determine which JVM to link with. The choices are as follows:
PEGASUS_JVM sun Sun's jvm (ex: j2sdk1.4.2_07)
PEGASUS_JVM ibm IBM's jvm (ex: IBMJava2-142)
PEGASUS_JVM bea Suse's IBM jvm (ex: BEAJava2-1.4.2)
So, pick one and export that variable to the environment. For example,
export PEGASUS_JVM=sun
NOTE: This is currently listened to for Linux builds.
There are a couple of optional environment variables to determine how the JRE is initialized. These are
as follows (the variable name and what JRE option that it corresponds to):
PEGASUS_JMPI_MAX_HEAP -Xmx
PEGASUS_JMPI_INITIAL_HEAP -Xms
PEGASUS_JMPI_JAVA_THREAD_STACK_SIZE -Xss
So, for example, you would perform the following if you want to change the maximum heap size to 128 megabytes.
export PEGASUS_JMPI_MAX_HEAP=128m
There is a new environment variable that tells the JVM to output more debugging information. The variable name
is called PEGASUS_JMPI_VERBOSE. An example usage is as follows:
export PEGASUS_JMPI_VERBOSE="jni,class"
This will tell the JVM to output debug information on the JNI layer and class loading.
When using this script, place a copy of this script above your PEGASUS_HOME directory.
"cd" to PEGASUS_HOME, and issue ". ../setJPeg". Then do a normal make.
This installment has a number of restrictios:
The provider interfaces follow the SNIA OpenWBEM APIs
Only Instance and Association providers are supported at the moment.
SetProperty and GetProperty CIM operations will crash cimserver
Jar support is not yet implemented - all classes must be accessable via the CLASSPATH variabe.
The Makefiles are not yet Pegasus conforming.
cimmofl must be used for provider registration.
Unloading of idle providers is not supported and Java will increase the memory footprint.
poststarttests
This installment has a set of tests modelled after wetest/static. All tests work properly except
the Property tests. I had to modify "diff" to "diff -w", why that is needed I do not understand.
Building poststarttests:
cd to .../src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests/Load
Issue "make"
This will load a schema to the repository and register the provider.
Running poststarttests:
cd to .../src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests
Issue "find -name "*.rsp" -exec rm {} \;" to clean up *.rsp files
Issue "make poststarttests"
Samples
The provider used for posstarttest,
.../JMPI/org/pegasus/jmpi/test/JMPI_TestPropertyTypes/JMPI_TestPropertyTest.java is a working
example of how to code an JMPI tyle instance provider.
This directors also constains the required Makefile.
.../JMPI/org/pegasus/jmpi/sample contains more samples, one of which is an incomplete CIMClient
sample.
Notice that all provider classes must be accessibe via the CASSPATH environment setting.
Provider Registration
JMPI providers are registered as usual. The Location property in P_ProviderModule has a special format.
The format is: <jar-file-name>:<provider-class-name>
Although jar support is not yet working correctly, this format must be used. You should use cimmofl
for registration untill cimmof is prepared for JMPI.
instance of PG_ProviderModule
{
Name = "JMPI_TestPropertyTypesModule";
Location = "JMPI_TestPropertyTypes.jar:"
"org/pegasus/jmpi/tests/JMPI_TestPropertyTypes/JMPI_TestPropertyTypes";
Vendor = "Pegasus Community";
Version = "2.0.0";
InterfaceType = "JMPI";
InterfaceVersion = "1.0.0";
};
Bug reports
Use normal Pegasus bugzilla procedures to report malfunctions.
Regards, Adrian Schuur.