                                        README
                             Running the NFL Provider Example



The NFLProvider.java and NFL_Provider.mof files create a class that implements
the InstanceProvider and MethodProvider interfaces. You can use the NFL 
Provider to create instances and call methods.

Note that the examples here are taken from Solaris platform, that /usr/java
points to jdk1.2 and that WBEM files are installed on "/usr" directory.

To run the NFL Provider:

1. Log in to the root account or change to superuser. For example:

su
password:*****
#

2. Copy the NFLProvider.class and NFLTeam.class files to the /usr/sadm/lib/wbem
directory. For example:

# cp /usr/demo/wbem/provider/nfl/*.class /usr/sadm/lib/wbem

3. Use the MOF Compiler to compile the NFL_Provider.mof file. For example:

# /usr/sadm/bin/mofcomp -c "host" -u root -p "password"
/usr/demo/wbem/provider/nfl/NFL_Provider.mof  


NOTE: If the error message, "NO_CIMOM:CIMOM //localhost/CIMOM2 not detected,"
      is displayed, the CIM Object Manager is not running on your system. 
      Type the following commands to restart the CIM Object Manager, 
      and then type the mofcomp command in Step 3 again:

      /usr/sadm/bin/cimom stop
      /usr/sadm/bin/cimom

4. Start CIM WorkShop. For example:

# /usr/sadm/bin/cimworkshop

5. Search for the NFL_Provider class:

In CIM WorkShop, click Action->Find Class and type EX_NFLProvider.
You can view the instances in this class.


Modifying the NFL Provider Example
----------------------------------

You may want to modify the NFL Provider example.

To edit the NFL Provider:

1. Edit the /usr/demo/wbem/provider/nfl/NFLProvider.java file.

2. Make sure the LD_LIBRARY_PATH environment variable is set to the location
of the shared library files. For example, if the shared library files are
stored in /wbem/provider:

  If you use the C shell, type:

  % setenv LD_LIBRARY_PATH /wbem/provider

  If you use the Borne shell, type:

  % set LD_LIBRARY_PATH /wbem/provider

3. Make sure the CLASSPATH environment variable is set to the directory that
contains the provider class files.

  If you use the C shell, type:

  % setenv CLASSPATH 
.:/usr/sadm/lib/wbem:/usr/sadm/lib/wbem/cimapi.jar:/usr/sadm/lib/xml.jar:/usr/sadm/
lib/wbem/cimworkshop.jar


  If you use the Borne shell, type:

  % set CLASSPATH 
.:/usr/sadm/lib/wbem:/usr/sadm/lib/wbem/cimapi.jar:/usr/sadm/lib/xml.jar:/usr/sadm/
lib/wbem/cimworkshop.jar


4. Compile the /usr/demo/wbem/provider/nfl/NFLProvider.java file. For example:

% javac /usr/demo/wbem/provider/nfl/NFLProvider.java
 
5. Copy the NFLProvider.class and NFLTeam.class to the /usr/sadm/lib/wbem directory. 
For example:

% cp /usr/demo/wbem/provider/nfl/*.class /usr/sadm/lib/wbem

6. Use the MOF Compiler to compile the NFL_Provider.mof file. For example:

% /usr/sadm/bin/mofcomp -c "host" -u root -p "password"
/usr/demo/wbem/provider/nfl/NFL_Provider.mof  


7. Log in as root or change to superuser and stop the CIM Object Manager. For example:

su
password:******
# /usr/sadm/bin/cimom stop

8. Choose one of the following methods to restart the CIM Object Manager:

   Start the CIM Object Manager in normal mode:

   # /usr/sadm/bin/cimom

   Start the CIM Object Manager in debug mode:

   a. Use any text editor to edit the file /usr/sadm/bin/cimom.

   b. Locate the following line:
      ${JAVACMD} $JAVAOPTS $CIMOMSERVER "$@" &

   c. Replace it with the following line:
      ${JAVACMD} $JAVAOPTS $CIMOMSERVER -lDev "$@" &

   d. Start the CIM Object Manager. For example:
      # /usr/sadm/bin/cimom


Related URLs
-------------

- http://www.sun.com/solaris/wbem/download.html (Solaris WBEM Services)
- http://www.dmtf.org/spec/cims.html (DMTF CIM Specification)


