                                        README
                        Running the TeacherStudent Provider Example



The TeacherStudent.java and Teacher_Student.mof files create 3 classes that
implement the AssociatorProvider interface by implementing the associators,
associatorNames, references, referenceNames methods.
You can use the TeacherStudent Provider to create an association.

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 TeacherStudent Provider:

Make sure your environment setup includes JDK1.2 and the classpath:

CLASSPATH=.:/usr/sadm/lib/wbem/cimapi.jar:/usr/sadm/lib/xml.jar


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

su
password:*****
#

2. Copy the TeacherStudent.class file to the /usr/sadm/lib/wbem directory. 
For example:

# cp /usr/demo/wbem/provider/tsa/TeacherStudent.class /usr/sadm/lib/wbem

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

# /usr/sadm/bin/mofcomp -c "host" -u root -p "password"
/usr/demo/wbem/provider/tsa/Teacher_Student.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 Ex_Student, Ex_Teacher and Ex_TeacherStudent classes:

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


Modifying the TeacherStudent Provider Example
---------------------------------------------

You may want to modify the TeacherStudent Provider example.

To edit the TeacherStudent Provider:

1. Edit the /usr/demo/wbem/provider/tsa/TeacherStudent.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/tsa/TeacherStudent.java file. For example:

% javac /usr/demo/wbem/provider/tsa/TeacherStudent.java

5. Copy the TeacherStudent.class to the /usr/sadm/lib/wbem directory. 
For example:

% cp /usr/demo/wbem/provider/tsa/TeacherStudent.class /usr/sadm/lib/wbem

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

% /usr/sadm/bin/mofcomp -c "host" -u root -p "password"
/usr/demo/wbem/provider/tsa/Teacher_Student.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)

