(file) Return to readme.jmpi CVS log (file) (dir) Up to [Pegasus] / pegasus

  1 karl  1.7 //%2006////////////////////////////////////////////////////////////////////////
  2           //
  3           // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6           // IBM Corp.; EMC Corporation, The Open Group.
  7           // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9           // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11           // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13           //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // of this software and associated documentation files (the "Software"), to
 16           // deal in the Software without restriction, including without limitation the
 17           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18           // sell copies of the Software, and to permit persons to whom the Software is
 19           // furnished to do so, subject to the following conditions:
 20 mark.hamzy 1.8 //
 21 karl       1.7 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22                // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23                // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24                // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25                // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26                // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27                // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28                // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29                //
 30                //==============================================================================
 31 schuur     1.1 
 32 mark.hamzy 1.9 Java Manageability Programming Interface (JMPI)
 33                -----------------------------------------------
 34 schuur     1.1 
 35 mark.hamzy 1.9 JMPI is a bridge between clients and providers written in Java and the Open
 36                Pegasus project.
 37 schuur     1.1 
 38 mark.hamzy 1.9 More information on JMPI's status can be found at 
 39                   http://www.openpegasus.org/page.tpl?ggid=799
 40 r.kieninger 1.3 
 41 schuur      1.1 
 42                 Environment settings
 43 mark.hamzy  1.9 --------------------
 44 schuur      1.1 
 45 mark.hamzy  1.9 In order to build this support a few environment variables have to used.
 46                 The following script has been proven useful for setting up the build and execution environment.
 47                 You might need to adjust this to your system layout.
 48 schuur      1.1 
 49 mark.hamzy  1.9    an example setJPeg script file:
 50 schuur      1.1    export PEGASUS_HOME=`pwd`
 51 mark.hamzy  1.9    export PEGASUS_ROOT=${PEGASUS_HOME}
 52 schuur      1.1    export PEGASUS_PLATFORM=LINUX_IX86_GNU
 53 mark.hamzy  1.9    export PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=true
 54 mark.hamzy  1.12    export PEGASUS_JVM=sun
 55 mark.hamzy  1.9     export JAVA_SDK=/usr/java/j2sdk1.4.2_08
 56                     export JAVA_SDKINC=${JAVA_SDK}/include
 57 mark.hamzy  1.12    export PEGASUS_JAVA_ARCH=i386
 58                     export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${JAVA_SDK}/jre/lib/${PEGASUS_JAVA_ARCH}/server:${JAVA_SDK}/jre/lib/${PEGASUS_JAVA_ARCH}/native_threads:${JAVA_SDK}/jre/lib/${PEGASUS_JAVA_ARCH}
 59 mark.hamzy  1.9     export PATH=${JAVA_SDK}/bin/:${PEGASUS_HOME}/bin:${PATH}
 60                     export CLASSPATH=${CLASSPATH}:${PEGASUS_HOME}/lib/JMPIImpl.jar
 61                  
 62 mark.hamzy  1.12 Lets walk through the manditory environment variables.  The first tells Pegasus to build the
 63                  Java provider manager.
 64                     export PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=true
 65                  
 66                  The second says which JRE to use.  The choices are as follows:
 67                     export PEGASUS_JVM=gcj     Gnu's jvm (ex: gcj (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30))
 68                     export PEGASUS_JVM=sun	Sun's jvm (ex: j2sdk1.4.2_07)
 69                     export PEGASUS_JVM=ibm	IBM's jvm (ex: IBMJava2-142)
 70                     export PEGASUS_JVM=bea	Suse's IBM jvm (ex: BEAJava2-1.4.2)
 71 mark.hamzy  1.9  So, pick one and export that variable to the environment.  For example,
 72 mark.hamzy  1.12    export PEGASUS_JVM=sun
 73 mark.hamzy  1.11 NOTE: The gcj and sun options were the only tested JVMs.
 74 mark.hamzy  1.12 NOTE: gcj is only supported using gcc version 4.1.1 or later.
 75                  
 76                  The third and fourth say where the JRE libraries and header files are located.  This may or may not
 77                  be necessary depending upon the compiler's default search paths.
 78                  Since we are using Sun's JRE, point to Sun's paths.
 79                     export JAVA_SDK=/usr/java/j2sdk1.4.2_08
 80                     export JAVA_SDKINC=${JAVA_SDK}/include
 81                  
 82                  The fifth variable defines the Java architecture of the JMV
 83                     export PEGASUS_JAVA_ARCH=i386
 84                  
 85                  The sixth may be necessary to tell the linker where to load the JRE libraries.
 86                     export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${JAVA_SDK}/jre/lib/${PEGASUS_JAVA_ARCH}/server:${JAVA_SDK}/jre/lib/${PEGASUS_JAVA_ARCH}/native_threads:${JAVA_SDK}/jre/lib/${PEGASUS_JAVA_ARCH}
 87                  
 88                  The seventh one may be necessary to get the JVM's executable files into the PATH.
 89                     export PATH=${JAVA_SDK}/bin/:${PEGASUS_HOME}/bin:${PATH}
 90                  
 91                  The eight tells the JRE to include JMPI's Java classes.
 92                     export CLASSPATH=${CLASSPATH}:${PEGASUS_HOME}/lib/JMPIImpl.jar
 93 schuur      1.1  
 94 mark.hamzy  1.9  There are a couple of optional environment variables to determine how the JRE is initialized.  These are
 95                  as follows (the variable name and what JRE option that it corresponds to):
 96 mark.hamzy  1.5  
 97 mark.hamzy  1.9  PEGASUS_JMPI_MAX_HEAP               -Xmx
 98                  PEGASUS_JMPI_INITIAL_HEAP           -Xms
 99                  PEGASUS_JMPI_JAVA_THREAD_STACK_SIZE -Xss
100 mark.hamzy  1.4  
101 mark.hamzy  1.9  So, for example, you would perform the following if you want to change the maximum heap size to 128 megabytes.
102 mark.hamzy  1.4  
103 mark.hamzy  1.9  export PEGASUS_JMPI_MAX_HEAP=128m
104 mark.hamzy  1.4  
105 mark.hamzy  1.9  There is a new optional environment variable that tells the JVM to output more debugging information.  The variable name
106                  is called PEGASUS_JMPI_VERBOSE.  An example usage is as follows:
107 mark.hamzy  1.4  
108 mark.hamzy  1.9  export PEGASUS_JMPI_VERBOSE="jni,class"
109 mark.hamzy  1.6  
110 mark.hamzy  1.9  This will tell the JVM to output debug information on the JNI layer and class loading.
111 mark.hamzy  1.6  
112 mark.hamzy  1.9  When using this script, place a copy of this script above your PEGASUS_HOME directory.
113                  "cd" to PEGASUS_HOME, and issue ". ./setJPeg". Then do a normal make.
114 mark.hamzy  1.6  
115 schuur      1.1  
116 mark.hamzy  1.9  Known restrictions
117                  ------------------
118 schuur      1.1  
119 mark.hamzy  1.9  This installment has the following restrictios:
120 schuur      1.1  
121 mark.hamzy  1.8     Unloading of idle providers is not supported and Java will increase the memory footprint.
122 mark.hamzy  1.9     Java 1.5 is not currently supported.
123                  
124                  
125                  Level of coverage
126                  -----------------
127                  
128                  All interfaces to a provider have a sample provider written for them and are part of the
129                  testcases.  All main CIM java classes have testcases written for them as well.
130                  
131                  
132                  Outstanding issues
133                  ------------------
134                  
135                  Java documentation needs to be written for the classes and methods within JMPI.
136                  
137                  
138                  Testing
139                  -------
140                  
141                  This installment has a set of tests located under src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests/
142 schuur      1.1  
143 mark.hamzy  1.9     Static/
144 schuur      1.1  
145 mark.hamzy  1.9        These tests have been modelled after wetest/static.
146                        For the tests, I had to modify "diff" to "diff -w", why that is needed I do not understand.
147 schuur      1.1  
148 mark.hamzy  1.9     Providers/
149 schuur      1.1  
150 mark.hamzy  1.9        These tests implement the many variants of provider interfaces.
151 schuur      1.1  
152 mark.hamzy  1.9     Client/
153 schuur      1.1  
154 mark.hamzy  1.9        These tests test out the client code and various Java classes.
155                  
156                  
157                  Running the tests
158                  -----------------
159                  
160                  Tests are run with the following process.
161                  If the repository has not been built before then issue the following:
162                  
163                     cd to ${PEGASUS_HOME}/src/Pegasus/ProviderManager2/JMPI/
164                     Issue "make repository"
165 schuur      1.1  
166                     This will load a schema to the repository and register the provider.
167                  
168 mark.hamzy  1.9  Next, run the tests.
169 schuur      1.1  
170 mark.hamzy  1.9     cd to ${PEGASUS_HOME}/src/Pegasus/ProviderManager2/JMPI/
171                     Issue "find -name \*.rsp -exec rm {} \;" to clean up *.rsp files from failed tests.
172 schuur      1.1     Issue "make poststarttests"
173                  
174                  
175                  Samples
176 mark.hamzy  1.9  -------
177                  
178                   There are four sample providers located in
179                     ${PEGASUS_HOME}/src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests/Providers/
180                  
181                     Associations/
182                  
183                        This provider implements an association provider.
184                  
185                     Instances/
186                  
187                        This provider implements an instance provider.
188                  
189                     Indications/
190 schuur      1.1  
191 mark.hamzy  1.9        This provider implements an indication provider.
192 schuur      1.1  
193 mark.hamzy  1.9     Properties/
194 schuur      1.1  
195 mark.hamzy  1.9        This provider implements a property provider.
196                  
197                     There is also sample Java code that deals with CIM classes that is located in
198                     ${PEGASUS_HOME}/src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests/Client/
199 schuur      1.1  
200                  
201                  Provider Registration
202 mark.hamzy  1.9  ---------------------
203 schuur      1.1  
204 mark.hamzy  1.9     JMPI providers are registered as usual. The Location property in PG_ProviderModule has a special format.
205 schuur      1.1  	The format is: <jar-file-name>:<provider-class-name>
206                  
207 mark.hamzy  1.8     JMPI providers now fall into two groups.
208                     1) Legacy providers use:
209                        InterfaceType = "JMPI"
210                     and use one of the 3 following based on existing JMPI samples:
211                        InterfaceVersion = "1.0.0";
212                        InterfaceVersion = "2.0.0";
213                        InterfaceVersion = "2.2.0";
214                     Note that there is no difference in behavior in the three versions.
215 mark.hamzy  1.9  
216                     instance of PG_ProviderModule
217                     {
218                        Name             = "JMPIInstanceProviderModule";
219                        Location         = "JMPIInstanceProvider.jar:Instances/JMPIInstanceProvider";
220                        Vendor           = "OpenPegasus";
221                        Version          = "2.0.0";
222                        InterfaceType    = "JMPI";
223                        InterfaceVersion = "1.0.0";
224                     };
225                  
226 mark.hamzy  1.8     2) New style providers use:
227                        InterfaceType = "JMPIExperimental"
228                     and:
229                        InterfaceVersion = "0.0.1";
230                  
231 mark.hamzy  1.9     instance of PG_ProviderModule
232                     {
233                        Name             = "JMPIExpInstanceProviderModule";
234                        Location         = "JMPIExpInstanceProvider.jar:Instances/JMPIExpInstanceProvider";
235                        Vendor           = "OpenPegasus";
236                        Version          = "2.0.0";
237                        InterfaceType    = "JMPIExperimental";
238                        InterfaceVersion = "0.0.1";
239                     };
240                  
241 schuur      1.1  
242                  Bug reports
243 mark.hamzy  1.9  -----------
244 schuur      1.1  
245 r.kieninger 1.3     Use normal Pegasus bugzilla procedures to report malfunctions.

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2