(file) Return to JMPIProviderManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / JMPI

Diff for /pegasus/src/Pegasus/ProviderManager2/JMPI/JMPIProviderManager.cpp between version 1.38 and 1.43

version 1.38, 2005/12/14 21:45:52 version 1.43, 2006/03/08 23:14:30
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 245 
Line 247 
    env->ExceptionClear();    env->ExceptionClear();
 } }
  
   bool JMPIProviderManager::getInterfaceType (ProviderIdContainer pidc,
                                               String&             interfaceType,
                                               String&             interfaceVersion)
   {
   ///CIMInstance ciProvider       = pidc.getProvider ();
      CIMInstance ciProviderModule = pidc.getModule ();
      Uint32      idx;
      bool        fRet             = true;
   
   ///PEGASUS_STD(cout)<<"--- JMPIProviderManager::getInterfaceType: ciProvider       = "<<ciProvider.getPath ().toString ()<<PEGASUS_STD(endl);
   ///PEGASUS_STD(cout)<<"--- JMPIProviderManager::getInterfaceType: ciProviderModule = "<<ciProviderModule.getPath ().toString ()<<PEGASUS_STD(endl);
   
      idx = ciProviderModule.findProperty ("InterfaceType");
   
      if (idx != PEG_NOT_FOUND)
      {
         CIMValue itValue;
   
         itValue = ciProviderModule.getProperty (idx).getValue ();
   
         itValue.get (interfaceType);
   
         DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::getInterfaceType: interfaceType = "<<interfaceType<<PEGASUS_STD(endl));
      }
      else
      {
         fRet = false;
      }
   
      idx = ciProviderModule.findProperty ("InterfaceVersion");
   
      if (idx != PEG_NOT_FOUND)
      {
         CIMValue itValue;
   
         itValue = ciProviderModule.getProperty (idx).getValue ();
   
         itValue.get (interfaceVersion);
   
         DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::getInterfaceType: interfaceVersion = "<<interfaceVersion<<PEGASUS_STD(endl));
      }
      else
      {
         fRet = false;
      }
   
      return fRet;
   }
   
   bool JMPIProviderManager::interfaceIsUsed (JNIEnv  *env,
                                              jobject  jObject,
                                              String   searchInterfaceName)
   {
      jobjectArray jInterfaces       = 0;
      jsize        jInterfacesLength = 0;
      bool         fFound            = false;
   
      if (!jObject)
      {
         return false;
      }
   
      jInterfaces = (jobjectArray)env->CallObjectMethod (env->GetObjectClass (jObject),
                                                         JMPIjvm::jv.ClassGetInterfaces);
   
      if (!jInterfaces)
      {
         return false;
      }
   
      jInterfacesLength = env->GetArrayLength (jInterfaces);
   
      for (jsize i = 0; !fFound && i < jInterfacesLength; i++)
      {
         jobject jInterface = env->GetObjectArrayElement (jInterfaces, i);
   
         if (jInterface)
         {
            jstring jInterfaceName = (jstring)env->CallObjectMethod (jInterface,
                                                                     JMPIjvm::jv.ClassGetName);
   
            if (jInterfaceName)
            {
               const char *pszInterfaceName = env->GetStringUTFChars (jInterfaceName,
                                                                      0);
               String      interfaceName    = pszInterfaceName;
   
               if (String::equal (interfaceName, searchInterfaceName))
               {
                  fFound = true;
               }
   
               env->ReleaseStringUTFChars (jInterfaceName, pszInterfaceName);
            }
         }
      }
   
      return fFound;
   }
   
 JMPIProviderManager::IndProvTab    JMPIProviderManager::provTab; JMPIProviderManager::IndProvTab    JMPIProviderManager::provTab;
 JMPIProviderManager::IndSelectTab  JMPIProviderManager::selxTab; JMPIProviderManager::IndSelectTab  JMPIProviderManager::selxTab;
 JMPIProviderManager::ProvRegistrar JMPIProviderManager::provReg; JMPIProviderManager::ProvRegistrar JMPIProviderManager::provReg;
Line 426 
Line 528 
     PEGASUS_ASSERT(response != 0); \     PEGASUS_ASSERT(response != 0); \
     response->setKey(request->getKey()); \     response->setKey(request->getKey()); \
     response->setHttpMethod(request->getHttpMethod()); \     response->setHttpMethod(request->getHttpMethod()); \
     type1##ResponseHandler handler(request, response);      type1##ResponseHandler handler(request, response, _responseChunkCallback);
  
 #define VOIDINTRO ); #define VOIDINTRO );
 #define NOVOIDINTRO(type) ,type); #define NOVOIDINTRO(type) ,type);
Line 488 
Line 590 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMINSTANCEPROVIDER,
        METHOD_PEGASUS_25,         METHOD_INSTANCEPROVIDER,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER2, // same as METHOD_CIMINSTANCEPROVIDER2
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 519 
Line 621 
                                    name.getLogicalName());                                    name.getLogicalName());
         OperationContext context;         OperationContext context;
  
           context.insert(request->operationContext.get(IdentityContainer::NAME));
           context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
           context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
   
         // forward request         // forward request
         JMPIProvider &pr=ph.GetProvider();         JMPIProvider &pr=ph.GetProvider();
  
Line 548 
Line 654 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
         /* Fix for 4238 */          getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
         // public abstract org.pegasus.jmpi.CIMInstance getInstance (org.pegasus.jmpi.CIMObjectPath cop,                            interfaceType,
         //                                                           org.pegasus.jmpi.CIMClass      cimClass,                            interfaceVersion);
         //                                                           boolean                        includeQualifiers,  
         //                                                           boolean                        includeClassOrigin,  
         //                                                           String                         propertyList[])  
         //        throws org.pegasus.jmpi.CIMException  
         id = env->GetMethodID((jclass)pr.jProviderClass,  
                               "getInstance",  
                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;ZZ[Ljava/lang/String;)Lorg/pegasus/jmpi/CIMInstance;");  
   
         if (id != NULL)  
         {  
             eMethodFound = METHOD_PEGASUS_25;  
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: found METHOD_PEGASUS_25."<<PEGASUS_STD(endl));  
         }  
         /* Fix for 4238 */  
  
         if (id == NULL)          if (interfaceType == "JMPI")
         {         {
             env->ExceptionClear();             // public org.pegasus.jmpi.CIMInstance getInstance (org.pegasus.jmpi.CIMObjectPath cop,
   
             // public abstract org.pegasus.jmpi.CIMInstance getInstance (org.pegasus.jmpi.CIMObjectPath cop,  
             //                                                           org.pegasus.jmpi.CIMClass      cimClass,             //                                                           org.pegasus.jmpi.CIMClass      cimClass,
             //                                                           boolean                        localOnly)             //                                                           boolean                        localOnly)
             //        throws org.pegasus.jmpi.CIMException             //        throws org.pegasus.jmpi.CIMException
Line 581 
Line 673 
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_INSTANCEPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
             }  
         }         }
  
         if (id == NULL)         if (id == NULL)
Line 603 
Line 694 
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: found METHOD_CIMINSTANCEPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              /* Fix for 4238 */
              // public org.pegasus.jmpi.CIMInstance getInstance (org.pegasus.jmpi.OperationContext oc
              //                                                  org.pegasus.jmpi.CIMObjectPath    cop,
              //                                                  org.pegasus.jmpi.CIMClass         cimClass,
              //                                                  boolean                           includeQualifiers,
              //                                                  boolean                           includeClassOrigin,
              //                                                  String                            propertyList[])
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "getInstance",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;ZZ[Ljava/lang/String;)Lorg/pegasus/jmpi/CIMInstance;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
              }
              /* Fix for 4238 */
             }             }
   
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_CIMINSTANCEPROVIDER:
         {         {
             jint    jopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jopRef);             jobject jop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->instanceName.getClassName()<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->instanceName.getClassName(),                                                       request->instanceName.getClassName(),
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->instanceName.getClassName()<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 663 
Line 804 
         }         }
  
         /* Fix for 4238 */         /* Fix for 4238 */
         case METHOD_PEGASUS_25:          case METHOD_INSTANCEPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jopRef);             jobject jop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->instanceName.getClassName()<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->instanceName.getClassName(),                                                       request->instanceName.getClassName(),
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->instanceName.getClassName()<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstanceRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 689 
Line 848 
             jobjectArray jPropertyList = getList(jv,env,request->propertyList);             jobjectArray jPropertyList = getList(jv,env,request->propertyList);
             jobject      jciRet        = env->CallObjectMethod((jobject)pr.jProvider,             jobject      jciRet        = env->CallObjectMethod((jobject)pr.jProvider,
                                                                id,                                                                id,
                                                                  joc,
                                                                jop,                                                                jop,
                                                                jcimClass,                                                                jcimClass,
                                                                JMPI_INCLUDE_QUALIFIERS,                                                                JMPI_INCLUDE_QUALIFIERS,
Line 699 
Line 859 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
  
             if (jciRet) {             if (jciRet) {
Line 712 
Line 879 
         }         }
         /* Fix for 4238 */         /* Fix for 4238 */
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_INSTANCEPROVIDER:
         {         {
             jint    jopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jopRef);             jobject jop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->instanceName.getClassName()<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->instanceName.getClassName(),                                                       request->instanceName.getClassName(),
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->instanceName.getClassName()<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 784 
Line 966 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMINSTANCEPROVIDER,
        METHOD_PEGASUS_25,         METHOD_CIMINSTANCEPROVIDER2,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER,
          METHOD_INSTANCEPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 810 
Line 993 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(),                                                                           name.getLogicalName(),
                String::EMPTY);                String::EMPTY);
  
         // convert arguments         // convert arguments
Line 848 
Line 1031 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
         /* Fix for 4189 */          getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
         // public java.util.Vector enumerateInstances (org.pegasus.jmpi.CIMObjectPath cop,                            interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
              // public abstract java.util.Vector enumInstances (org.pegasus.jmpi.CIMObjectPath cop,
              //                                                 boolean                        deep,
         //                                             org.pegasus.jmpi.CIMClass      cimClass,         //                                             org.pegasus.jmpi.CIMClass      cimClass,
         //                                             boolean                        includeQualifiers,             //                                                 boolean                        localOnly)
         //                                             boolean                        includeClassOrigin,  
         //                                             java.lang.String[]             propertyList)  
         //         throws org.pegasus.jmpi.CIMException         //         throws org.pegasus.jmpi.CIMException
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
                               "enumerateInstances",                                   "enumInstances",
                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;ZZ[Ljava/lang/String;)Ljava/util/Vector;");                                   "(Lorg/pegasus/jmpi/CIMObjectPath;ZLorg/pegasus/jmpi/CIMClass;Z)Ljava/util/Vector;");
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_PEGASUS_25;                 eMethodFound = METHOD_INSTANCEPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_PEGASUS_25."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
         }         }
         /* Fix for 4189 */  
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public abstract java.util.Vector enumInstances (org.pegasus.jmpi.CIMObjectPath cop,                 // public org.pegasus.jmpi.CIMInstance[] enumInstances (org.pegasus.jmpi.CIMObjectPath cop,
             //                                                 boolean                        deep,                 //                                                      boolean                        localOnly,
             //                                                 org.pegasus.jmpi.CIMClass      cimClass,                 //                                                      boolean                        includeQualifiers,
             //                                                 boolean                        localOnly)                 //                                                      boolean                        includeClassOrigin,
                  //                                                      java.lang.String[]             propertyList,
                  //                                                      org.pegasus.jmpi.CIMClass      cimClass)
             //        throws org.pegasus.jmpi.CIMException             //        throws org.pegasus.jmpi.CIMException
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "enumInstances",                                   "enumInstances",
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;ZLorg/pegasus/jmpi/CIMClass;Z)Ljava/util/Vector;");                                       "(Lorg/pegasus/jmpi/CIMObjectPath;ZZZ[Ljava/lang/String;Lorg/pegasus/jmpi/CIMClass;)[Lorg/pegasus/jmpi/CIMInstance;");
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_SNIA_PROVIDER20;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_CIMINSTANCEPROVIDER."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
           else if (interfaceType == "JMPIExperimental")
           {
              /* Fix for 4189 */
              // public abstract java.util.Vector enumerateInstances (org.pegasus.jmpi.OperationContext oc
              //                                                      org.pegasus.jmpi.CIMObjectPath    cop,
              //                                                      org.pegasus.jmpi.CIMClass         cimClass,
              //                                                      boolean                           includeQualifiers,
              //                                                      boolean                           includeClassOrigin,
              //                                                      java.lang.String[]                propertyList)
              //         throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "enumerateInstances",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;ZZ[Ljava/lang/String;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
              }
              /* Fix for 4189 */
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public org.pegasus.jmpi.CIMInstance[] enumInstances (org.pegasus.jmpi.CIMObjectPath cop,                 // public abstract org.pegasus.jmpi.CIMInstance[] enumerateInstances (org.pegasus.jmpi.OperationContext oc
             //                                                      boolean                        localOnly,                 //                                                                    org.pegasus.jmpi.CIMObjectPath    cop,
                  //                                                                    org.pegasus.jmpi.CIMClass         cimClass,
             //                                                      boolean                        includeQualifiers,             //                                                      boolean                        includeQualifiers,
             //                                                      boolean                        includeClassOrigin,             //                                                      boolean                        includeClassOrigin,
             //                                                      java.lang.String[]             propertyList,                 //                                                                    java.lang.String[]                propertyList)
             //                                                      org.pegasus.jmpi.CIMClass      cimClass)  
             //         throws org.pegasus.jmpi.CIMException             //         throws org.pegasus.jmpi.CIMException
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "enumInstances",                                   "enumInstances",
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;ZZZ[Ljava/lang/String;Lorg/pegasus/jmpi/CIMClass;)[Lorg/pegasus/jmpi/CIMInstance;");                                       "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;");
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER2;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: found METHOD_CIMINSTANCEPROVIDER2."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
  
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
           }
   
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_CIMINSTANCEPROVIDER:
         {         {
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 963 
Line 1203 
                     CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                     CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
  
                     /* Fix for 4237 */                     /* Fix for 4237 */
                     CIMClass             cls = pr._cimom_handle->getClass(context,                      CIMClass cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                                           request->nameSpace,                                                                           request->nameSpace,
                                                                           ciRet->getClassName(),                                                                           ciRet->getClassName(),
                                                                           false,                                                                           false,
                                                                           true,                                                                           true,
                                                                           true,                                                                           true,
                                                                           CIMPropertyList());                                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op  = ciRet->getPath();                     const CIMObjectPath& op  = ciRet->getPath();
                     CIMObjectPath        iop = ciRet->buildPath(cls);                     CIMObjectPath        iop = ciRet->buildPath(cls);
  
Line 982 
Line 1237 
             break;             break;
         }         }
  
         /* Fix for 4189 */          case METHOD_CIMINSTANCEPROVIDER2:
         case METHOD_PEGASUS_25:  
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 1007 
Line 1279 
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             jobjectArray jPropertyList = getList(jv,env,request->propertyList);             jobjectArray jPropertyList = getList(jv,env,request->propertyList);
             jobject      jVec          = env->CallObjectMethod((jobject)pr.jProvider,              jobjectArray jAr           = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                id,                                                                id,
                                                                                joc,
                                                                jcop,                                                                jcop,
                                                                jcc,                                                                jcc,
                                                                JMPI_INCLUDE_QUALIFIERS,                                                                JMPI_INCLUDE_QUALIFIERS,
Line 1019 
Line 1292 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {              if (jAr) {
                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                  for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jobject jciRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);                      jobject jciRet = env->GetObjectArrayElement(jAr,i);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
Line 1032 
Line 1312 
                     CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                     CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
  
                     /* Fix for 4237 */                     /* Fix for 4237 */
                     CIMClass             cls = pr._cimom_handle->getClass(context,                      CIMClass cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                                           request->nameSpace,                                                                           request->nameSpace,
                                                                           ciRet->getClassName(),                                                                           ciRet->getClassName(),
                                                                           false,                                                                           false,
                                                                           true,                                                                           true,
                                                                           true,                                                                           true,
                                                                           CIMPropertyList());                                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op  = ciRet->getPath();                     const CIMObjectPath& op  = ciRet->getPath();
                     CIMObjectPath        iop = ciRet->buildPath(cls);                     CIMObjectPath        iop = ciRet->buildPath(cls);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     iop.setNameSpace(op.getNameSpace());  
   
                     ciRet->setPath(iop);  
                     /* Fix for 4237*/  
   
                     handler.deliver(*ciRet);                     handler.deliver(*ciRet);
                 }                 }
             }             }
             handler.complete();             handler.complete();
             break;             break;
         }         }
         /* Fix for 4189 */  
  
         case METHOD_SNIA_PROVIDER20:          /* Fix for 4189 */
           case METHOD_INSTANCEPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass (context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 1080 
Line 1388 
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             // Modified for Bugzilla# 3679              jobjectArray jPropertyList = getList(jv,env,request->propertyList);
             jobject jVec = env->CallObjectMethod((jobject)pr.jProvider,             jobject jVec = env->CallObjectMethod((jobject)pr.jProvider,
                                                  id,                                                  id,
                                                                  joc,
                                                  jcop,                                                  jcop,
                                                  request->deepInheritance,  
                                                  jcc,                                                  jcc,
                                                  JMPI_LOCALONLY);                                                                 JMPI_INCLUDE_QUALIFIERS,
                                                                  request->includeClassOrigin,
                                                                  jPropertyList);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jciRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);
   
                       JMPIjvm::checkException(env);
   
                       jint         jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
                       CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
   
                       /* Fix for 4237 */
                       CIMClass             cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                           request->nameSpace,
                                                           ciRet->getClassName(),
                                                           false,
                                                           true,
                                                           true,
                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                       const CIMObjectPath& op  = ciRet->getPath();
                       CIMObjectPath        iop = ciRet->buildPath(cls);
   
                       JMPIjvm::checkException(env);
   
                       iop.setNameSpace(op.getNameSpace());
   
                       ciRet->setPath(iop);
                       /* Fix for 4237*/
   
                       handler.deliver(*ciRet);
                   }
               }
               handler.complete();
               break;
           }
           /* Fix for 4189 */
   
           case METHOD_INSTANCEPROVIDER:
           {
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                   request->nameSpace,
                                                   request->className,
                                                   false,
                                                   true,
                                                   true,
                                                   CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
               CIMClass *pcls = new CIMClass (cls);
   
               JMPIjvm::checkException(env);
   
               jint    jccRef = DEBUG_ConvertCToJava (CIMClass*, jint, pcls);
               jobject jcc    = env->NewObject(jv->CIMClassClassRef,jv->CIMClassNewI,jccRef);
   
               JMPIjvm::checkException(env);
   
               // Modified for Bugzilla# 3679
               jobject jVec = env->CallObjectMethod((jobject)pr.jProvider,
                                                    id,
                                                    jcop,
                                                    request->deepInheritance,
                                                    jcc,
                                                    JMPI_LOCALONLY);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
Line 1105 
Line 1525 
                     CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                     CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
  
                     /* Fix for 4237 */                     /* Fix for 4237 */
                     CIMClass             cls = pr._cimom_handle->getClass(context,                      CIMClass cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                                           request->nameSpace,                                                                           request->nameSpace,
                                                                           ciRet->getClassName(),                                                                           ciRet->getClassName(),
                                                                           false,                                                                           false,
                                                                           true,                                                                           true,
                                                                           true,                                                                           true,
                                                                           CIMPropertyList());                                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op  = ciRet->getPath();                     const CIMObjectPath& op  = ciRet->getPath();
                     CIMObjectPath        iop = ciRet->buildPath(cls);                     CIMObjectPath        iop = ciRet->buildPath(cls);
  
Line 1155 
Line 1590 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMINSTANCEPROVIDER,
        METHOD_PEGASUS_25,         METHOD_CIMINSTANCEPROVIDER2,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER,
          METHOD_INSTANCEPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 1181 
Line 1617 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName());                                                                           name.getLogicalName());
  
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
Line 1217 
Line 1653 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
           if (interfaceType == "JMPI")
           {
         // public abstract java.util.Vector enumInstances (org.pegasus.jmpi.CIMObjectPath cop,         // public abstract java.util.Vector enumInstances (org.pegasus.jmpi.CIMObjectPath cop,
         //                                                 boolean                        deep,         //                                                 boolean                        deep,
         //                                                 org.pegasus.jmpi.CIMClass      cimClass)         //                                                 org.pegasus.jmpi.CIMClass      cimClass)
Line 1228 
Line 1672 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_INSTANCEPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public org.pegasus.jmpi.CIMObjectPath[] enumerateInstanceNames (org.pegasus.jmpi.CIMObjectPath cop,                 // public org.pegasus.jmpi.CIMObjectPath[] enumerateInstanceNames (org.pegasus.jmpi.CIMObjectPath op,
             //                                                                 org.pegasus.jmpi.CIMClass      cimClass)                 //                                                                 org.pegasus.jmpi.CIMClass      cc)
             //         throws org.pegasus.jmpi.CIMException             //         throws org.pegasus.jmpi.CIMException
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "enumerateInstanceNames",                                   "enumerateInstanceNames",
Line 1245 
Line 1689 
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_CIMINSTANCEPROVIDER."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract java.util.Vector enumerateInstanceNames (org.pegasus.jmpi.OperationContext oc
              //                                                          org.pegasus.jmpi.CIMObjectPath    cop,
              //                                                          org.pegasus.jmpi.CIMClass         cimClass)
              //         throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "enumerateInstanceNames",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
              }
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public java.util.Vector enumerateInstanceNames (org.pegasus.jmpi.CIMObjectPath cop,                 // public abstract org.pegasus.jmpi.CIMObjectPath[] enumerateInstanceNames (org.pegasus.jmpi.OperationContext oc
                  //                                                                          org.pegasus.jmpi.CIMObjectPath    cop,
             //                                                 org.pegasus.jmpi.CIMClass      cimClass)             //                                                 org.pegasus.jmpi.CIMClass      cimClass)
             //         throws org.pegasus.jmpi.CIMException             //         throws org.pegasus.jmpi.CIMException
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "enumerateInstanceNames",                                   "enumerateInstanceNames",
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;)Ljava/util/Vector;");                                       "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;)[Lorg/pegasus/jmpi/CIMObjectPath;");
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_25;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER2;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_PEGASUS_25."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: found METHOD_CIMINSTANCEPROVIDER2."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
            DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: No method found!"<<PEGASUS_STD(endl));            DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_CIMINSTANCEPROVIDER:
           {
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                   request->nameSpace,
                                                   request->className,
                                                   false,
                                                   true,
                                                   true,
                                                   CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
               CIMClass *pcls = new CIMClass (cls);
   
               JMPIjvm::checkException(env);
   
               jint    jcimClassRef = DEBUG_ConvertCToJava (CIMClass*, jint, pcls);
               jobject jcimClass    = env->NewObject(jv->CIMClassClassRef,jv->CIMClassNewI,jcimClassRef);
   
               JMPIjvm::checkException(env);
   
               jobjectArray jAr = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                      id,
                                                                      jcop,
                                                                      jcimClass);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jAr) {
                   for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jcopRet = env->GetObjectArrayElement(jAr,i);
   
                       JMPIjvm::checkException(env);
   
                       jint           jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
                       CIMObjectPath *copRet     = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRetRef);
   
                       JMPIjvm::checkException(env);
   
                       handler.deliver(*copRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_CIMINSTANCEPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 1302 
Line 1858 
  
             jobjectArray jAr = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jAr = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                    id,                                                                    id,
                                                                      joc,
                                                                    jcop,                                                                    jcop,
                                                                    jcimClass);                                                                    jcimClass);
  
Line 1309 
Line 1866 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jAr) {             if (jAr) {
                 for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {                 for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {
Line 1330 
Line 1894 
             break;             break;
         }         }
  
         case METHOD_PEGASUS_25:          case METHOD_INSTANCEPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 1355 
Line 1937 
  
             jobject jVec = env->CallObjectMethod((jobject)pr.jProvider,             jobject jVec = env->CallObjectMethod((jobject)pr.jProvider,
                                                  id,                                                  id,
                                                    joc,
                                                  jcop,                                                  jcop,
                                                  jcimClass);                                                  jcimClass);
  
Line 1362 
Line 1945 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
Line 1383 
Line 1973 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_INSTANCEPROVIDER:
         {         {
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 1463 
Line 2068 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER, // same as METHOD_CIMINSTANCEPROVIDER
          METHOD_INSTANCEPROVIDER2 // same as METHOD_CIMINSTANCEPROVIDER2
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 1488 
Line 2094 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(),                                                                           name.getLogicalName(),
               String::EMPTY);               String::EMPTY);
  
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
   
         // forward request         // forward request
         JMPIProvider &pr = ph.GetProvider();         JMPIProvider &pr = ph.GetProvider();
  
Line 1526 
Line 2125 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
         // public abstract org.pegasus.jmpi.CIMObjectPath createInstance (org.pegasus.jmpi.CIMObjectPath cop,          if (interfaceType == "JMPI")
           {
              // public org.pegasus.jmpi.CIMObjectPath createInstance (org.pegasus.jmpi.CIMObjectPath cop,
         //                                                                org.pegasus.jmpi.CIMInstance   cimInstance)         //                                                                org.pegasus.jmpi.CIMInstance   cimInstance)
         //        throws org.pegasus.jmpi.CIMException         //        throws org.pegasus.jmpi.CIMException
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
Line 1536 
Line 2143 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_INSTANCEPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public org.pegasus.jmpi.CIMObjectPath createInstance (org.pegasus.jmpi.OperationContext oc
              //                                                       org.pegasus.jmpi.CIMObjectPath    cop,
              //                                                       org.pegasus.jmpi.CIMInstance      cimInstance)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "createInstance",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMInstance;)Lorg/pegasus/jmpi/CIMObjectPath;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
              }
           }
   
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_SNIA_PROVIDER20:          case METHOD_INSTANCEPROVIDER:
         {         {
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
Line 1580 
Line 2217 
             break;             break;
         }         }
  
         case METHOD_UNKNOWN:          case METHOD_INSTANCEPROVIDER2:
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: should not be here!"<<PEGASUS_STD(endl));              jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
             break;              jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
         }  
         }  
     }  
     HandlerCatch(handler);  
  
     if (env) JMPIjvm::detachThread();              jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               CIMInstance *ci     = new CIMInstance (request->newInstance);
               jint         jciRef = DEBUG_ConvertCToJava (CIMInstance*, jint, ci);
               jobject      jci    = env->NewObject(jv->CIMInstanceClassRef,jv->CIMInstanceNewI,jciRef);
   
               JMPIjvm::checkException(env);
   
               DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: id = "<<id<<", jcop = "<<jcop<<", jci = "<<jci<<PEGASUS_STD(endl));
   
               jobject jcopRet = env->CallObjectMethod((jobject)pr.jProvider,
                                                       id,
                                                       joc,
                                                       jcop,
                                                       jci);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
               handler.processing();
   
               if (jcopRet) {
                   jint           jCopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
                   CIMObjectPath *copRet     = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jCopRetRef);
   
                   handler.deliver(*copRet);
               }
               handler.complete();
               break;
           }
   
           case METHOD_UNKNOWN:
           {
               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateInstanceRequest: should not be here!"<<PEGASUS_STD(endl));
               break;
           }
           }
       }
       HandlerCatch(handler);
   
       if (env) JMPIjvm::detachThread();
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
  
Line 1606 
Line 2290 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMINSTANCEPROVIDER,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER,
          METHOD_INSTANCEPROVIDER2, // same as METHOD_CIMINSTANCEPROVIDER2
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 1634 
Line 2319 
         DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: provider name physical = "<<name.getPhysicalName()<<", logical = "<<name.getLogicalName()<<PEGASUS_STD(endl));         DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: provider name physical = "<<name.getPhysicalName()<<", logical = "<<name.getLogicalName()<<PEGASUS_STD(endl));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
  
         // forward request         // forward request
         JMPIProvider &pr = ph.GetProvider();         JMPIProvider &pr = ph.GetProvider();
Line 1671 
Line 2350 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
         // public abstract void setInstance (org.pegasus.jmpi.CIMObjectPath cop,         // public abstract void setInstance (org.pegasus.jmpi.CIMObjectPath cop,
         //                                   org.pegasus.jmpi.CIMInstance   cimInstance)         //                                   org.pegasus.jmpi.CIMInstance   cimInstance)
         //        org.pegasus.jmpi.throws CIMException         //        org.pegasus.jmpi.throws CIMException
Line 1681 
Line 2368 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_INSTANCEPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
Line 1700 
Line 2387 
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: found METHOD_CIMINSTANCEPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract void setInstance (org.pegasus.jmpi.OperationContext oc,
              //                                   org.pegasus.jmpi.CIMObjectPath    op,
              //                                   org.pegasus.jmpi.CIMInstance      cimInstance);
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "setInstance",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMInstance;)V");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
             }             }
         }         }
  
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleModifyInstanceRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
           }
   
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_INSTANCEPROVIDER2:
           {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               CIMInstance *ci     = new CIMInstance (request->modifiedInstance);
               jint         jciRef = DEBUG_ConvertCToJava (CIMInstance*, jint, ci);
               jobject      jci    = env->NewObject(jv->CIMInstanceClassRef,jv->CIMInstanceNewI,jciRef);
   
               JMPIjvm::checkException(env);
   
               jobjectArray jPropertyList = getList(jv,env,request->propertyList);
   
               env->CallVoidMethod((jobject)pr.jProvider,
                                   id,
                                   joc,
                                   jcop,
                                   jci);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
               break;
           }
   
           case METHOD_CIMINSTANCEPROVIDER:
         {         {
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
Line 1737 
Line 2491 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_INSTANCEPROVIDER:
         {         {
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
Line 1787 
Line 2541 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER,  // same as METHOD_CIMINSTANCEPROVIDER
          METHOD_INSTANCEPROVIDER2, // same as METHOD_CIMINSTANCEPROVIDER2
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 1812 
Line 2567 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
  
         // forward request         // forward request
         JMPIProvider &pr = ph.GetProvider();         JMPIProvider &pr = ph.GetProvider();
Line 1849 
Line 2598 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
         // public abstract void deleteInstance (org.pegasus.jmpi.CIMObjectPath cop)         // public abstract void deleteInstance (org.pegasus.jmpi.CIMObjectPath cop)
         //        throws org.pegasus.jmpi.CIMException         //        throws org.pegasus.jmpi.CIMException
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
Line 1858 
Line 2615 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_INSTANCEPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteInstanceRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteInstanceRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract void deleteInstance (org.pegasus.jmpi.OperationContext oc,
              //                                      org.pegasus.jmpi.CIMObjectPath    cop)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "deleteInstance",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;)V");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteInstanceRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
              }
           }
   
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteInstanceRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_SNIA_PROVIDER20:          case METHOD_INSTANCEPROVIDER2:
           {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               env->CallVoidMethod((jobject)pr.jProvider,
                                   id,
                                   joc,
                                   jcop);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
               break;
           }
   
           case METHOD_INSTANCEPROVIDER:
         {         {
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
Line 1909 
Line 2723 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMINSTANCEPROVIDER,
        METHOD_PEGASUS_25,         METHOD_CIMINSTANCEPROVIDER2,
        METHOD_SNIA_PROVIDER20,         METHOD_INSTANCEPROVIDER,
          METHOD_INSTANCEPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 1935 
Line 2750 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
  
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
Line 1972 
Line 2788 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
         // public abstract java.util.Vector execQuery (org.pegasus.jmpi.CIMObjectPath cop,         // public abstract java.util.Vector execQuery (org.pegasus.jmpi.CIMObjectPath cop,
         //                                             java.lang.String               queryStatement,         //                                             java.lang.String               queryStatement,
         //                                             int                            ql,         //                                             int                            ql,
Line 1985 
Line 2809 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_INSTANCEPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_INSTANCEPROVIDER."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
Line 2004 
Line 2828 
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_CIMINSTANCEPROVIDER."<<PEGASUS_STD(endl));
             }             }
         }         }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract java.util.Vector execQuery (org.pegasus.jmpi.OperationContext oc,
              //                                             org.pegasus.jmpi.CIMObjectPath    cop,
              //                                             org.pegasus.jmpi.CIMClass         cimClass,
              //                                             java.lang.String                  queryStatement,
              //                                             java.lang.String                  queryLanguage)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "execQuery",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_INSTANCEPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_INSTANCEPROVIDER2."<<PEGASUS_STD(endl));
              }
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public abstract java.util.Vector execQuery(org.pegasus.jmpi.CIMObjectPath cop,                 // public abstract org.pegasus.jmpi.CIMInstance[] execQuery (org.pegasus.jmpi.OperationContext oc,
                  //                                                           org.pegasus.jmpi.CIMObjectPath    cop,
             //                                            org.pegasus.jmpi.CIMClass      cimClass,             //                                            org.pegasus.jmpi.CIMClass      cimClass,
             //                                            java.lang.String               query,                 //                                                           java.lang.String                  queryStatement,
             //                                            java.lang.String               ql)                 //                                                           java.lang.String                  queryLanguage)
             //        throws org.pegasus.jmpi.CIMException             //        throws org.pegasus.jmpi.CIMException
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "execQuery",                                   "execQuery",
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;");                                       "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMClass;Ljava/lang/String;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;");
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_25;                     eMethodFound = METHOD_CIMINSTANCEPROVIDER2;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_PEGASUS_25."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found METHOD_CIMINSTANCEPROVIDER2."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found no method!"<<PEGASUS_STD(endl));             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_CIMINSTANCEPROVIDER:
         {         {
             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
Line 2048 
Line 2900 
             jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());             jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());
             jstring jquery         = env->NewStringUTF(request->query.getCString());             jstring jquery         = env->NewStringUTF(request->query.getCString());
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 2097 
Line 2964 
             break;             break;
         }         }
  
         case METHOD_PEGASUS_25:          case METHOD_CIMINSTANCEPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
  
Line 2107 
Line 2977 
             jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());             jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());
             jstring jquery         = env->NewStringUTF(request->query.getCString());             jstring jquery         = env->NewStringUTF(request->query.getCString());
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 2124 
Line 3009 
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             jobjectArray jVec = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,              jobjectArray jAr = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                    id,                                                                    id,
                                                                      joc,
                                                                    jcop,                                                                    jcop,
                                                                    jCc,  
                                                                    jquery,                                                                    jquery,
                                                                    jqueryLanguage);                                                                     jqueryLanguage,
                                                                      jCc);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {              if (jAr) {
                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {                  for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jobject jciRet = env->GetObjectArrayElement(jVec,i);                      jobject jciRet = env->GetObjectArrayElement(jAr,i);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
Line 2156 
Line 3049 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_INSTANCEPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
  
Line 2166 
Line 3062 
             jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());             jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());
             jstring jquery         = env->NewStringUTF(request->query.getCString());             jstring jquery         = env->NewStringUTF(request->query.getCString());
  
             CIMClass cls = pr._cimom_handle->getClass(context,              CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                       request->nameSpace,                                                       request->nameSpace,
                                                       request->className,                                                       request->className,
                                                       false,                                                       false,
                                                       true,                                                       true,
                                                       true,                                                       true,
                                                       CIMPropertyList());                                                       CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
             CIMClass *pcls = new CIMClass (cls);             CIMClass *pcls = new CIMClass (cls);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 2183 
Line 3094 
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             jint jql = 0; // @BUG - how to convert?  
   
             jobjectArray jVec = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,                                                                     id,
                                                                      joc,
                                                                     jcop,                                                                     jcop,
                                                                      jCc,
                                                                     jquery,                                                                     jquery,
                                                                     jql,                                                                     jqueryLanguage);
                                                                     jCc);  
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
Line 2217 
Line 3134 
             break;             break;
         }         }
  
         case METHOD_UNKNOWN:          case METHOD_INSTANCEPROVIDER:
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: should not be here!"<<PEGASUS_STD(endl));              jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             break;              jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
         }  
         }  
     }  
     HandlerCatch(handler);  
   
     if (env) JMPIjvm::detachThread();  
  
     PEG_METHOD_EXIT();              JMPIjvm::checkException(env);
   
               jstring jqueryLanguage = env->NewStringUTF(request->queryLanguage.getCString());
               jstring jquery         = env->NewStringUTF(request->query.getCString());
   
               CIMClass cls;
   
               try
               {
                  DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
                  AutoMutex lock (pr._cimomMutex);
   
                  cls = pr._cimom_handle->getClass(context,
                                                   request->nameSpace,
                                                   request->className,
                                                   false,
                                                   true,
                                                   true,
                                                   CIMPropertyList());
                  DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));
               }
               catch (CIMException e)
               {
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                  throw;
               }
   
               CIMClass *pcls = new CIMClass (cls);
   
               JMPIjvm::checkException(env);
   
               jint jcls = DEBUG_ConvertCToJava (CIMClass*, jint, pcls);
   
               jobject jCc=env->NewObject(jv->CIMClassClassRef,jv->CIMClassNewI,jcls);
   
               JMPIjvm::checkException(env);
   
               jint jql = 0; // @BUG - how to convert?
   
               jobjectArray jVec = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                       id,
                                                                       jcop,
                                                                       jquery,
                                                                       jql,
                                                                       jCc);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jciRet = env->GetObjectArrayElement(jVec,i);
   
                       JMPIjvm::checkException(env);
   
                       jint         jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
                       CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
   
                       JMPIjvm::checkException(env);
   
                       handler.deliver(*ciRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_UNKNOWN:
           {
               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleExecQueryRequest: should not be here!"<<PEGASUS_STD(endl));
               break;
           }
           }
       }
       HandlerCatch(handler);
   
       if (env) JMPIjvm::detachThread();
   
       PEG_METHOD_EXIT();
  
     STAT_COPYDISPATCHER     STAT_COPYDISPATCHER
  
Line 2243 
Line 3236 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMASSOCIATORPROVIDER,
        METHOD_SNIA_PROVIDER20,         METHOD_CIMASSOCIATORPROVIDER2,
          METHOD_ASSOCIATORPROVIDER,
          METHOD_ASSOCIATORPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 2272 
Line 3267 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
  
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
Line 2309 
Line 3305 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
         // public abstract java.util.Vector associators (org.pegasus.jmpi.CIMObjectPath assocName,          getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
              // public java.util.Vector associators (org.pegasus.jmpi.CIMObjectPath assocName,
         //                                               org.pegasus.jmpi.CIMObjectPath pathName,         //                                               org.pegasus.jmpi.CIMObjectPath pathName,
         //                                               java.lang.String               resultClass,         //                                               java.lang.String               resultClass,
         //                                               java.lang.String               role,         //                                               java.lang.String               role,
Line 2323 
Line 3327 
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
                               "associators",                               "associators",
                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");
 //@BUG was:                   "(Lorg/pegasus/jmpi/CIMObjectPath;                                Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;"  
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_ASSOCIATORPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found METHOD_ASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
              }
   
              if (id == NULL)
              {
                  env->ExceptionClear();
   
                  // public org.pegasus.jmpi.CIMInstance[] associators (org.pegasus.jmpi.CIMObjectPath assocName,
                  //                                                    org.pegasus.jmpi.CIMObjectPath pathName,
                  //                                                    java.lang.String               resultClass,
                  //                                                    java.lang.String               role,
                  //                                                    java.lang.String               resultRole,
                  //                                                    boolean                        includeQualifiers,
                  //                                                    boolean                        includeClassOrigin,
                  //                                                    java.lang.String[]             propertyList)
                  //        throws org.pegasus.jmpi.CIMException
                  //
                  id = env->GetMethodID((jclass)pr.jProviderClass,
                                        "associators",
                                        "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMASSOCIATORPROVIDER;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found METHOD_CIMASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public java.util.Vector associators (org.pegasus.jmpi.OperationContext oc,
              //                                      org.pegasus.jmpi.CIMObjectPath    assocName,
              //                                      org.pegasus.jmpi.CIMObjectPath    pathName,
              //                                      java.lang.String                  resultClass,
              //                                      java.lang.String                  role,
              //                                      java.lang.String                  resultRole,
              //                                      boolean                           includeQualifiers,
              //                                      boolean                           includeClassOrigin,
              //                                      java.lang.String[]                propertyList)
              //        throws org.pegasus.jmpi.CIMException
              //
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "associators",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_ASSOCIATORPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found METHOD_ASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public abstract java.util.Vector associators (org.pegasus.jmpi.CIMObjectPath assocName,                 // public org.pegasus.jmpi.CIMInstance[] associators (org.pegasus.jmpi.OperationContext oc,
                  //                                                    org.pegasus.jmpi.CIMObjectPath assocName,
                  //                                                    org.pegasus.jmpi.CIMObjectPath pathName,
             //                                               java.lang.String               resultClass,             //                                               java.lang.String               resultClass,
             //                                               java.lang.String               role,             //                                               java.lang.String               role,
             //                                               java.lang.String               resultRole,             //                                               java.lang.String               resultRole,
Line 2346 
Line 3399 
             //             //
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "associators",                                   "associators",
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");                                       "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;");
 //@BUG was:                       "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;"  
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMASSOCIATORPROVIDER2;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found METHOD_CIMASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found no method!"<<PEGASUS_STD(endl));             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_CIMASSOCIATORPROVIDER:
         {         {
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
             jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());             jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());
             jstring jRole        = env->NewStringUTF(request->role.getCString());             jstring jRole        = env->NewStringUTF(request->role.getCString());
             jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());             jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());
Line 2392 
Line 3458 
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                     jPathName,
                                                                   jResultClass,                                                                   jResultClass,
                                                                   jRole,                                                                   jRole,
                                                                   jResultRole,                                                                   jResultRole,
Line 2417 
Line 3484 
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     CIMInstance         *ciRet = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                     CIMInstance         *ciRet = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                     CIMClass             cls   = pr._cimom_handle->getClass(context,                      CIMClass             cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                                             request->nameSpace,                                                                             request->nameSpace,
                                                                             ciRet->getClassName(),                                                                             ciRet->getClassName(),
                                                                             false,                                                                             false,
                                                                             true,                                                                             true,
                                                                             true,                                                                             true,
                                                                             CIMPropertyList());                                                                             CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op    = ciRet->getPath();                     const CIMObjectPath& op    = ciRet->getPath();
                     CIMObjectPath        iop   = ciRet->buildPath(cls);                     CIMObjectPath        iop   = ciRet->buildPath(cls);
  
Line 2439 
Line 3521 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_CIMASSOCIATORPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
Line 2461 
Line 3546 
  
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: assocName          = "<<assocPath->toString ()<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: assocName          = "<<assocPath->toString ()<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: pathName           = "<<objectPath->toString ()<<PEGASUS_STD(endl));  
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultClass        = "<<request->resultClass<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultClass        = "<<request->resultClass<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: role               = "<<request->role<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: role               = "<<request->role<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultRole         = "<<request->resultRole<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultRole         = "<<request->resultRole<<PEGASUS_STD(endl));
Line 2471 
Line 3555 
  
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                  id,                                                                  id,
                                                                     joc,
                                                                  jAssociationName,                                                                  jAssociationName,
                                                                  jPathName,                                                                  jPathName,
                                                                  jResultClass,                                                                  jResultClass,
Line 2484 
Line 3569 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                  for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jobject jciRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);                      jobject jciRet = env->GetObjectArrayElement(jVec,i);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jint                 jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);                     jint                 jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
   
                       JMPIjvm::checkException(env);
   
                     CIMInstance         *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                     CIMInstance         *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                     CIMClass             cls       = pr._cimom_handle->getClass(context,                      CIMClass             cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                                                 request->nameSpace,                                                                                 request->nameSpace,
                                                                                 ciRet->getClassName(),                                                                                 ciRet->getClassName(),
                                                                                 false,                                                                                 false,
                                                                                 true,                                                                                 true,
                                                                                 true,                                                                                 true,
                                                                                 CIMPropertyList());                                                                                 CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op        = ciRet->getPath();                     const CIMObjectPath& op        = ciRet->getPath();
                     CIMObjectPath        iop       = ciRet->buildPath(cls);                     CIMObjectPath        iop       = ciRet->buildPath(cls);
  
Line 2517 
Line 3627 
             break;             break;
         }         }
  
         case METHOD_UNKNOWN:          case METHOD_ASSOCIATORPROVIDER2:
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: should not be here!"<<PEGASUS_STD(endl));              jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
             break;              jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
         }  
         }  
     }  
     HandlerCatch(handler);  
  
     if (env) JMPIjvm::detachThread();              jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
     PEG_METHOD_EXIT();              JMPIjvm::checkException(env);
  
     STAT_COPYDISPATCHER              jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
  
     return(response);              JMPIjvm::checkException(env);
 }  
  
 Message * JMPIProviderManager::handleAssociatorNamesRequest(const Message * message) throw()              jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());
 {              jstring jRole        = env->NewStringUTF(request->role.getCString());
     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,"JMPIProviderManager::handleAssociatorNamesRequest");              jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());
  
     HandlerIntro(AssociatorNames,message,request,response,handler,Array<CIMObjectPath>());              JMPIjvm::checkException(env);
  
     typedef enum {              jobjectArray jPropertyList = getList(jv,env,request->propertyList);
        METHOD_UNKNOWN = 0,  
        METHOD_PEGASUS_24,  
        METHOD_SNIA_PROVIDER20  
     } METHOD_VERSION;  
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;  
     JNIEnv          *env           = NULL;  
  
     try {  #ifdef PEGASUS_DEBUG
         Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,              DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: assocName          = "<<assocPath->toString ()<<PEGASUS_STD(endl));
             "JMPIProviderManager::handleAssociatorNamesRequest - Host name: $0  Name space: $1  Class name: $2",              DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultClass        = "<<request->resultClass<<PEGASUS_STD(endl));
             System::getHostName(),              DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: role               = "<<request->role<<PEGASUS_STD(endl));
             request->nameSpace.getString(),              DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultRole         = "<<request->resultRole<<PEGASUS_STD(endl));
             request->objectName.getClassName().getString());              DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: includeQualifiers  = "<<false<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: includeClassOrigin = "<<false<<PEGASUS_STD(endl));
   #endif
  
         DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: hostname = "<<System::getHostName()<<", namespace = "<<request->nameSpace.getString()<<", classname = "<<request->objectName.getClassName().getString()<<", assocName = "<<request->assocClass.getString()<<PEGASUS_STD(endl));              jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     joc,
                                                                     jAssociationName,
                                                                     jPathName,
                                                                     jResultClass,
                                                                     jRole,
                                                                     jResultRole,
                                                                     JMPI_INCLUDE_QUALIFIERS,
                                                                     request->includeClassOrigin,
                                                                     jPropertyList);
  
         // make target object path              JMPIjvm::checkException(env);
         CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(),  
                                                        request->nameSpace,  
                                                        request->objectName.getClassName(),  
                                                        request->objectName.getKeyBindings());  
         CIMObjectPath *assocPath  = new CIMObjectPath (System::getHostName(),  
                                                        request->nameSpace,  
                                                        request->assocClass.getString());  
  
         // resolve provider name              STAT_PMS_PROVIDEREND;
         ProviderName name = _resolveProviderName(  
             request->operationContext.get(ProviderIdContainer::NAME));  
  
         // get cached or load new provider module              if (joc)
         JMPIProvider::OpProviderHolder ph =              {
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                 env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
  
         // convert arguments                 JMPIjvm::checkException(env);
         OperationContext context;              }
  
         context.insert(request->operationContext.get(IdentityContainer::NAME));              handler.processing();
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));              if (jVec) {
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));                  for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
  
         // forward request                      jobject jciRet = env->GetObjectArrayElement(jVec,i);
         JMPIProvider &pr = ph.GetProvider();  
  
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,"Calling provider.associatorNames: " + pr.getName());                      JMPIjvm::checkException(env);
  
         DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: Calling provider associatorNames: "<<pr.getName()<<", role: "<<request->role<<", aCls: "<<request->assocClass<<PEGASUS_STD(endl));                      jint jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
  
         JvmVector *jv = 0;                      JMPIjvm::checkException(env);
  
         env = JMPIjvm::attachThread(&jv);                      CIMInstance         *ciRet = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                       CIMClass             cls;
  
         if (!env)                      try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                           request->nameSpace,
                                                           ciRet->getClassName(),
                                                           false,
                                                           true,
                                                           true,
                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                       const CIMObjectPath& op    = ciRet->getPath();
                       CIMObjectPath        iop   = ciRet->buildPath(cls);
   
                       JMPIjvm::checkException(env);
   
                       iop.setNameSpace(op.getNameSpace());
                       ciRet->setPath(iop);
   
                       handler.deliver(*ciRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_ASSOCIATORPROVIDER:
           {
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());
               jstring jRole        = env->NewStringUTF(request->role.getCString());
               jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());
   
               JMPIjvm::checkException(env);
   
               jobjectArray jPropertyList = getList(jv,env,request->propertyList);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: assocName          = "<<assocPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: pathName           = "<<objectPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultClass        = "<<request->resultClass<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: role               = "<<request->role<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: resultRole         = "<<request->resultRole<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: includeQualifiers  = "<<false<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorsRequest: includeClassOrigin = "<<false<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                    id,
                                                                    jAssociationName,
                                                                    jPathName,
                                                                    jResultClass,
                                                                    jRole,
                                                                    jResultRole,
                                                                    JMPI_INCLUDE_QUALIFIERS,
                                                                    request->includeClassOrigin,
                                                                    jPropertyList);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jciRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);
   
                       JMPIjvm::checkException(env);
   
                       jint                 jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
                       CIMInstance         *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                       CIMClass             cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                           request->nameSpace,
                                                           ciRet->getClassName(),
                                                           false,
                                                           true,
                                                           true,
                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                       const CIMObjectPath& op        = ciRet->getPath();
                       CIMObjectPath        iop       = ciRet->buildPath(cls);
   
                       JMPIjvm::checkException(env);
   
                       iop.setNameSpace(op.getNameSpace());
                       ciRet->setPath(iop);
   
                       handler.deliver(*ciRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_UNKNOWN:
           {
               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorsRequest: should not be here!"<<PEGASUS_STD(endl));
               break;
           }
           }
       }
       HandlerCatch(handler);
   
       if (env) JMPIjvm::detachThread();
   
       PEG_METHOD_EXIT();
   
       STAT_COPYDISPATCHER
   
       return(response);
   }
   
   Message * JMPIProviderManager::handleAssociatorNamesRequest(const Message * message) throw()
   {
       PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,"JMPIProviderManager::handleAssociatorNamesRequest");
   
       HandlerIntro(AssociatorNames,message,request,response,handler,Array<CIMObjectPath>());
   
       typedef enum {
          METHOD_UNKNOWN = 0,
          METHOD_CIMASSOCIATORPROVIDER,
          METHOD_CIMASSOCIATORPROVIDER2,
          METHOD_ASSOCIATORPROVIDER,
          METHOD_ASSOCIATORPROVIDER2
       } METHOD_VERSION;
       METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
       JNIEnv          *env           = NULL;
   
       try {
           Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
               "JMPIProviderManager::handleAssociatorNamesRequest - Host name: $0  Name space: $1  Class name: $2",
               System::getHostName(),
               request->nameSpace.getString(),
               request->objectName.getClassName().getString());
   
           DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: hostname = "<<System::getHostName()<<", namespace = "<<request->nameSpace.getString()<<", classname = "<<request->objectName.getClassName().getString()<<", assocName = "<<request->assocClass.getString()<<PEGASUS_STD(endl));
   
           // make target object path
           CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(),
                                                          request->nameSpace,
                                                          request->objectName.getClassName(),
                                                          request->objectName.getKeyBindings());
           CIMObjectPath *assocPath  = new CIMObjectPath (System::getHostName(),
                                                          request->nameSpace,
                                                          request->assocClass.getString());
   
           // resolve provider name
           ProviderName name = _resolveProviderName(
               request->operationContext.get(ProviderIdContainer::NAME));
   
           // get cached or load new provider module
           JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
                                                                            name.getLogicalName(),
                                                                            String::EMPTY);
   
           // forward request
           JMPIProvider &pr = ph.GetProvider();
   
           PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,"Calling provider.associatorNames: " + pr.getName());
   
           DDD(PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: Calling provider associatorNames: "<<pr.getName()<<", role: "<<request->role<<", aCls: "<<request->assocClass<<PEGASUS_STD(endl));
   
           JvmVector *jv = 0;
   
           env = JMPIjvm::attachThread(&jv);
   
           if (!env)
         {         {
             PEG_METHOD_EXIT();             PEG_METHOD_EXIT();
  
Line 2609 
Line 3914 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
         // public abstract java.util.Vector associatorNames (org.pegasus.jmpi.CIMObjectPath assocName,          if (interfaceType == "JMPI")
           {
              // public java.util.Vector associatorNames (org.pegasus.jmpi.CIMObjectPath assocName,
         //                                                   org.pegasus.jmpi.CIMObjectPath pathName,         //                                                   org.pegasus.jmpi.CIMObjectPath pathName,
         //                                                   java.lang.String               resultClass,         //                                                   java.lang.String               resultClass,
         //                                                   java.lang.String               role,         //                                                   java.lang.String               role,
Line 2619 
Line 3932 
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
                               "associatorNames",                               "associatorNames",
                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;");                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;");
 //@BUG was:                   "(Lorg/pegasus/jmpi/CIMObjectPath;                                Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;"  
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_ASSOCIATORPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found METHOD_ASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public abstract java.util.Vector associatorNames (org.pegasus.jmpi.CIMObjectPath assocName,                 // public org.pegasus.jmpi.CIMObjectPath[] associatorNames (org.pegasus.jmpi.CIMObjectPath assocName,
             //                                                   java.lang.String               resultClass,                 //                                                          org.pegasus.jmpi.CIMObjectPath pathName,
             //                                                   java.lang.String               role,                 //                                                          java.lang.String               resultClass,
             //                                                   java.lang.String               resultRole)                 //                                                          java.lang.String               role,
             //        throws org.pegasus.jmpi.CIMException                 //                                                          java.lang.String               resultRole)
             id = env->GetMethodID((jclass)pr.jProviderClass,                 //        throws org.pegasus.jmpi.CIMException
                                   "associatorNames",                 id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;");                                       "associatorNames",
 //@BUG was:                       "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMObjectPath;"                                       "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMObjectPath;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMASSOCIATORPROVIDER;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found METHOD_CIMASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public java.util.Vector associatorNames (org.pegasus.jmpi.OperationContext oc,
              //                                          org.pegasus.jmpi.CIMObjectPath    assocName,
              //                                          org.pegasus.jmpi.CIMObjectPath    pathName,
              //                                          java.lang.String                  resultClass,
              //                                          java.lang.String                  role,
              //                                          java.lang.String                  resultRole)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "associatorNames",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_ASSOCIATORPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found METHOD_ASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
              }
   
              if (id == NULL)
              {
                  env->ExceptionClear();
   
                  // public org.pegasus.jmpi.CIMObjectPath[] associatorNames (org.pegasus.jmpi.OperationContext oc,
                  //                                                          org.pegasus.jmpi.CIMObjectPath    assocName,
                  //                                                          org.pegasus.jmpi.CIMObjectPath    pathName,
                  //                                                          java.lang.String                  resultClass,
                  //                                                          java.lang.String                  role,
                  //                                                          java.lang.String                  resultRole)
                  //        throws org.pegasus.jmpi.CIMException
                  id = env->GetMethodID((jclass)pr.jProviderClass,
                                        "associatorNames",
                                        "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMObjectPath;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMASSOCIATORPROVIDER2;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found METHOD_CIMASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
                  }
              }
           }
   
           if (id == NULL)
           {
               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
           }
   
           JMPIjvm::checkException(env);
   
           switch (eMethodFound)
           {
           case METHOD_CIMASSOCIATORPROVIDER:
           {
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());
               jstring jRole        = env->NewStringUTF(request->role.getCString());
               jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());
   
               JMPIjvm::checkException(env);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: assocName   = "<<assocPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultClass = "<<request->resultClass<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: role        = "<<request->role<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultRole  = "<<request->resultRole<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     jAssociationName,
                                                                     jPathName,
                                                                     jResultClass,
                                                                     jRole,
                                                                     jResultRole);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jcopRet = env->GetObjectArrayElement(jVec,i);
   
                       JMPIjvm::checkException(env);
   
                       jint           jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
                       CIMObjectPath *copRet     = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRet);
   
                       JMPIjvm::checkException(env);
   
                       handler.deliver(*copRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_CIMASSOCIATORPROVIDER2:
           {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());
               jstring jRole        = env->NewStringUTF(request->role.getCString());
               jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());
   
               JMPIjvm::checkException(env);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: assocName   = "<<assocPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultClass = "<<request->resultClass<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: role        = "<<request->role<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultRole  = "<<request->resultRole<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     joc,
                                                                     jAssociationName,
                                                                     jPathName,
                                                                     jResultClass,
                                                                     jRole,
                                                                     jResultRole);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
  
             if (id != NULL)              if (joc)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                 env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));  
             }  
         }  
  
         if (id == NULL)                 JMPIjvm::checkException(env);
         {  
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: found no method!"<<PEGASUS_STD(endl));  
         }         }
  
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jcopRet = env->GetObjectArrayElement(jVec,i);
   
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)                      jint           jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
         {                      CIMObjectPath *copRet     = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRet);
         case METHOD_PEGASUS_24:  
                       JMPIjvm::checkException(env);
   
                       handler.deliver(*copRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_ASSOCIATORPROVIDER:
         {         {
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
             jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());             jstring jResultClass = env->NewStringUTF(request->resultClass.getString().getCString());
             jstring jRole        = env->NewStringUTF(request->role.getCString());             jstring jRole        = env->NewStringUTF(request->role.getCString());
             jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());             jstring jResultRole  = env->NewStringUTF(request->resultRole.getCString());
Line 2672 
Line 4165 
  
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: assocName   = "<<assocPath->toString ()<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: assocName   = "<<assocPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: pathName    = "<<objectPath->toString ()<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultClass = "<<request->resultClass<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultClass = "<<request->resultClass<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: role        = "<<request->role<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: role        = "<<request->role<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultRole  = "<<request->resultRole<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleAssociatorNamesRequest: resultRole  = "<<request->resultRole<<PEGASUS_STD(endl));
Line 2680 
Line 4174 
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                     jPathName,
                                                                   jResultClass,                                                                   jResultClass,
                                                                   jRole,                                                                   jRole,
                                                                   jResultRole);                                                                   jResultRole);
Line 2690 
Line 4185 
  
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {                  for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jobject jcopRet = env->GetObjectArrayElement(jVec,i);                      jobject jcopRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jint           jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);                     jint           jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
                     CIMObjectPath *copRet     = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRet);                      CIMObjectPath *copRet     = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRetRef);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
Line 2709 
Line 4204 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_ASSOCIATORPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, assocPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
Line 2737 
Line 4235 
  
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                     joc,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                   jPathName,                                                                   jPathName,
                                                                   jResultClass,                                                                   jResultClass,
Line 2747 
Line 4246 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
Line 2794 
Line 4300 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMASSOCIATORPROVIDER,
        METHOD_SNIA_PROVIDER20,         METHOD_CIMASSOCIATORPROVIDER2,
          METHOD_ASSOCIATORPROVIDER,
          METHOD_ASSOCIATORPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 2823 
Line 4331 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
  
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
Line 2860 
Line 4369 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
         // public abstract java.util.Vector references (org.pegasus.jmpi.CIMObjectPath assocName,          getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
              // public java.util.Vector references (org.pegasus.jmpi.CIMObjectPath assocName,
         //                                              org.pegasus.jmpi.CIMObjectPath pathName,         //                                              org.pegasus.jmpi.CIMObjectPath pathName,
         //                                              java.lang.String               role,         //                                              java.lang.String               role,
         //                                              boolean                        includeQualifiers,         //                                              boolean                        includeQualifiers,
Line 2871 
Line 4388 
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
                               "references",                               "references",
                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");
 //@BUG was:                   "(Lorg/pegasus/jmpi/CIMObjectPath;                                Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;"  
  
         if (id != NULL)             if (id != NULL)
         {             {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_ASSOCIATORPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found METHOD_ASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
         }             }
   
              if (id == NULL)
              {
                  env->ExceptionClear();
   
                  // public org.pegasus.jmpi.CIMInstance[] references (org.pegasus.jmpi.CIMObjectPath assocName,
                  //                                                   org.pegasus.jmpi.CIMObjectPath pathName,
                  //                                                   java.lang.String               role,
                  //                                                   boolean                        includeQualifiers,
                  //                                                   boolean                        includeClassOrigin,
                  //                                                   java.lang.String[]             propertyList)
                  //        throws org.pegasus.jmpi.CIMException
                  id = env->GetMethodID((jclass)pr.jProviderClass,
                                        "references",
                                        "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMASSOCIATORPROVIDER;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found METHOD_CIMASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public java.util.Vector references (org.pegasus.jmpi.OperationContext oc,
              //                                     org.pegasus.jmpi.CIMObjectPath    assocName,
              //                                     org.pegasus.jmpi.CIMObjectPath    pathName,
              //                                     java.lang.String                  role,
              //                                     boolean                           includeQualifiers,
              //                                     boolean                           includeClassOrigin,
              //                                     java.lang.String[]                propertyList)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "references",
                                    " (Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_ASSOCIATORPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found METHOD_ASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
              }
   
              if (id == NULL)
              {
                  env->ExceptionClear();
   
                  // public org.pegasus.jmpi.CIMInstance[] references (org.pegasus.jmpi.OperationContext oc,
                  //                                                   org.pegasus.jmpi.CIMObjectPath    assocName,
                  //                                                   org.pegasus.jmpi.CIMObjectPath    pathName,
                  //                                                   java.lang.String                  role,
                  //                                                   boolean                           includeQualifiers,
                  //                                                   boolean                           includeClassOrigin,
                  //                                                   java.lang.String[]                propertyList)
                  //        throws org.pegasus.jmpi.CIMException
                  id = env->GetMethodID((jclass)pr.jProviderClass,
                                        "references",
                                        "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMASSOCIATORPROVIDER2;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found METHOD_CIMASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
                  }
              }
           }
   
           if (id == NULL)
           {
               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
           }
   
           JMPIjvm::checkException(env);
   
           switch (eMethodFound)
           {
           case METHOD_CIMASSOCIATORPROVIDER:
           {
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jRole = env->NewStringUTF(request->role.getCString());
   
               JMPIjvm::checkException(env);
   
               jobjectArray jPropertyList = getList(jv,env,request->propertyList);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: assocName          = "<<resultPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: role               = "<<request->role<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeQualifiers  = "<<false<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeClassOrigin = "<<false<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     jAssociationName,
                                                                     jPathName,
                                                                     jRole,
                                                                     JMPI_INCLUDE_QUALIFIERS,
                                                                     request->includeClassOrigin,
                                                                     jPropertyList);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jciRet = env->GetObjectArrayElement(jVec,i);
   
                       JMPIjvm::checkException(env);
   
                       jint jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
   
                       JMPIjvm::checkException(env);
   
                       CIMInstance         *ciRet = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                       CIMClass             cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                           request->nameSpace,
                                                           ciRet->getClassName(),
                                                           false,
                                                           true,
                                                           true,
                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                       const CIMObjectPath& op    = ciRet->getPath();
                       CIMObjectPath        iop   = ciRet->buildPath(cls);
   
                       JMPIjvm::checkException(env);
   
                       iop.setNameSpace(op.getNameSpace());
                       ciRet->setPath(iop);
   
                       handler.deliver(*ciRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_CIMASSOCIATORPROVIDER2:
           {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jRole = env->NewStringUTF(request->role.getCString());
   
               JMPIjvm::checkException(env);
   
               jobjectArray jPropertyList = getList(jv,env,request->propertyList);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: assocName          = "<<resultPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: role               = "<<request->role<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeQualifiers  = "<<false<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeClassOrigin = "<<false<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     joc,
                                                                     jAssociationName,
                                                                     jPathName,
                                                                     jRole,
                                                                     JMPI_INCLUDE_QUALIFIERS,
                                                                     request->includeClassOrigin,
                                                                     jPropertyList);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jciRet = env->GetObjectArrayElement(jVec,i);
  
         if (id == NULL)                      JMPIjvm::checkException(env);
         {  
             env->ExceptionClear();  
  
             // public abstract java.util.Vector references (org.pegasus.jmpi.CIMObjectPath assocName,                      jint jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
             //                                              java.lang.String               role,  
             //                                              boolean                        includeQualifiers,  
             //                                              boolean                        includeClassOrigin,  
             //                                              java.lang.String[]             propertyList)  
             //        throws org.pegasus.jmpi.CIMException  
             id = env->GetMethodID((jclass)pr.jProviderClass,  
                                   "references",  
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)Ljava/util/Vector;");  
 //@BUG was:                       "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;ZZ[Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMInstance;"  
  
             if (id != NULL)                      JMPIjvm::checkException(env);
   
                       CIMInstance         *ciRet = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                       CIMClass             cls;
   
                       try
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                         DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                         AutoMutex lock (pr._cimomMutex);
             }  
         }  
  
         if (id == NULL)                         cls = pr._cimom_handle->getClass(context,
                                                           request->nameSpace,
                                                           ciRet->getClassName(),
                                                           false,
                                                           true,
                                                           true,
                                                           CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: found no method!"<<PEGASUS_STD(endl));                         DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
         }         }
  
                       const CIMObjectPath& op    = ciRet->getPath();
                       CIMObjectPath        iop   = ciRet->buildPath(cls);
   
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)                      iop.setNameSpace(op.getNameSpace());
         {                      ciRet->setPath(iop);
         case METHOD_PEGASUS_24:  
                       handler.deliver(*ciRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_ASSOCIATORPROVIDER:
         {         {
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
             jstring jRole = env->NewStringUTF(request->role.getCString());             jstring jRole = env->NewStringUTF(request->role.getCString());
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 2925 
Line 4687 
  
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: assocName          = "<<resultPath->toString ()<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: assocName          = "<<resultPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: pathName           = "<<objectPath->toString ()<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: role               = "<<request->role<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: role               = "<<request->role<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeQualifiers  = "<<false<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeQualifiers  = "<<false<<PEGASUS_STD(endl));
             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeClassOrigin = "<<false<<PEGASUS_STD(endl));             DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferencesRequest: includeClassOrigin = "<<false<<PEGASUS_STD(endl));
Line 2933 
Line 4696 
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                     jPathName,
                                                                   jRole,                                                                   jRole,
                                                                   JMPI_INCLUDE_QUALIFIERS,                                                                   JMPI_INCLUDE_QUALIFIERS,
                                                                   request->includeClassOrigin,                                                                   request->includeClassOrigin,
Line 2944 
Line 4708 
  
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {                  for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jobject jciRet = env->GetObjectArrayElement(jVec,i);                      jobject jciRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);
  
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     jint jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);                     jint jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
                       CIMInstance         *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                       CIMClass             cls;
  
                     JMPIjvm::checkException(env);                      try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
  
                     CIMInstance         *ciRet = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                         cls = pr._cimom_handle->getClass(context,
                     CIMClass             cls   = pr._cimom_handle->getClass(context,  
                                                                             request->nameSpace,                                                                             request->nameSpace,
                                                                             ciRet->getClassName(),                                                                             ciRet->getClassName(),
                                                                             false,                                                                             false,
                                                                             true,                                                                             true,
                                                                             true,                                                                             true,
                                                                             CIMPropertyList());                                                                             CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op    = ciRet->getPath();                     const CIMObjectPath& op    = ciRet->getPath();
                     CIMObjectPath        iop   = ciRet->buildPath(cls);                     CIMObjectPath        iop   = ciRet->buildPath(cls);
  
Line 2978 
Line 4754 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_ASSOCIATORPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
Line 3006 
Line 4785 
  
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                     joc,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                   jPathName,                                                                   jPathName,
                                                                   jRole,                                                                   jRole,
Line 3017 
Line 4797 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
Line 3028 
Line 4815 
  
                     jint                 jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);                     jint                 jciRetRef = env->CallIntMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);
                     CIMInstance         *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);                     CIMInstance         *ciRet     = DEBUG_ConvertJavaToC (jint, CIMInstance*, jciRetRef);
                     CIMClass             cls       = pr._cimom_handle->getClass(context,                      CIMClass             cls;
   
                       try
                       {
                          DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                          AutoMutex lock (pr._cimomMutex);
   
                          cls = pr._cimom_handle->getClass(context,
                                                                                 request->nameSpace,                                                                                 request->nameSpace,
                                                                                 ciRet->getClassName(),                                                                                 ciRet->getClassName(),
                                                                                 false,                                                                                 false,
                                                                                 true,                                                                                 true,
                                                                                 true,                                                                                 true,
                                                                                 CIMPropertyList());                                                                                 CIMPropertyList());
                          DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));
                       }
                       catch (CIMException e)
                       {
                          DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferencesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));
                          throw;
                       }
   
                     const CIMObjectPath& op        = ciRet->getPath();                     const CIMObjectPath& op        = ciRet->getPath();
                     CIMObjectPath        iop       = ciRet->buildPath(cls);                     CIMObjectPath        iop       = ciRet->buildPath(cls);
  
Line 3076 
Line 4878 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMASSOCIATORPROVIDER,
        METHOD_SNIA_PROVIDER20,         METHOD_CIMASSOCIATORPROVIDER2,
          METHOD_ASSOCIATORPROVIDER,
          METHOD_ASSOCIATORPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 3105 
Line 4909 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
  
         JMPIProvider &pr = ph.GetProvider();         JMPIProvider &pr = ph.GetProvider();
  
Line 3141 
Line 4939 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
         // public abstract java.util.Vector referenceNames (org.pegasus.jmpi.CIMObjectPath assocName,          if (interfaceType == "JMPI")
           {
              // public java.util.Vector referenceNames (org.pegasus.jmpi.CIMObjectPath assocName,
         //                                                  org.pegasus.jmpi.CIMObjectPath pathName,         //                                                  org.pegasus.jmpi.CIMObjectPath pathName,
         //                                                  java.lang.String               role)         //                                                  java.lang.String               role)
         //        throws org.pegasus.jmpi.CIMException         //        throws org.pegasus.jmpi.CIMException
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
                               "referenceNames",                               "referenceNames",
                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)Ljava/util/Vector;");                               "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)Ljava/util/Vector;");
 //@BUG was:                   "(Lorg/pegasus/jmpi/CIMObjectPath;                                Ljava/lang/String;)Ljava/util/Vector;"  
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_ASSOCIATORPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found METHOD_ASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
              }
   
              if (id == NULL)
              {
                  env->ExceptionClear();
   
                  // public org.pegasus.jmpi.CIMObjectPath[] referenceNames (org.pegasus.jmpi.CIMObjectPath assocName,
                  //                                                         org.pegasus.jmpi.CIMObjectPath pathName,
                  //                                                         java.lang.String               role)
                  //        throws org.pegasus.jmpi.CIMException
                  id = env->GetMethodID((jclass)pr.jProviderClass,
                                        "referenceNames",
                                        "(Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMObjectPath;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMASSOCIATORPROVIDER;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found METHOD_CIMASSOCIATORPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public java.util.Vector referenceNames (org.pegasus.jmpi.OperationContext oc,
              //                                         org.pegasus.jmpi.CIMObjectPath    assocName,
              //                                         org.pegasus.jmpi.CIMObjectPath    pathName,
              //                                         java.lang.String                  role)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "referenceNames",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)Ljava/util/Vector;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_ASSOCIATORPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found METHOD_ASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             env->ExceptionClear();             env->ExceptionClear();
  
             // public abstract java.util.Vector referenceNames (org.pegasus.jmpi.CIMObjectPath assocName,                 // public org.pegasus.jmpi.CIMObjectPath[] referenceNames (org.pegasus.jmpi.OperationContext oc,
                  //                                                         org.pegasus.jmpi.CIMObjectPath    assocName,
                  //                                                         org.pegasus.jmpi.CIMObjectPath    pathName,
             //                                                  java.lang.String               role)             //                                                  java.lang.String               role)
             //        throws org.pegasus.jmpi.CIMException             //        throws org.pegasus.jmpi.CIMException
             id = env->GetMethodID((jclass)pr.jProviderClass,             id = env->GetMethodID((jclass)pr.jProviderClass,
                                   "referenceNames",                                   "referenceNames",
                                   "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)Ljava/util/Vector;");                                       "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMObjectPath;");
 //@BUG was:                       "(Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;)[Lorg/pegasus/jmpi/CIMObjectPath;"  
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMASSOCIATORPROVIDER2;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found METHOD_CIMASSOCIATORPROVIDER2."<<PEGASUS_STD(endl));
                  }
             }             }
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found no method!"<<PEGASUS_STD(endl));             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleReferenceNamesRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_PEGASUS_24:          case METHOD_CIMASSOCIATORPROVIDER:
           {
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jRole = env->NewStringUTF(request->role.getCString());
   
               JMPIjvm::checkException(env);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferenceNamesRequest: assocName          = "<<objectPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferenceNamesRequest: role               = "<<request->role<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     jPathName,
                                                                     jAssociationName,
                                                                     jRole);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jcopRet = env->GetObjectArrayElement(jVec,i);
   
                       JMPIjvm::checkException(env);
   
                       jint jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
   
                       JMPIjvm::checkException(env);
   
                       CIMObjectPath *copRet = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRetRef);
   
                       handler.deliver(*copRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_CIMASSOCIATORPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
             jstring jRole = env->NewStringUTF(request->role.getCString());             jstring jRole = env->NewStringUTF(request->role.getCString());
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
Line 3203 
Line 5115 
  
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                     joc,
                                                                     jPathName,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                   jRole);                                                                   jRole);
  
Line 3210 
Line 5124 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {                 for (int i=0,m=env->GetArrayLength(jVec); i<m; i++) {
Line 3232 
Line 5153 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_ASSOCIATORPROVIDER:
           {
               jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
               jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
   
               JMPIjvm::checkException(env);
   
               jint    jPathNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jPathName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jPathNameRef);
   
               JMPIjvm::checkException(env);
   
               jstring jRole = env->NewStringUTF(request->role.getCString());
   
               JMPIjvm::checkException(env);
   
   #ifdef PEGASUS_DEBUG
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferenceNamesRequest: assocName          = "<<objectPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferenceNamesRequest: pathName           = "<<resultPath->toString ()<<PEGASUS_STD(endl));
               DDD(PEGASUS_STD(cerr)<<"--- JMPIProviderManager::handleReferenceNamesRequest: role               = "<<request->role<<PEGASUS_STD(endl));
   #endif
   
               jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                     id,
                                                                     jAssociationName,
                                                                     jPathName,
                                                                     jRole);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
               if (jVec) {
                   for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
                       JMPIjvm::checkException(env);
   
                       jobject jcopRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);
   
                       JMPIjvm::checkException(env);
   
                       jint jcopRetRef = env->CallIntMethod(jcopRet,JMPIjvm::jv.CIMObjectPathCInst);
   
                       JMPIjvm::checkException(env);
   
                       CIMObjectPath *copRet = DEBUG_ConvertJavaToC (jint, CIMObjectPath*, jcopRetRef);
   
                       handler.deliver(*copRet);
                   }
               }
               handler.complete();
               break;
           }
   
           case METHOD_ASSOCIATORPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);             jint    jAssociationNameRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, resultPath);
             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);             jobject jAssociationName    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jAssociationNameRef);
  
Line 3256 
Line 5234 
  
             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,             jobjectArray jVec=(jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,
                                                                   id,                                                                   id,
                                                                     joc,
                                                                   jAssociationName,                                                                   jAssociationName,
                                                                   jPathName,                                                                   jPathName,
                                                                   jRole);                                                                   jRole);
Line 3264 
Line 5243 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
             if (jVec) {             if (jVec) {
                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                 for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {
Line 3312 
Line 5298 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_SNIA_PROVIDER20,         METHOD_PROPERTYPROVIDER,
          METHOD_PROPERTYPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 3334 
Line 5321 
  
         // resolve provider name         // resolve provider name
         ProviderName name = _resolveProviderName(         ProviderName name = _resolveProviderName(
             request->operationContext.get(ProviderIdContainer::NAME));              request->operationContext.get(ProviderIdContainer::NAME));
   
         // get cached or load new provider module  
         JMPIProvider::OpProviderHolder ph =  
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);  
   
         // convert arguments  
         OperationContext context;  
  
         context.insert(request->operationContext.get(IdentityContainer::NAME));          // get cached or load new provider module
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
  
         // forward request         // forward request
         JMPIProvider &pr = ph.GetProvider();         JMPIProvider &pr = ph.GetProvider();
Line 3374 
Line 5355 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
           if (interfaceType == "JMPI")
           {
         // public abstract org.pegasus.jmpi.CIMValue getPropertyValue (org.pegasus.jmpi.CIMObjectPath cop,         // public abstract org.pegasus.jmpi.CIMValue getPropertyValue (org.pegasus.jmpi.CIMObjectPath cop,
         //                                                             java.lang.String               oclass,         //                                                             java.lang.String               oclass,
         //                                                             java.lang.String               pName)         //                                                             java.lang.String               pName)
Line 3386 
Line 5375 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_PROPERTYPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetPropertyRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetPropertyRequest: found METHOD_PROPERTYPROVIDER."<<PEGASUS_STD(endl));
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract org.pegasus.jmpi.CIMValue getPropertyValue (org.pegasus.jmpi.OperationContext oc,
              //                                                             org.pegasus.jmpi.CIMObjectPath    cop,
              //                                                             java.lang.String                  oclass,
              //                                                             java.lang.String                  pName)
              //        throws org.pegasus.jmpi.CIMException
              //
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "getPropertyValue",
                                    " (Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;)Lorg/pegasus/jmpi/CIMValue;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_PROPERTYPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetPropertyRequest: found METHOD_PROPERTYPROVIDER2."<<PEGASUS_STD(endl));
              }
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetPropertyRequest: found no method!"<<PEGASUS_STD(endl));             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleGetPropertyRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_SNIA_PROVIDER20:          case METHOD_PROPERTYPROVIDER:
           {
               jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
   
               JMPIjvm::checkException(env);
   
               jstring joclass = env->NewStringUTF(request->instanceName.getClassName().getString().getCString());
   
               JMPIjvm::checkException(env);
   
               jstring jpName = env->NewStringUTF(request->propertyName.getString().getCString());
   
               JMPIjvm::checkException(env);
   
               STAT_GETSTARTTIME;
   
               jobject jvalRet = env->CallObjectMethod ((jobject)pr.jProvider,
                                                        id,
                                                        jcop,
                                                        joclass,
                                                        jpName);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
   
               if (jvalRet)
               {
                  jint      jvalRetRef = env->CallIntMethod(jvalRet,JMPIjvm::jv.CIMValueCInst);
                  CIMValue *valRet     = DEBUG_ConvertJavaToC (jint, CIMValue*, jvalRetRef);
   
                  JMPIjvm::checkException(env);
   
                  handler.deliver(*valRet);
               }
               handler.complete();
               break;
           }
   
           case METHOD_PROPERTYPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
  
Line 3418 
Line 5479 
  
             jobject jvalRet = env->CallObjectMethod ((jobject)pr.jProvider,             jobject jvalRet = env->CallObjectMethod ((jobject)pr.jProvider,
                                                      id,                                                      id,
                                                        joc,
                                                      jcop,                                                      jcop,
                                                      joclass,                                                      joclass,
                                                      jpName);                                                      jpName);
Line 3426 
Line 5488 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
  
             if (jvalRet)             if (jvalRet)
Line 3467 
Line 5536 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_SNIA_PROVIDER20,         METHOD_PROPERTYPROVIDER,
          METHOD_PROPERTYPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 3492 
Line 5562 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
  
         // forward request         // forward request
         JMPIProvider &pr = ph.GetProvider();         JMPIProvider &pr = ph.GetProvider();
Line 3529 
Line 5593 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
  
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
   
           if (interfaceType == "JMPI")
           {
         // public abstract void setPropertyValue (org.pegasus.jmpi.CIMObjectPath cop,         // public abstract void setPropertyValue (org.pegasus.jmpi.CIMObjectPath cop,
         //                                        java.lang.String               oclass,         //                                        java.lang.String               oclass,
         //                                        java.lang.String               pName,         //                                        java.lang.String               pName,
Line 3542 
Line 5614 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_PROPERTYPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleSetPropertyRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleSetPropertyRequest: found METHOD_PROPERTYPROVIDER."<<PEGASUS_STD(endl));
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract void setPropertyValue (org.pegasus.jmpi.OperationContext oc,
              //                                        org.pegasus.jmpi.CIMObjectPath    cop,
              //                                        java.lang.String                  oclass,
              //                                        java.lang.String                  pName,
              //                                        org.pegasus.jmpi.CIMValue         val)
              //        throws org.pegasus.jmpi.CIMException
              //
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "setPropertyValue",
                                    " (Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/lang/String;Lorg/pegasus/jmpi/CIMValue;)V");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_PROPERTYPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleSetPropertyRequest: found METHOD_PROPERTYPROVIDER2."<<PEGASUS_STD(endl));
              }
         }         }
  
         if (id == NULL)         if (id == NULL)
         {         {
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleSetPropertyRequest: found no method!"<<PEGASUS_STD(endl));             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleSetPropertyRequest: found no method!"<<PEGASUS_STD(endl));
   
               PEG_METHOD_EXIT();
   
               STAT_COPYDISPATCHER
   
               throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                              MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                  "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_SNIA_PROVIDER20:          case METHOD_PROPERTYPROVIDER:
           {
               jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
   
               JMPIjvm::checkException(env);
   
               jstring joclass = env->NewStringUTF(request->instanceName.getClassName().getString().getCString());
   
               JMPIjvm::checkException(env);
   
               jstring jpName = env->NewStringUTF(request->propertyName.getString().getCString());
   
               JMPIjvm::checkException(env);
   
               CIMValue *val = new CIMValue (request->newValue);
   
               JMPIjvm::checkException(env);
   
               jint    jvalref = DEBUG_ConvertCToJava (CIMValue*, jint, val);
               jobject jval    = env->NewObject(jv->CIMValueClassRef, jv->CIMValueNewI, jvalref);
   
               JMPIjvm::checkException(env);
   
               STAT_GETSTARTTIME;
   
               env->CallVoidMethod ((jobject)pr.jProvider,
                                    id,
                                    jcop,
                                    joclass,
                                    jpName,
                                    jval);
   
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
               break;
           }
   
           case METHOD_PROPERTYPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopref = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef, jv->CIMObjectPathNewI, jcopref);
  
Line 3583 
Line 5725 
  
             env->CallVoidMethod ((jobject)pr.jProvider,             env->CallVoidMethod ((jobject)pr.jProvider,
                                  id,                                  id,
                                    joc,
                                  jcop,                                  jcop,
                                  joclass,                                  joclass,
                                  jpName,                                  jpName,
Line 3590 
Line 5733 
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
             break;             break;
         }         }
Line 3620 
Line 5770 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_PEGASUS_24,         METHOD_CIMMETHODPROVIDER,
        METHOD_SNIA_PROVIDER20,         METHOD_CIMMETHODPROVIDER2,
          METHOD_METHODPROVIDER,
          METHOD_METHODPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 3646 
Line 5798 
             request->operationContext.get(ProviderIdContainer::NAME));             request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);                                                                           name.getLogicalName(),
                                                                            String::EMPTY);
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
  
         JMPIProvider &pr=ph.GetProvider();         JMPIProvider &pr=ph.GetProvider();
  
Line 3682 
Line 5828 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
           if (interfaceType == "JMPI")
           {
         // public abstract org.pegasus.jmpi.CIMValue invokeMethod (org.pegasus.jmpi.CIMObjectPath cop,         // public abstract org.pegasus.jmpi.CIMValue invokeMethod (org.pegasus.jmpi.CIMObjectPath cop,
         //                                                         java.lang.String               name,         //                                                         java.lang.String               name,
         //                                                         java.util.Vector               in,         //                                                         java.util.Vector               in,
Line 3694 
Line 5848 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_METHODPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: found METHOD_METHODPROVIDER."<<PEGASUS_STD(endl));
         }         }
  
         if (id == NULL)         if (id == NULL)
Line 3713 
Line 5867 
  
             if (id != NULL)             if (id != NULL)
             {             {
                 eMethodFound = METHOD_PEGASUS_24;                     eMethodFound = METHOD_CIMMETHODPROVIDER;
                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: found METHOD_PEGASUS_24."<<PEGASUS_STD(endl));                     DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: found METHOD_CIMMETHODPROVIDER."<<PEGASUS_STD(endl));
                  }
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public abstract org.pegasus.jmpi.CIMValue invokeMethod (org.pegasus.jmpi.OperationContext oc,
              //                                                         org.pegasus.jmpi.CIMObjectPath    cop,
              //                                                         java.lang.String                  name,
              //                                                         java.util.Vector                  in,
              //                                                         java.util.Vector                  out)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "invokeMethod",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;Ljava/util/Vector;Ljava/util/Vector;)Lorg/pegasus/jmpi/CIMValue;");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_METHODPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: found METHOD_METHODPROVIDER2."<<PEGASUS_STD(endl));
              }
   
              if (id == NULL)
              {
                  env->ExceptionClear();
   
                  // public org.pegasus.jmpi.CIMValue invokeMethod (org.pegasus.jmpi.OperationContext oc,
                  //                                                org.pegasus.jmpi.CIMObjectPath    op,
                  //                                                java.lang.String                  methodName,
                  //                                                org.pegasus.jmpi.CIMArgument[]    inArgs,
                  //                                                org.pegasus.jmpi.CIMArgument[]    outArgs)
                  //        throws org.pegasus.jmpi.CIMException
                  id = env->GetMethodID((jclass)pr.jProviderClass,
                                        "invokeMethod",
                                        "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/CIMObjectPath;Ljava/lang/String;[Lorg/pegasus/jmpi/CIMArgument;[Lorg/pegasus/jmpi/CIMArgument;)Lorg/pegasus/jmpi/CIMValue;");
   
                  if (id != NULL)
                  {
                      eMethodFound = METHOD_CIMMETHODPROVIDER2;
                      DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: found METHOD_CIMMETHODPROVIDER2."<<PEGASUS_STD(endl));
                  }
              }
           }
   
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleInvokeMethodRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
             }             }
   
           JMPIjvm::checkException(env);
   
           switch (eMethodFound)
           {
           case METHOD_CIMMETHODPROVIDER:
           {
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               jstring jMethod = env->NewStringUTF(request->methodName.getString().getCString());
   
               JMPIjvm::checkException(env);
   
               Uint32 m=request->inParameters.size();
   
               jobjectArray jArIn=(jobjectArray)env->NewObjectArray(m,jv->CIMArgumentClassRef,NULL);
   
               for (Uint32 i=0; i<m; i++) {
                 CIMParamValue *parm    = new CIMParamValue(request->inParameters[i]);
                 jint           jArgRef = DEBUG_ConvertCToJava (CIMParamValue*, jint, parm);
                 jobject        jArg    = env->NewObject(jv->CIMArgumentClassRef,jv->CIMArgumentNewI,jArgRef);
   
                 env->SetObjectArrayElement(jArIn,i,jArg);
         }         }
  
               jobjectArray jArOut=(jobjectArray)env->NewObjectArray(24,jv->CIMArgumentClassRef,NULL);
   
               jobject jValueRet = env->CallObjectMethod((jobject)pr.jProvider,
                                                         id,
                                                         jcop,
                                                         jMethod,
                                                         jArIn,
                                                         jArOut);
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
   
               jint      jValueRetRef = env->CallIntMethod(jValueRet,JMPIjvm::jv.CIMValueCInst);
               CIMValue *valueRet     = DEBUG_ConvertJavaToC (jint, CIMValue*, jValueRetRef);
   
               handler.deliver(*valueRet);
   
               for (int i=0; i<24; i++) {
                   jobject jArg = env->GetObjectArrayElement(jArOut,i);
   
                   JMPIjvm::checkException(env);
   
                   if (jArg==NULL)
                      break;
   
                   jint           jpRef = env->CallIntMethod(jArg,JMPIjvm::jv.CIMArgumentCInst);
                   CIMParamValue *p     = DEBUG_ConvertJavaToC (jint, CIMParamValue*, jpRef);
   
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)                  handler.deliverParamValue(*p);
         {              }
         case METHOD_PEGASUS_24:  
               handler.complete();
               break;
           }
   
           case METHOD_CIMMETHODPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
Line 3749 
Line 6021 
  
             jobject jValueRet = env->CallObjectMethod((jobject)pr.jProvider,             jobject jValueRet = env->CallObjectMethod((jobject)pr.jProvider,
                                                       id,                                                       id,
                                                         joc,
                                                       jcop,                                                       jcop,
                                                       jMethod,                                                       jMethod,
                                                       jArIn,                                                       jArIn,
Line 3757 
Line 6030 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
  
             jint      jValueRetRef = env->CallIntMethod(jValueRet,JMPIjvm::jv.CIMValueCInst);             jint      jValueRetRef = env->CallIntMethod(jValueRet,JMPIjvm::jv.CIMValueCInst);
Line 3784 
Line 6064 
             break;             break;
         }         }
  
         case METHOD_SNIA_PROVIDER20:          case METHOD_METHODPROVIDER:
           {
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               jstring jMethod = env->NewStringUTF(request->methodName.getString().getCString());
   
               JMPIjvm::checkException(env);
   
               jobject jVecIn = env->NewObject(jv->VectorClassRef,jv->VectorNew);
   
               JMPIjvm::checkException(env);
   
               for (int i=0,m=request->inParameters.size(); i<m; i++)
               {
                   const CIMParamValue &parm  = request->inParameters[i];
                   const CIMValue       v     = parm.getValue();
                   CIMProperty         *p     = new CIMProperty(parm.getParameterName(),v,v.getArraySize());
                   jint                 jpRef = DEBUG_ConvertCToJava (CIMProperty*, jint, p);
                   jobject              jp    = env->NewObject(jv->CIMPropertyClassRef,jv->CIMPropertyNewI,jpRef);
   
                   env->CallVoidMethod(jVecIn,jv->VectorAddElement,jp);
                }
   
               jobject jVecOut=env->NewObject(jv->VectorClassRef,jv->VectorNew);
               JMPIjvm::checkException(env);
   
               jobject jValueRet = env->CallObjectMethod((jobject)pr.jProvider,
                                                         id,
                                                         jcop,
                                                         jMethod,
                                                         jVecIn,
                                                         jVecOut);
               JMPIjvm::checkException(env);
   
               STAT_PMS_PROVIDEREND;
   
               handler.processing();
   
               jint      jValueRetRef = env->CallIntMethod(jValueRet,JMPIjvm::jv.CIMValueCInst);
               CIMValue *valueRet     = DEBUG_ConvertJavaToC (jint, CIMValue*, jValueRetRef);
   
               handler.deliver(*valueRet);
   
               for (int i=0,m=env->CallIntMethod(jVecOut,JMPIjvm::jv.VectorSize); i<m; i++)
               {
                   JMPIjvm::checkException(env);
   
                   jobject jProp = env->CallObjectMethod(jVecOut,JMPIjvm::jv.VectorElementAt,i);
   
                   JMPIjvm::checkException(env);
   
                   jint         jpRef = env->CallIntMethod(jProp,JMPIjvm::jv.CIMPropertyCInst);
                   CIMProperty *p     = DEBUG_ConvertJavaToC (jint, CIMProperty*, jpRef);
   
                   JMPIjvm::checkException(env);
   
                   handler.deliverParamValue(CIMParamValue(p->getName().getString(),p->getValue()));
               }
   
               handler.complete();
               break;
           }
   
           case METHOD_METHODPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);             jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, objectPath);
             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);             jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
  
Line 3815 
Line 6164 
  
             jobject jValueRet = env->CallObjectMethod((jobject)pr.jProvider,             jobject jValueRet = env->CallObjectMethod((jobject)pr.jProvider,
                                                       id,                                                       id,
                                                         joc,
                                                       jcop,                                                       jcop,
                                                       jMethod,                                                       jMethod,
                                                       jVecIn,                                                       jVecIn,
Line 3823 
Line 6173 
  
             STAT_PMS_PROVIDEREND;             STAT_PMS_PROVIDEREND;
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             handler.processing();             handler.processing();
  
             jint      jValueRetRef = env->CallIntMethod(jValueRet,JMPIjvm::jv.CIMValueCInst);             jint      jValueRetRef = env->CallIntMethod(jValueRet,JMPIjvm::jv.CIMValueCInst);
Line 3887 
Line 6244 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_SNIA_PROVIDER20,         METHOD_EVENTPROVIDER,
          METHOD_EVENTPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 3916 
Line 6274 
         String fileName = resolveFileName(providerLocation);         String fileName = resolveFileName(providerLocation);
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (fileName, providerName,
             providerManager.getProvider(fileName, providerName, String::EMPTY);                                                                           String::EMPTY);
  
         indProvRecord *prec = NULL;         indProvRecord *prec = NULL;
  
Line 3955 
Line 6313 
         context->insert(request->operationContext.get(AcceptLanguageListContainer::NAME));         context->insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context->insert(request->operationContext.get(ContentLanguageListContainer::NAME));         context->insert(request->operationContext.get(ContentLanguageListContainer::NAME));
         context->insert(request->operationContext.get(SubscriptionInstanceContainer::NAME));         context->insert(request->operationContext.get(SubscriptionInstanceContainer::NAME));
         context->insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME));  
         context->insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME));         context->insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME));
  
         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();
Line 4024 
Line 6381 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
           if (interfaceType == "JMPI")
           {
         // public void activateFilter (org.pegasus.jmpi.SelectExp     filter,         // public void activateFilter (org.pegasus.jmpi.SelectExp     filter,
         //                             java.lang.String               eventType,         //                             java.lang.String               eventType,
         //                             org.pegasus.jmpi.CIMObjectPath classPath,         //                             org.pegasus.jmpi.CIMObjectPath classPath,
         //                             java.lang.String               owner)             //                             boolean                        firstActivation)
         //        throws org.pegasus.jmpi.CIMException         //        throws org.pegasus.jmpi.CIMException
         id = env->GetMethodID((jclass)pr.jProviderClass,         id = env->GetMethodID((jclass)pr.jProviderClass,
                               "activateFilter",                               "activateFilter",
Line 4036 
Line 6401 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_EVENTPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateSubscriptionRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateSubscriptionRequest: found METHOD_EVENTPROVIDER."<<PEGASUS_STD(endl));
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public void activateFilter (org.pegasus.jmpi.OperationContext oc,
              //                             org.pegasus.jmpi.SelectExp        filter,
              //                             java.lang.String                  eventType,
              //                             org.pegasus.jmpi.CIMObjectPath    classPath,
              //                             boolean                           firstActivation)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "activateFilter",
                                    "(Lorg/pegasus/jmpi/OperationContext;Lorg/pegasus/jmpi/SelectExp;Ljava/lang/String;Lorg/pegasus/jmpi/CIMObjectPath;Z)V");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_EVENTPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateSubscriptionRequest: found METHOD_EVENTPROVIDER2."<<PEGASUS_STD(endl));
              }
           }
   
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleCreateSubscriptionRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_SNIA_PROVIDER20:          case METHOD_EVENTPROVIDER:
           {
               jint    jSelRef = DEBUG_ConvertCToJava (CMPI_SelectExp*, jint, eSelx);
               jobject jSel    = env->NewObject(jv->SelectExpClassRef,jv->SelectExpNewI,jSelRef);
   
               JMPIjvm::checkException(env);
   
               jint    jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jint, &eSelx->classNames[0]);
               jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jcopRef);
   
               JMPIjvm::checkException(env);
   
               jstring jType = env->NewStringUTF(request->nameSpace.getString().getCString());
   
               JMPIjvm::checkException(env);
   
               env->CallVoidMethod((jobject)pr.jProvider,
                                   id,
                                   jSel,
                                   jType,
                                   jcop,
                                   (jboolean)0);
   
               JMPIjvm::checkException(env);
   
               //
               //  Increment count of current subscriptions for this provider
               //
               if (ph.GetProvider ().testIfZeroAndIncrementSubscriptions ())
               {
                   //
                   //  If there were no current subscriptions before the increment,
                   //  the first subscription has been created
                   //  Call the provider's enableIndications method
                   //
                   if (_subscriptionInitComplete)
                   {
                       prec->enabled = true;
                       CIMRequestMessage * request = 0;
                       CIMResponseMessage * response = 0;
                       prec->handler = new EnableIndicationsResponseHandler (
                           request,
                           response,
                           req_provider,
                           _indicationCallback,
                           _responseChunkCallback);
                   }
               }
   
               STAT_PMS_PROVIDEREND;
               break;
           }
   
           case METHOD_EVENTPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jSelRef = DEBUG_ConvertCToJava (CMPI_SelectExp*, jint, eSelx);             jint    jSelRef = DEBUG_ConvertCToJava (CMPI_SelectExp*, jint, eSelx);
             jobject jSel    = env->NewObject(jv->SelectExpClassRef,jv->SelectExpNewI,jSelRef);             jobject jSel    = env->NewObject(jv->SelectExpClassRef,jv->SelectExpNewI,jSelRef);
  
Line 4062 
Line 6515 
  
             env->CallVoidMethod((jobject)pr.jProvider,             env->CallVoidMethod((jobject)pr.jProvider,
                                 id,                                 id,
                                   joc,
                                 jSel,                                 jSel,
                                 jType,                                 jType,
                                 jcop,                                 jcop,
Line 4069 
Line 6523 
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             //             //
             //  Increment count of current subscriptions for this provider             //  Increment count of current subscriptions for this provider
             //             //
Line 4084 
Line 6545 
                     prec->enabled = true;                     prec->enabled = true;
                     CIMRequestMessage * request = 0;                     CIMRequestMessage * request = 0;
                     CIMResponseMessage * response = 0;                     CIMResponseMessage * response = 0;
                     prec->handler = new EnableIndicationsResponseHandler                      prec->handler = new EnableIndicationsResponseHandler(
                         (request, response, req_provider, _indicationCallback);                          request,
                           response,
                           req_provider,
                           _indicationCallback,
                           _responseChunkCallback);
                 }                 }
             }             }
  
Line 4118 
Line 6583 
  
     typedef enum {     typedef enum {
        METHOD_UNKNOWN = 0,        METHOD_UNKNOWN = 0,
        METHOD_SNIA_PROVIDER20,         METHOD_EVENTPROVIDER,
          METHOD_EVENTPROVIDER2,
     } METHOD_VERSION;     } METHOD_VERSION;
     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;     METHOD_VERSION   eMethodFound  = METHOD_UNKNOWN;
     JNIEnv          *env           = NULL;     JNIEnv          *env           = NULL;
Line 4146 
Line 6612 
         String fileName = resolveFileName(providerLocation);         String fileName = resolveFileName(providerLocation);
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (fileName, providerName,
             providerManager.getProvider(fileName, providerName, String::EMPTY);                                                                           String::EMPTY);
  
         indProvRecord *prec = NULL;         indProvRecord *prec = NULL;
  
Line 4169 
Line 6635 
  
         selxTab.remove(sPathString);         selxTab.remove(sPathString);
  
         // convert arguments  
         OperationContext context;  
   
         context.insert(request->operationContext.get(IdentityContainer::NAME));  
         context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));  
         context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME));  
         context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME));  
   
         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();
  
         JMPIProvider & pr=ph.GetProvider();         JMPIProvider & pr=ph.GetProvider();
Line 4206 
Line 6663 
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
         jmethodID id = NULL;         jmethodID id = NULL;
           String    interfaceType;
           String    interfaceVersion;
   
           getInterfaceType (request->operationContext.get (ProviderIdContainer::NAME),
                             interfaceType,
                             interfaceVersion);
  
           if (interfaceType == "JMPI")
           {
         // public void deActivateFilter (org.pegasus.jmpi.SelectExp    filter,         // public void deActivateFilter (org.pegasus.jmpi.SelectExp    filter,
         //                              java.lang.String               eventType,         //                              java.lang.String               eventType,
         //                              org.pegasus.jmpi.CIMObjectPath classPath,         //                              org.pegasus.jmpi.CIMObjectPath classPath,
Line 4218 
Line 6683 
  
         if (id != NULL)         if (id != NULL)
         {         {
             eMethodFound = METHOD_SNIA_PROVIDER20;                 eMethodFound = METHOD_EVENTPROVIDER;
             DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest: found METHOD_SNIA_PROVIDER20."<<PEGASUS_STD(endl));                 DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest: found METHOD_EVENTPROVIDER."<<PEGASUS_STD(endl));
              }
           }
           else if (interfaceType == "JMPIExperimental")
           {
              // public void deActivateFilter (org.pegasus.jmpi.OperationContext oc,
              //                               org.pegasus.jmpi.SelectExp        filter,
              //                               java.lang.String                  eventType,
              //                               org.pegasus.jmpi.CIMObjectPath    classPath,
              //                               boolean                           lastActivation)
              //        throws org.pegasus.jmpi.CIMException
              id = env->GetMethodID((jclass)pr.jProviderClass,
                                    "deActivateFilter",
                                    "(Lorg/pegasus/jmpi/SelectExp;Ljava/lang/String;Lorg/pegasus/jmpi/CIMObjectPath;Z)V");
   
              if (id != NULL)
              {
                  eMethodFound = METHOD_EVENTPROVIDER2;
                  DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest: found METHOD_EVENTPROVIDER2."<<PEGASUS_STD(endl));
              }
           }
   
           if (id == NULL)
           {
              DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest: No method found!"<<PEGASUS_STD(endl));
   
              PEG_METHOD_EXIT();
   
              STAT_COPYDISPATCHER
   
              throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                             MessageLoaderParms ("ProviderManager.JMPI.METHOD_NOT_FOUND",
                                                                 "Could not find a method for the provider based on InterfaceType."));
         }         }
  
         JMPIjvm::checkException(env);         JMPIjvm::checkException(env);
  
         switch (eMethodFound)         switch (eMethodFound)
         {         {
         case METHOD_SNIA_PROVIDER20:          case METHOD_EVENTPROVIDER:
           {
               jint    jObj = DEBUG_ConvertCToJava (CMPI_SelectExp*, jint, eSelx);
               jobject jSel = env->NewObject(jv->SelectExpClassRef,jv->SelectExpNewI,jObj);
   
               JMPIjvm::checkException(env);
   
               jObj = DEBUG_ConvertCToJava (CIMObjectPath*, jint, &eSelx->classNames[0]);
   
               jobject jRef = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewI,jObj);
   
               JMPIjvm::checkException(env);
   
               jstring jType = env->NewStringUTF(request->nameSpace.getString().getCString());
   
               JMPIjvm::checkException(env);
   
               env->CallVoidMethod((jobject)pr.jProvider,
                                   id,
                                   jSel,
                                   jType,
                                   jRef,
                                   (jboolean)(prec==NULL));
   
               JMPIjvm::checkException(env);
   
               //
               //  Decrement count of current subscriptions for this provider
               //
               if (ph.GetProvider ().decrementSubscriptionsAndTestIfZero ())
               {
                   //
                   //  If there are no current subscriptions after the decrement,
                   //  the last subscription has been deleted
                   //  Call the provider's disableIndications method
                   //
                   if (_subscriptionInitComplete)
                   {
                       prec->enabled = false;
                       if (prec->handler) delete prec->handler;
                       prec->handler = NULL;
                   }
               }
   
               STAT_PMS_PROVIDEREND;
   
               delete eSelx;
               delete qContext;
               delete srec;
               break;
           }
   
           case METHOD_EVENTPROVIDER2:
         {         {
               jint    jocRef = DEBUG_ConvertCToJava (OperationContext*, jint, &request->operationContext);
               jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewI,jocRef);
   
             jint    jObj = DEBUG_ConvertCToJava (CMPI_SelectExp*, jint, eSelx);             jint    jObj = DEBUG_ConvertCToJava (CMPI_SelectExp*, jint, eSelx);
             jobject jSel = env->NewObject(jv->SelectExpClassRef,jv->SelectExpNewI,jObj);             jobject jSel = env->NewObject(jv->SelectExpClassRef,jv->SelectExpNewI,jObj);
  
Line 4245 
Line 6797 
  
             env->CallVoidMethod((jobject)pr.jProvider,             env->CallVoidMethod((jobject)pr.jProvider,
                                 id,                                 id,
                                   joc,
                                 jSel,                                 jSel,
                                 jType,                                 jType,
                                 jRef,                                 jRef,
Line 4252 
Line 6805 
  
             JMPIjvm::checkException(env);             JMPIjvm::checkException(env);
  
               if (joc)
               {
                  env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);
   
                  JMPIjvm::checkException(env);
               }
   
             //             //
             //  Decrement count of current subscriptions for this provider             //  Decrement count of current subscriptions for this provider
             //             //
Line 4424 
Line 6984 
            request->operationContext.get(ProviderIdContainer::NAME));            request->operationContext.get(ProviderIdContainer::NAME));
  
         // get cached or load new provider module         // get cached or load new provider module
         JMPIProvider::OpProviderHolder ph =          JMPIProvider::OpProviderHolder ph = providerManager.getProvider (name.getPhysicalName(),
             providerManager.getProvider(name.getPhysicalName(),                                                                           name.getLogicalName(),
                name.getLogicalName(), String::EMPTY);                                                                           String::EMPTY);
  
     }     }
     HandlerCatch(handler);     HandlerCatch(handler);
Line 4487 
Line 7047 
                 prec->enabled = true;                 prec->enabled = true;
                 CIMRequestMessage * request = 0;                 CIMRequestMessage * request = 0;
                 CIMResponseMessage * response = 0;                 CIMResponseMessage * response = 0;
                 prec->handler = new EnableIndicationsResponseHandler                  prec->handler = new EnableIndicationsResponseHandler(
                     (request, response, provider, _indicationCallback);                      request,
                       response,
                       provider,
                       _indicationCallback,
                       _responseChunkCallback);
             }             }
         }         }
         catch (CIMException & e)         catch (CIMException & e)


Legend:
Removed from v.1.38  
changed lines
  Added in v.1.43

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2