version 1.68, 2008/01/30 12:06:31
|
version 1.69, 2008/03/12 19:11:56
|
|
|
#include <Pegasus/Common/OperationContext.h> | #include <Pegasus/Common/OperationContext.h> |
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/Common/StatisticalData.h> | #include <Pegasus/Common/StatisticalData.h> |
#include <Pegasus/Common/Logger.h> |
|
#include <Pegasus/Common/MessageLoader.h> //l10n | #include <Pegasus/Common/MessageLoader.h> //l10n |
#include <Pegasus/Common/Constants.h> | #include <Pegasus/Common/Constants.h> |
#include <Pegasus/Common/FileSystem.h> | #include <Pegasus/Common/FileSystem.h> |
|
|
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
int JMPIProviderManager::trace=0; |
|
|
|
#ifdef PEGASUS_DEBUG |
|
#define DDD(x) if (JMPIProviderManager::trace) x; |
|
#else |
|
#define DDD(x) |
|
#endif |
|
|
|
// request->localOnly is replaced with JMPI_LOCALONLY for | // request->localOnly is replaced with JMPI_LOCALONLY for |
// getInstance () and enumerateInstances () | // getInstance () and enumerateInstances () |
#define JMPI_LOCALONLY false | #define JMPI_LOCALONLY false |
|
|
| |
void JMPIProviderManager::debugPrintMethodPointers (JNIEnv *env, jclass jc) | void JMPIProviderManager::debugPrintMethodPointers (JNIEnv *env, jclass jc) |
{ | { |
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
|
"JMPIProviderManager::debugPrintMethodPointers"); |
|
|
static const char *methodNames[][3] = { | static const char *methodNames[][3] = { |
// CIMProvider | // CIMProvider |
{"snia 2.0", | {"snia 2.0", |
|
|
| |
if (!env) | if (!env) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::debugPrintMethodPointers:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" env is NULL!"<<endl); |
"No JNI environment specified. (JNIEnv==NULL)"); |
|
PEG_METHOD_EXIT(); |
return; | return; |
} | } |
if (!jc) | if (!jc) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::debugPrintMethodPointers: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"jc is NULL!"<<endl); |
"No Java class specified. (jc==NULL)"); |
|
PEG_METHOD_EXIT(); |
return; | return; |
} | } |
| |
for (int i = 0; i < (int)(sizeof (methodNames)/sizeof (methodNames[0])); i++) | for (int i = 0; i < (int)(sizeof (methodNames)/sizeof (methodNames[0])); i++) |
{ | { |
jmethodID id = env->GetMethodID(jc,methodNames[i][1], methodNames[i][2]); | jmethodID id = env->GetMethodID(jc,methodNames[i][1], methodNames[i][2]); |
DDD(cout<<"--- JMPIProviderManager::debugPrintMethodPointers: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
<<methodNames[i][0]<<", "<<methodNames[i][1]<<", id = " |
"Method: %s, %s, id = %X", |
<<hex<<(long)id<<dec<<endl); |
methodNames[i][0],methodNames[i][1],(long)id)); |
|
|
env->ExceptionClear(); | env->ExceptionClear(); |
} | } |
| |
env->ExceptionClear(); | env->ExceptionClear(); |
|
PEG_METHOD_EXIT(); |
|
return; |
} | } |
| |
void |
void debugIntrospectJavaObject (JNIEnv *env, jobject jInst) |
debugIntrospectJavaObject (JNIEnv *env, jobject jInst) |
|
{ | { |
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
|
"JMPIProviderManager::debugIntrospectJavaObject"); |
|
|
jclass jInstClass = env->GetObjectClass(jInst); | jclass jInstClass = env->GetObjectClass(jInst); |
jclass jInstSuperClass = env->GetSuperclass(jInstClass); | jclass jInstSuperClass = env->GetSuperclass(jInstClass); |
jmethodID jmidGetDeclaredMethods = env->GetMethodID( | jmethodID jmidGetDeclaredMethods = env->GetMethodID( |
|
|
jmidToString); | jmidToString); |
const char *pszResult = env->GetStringUTFChars(jstringResult, 0); | const char *pszResult = env->GetStringUTFChars(jstringResult, 0); |
| |
cout<<"--- JMPIProviderManager::debugIntrospectJavaObject: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
<<pszResult<<endl; |
"Introspect java object: %s",pszResult)); |
| |
env->ReleaseStringUTFChars (jstringResult, pszResult); | env->ReleaseStringUTFChars (jstringResult, pszResult); |
} | } |
} | } |
} | } |
| |
|
|
env->ExceptionClear(); | env->ExceptionClear(); |
|
PEG_METHOD_EXIT(); |
|
return; |
} | } |
| |
void |
void debugDumpJavaObject (JNIEnv *env, jobject jInst) |
debugDumpJavaObject (JNIEnv *env, jobject jInst) |
|
{ | { |
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
|
"JMPIProviderManager::debugDumpJavaObject"); |
jclass jInstClass = env->GetObjectClass(jInst); | jclass jInstClass = env->GetObjectClass(jInst); |
jclass jInstSuperClass = env->GetSuperclass(jInstClass); | jclass jInstSuperClass = env->GetSuperclass(jInstClass); |
jmethodID jmidToString1 = env->GetMethodID( | jmethodID jmidToString1 = env->GetMethodID( |
|
|
"()Ljava/lang/String;"); | "()Ljava/lang/String;"); |
if (!jmidToString1 || !jmidToString2) | if (!jmidToString1 || !jmidToString2) |
{ | { |
|
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"No class or super class description."); |
env->ExceptionClear(); | env->ExceptionClear(); |
|
PEG_METHOD_EXIT(); |
return; | return; |
} | } |
jstring jstringResult1 = (jstring)env->CallObjectMethod( | jstring jstringResult1 = (jstring)env->CallObjectMethod( |
|
|
JMPIjvm::jv.instanceMethodNames[22].methodName, | JMPIjvm::jv.instanceMethodNames[22].methodName, |
JMPIjvm::jv.instanceMethodNames[22].signature); | JMPIjvm::jv.instanceMethodNames[22].signature); |
| |
cout<<"--- JMPIProviderManager::debugIntrospectJavaObject: jInstClass = " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
<<jInstClass<<", jInstSuperClass = "<<jInstSuperClass |
"Dumping class %s:\n " |
<<", jClassShouldBe = "<<JMPIjvm::jv.classRefs[18]<<", jmidCInst = " |
" jInstSuperClass = %s\n" |
<<jmidCInst<<endl; |
" jClassShouldBe = %s\n" |
cout<<"pszResult1 = "<<pszResult1<<endl; |
" jmidCInst = %s\n" |
cout<<"pszResult2 = "<<pszResult2<<endl; |
" pszResult1 = %s\n" |
cout<<"pszResult3 = "<<pszResult3<<endl; |
" pszResult2 = %s\n" |
|
" pszResult3 = %s", |
|
jInstClass,jInstSuperClass,JMPIjvm::jv.classRefs[18],jmidCInst, |
|
pszResult1,pszResult2,pszResult3 )); |
| |
env->ReleaseStringUTFChars (jstringResult1, pszResult1); | env->ReleaseStringUTFChars (jstringResult1, pszResult1); |
env->ReleaseStringUTFChars (jstringResult2, pszResult2); | env->ReleaseStringUTFChars (jstringResult2, pszResult2); |
env->ReleaseStringUTFChars (jstringResult3, pszResult3); | env->ReleaseStringUTFChars (jstringResult3, pszResult3); |
| |
env->ExceptionClear(); | env->ExceptionClear(); |
|
PEG_METHOD_EXIT(); |
|
return; |
} | } |
| |
bool JMPIProviderManager::getInterfaceType( | bool JMPIProviderManager::getInterfaceType( |
|
|
String& interfaceType, | String& interfaceType, |
String& interfaceVersion) | String& interfaceVersion) |
{ | { |
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
|
"JMPIProviderManager::getInterfaceType"); |
|
|
CIMInstance ciProviderModule = pidc.getModule (); | CIMInstance ciProviderModule = pidc.getModule (); |
Uint32 idx; | Uint32 idx; |
bool fRet = true; | bool fRet = true; |
|
|
| |
itValue.get (interfaceType); | itValue.get (interfaceType); |
| |
DDD(cout<<"--- JMPIProviderManager::getInterfaceType: interfaceType = " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<interfaceType<<endl); |
"interfaceType = %s",(const char*)interfaceType.getCString())); |
} | } |
else | else |
{ | { |
|
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
|
"inferfaceType not found."); |
fRet = false; | fRet = false; |
} | } |
| |
|
|
| |
itValue.get (interfaceVersion); | itValue.get (interfaceVersion); |
| |
DDD(cout<<"--- JMPIProviderManager::getInterfaceType: interfaceVersion = " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<interfaceVersion<<endl); |
"interfaceVersion = %s",(const char*)interfaceVersion.getCString())); |
} | } |
else | else |
{ | { |
|
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
|
"inferfaceVersion not found."); |
fRet = false; | fRet = false; |
} | } |
|
PEG_METHOD_EXIT(); |
return fRet; | return fRet; |
} | } |
| |
|
|
JMPIProviderManager::JMPIProviderManager() | JMPIProviderManager::JMPIProviderManager() |
{ | { |
_subscriptionInitComplete = false; | _subscriptionInitComplete = false; |
|
|
#ifdef PEGASUS_DEBUG |
|
if (getenv("PEGASUS_JMPI_TRACE")) |
|
JMPIProviderManager::trace = 1; |
|
else |
|
JMPIProviderManager::trace = 0; |
|
#else |
|
JMPIProviderManager::trace = 0; |
|
#endif |
|
} | } |
| |
JMPIProviderManager::~JMPIProviderManager(void) | JMPIProviderManager::~JMPIProviderManager(void) |
|
|
Boolean JMPIProviderManager::insertProvider(const ProviderName & name, | Boolean JMPIProviderManager::insertProvider(const ProviderName & name, |
const String &ns, const String &cn) | const String &ns, const String &cn) |
{ | { |
String key(ns + String("::") + cn); |
PEG_METHOD_ENTER( TRC_PROVIDERMANAGER, |
|
"JMPIProviderManager::insertProvider"); |
| |
DDD(cout<<"--- JMPIProviderManager::insertProvider: "<<key<<endl); |
String key(ns + String("::") + cn); |
|
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
|
"insertProvider: %s",(const char*)key.getCString())); |
| |
Boolean ret = false; | Boolean ret = false; |
| |
|
|
ret = provReg.insert(key,name); | ret = provReg.insert(key,name); |
} | } |
| |
|
PEG_METHOD_EXIT(); |
return ret; | return ret; |
} | } |
| |
|
|
| |
default: | default: |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, | PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"*** Unsupported Request %d", |
"Unsupported Request %d", |
request->getType() | request->getType() |
)); | )); |
DDD(cout<<"--- JMPIProviderManager::processMessage:" |
|
" Unsupported request "<<request->getType ()<<endl); |
|
| |
response = handleUnsupportedRequest(request); | response = handleUnsupportedRequest(request); |
break; | break; |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleGetInstanceRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleGetInstanceRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
instanceName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->instanceName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
|
"hostname = "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->instanceName.getClassName().getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr=ph.GetProvider(); | JMPIProvider &pr=ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE(( TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleGetInstanceRequest:Calling provider instance: %s" , |
Tracer::LEVEL4, |
(const char*)pr.getName().getCString())); |
"Calling provider.getInstance: " + pr.getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
|
"Calling provider getInstance: "<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleGetInstanceRequest:" |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_INSTANCEPROVIDER."<<endl); |
"handleGetInstanceRequest: " |
|
"Found METHOD_INSTANCEPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER; | eMethodFound = METHOD_CIMINSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
": found METHOD_CIMINSTANCEPROVIDER."<<endl); |
"handleGetInstanceRequest: " |
|
"Found METHOD_CIMINSTANCEPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_INSTANCEPROVIDER2."<<endl); |
"handleGetInstanceRequest: " |
|
"Found METHOD_INSTANCEPROVIDER2."); |
} | } |
/* Fix for 4238 */ | /* Fix for 4238 */ |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"No method found!"<<endl); |
"handleGetInstanceRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->instanceName.getClassName()<<endl); |
"handleGetInstanceRequest: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString() |
|
)); |
| |
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
|
|
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
| |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->instanceName.getClassName()<<endl); |
"handleGetInstanceRequest: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleGetInstanceRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass("<<__LINE__ |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<") "<<request->instanceName.getClassName()<<endl); |
"handleGetInstanceRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass( | cls = pr._cimom_handle->getClass( |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__ |
|
<<") "<<request->instanceName.getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleGetInstanceRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleGetInstanceRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion (METHOD_INSTANCEPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->instanceName.getClassName()<<endl); |
"handleGetInstanceRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass( | cls = pr._cimom_handle->getClass( |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__ |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<") "<<request->instanceName.getClassName()<<endl); |
"handleGetInstanceRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleGetInstancesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleGetInstanceRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion (METHOD_INSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request-> |
|
instanceName.getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleGetInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleGetInstanceRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleEnumerateInstanceRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleEnumerateInstancesRequest - Host name: $0" |
(const char*)request->className.getString().getCString() |
" Name space: $1 Class name: $2", |
)); |
System::getHostName(), |
|
request->nameSpace.getString(), |
|
request->className.getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: " |
|
"hostname = "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->className.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(), | CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(), |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleEnumerateInstanceRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", (const char*)pr.getName().getCString())); |
"Calling provider.enumerateInstances: " + pr.getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: " |
|
"Calling provider enumerateInstances: " |
|
<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleEnumerateInstanceRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, | throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstances" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_INSTANCEPROVIDER."<<endl); |
"handleEnumerateInstances: Found METHOD_INSTANCEPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER; | eMethodFound = METHOD_CIMINSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstances" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMINSTANCEPROVIDER." |
"handleEnumerateInstances: " |
<<endl); |
"Found METHOD_CIMINSTANCEPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstances" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_INSTANCEPROVIDER2." |
"handleEnumerateInstances: " |
<<endl); |
"Found METHOD_INSTANCEPROVIDER2."); |
} | } |
if (id == NULL) | if (id == NULL) |
{ | { |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER2; | eMethodFound = METHOD_CIMINSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstances" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMINSTANCEPROVIDER2." |
"handleEnumerateInstances: " |
<<endl); |
"Found METHOD_CIMINSTANCEPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstancesRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
" No method found!"<<endl); |
"handleEnumerateInstances: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->className<<endl); |
"handleEnumerateInstances: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->className<<endl); |
"handleEnumerateInstances: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstances" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during " |
"handleEnumerateInstances: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstances: " |
|
"enter: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstances: " |
|
"exit: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleEnumerate" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"InstancesRequest: Error: Caught " |
"handleEnumerateInstances: " |
"CIMException during " |
"Caught CIMExcetion " |
"cimom_handle->getClass(" |
"during cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstances: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstances: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstancesRequest: Error: Caught " |
"handleEnumerateInstances: " |
"CIMExcetion during cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstancesRequest: " |
|
"enter: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstancesRequest: " |
|
"exit: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstancesRequest: Error: " |
"handleEnumerateInstancesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion " |
"cimom_handle->getClass(" |
"cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstancesRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass (context, | cls = pr._cimom_handle->getClass (context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleEnumerateInstancesRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstancesRequest: Error: Caught " |
"handleEnumerateInstancesRequest: " |
"CIMExcetion during cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_INSTANCEPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstancesRequest: " |
|
"enter: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstancesRequest: " |
|
"exit: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstancesRequest: Error: " |
"handleEnumerateInstancesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion " |
"cimom_handle->getClass(" |
"cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstancesRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstancesRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstancesRequest: Error: Caught " |
"handleEnumerateInstancesRequest: " |
"CIMExcetion during cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_INSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleEnumerateInstancesRequest: " |
|
"enter: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleEnumerateInstancesRequest: " |
|
"exit: cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstancesRequest: Error: " |
"handleEnumerateInstancesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion " |
"cimom_handle->getClass(" |
"during cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstancesRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
": should not be here!"<<endl); |
"handleEnumerateInstancesRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleEnumerateInstanceNamesRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleEnumerateInstanceNamesRequest - " |
(const char*)request->className.getString().getCString())); |
"Host name: $0 Name space: $1 Class name: $2", |
|
System::getHostName(), |
|
request->nameSpace.getString(), |
|
request->className.getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest" |
|
": hostname = " |
|
<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->className.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(), | CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(), |
|
|
| |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleEnumerateInstanceNamesRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s",(const char*)pr.getName().getCString())); |
"Calling provider.enumerateInstanceNames: " + pr.getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleEnumerateInstanceNamesRequest" |
|
": Calling provider : enumerateInstanceNames: " |
|
<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleEnumerateInstanceNamesRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleEnumerateInstanceNamesRequest: found " |
"handleEnumerateInstanceNamesRequest: " |
"METHOD_INSTANCEPROVIDER." |
"Found METHOD_INSTANCEPROVIDER."); |
<<endl); |
|
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER; | eMethodFound = METHOD_CIMINSTANCEPROVIDER; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleEnumerateInstanceNamesRequest: found " |
"handleEnumerateInstanceNamesRequest: " |
"METHOD_CIMINSTANCEPROVIDER." |
"Found METHOD_CIMINSTANCEPROVIDER."); |
<<endl); |
|
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleEnumerateInstanceNamesRequest: found " |
"handleEnumerateInstanceNamesRequest: " |
"METHOD_INSTANCEPROVIDER2." |
"Found METHOD_INSTANCEPROVIDER2."); |
<<endl); |
|
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER2; | eMethodFound = METHOD_CIMINSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleEnumerateInstanceNamesRequest: found " |
"handleEnumerateInstanceNamesRequest: " |
"METHOD_CIMINSTANCEPROVIDER2." |
"Found METHOD_CIMINSTANCEPROVIDER2."); |
<<endl); |
|
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstanceNamesRequest: No method found!" |
"handleEnumerateInstanceNamesRequest: " |
<<endl); |
"No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstanceNamesRequest: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleEnumerateInstanceNamesRequest: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstanceNamesRequest: Error: " |
"handleEnumerateInstanceNamesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER) " |
"cimom_handle->getClass(" |
"during cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstanceNamesRequest: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleEnumerateInstanceNamesRequest: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstanceNamesRequest: Error: " |
"handleEnumerateInstanceNamesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER2) " |
"cimom_handle->getClass(" |
"during cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstanceNamesRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleEnumerateInstanceNamesRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstanceNamesRequest: Error: " |
"handleEnumerateInstanceNamesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion(METHOD_INSTANCEPROVIDER2) " |
"cimom_handle->getClass(" |
"during cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<request->className<<endl); |
"handleEnumerateInstanceNamesRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleEnumerateInstanceNamesRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstanceNamesRequest: Error: " |
"handleEnumerateInstanceNamesRequest: " |
"Caught CIMExcetion during " |
"Caught CIMExcetion(METHOD_INSTANCEPROVIDER) " |
"cimom_handle->getClass(" |
"during cimom_handle->getClass(%s): %s ", |
<<__LINE__<<") "<<endl); |
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleEnumerateInstanceNamesRequest: should not be" |
"handleEnumerateInstanceNamesRequest: " |
" here!" |
"Unknown method provider!"); |
<<endl); |
|
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
"JMPIProviderManager::handleCreateInstanceRequest - Host name: $0 " |
"handleCreateInstanceRequest: " |
"Name space: $1 Class name: $2", |
"name space = %s class name = %s", |
System::getHostName(), |
(const char*)request->nameSpace.getString().getCString(), |
request->nameSpace.getString(), |
(const char*)request-> |
request->newInstance.getPath().getClassName().getString()); |
newInstance.getPath().getClassName().getString().getCString() |
|
)); |
DDD(cout<<"--- JMPIProviderManager::handleCreateInstanceRequest: " |
|
"hostname = " |
|
<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->newInstance.getPath().getClassName().getString() |
|
<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = | CIMObjectPath *objectPath = |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleCreateInstanceRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", (const char*)pr.getName().getCString())); |
"Calling provider.createInstance: " + ph.GetProvider().getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleCreateInstanceRequest: " |
|
"Calling provider createInstance: " |
|
<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleCreateInstanceRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD (cout<<"--- JMPIProviderManager::handleCreateInstanceRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
": found METHOD_INSTANCEPROVIDER." |
"handleCreateInstanceRequest: " |
<<endl); |
"Found METHOD_INSTANCEPROVIDER."); |
} | } |
} | } |
else if (interfaceType == "JMPIExperimental") | else if (interfaceType == "JMPIExperimental") |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleCreateInstanceRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_INSTANCEPROVIDER2."<<endl); |
"handleCreateInstanceRequest: " |
|
"Found METHOD_INSTANCEPROVIDER2."); |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleCreateInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"No method found!"<<endl); |
"handleCreateInstanceRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
DDD(cout<<"--- JMPIProviderManager::handleCreateInstanceRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"id = "<<id<<", jcop = "<<jcop |
"handleCreateInstanceRequest: " |
<<", jci = "<<jci<<endl); |
"id = %X, jcop = %X, jci = %X", |
|
(long)id,(long)jcop,(long)jci)); |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
| |
|
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
DDD(cout<<"--- JMPIProviderManager::handleCreateInstanceRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"id = "<<id<<", jcop = "<<jcop |
"handleCreateInstanceRequest: " |
<<", jci = "<<jci<<endl); |
"id = %X, jcop = %X, jci = %X", |
|
(long)id,(long)jcop,(long)jci)); |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleCreateInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleCreateInstanceRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
"JMPIProviderManager::handleModifyInstanceRequest - Host name: $0 " |
"handleModifyInstanceRequest: " |
" Name space: $1 Class name: $2", |
"name space = %s class name = %s", |
System::getHostName(), |
(const char*)request->nameSpace.getString().getCString(), |
request->nameSpace.getString(), |
(const char*)request->modifiedInstance.getPath().getClassName() |
request->modifiedInstance.getPath().getClassName().getString()); |
.getString().getCString() |
|
)); |
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest: " |
|
"hostname = "<<System::getHostName() |
|
<<", namespace = "<<request->nameSpace.getString() |
|
<<", classname = " |
|
<<request->modifiedInstance.getPath().getClassName().getString() |
|
<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = | CIMObjectPath *objectPath = |
|
|
ProviderName name = _resolveProviderName( | ProviderName name = _resolveProviderName( |
request->operationContext.get(ProviderIdContainer::NAME)); | request->operationContext.get(ProviderIdContainer::NAME)); |
| |
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"provider name physical = "<<name.getPhysicalName() |
"handleModifyInstanceRequest: " |
<<", logical = "<<name.getLogicalName()<<endl); |
"provider name physical = %s, logical = %s", |
|
(const char*)name.getPhysicalName().getCString(), |
|
(const char*)name.getLogicalName().getCString() |
|
)); |
| |
// get cached or load new provider module | // get cached or load new provider module |
JMPIProvider::OpProviderHolder ph = | JMPIProvider::OpProviderHolder ph = |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleModifyInstanceRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", (const char*)pr.getName().getCString())); |
"Calling provider.modifyInstance: " + pr.getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest: " |
|
"Calling provider "<<hex<<(long)&pr<<dec |
|
<<", name = "<<pr.getName ()<<", module = " |
|
<<pr.getModule()<<" modifyInstance: "<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleModifyInstanceRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_INSTANCEPROVIDER."<<endl); |
"handleModifyInstanceRequest: " |
|
"Found METHOD_INSTANCEPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER; | eMethodFound = METHOD_CIMINSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleModifyInstanceRequest: found " |
"handleModifyInstanceRequest: " |
"METHOD_CIMINSTANCEPROVIDER." |
"Found METHOD_CIMINSTANCEPROVIDER."); |
<<endl); |
|
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_INSTANCEPROVIDER2."<<endl); |
"handleModifyInstanceRequest: " |
|
"Found METHOD_INSTANCEPROVIDER2."); |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
" No method found!"<<endl); |
"handleModifyInstanceRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleModifyInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!" |
"handleModifyInstanceRequest: Unknown method provider!"); |
<<endl); |
|
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleDeleteInstanceRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleDeleteInstanceRequest - Host name: $0 " |
(const char*)request-> |
" Name space: $1 Class name: $2", |
instanceName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->instanceName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleDeleteInstanceRequest: " |
|
"hostname = " |
|
<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->instanceName.getClassName().getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleDeleteInstanceRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", (const char*)pr.getName().getCString())); |
"Calling provider.deleteInstance: " + pr.getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleDeleteInstanceRequest: " |
|
"Calling provider deleteInstance: "<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleDeleteInstanceRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleDeleteInstanceRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_INSTANCEPROVIDER." |
"handleDeleteInstanceRequest: " |
<<endl); |
"Found METHOD_INSTANCEPROVIDER."); |
} | } |
} | } |
else if (interfaceType == "JMPIExperimental") | else if (interfaceType == "JMPIExperimental") |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleDeleteInstanceRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_INSTANCEPROVIDER2." |
"handleDeleteInstanceRequest: " |
<<endl); |
"Found METHOD_INSTANCEPROVIDER2."); |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleDeleteInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"No method found!"<<endl); |
"handleDeleteInstanceRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleDeleteInstanceRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleDeleteInstanceRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleExecQueryRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleExecQueryRequest - Host name: $0 " |
(const char*)request->className.getString().getCString() |
"Name space: $1 Class name: $2", |
)); |
System::getHostName(), |
|
request->nameSpace.getString(), |
|
request->className.getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: hostname = " |
|
<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->className.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(), | CIMObjectPath *objectPath = new CIMObjectPath (System::getHostName(), |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleExecQueryRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s, queryLanguage: %s, query: %s", |
"Calling provider.execQuery: " + pr.getName()); |
(const char*)pr.getName().getCString(), |
|
(const char*)request->queryLanguage.getCString(), |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
(const char*)request->query.getCString() |
"Calling provider execQuery: "<<pr.getName() |
)); |
<<", queryLanguage: "<<request->queryLanguage<<", query: " |
|
<<request->query<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleExecQueryRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER; | eMethodFound = METHOD_INSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_INSTANCEPROVIDER."<<endl); |
"handleExecQueryRequest: Found METHOD_INSTANCEPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER; | eMethodFound = METHOD_CIMINSTANCEPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_CIMINSTANCEPROVIDER."<<endl); |
"handleExecQueryRequest: " |
|
"Found METHOD_CIMINSTANCEPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_INSTANCEPROVIDER2; | eMethodFound = METHOD_INSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_INSTANCEPROVIDER2."<<endl); |
"handleExecQueryRequest: Found METHOD_INSTANCEPROVIDER2."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMINSTANCEPROVIDER2; | eMethodFound = METHOD_CIMINSTANCEPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_CIMINSTANCEPROVIDER2."<<endl); |
"handleExecQueryRequest: " |
|
"Found METHOD_CIMINSTANCEPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleExecQueryRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass("<<__LINE__ |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<") "<<request->className<<endl); |
"handleExecQueryRequest: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__<<") " |
|
<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleExecQueryRequest: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleExecQueryRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->className<<endl); |
"handleExecQueryRequest: " |
|
"enter(METHOD_CIMINSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__<<") " |
|
<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleExecQueryRequest: " |
|
"exit(METHOD_CIMINSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleExecQueryRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMINSTANCEPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->className<<endl); |
"handleExecQueryRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__<<") " |
|
<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleExecQueryRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleExecQueryRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_INSTANCEPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jVec, | jVec, |
JMPIjvm::jv.VectorElementAt, | JMPIjvm::jv.VectorElementAt, |
i); | i); |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest:" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" jciRet = "<<jciRet<<endl); |
"handleExecQueryRequest: jciRet = %X",jciRet)); |
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
DDD (cout<<"--- JMPIProviderManager::handleExecQueryRequest: done!" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<endl); |
"handleExecQueryRequest: done!"); |
|
|
handler.complete(); | handler.complete(); |
break; | break; |
} | } |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass("<<__LINE__<<") " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<request->className<<endl); |
"handleExecQueryRequest: " |
|
"enter(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass("<<__LINE__<<") " |
|
<<request->className<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleExecQueryRequest: " |
|
"exit(METHOD_INSTANCEPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)request->className.getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Error: Caught CIMExcetion during " |
"handleExecQueryRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_INSTANCEPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)request->className.getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleExecQueryRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleExecQueryRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleAssociatorsRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleAssociatorsRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
objectName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->objectName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
|
"hostname = "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->objectName.getClassName().getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleAssociatorsRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s, role: %s, aCls: %s", |
"Calling provider.associators: " + pr.getName()); |
(const char*)pr.getName().getCString(), |
|
(const char*)request->role.getCString(), |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
(const char*)request->assocClass.getString().getCString() |
"Calling provider associators: "<<pr.getName() |
)); |
<<", role: "<<request->role<<", aCls: " |
|
<<request->assocClass<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleAssociatorsRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER; | eMethodFound = METHOD_ASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_ASSOCIATORPROVIDER."<<endl); |
"handleAssociatorsRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
": found METHOD_CIMASSOCIATORPROVIDER." |
"handleAssociatorsRequest: " |
<<endl); |
"Found METHOD_ASSOCIATORPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER2; | eMethodFound = METHOD_ASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_ASSOCIATORPROVIDER2."<<endl); |
"handleAssociatorsRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER2."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
": found METHOD_CIMASSOCIATORPROVIDER2." |
"handleAssociatorsRequest: " |
<<endl); |
"Found METHOD_CIMASSOCIATORPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleAssociatorsRequest: No method found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleAssociatorsRequest: assocName = %s ", |
<<assocPath->toString ()<<endl); |
(const char*)assocPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleAssociatorsRequest: pathName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultClass = " |
"handleAssociatorsRequest: resultClass = %s ", |
<<request->resultClass<<endl); |
(const char*)request->resultClass.getString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = " |
"handleAssociatorsRequest: role = %s ", |
<<request->role<<endl); |
(const char*)request->role.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultRole = " |
"handleAssociatorsRequest: resultRole = %s ", |
<<request->resultRole<<endl); |
(const char*)request->resultRole.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"includeQualifiers = " |
"handleAssociatorsRequest: includeQualifiers = false"); |
<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
"handleAssociatorsRequest: includeClassOrigin = false"); |
"includeClassOrigin = " |
|
<<false<<endl); |
|
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleAssociatorsRequest: " |
|
"enter(METHOD_CIMASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorsRequest: " |
|
"exit(METHOD_CIMASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociators" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during " |
"handleAssociatorsRequest: " |
"cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMASSOCIATORPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleAssociatorsRequest: assocName = %s ", |
<<assocPath->toString ()<<endl); |
(const char*)assocPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleAssociatorsRequest: pathName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultClass = " |
"handleAssociatorsRequest: resultClass = %s ", |
<<request->resultClass<<endl); |
(const char*)request->resultClass.getString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = " |
"handleAssociatorsRequest: role = %s ", |
<<request->role<<endl); |
(const char*)request->role.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultRole = " |
"handleAssociatorsRequest: resultRole = %s ", |
<<request->resultRole<<endl); |
(const char*)request->resultRole.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"includeQualifiers = " |
"handleAssociatorsRequest: includeQualifiers = false"); |
<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
"handleAssociatorsRequest: includeClassOrigin = false"); |
"includeClassOrigin = " |
|
<<false<<endl); |
|
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleAssociatorsRequest: " |
|
"enter(METHOD_CIMASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleAssociatorsRequest: " |
|
"exit(METHOD_CIMASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociators" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleAssociatorsRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMASSOCIATORPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleAssociatorsRequest: assocName = %s ", |
<<assocPath->toString ()<<endl); |
(const char*)assocPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleAssociatorsRequest: pathName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultClass = " |
"handleAssociatorsRequest: resultClass = %s ", |
<<request->resultClass<<endl); |
(const char*)request->resultClass.getString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = " |
"handleAssociatorsRequest: role = %s ", |
<<request->role<<endl); |
(const char*)request->role.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultRole = " |
"handleAssociatorsRequest: resultRole = %s ", |
<<request->resultRole<<endl); |
(const char*)request->resultRole.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"includeQualifiers = " |
"handleAssociatorsRequest: includeQualifiers = false"); |
<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
"handleAssociatorsRequest: includeClassOrigin = false"); |
"includeClassOrigin = " |
|
<<false<<endl); |
|
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleAssociatorsRequest: " |
|
"enter(METHOD_ASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass( | cls = pr._cimom_handle->getClass( |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorsRequest: " |
|
"exit(METHOD_ASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociators" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleAssociatorsRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_ASSOCIATORPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleAssociatorsRequest: assocName = %s ", |
<<assocPath->toString ()<<endl); |
(const char*)assocPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleAssociatorsRequest: pathName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultClass = " |
"handleAssociatorsRequest: resultClass = %s ", |
<<request->resultClass<<endl); |
(const char*)request->resultClass.getString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = " |
"handleAssociatorsRequest: role = %s ", |
<<request->role<<endl); |
(const char*)request->role.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultRole = " |
"handleAssociatorsRequest: resultRole = %s ", |
<<request->resultRole<<endl); |
(const char*)request->resultRole.getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"includeQualifiers = " |
"handleAssociatorsRequest: includeQualifiers = false"); |
<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
"handleAssociatorsRequest: includeClassOrigin = false"); |
"includeClassOrigin = " |
|
<<false<<endl); |
|
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleAssociatorsRequest: " |
|
"enter(METHOD_ASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorsRequest: " |
|
"exit(METHOD_ASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociators" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleAssociatorsRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_ASSOCIATORPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorsRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleAssociatorsRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleAssociatorNamesRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleAssociatorNamesRequest - Host name: $0 " |
(const char*)request-> |
" Name space: $1 Class name: $2", |
objectName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->objectName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
|
"hostname = " |
|
<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->objectName.getClassName().getString() |
|
<<", assocName = "<<request->assocClass.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleAssociatorNamesRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s, role: %s, aCls: %s", |
"Calling provider.associatorNames: " + pr.getName()); |
(const char*)pr.getName().getCString(), |
|
(const char*)request->role.getCString(), |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)request->assocClass.getString().getCString() |
"Calling provider associatorNames: " |
)); |
<<pr.getName()<<", role: "<<request->role<<", aCls: " |
|
<<request->assocClass<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleAssociatorNamesRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER; | eMethodFound = METHOD_ASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNamesRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
": found METHOD_ASSOCIATORPROVIDER."<<endl); |
"handleAssociatorNamesRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNames" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMASSOCIATORPROVIDER." |
"handleAssociatorNamesRequest: " |
<<endl); |
"Found METHOD_CIMASSOCIATORPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER2; | eMethodFound = METHOD_ASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNamesRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
": found METHOD_ASSOCIATORPROVIDER2."<<endl); |
"handleAssociatorNamesRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER2."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNames" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMASSOCIATORPROVIDER2." |
"handleAssociatorNamesRequest: " |
<<endl); |
"Found METHOD_CIMASSOCIATORPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleAssociatorNames: No method found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = "<<assocPath->toString ()<<endl); |
"handleAssociatorNamesRequest: assocName = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)assocPath->toString().getCString())); |
"resultClass = "<<request->resultClass<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
"handleAssociatorNamesRequest: resultClass = %s ", |
"role = "<<request->role<<endl); |
(const char*)request->resultClass.getString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultRole = "<<request->resultRole<<endl); |
"handleAssociatorNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
|
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorNamesRequest: resultRole = %s ", |
|
(const char*)request->resultRole.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = "<<assocPath->toString ()<<endl); |
"handleAssociatorNamesRequest: assocName = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)assocPath->toString().getCString())); |
"resultClass = "<<request->resultClass<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
"handleAssociatorNamesRequest: resultClass = %s ", |
"role = "<<request->role<<endl); |
(const char*)request->resultClass.getString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"resultRole = "<<request->resultRole<<endl); |
"handleAssociatorNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
|
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorNamesRequest: resultRole = %s ", |
|
(const char*)request->resultRole.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = "<<assocPath->toString ()<<endl); |
"handleAssociatorNamesRequest: assocName = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)assocPath->toString().getCString())); |
"pathName = "<<objectPath->toString ()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
"handleAssociatorNamesRequest: pathName = %s ", |
"resultClass = "<<request->resultClass<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleAssociatorNamesRequest: resultClass = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)request->resultClass.getString().getCString())); |
"resultRole = "<<request->resultRole<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
|
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorNamesRequest: resultRole = %s ", |
|
(const char*)request->resultRole.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = "<<assocPath->toString ()<<endl); |
"handleAssociatorNamesRequest: assocName = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)assocPath->toString().getCString())); |
"pathName = "<<objectPath->toString ()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
"handleAssociatorNamesRequest: pathName = %s ", |
"resultClass = "<<request->resultClass<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleAssociatorNamesRequest: resultClass = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
(const char*)request->resultClass.getString().getCString())); |
"resultRole = "<<request->resultRole<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
|
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleAssociatorNamesRequest: resultRole = %s ", |
|
(const char*)request->resultRole.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleAssociatorNamesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleAssociatorNamesRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleReferencesRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleReferencesRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
objectName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->objectName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest: " |
|
"hostname = "<<System::getHostName() |
|
<<", namespace = "<<request->nameSpace.getString() |
|
<<", classname = " |
|
<<request->objectName.getClassName().getString() |
|
<<", result = "<<request->resultClass.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleReferencesRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s, role: %s, refCls: %s", |
"Calling provider.references: " + pr.getName()); |
(const char*)pr.getName().getCString(), |
|
(const char*)request->role.getCString(), |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest: " |
(const char*)request->resultClass.getString().getCString() |
"Calling provider references: "<<pr.getName() |
)); |
<<", role: "<<request->role<<" aCls: " |
|
<<request->resultClass<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleReferencesRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER; | eMethodFound = METHOD_ASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_ASSOCIATORPROVIDER."<<endl); |
"handleReferencesRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_CIMASSOCIATORPROVIDER."<<endl); |
"handleReferencesRequest: " |
|
"Found METHOD_CIMASSOCIATORPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER2; | eMethodFound = METHOD_ASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_ASSOCIATORPROVIDER2."<<endl); |
"handleReferencesRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER2."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_CIMASSOCIATORPROVIDER2."<<endl); |
"handleReferencesRequest: " |
|
"Found METHOD_CIMASSOCIATORPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleReferencesRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferencesRequest: assocName = %s ", |
<<resultPath->toString ()<<endl); |
(const char*)resultPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferencesRequest: role = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
(const char*)request->role.getCString())); |
"includeQualifiers = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
"handleReferencesRequest: includeQualifiers = false"); |
"includeClassOrigin = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleReferencesRequest: includeClassOrigin = false"); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleReferencesRequest: " |
|
"enter(METHOD_CIMASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleReferencesRequest: " |
|
"exit(METHOD_CIMASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferences" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleReferencesRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMASSOCIATORPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferencesRequest: assocName = %s ", |
<<resultPath->toString ()<<endl); |
(const char*)resultPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferencesRequest: role = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
(const char*)request->role.getCString())); |
"includeQualifiers = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
"handleReferencesRequest: includeQualifiers = false"); |
"includeClassOrigin = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleReferencesRequest: includeClassOrigin = false"); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleReferencesRequest: " |
|
"enter(METHOD_CIMASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
|
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleReferencesRequest: " |
|
"exit(METHOD_CIMASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferences" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleReferencesRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_CIMASSOCIATORPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferencesRequest: assocName = %s ", |
<<resultPath->toString ()<<endl); |
(const char*)resultPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleReferencesRequest: pathName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferencesRequest: role = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
(const char*)request->role.getCString())); |
"includeQualifiers = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
"handleReferencesRequest: includeQualifiers = false"); |
"includeClassOrigin = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleReferencesRequest: includeClassOrigin = false"); |
#endif | #endif |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
| |
|
|
| |
try | try |
{ | { |
DDD (cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleReferencesRequest: " |
|
"enter(METHOD_ASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD(cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleReferencesRequest: " |
|
"exit(METHOD_ASSOCIATORPROVIDER): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferences" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleReferencesRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_ASSOCIATORPROVIDER) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
jobjectArray jPropertyList = getList(jv,env,request->propertyList); | jobjectArray jPropertyList = getList(jv,env,request->propertyList); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferencesRequest: assocName = %s ", |
<<resultPath->toString ()<<endl); |
(const char*)resultPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleReferencesRequest: pathName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferencesRequest: role = %s ", |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
(const char*)request->role.getCString())); |
"includeQualifiers = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
DDD(cerr<<"--- JMPIProviderManager::handleReferencesRequest: " |
"handleReferencesRequest: includeQualifiers = false"); |
"includeClassOrigin = "<<false<<endl); |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"handleReferencesRequest: includeClassOrigin = false"); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
try | try |
{ | { |
DDD(cout<<"enter: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleReferencesRequest: " |
|
"enter(METHOD_ASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
AutoMutex lock (pr._cimomMutex); | AutoMutex lock (pr._cimomMutex); |
| |
cls = pr._cimom_handle->getClass(context, | cls = pr._cimom_handle->getClass(context, |
|
|
true, | true, |
true, | true, |
CIMPropertyList()); | CIMPropertyList()); |
DDD (cout<<"exit: cimom_handle->getClass(" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
<<__LINE__<<") "<<ciRet->getClassName()<<endl); |
"handleReferencesRequest: " |
|
"exit(METHOD_ASSOCIATORPROVIDER2): " |
|
"cimom_handle->getClass(%s).", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString() |
|
)); |
|
|
} | } |
catch (CIMException e) | catch (CIMException e) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferences" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"Request: Error: Caught CIMExcetion during" |
"handleReferencesRequest: " |
" cimom_handle->getClass(" |
"Caught CIMExcetion(METHOD_ASSOCIATORPROVIDER2) " |
<<__LINE__<<") "<<endl); |
"during cimom_handle->getClass(%s): %s ", |
|
(const char*)ciRet-> |
|
getClassName().getString().getCString(), |
|
(const char*)e.getMessage().getCString() |
|
)); |
|
|
|
PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
| |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferencesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleReferencesRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleReferenceNamesRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleReferenceNamesRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
objectName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->objectName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
|
"hostname = "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->objectName.getClassName().getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
| |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleReferenceNamesRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s, role: %s, refCls: %s", |
"Calling provider.referenceNames: " + pr.getName()); |
(const char*)pr.getName().getCString(), |
|
(const char*)request->role.getCString(), |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
(const char*)request->resultClass.getString().getCString() |
"Calling provider referenceNames: "<<pr.getName() |
)); |
<<", role: "<<request->role<<", aCls: " |
|
<<request->resultClass<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleReferenceNamesRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER; | eMethodFound = METHOD_ASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNamesRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_ASSOCIATORPROVIDER."<<endl); |
"handleReferencesRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNames" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMASSOCIATORPROVIDER." |
"handleReferenceNamesRequest: " |
<<endl); |
"Found METHOD_CIMASSOCIATORPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_ASSOCIATORPROVIDER2; | eMethodFound = METHOD_ASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNamesRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" found METHOD_ASSOCIATORPROVIDER2."<<endl); |
"handleReferenceNamesRequest: " |
|
"Found METHOD_ASSOCIATORPROVIDER2."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; | eMethodFound = METHOD_CIMASSOCIATORPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNames" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMASSOCIATORPROVIDER2." |
"handleReferenceNamesRequest: " |
<<endl); |
"Found METHOD_CIMASSOCIATORPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleReferenceNames: No method found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferenceNamesRequest: assocName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferenceNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferenceNamesRequest: assocName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferenceNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferenceNamesRequest: assocName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleReferenceNamesRequest: pathName = %s ", |
<<resultPath->toString ()<<endl); |
(const char*)resultPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferenceNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"assocName = " |
"handleReferenceNamesRequest: assocName = %s ", |
<<objectPath->toString ()<<endl); |
(const char*)objectPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"pathName = " |
"handleReferenceNamesRequest: pathName = %s ", |
<<resultPath->toString ()<<endl); |
(const char*)resultPath->toString().getCString())); |
DDD(cerr<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"role = "<<request->role<<endl); |
"handleReferenceNamesRequest: role = %s ", |
|
(const char*)request->role.getCString())); |
#endif | #endif |
| |
StatProviderTimeMeasurement providerTime(response); | StatProviderTimeMeasurement providerTime(response); |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleReferenceNamesRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleReferenceNamesRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleGetPropertyRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleGetPropertyRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
instanceName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->instanceName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleGetPropertyRequest: " |
|
"hostname = "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->className.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleReferenceNamesRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", |
"Calling provider.getPropertyValue: " + pr.getName()); |
(const char*)pr.getName().getCString() |
|
)); |
DDD(cout<<"--- JMPIProviderManager::handleGetPropertyRequest: " |
|
"Calling provider getPropertyValue: "<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleReferenceNamesRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_PROPERTYPROVIDER; | eMethodFound = METHOD_PROPERTYPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleGetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_PROPERTYPROVIDER."<<endl); |
"handleGetPropertyRequest: " |
|
"Found METHOD_PROPERTYPROVIDER."); |
} | } |
} | } |
else if (interfaceType == "JMPIExperimental") | else if (interfaceType == "JMPIExperimental") |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_PROPERTYPROVIDER2; | eMethodFound = METHOD_PROPERTYPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleGetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_PROPERTYPROVIDER2."<<endl); |
"handleGetPropertyRequest: " |
|
"Found METHOD_PROPERTYPROVIDER2."); |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleGetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleGetPropertyRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleGetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleGetPropertyRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
try | try |
{ | { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleSetPropertyRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleSetPropertyRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
instanceName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->instanceName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleSetPropertyRequest: hostname " |
|
"= "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->className.getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
// forward request | // forward request |
JMPIProvider &pr = ph.GetProvider(); | JMPIProvider &pr = ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleSetPropertyRequest: " |
Tracer::LEVEL4, |
"Calling provider. setPropertyValue: %s", |
"Calling provider.setPropertyValue: " + pr.getName()); |
(const char*)pr.getName().getCString())); |
|
|
DDD(cout<<"--- JMPIProviderManager::handleSetPropertyRequest: " |
|
"Calling provider setPropertyValue: " |
|
<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_PROPERTYPROVIDER; | eMethodFound = METHOD_PROPERTYPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleSetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_PROPERTYPROVIDER."<<endl); |
"handleSetPropertyRequest: " |
|
"Found METHOD_PROPERTYPROVIDER."); |
} | } |
} | } |
else if (interfaceType == "JMPIExperimental") | else if (interfaceType == "JMPIExperimental") |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_PROPERTYPROVIDER2; | eMethodFound = METHOD_PROPERTYPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleSetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_PROPERTYPROVIDER2."<<endl); |
"handleSetPropertyRequest: " |
|
"Found METHOD_PROPERTYPROVIDER2."); |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleSetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"found no method!"<<endl); |
"handleSetPropertyRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleSetPropertyRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleSetPropertyRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
JNIEnv *env = NULL; | JNIEnv *env = NULL; |
| |
try { | try { |
Logger::put( |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
Logger::STANDARD_LOG, |
"handleInvokeMethodRequest: " |
System::CIMSERVER, |
"name space = %s class name = %s", |
Logger::TRACE, |
(const char*)request->nameSpace.getString().getCString(), |
"JMPIProviderManager::handleInvokeMethodRequest - Host name: $0 " |
(const char*)request-> |
"Name space: $1 Class name: $2", |
instanceName.getClassName().getString().getCString() |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
request->instanceName.getClassName().getString()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleInvokeMethodRequest: " |
|
"hostname = "<<System::getHostName()<<", namespace = " |
|
<<request->nameSpace.getString()<<", classname = " |
|
<<request->instanceName.getClassName().getString()<<endl); |
|
| |
// make target object path | // make target object path |
CIMObjectPath *objectPath = new CIMObjectPath( | CIMObjectPath *objectPath = new CIMObjectPath( |
|
|
| |
JMPIProvider &pr=ph.GetProvider(); | JMPIProvider &pr=ph.GetProvider(); |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleInvokeMethodRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", |
"Calling provider.invokeMethod: " + pr.getName()); |
(const char*)pr.getName().getCString() |
|
)); |
DDD(cout<<"--- JMPIProviderManager::handleInvokeMethodRequest: " |
|
"Calling provider invokeMethod: "<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleInvokeMethodRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_METHODPROVIDER; | eMethodFound = METHOD_METHODPROVIDER; |
DDD (cout<<"--- JMPIProviderManager::handleInvokeMethodRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_METHODPROVIDER."<<endl); |
"handleInvokeMethodRequest: " |
|
"Found METHOD_PROPERTYPROVIDER."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMMETHODPROVIDER; | eMethodFound = METHOD_CIMMETHODPROVIDER; |
DDD(cout<<"--- JMPIProviderManager::handleInvokeMethod" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMMETHODPROVIDER." |
"handleInvokeMethodRequest: " |
<<endl); |
"Found METHOD_CIMMETHODPROVIDER."); |
} | } |
} | } |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_METHODPROVIDER2; | eMethodFound = METHOD_METHODPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleInvokeMethodRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"found METHOD_METHODPROVIDER2."<<endl); |
"handleInvokeMethodRequest: " |
|
"Found METHOD_METHODPROVIDER2."); |
} | } |
| |
if (id == NULL) | if (id == NULL) |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_CIMMETHODPROVIDER2; | eMethodFound = METHOD_CIMMETHODPROVIDER2; |
DDD(cout<<"--- JMPIProviderManager::handleInvokeMethod" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Request: found METHOD_CIMMETHODPROVIDER2." |
"handleInvokeMethodRequest: " |
<<endl); |
"Found METHOD_CIMMETHODPROVIDER2."); |
} | } |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleInvokeMethodRequest:" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
" No method found!"<<endl); |
"handleInvokeMethod: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on " | "Could not find a method for the provider based on " |
"InterfaceType.")); | "InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleInvokeMethodRequest: " |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"should not be here!"<<endl); |
"handleInvokeMethodRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
fileName = resolveFileName(providerLocation); | fileName = resolveFileName(providerLocation); |
| |
Logger::put(Logger::STANDARD_LOG, |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
System::CIMSERVER, |
"handleCreateSubscriptionRequest: " |
Logger::TRACE, |
"name space = %s provider name = %s provider filename = %s", |
"JMPIProviderManager::handleCreateSubscriptionRequest - " |
request->nameSpace.getString().getCString(), |
"Host name: $0 Name space: $1 Provider name(s): $2", |
providerName, fileName |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
providerName); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleCreateSubscriptionRequest: " |
|
"hostname = " |
|
<<System::getHostName() |
|
<<", namespace = " |
|
<<request->nameSpace.getString() |
|
<<", providername = " |
|
<<providerName |
|
<<", fileName = " |
|
<<fileName |
|
<<endl); |
|
| |
// get cached or load new provider module | // get cached or load new provider module |
JMPIProvider::OpProviderHolder ph = | JMPIProvider::OpProviderHolder ph = |
|
|
_indicationCallback, | _indicationCallback, |
_responseChunkCallback); | _responseChunkCallback); |
| |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleCreateSubscriptionRequest: " | "handleCreateSubscriptionRequest: " |
"Adding to provTab " |
"Adding %s to provTab.", |
<<providerName<<endl); |
(const char*)providerName.getCString())); |
| |
provTab.insert (providerName, prec); | provTab.insert (providerName, prec); |
} | } |
|
|
| |
AutoMutex lock (mutexSelxTab); | AutoMutex lock (mutexSelxTab); |
| |
DDD(cout<<"--- JMPIProviderManager::handleCreateSubscriptionRequest:" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" Adding to selxTab " |
"handleCreateSubscriptionRequest: " |
<<sPath.toString ()<<endl); |
"Adding %s to selxTab.", |
|
(const char*)sPath.toString().getCString())); |
| |
selxTab.insert (sPath.toString (), srec); | selxTab.insert (sPath.toString (), srec); |
| |
DDD(cout<<"--- JMPIProviderManager::handleCreateSubscriptionRequest:" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" For selxTab "<<sPath.toString ()<<", srec = "<<hex |
"handleCreateSubscriptionRequest: " |
<<(long)srec<<dec<<", qContext = "<<hex<<(long)qContext |
"For selxTab %s , srec = %X, qContext = %X", |
<<dec<<endl); |
(const char*)sPath.toString().getCString(), |
|
(long)srec,(long)qContext)); |
} | } |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL4, |
TRC_PROVIDERMANAGER, |
"handleCreateSubscriptionRequest: Calling provider: %s", |
Tracer::LEVEL4, |
(const char*)pr.getName().getCString())); |
"Calling provider.createSubscriptionRequest: " + pr.getName()); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleCreateSubscriptionRequest: " |
|
"Calling provider createSubscriptionRequest: " |
|
<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleCreateSubscriptionRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_EVENTPROVIDER; | eMethodFound = METHOD_EVENTPROVIDER; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleCreateSubscriptionRequest: found " |
"handleCreateSubscriptionRequest: " |
"METHOD_EVENTPROVIDER."<<endl); |
"Found METHOD_EVENTPROVIDER."); |
} | } |
} | } |
else if (interfaceType == "JMPIExperimental") | else if (interfaceType == "JMPIExperimental") |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_EVENTPROVIDER2; | eMethodFound = METHOD_EVENTPROVIDER2; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleCreateSubscriptionRequest: found " |
"handleCreateSubscriptionRequest: " |
"METHOD_EVENTPROVIDER2." |
"Found METHOD_EVENTPROVIDER2."); |
<<endl); |
|
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleCreateSubscriptionRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
": No method found!"<<endl); |
"handleCreateSubscriptionRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on" | "Could not find a method for the provider based on" |
" InterfaceType.")); | " InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD(cout<<"--- JMPIProviderManager::handleCreateSubscriptionRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
": should not be here!"<<endl); |
"handleCreateSubscriptionRequest: Unknown method provider!"); |
break; | break; |
} | } |
} | } |
|
|
| |
fileName = resolveFileName (providerLocation); | fileName = resolveFileName (providerLocation); |
| |
Logger::put (Logger::STANDARD_LOG, |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL3, |
System::CIMSERVER, |
"handleDeleteSubscriptionRequest: " |
Logger::TRACE, |
"name space = %s provider name = %s provider filename = %s", |
"JMPIProviderManager::handleDeleteSubscriptionRequest - " |
(const char*)request->nameSpace.getString().getCString(), |
"Host name: $0 Name space: $1 Provider name(s): $2", |
providerName, fileName |
System::getHostName(), |
)); |
request->nameSpace.getString(), |
|
providerName); |
|
|
|
DDD(cout<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest: " |
|
"hostname = " |
|
<<System::getHostName() |
|
<<", namespace = " |
|
<<request->nameSpace.getString() |
|
<<", providername = " |
|
<<providerName |
|
<<", fileName = " |
|
<<fileName |
|
<<endl); |
|
| |
// get cached or load new provider module | // get cached or load new provider module |
JMPIProvider::OpProviderHolder ph = providerManager.getProvider( | JMPIProvider::OpProviderHolder ph = providerManager.getProvider( |
|
|
| |
if (--prec->count <= 0) | if (--prec->count <= 0) |
{ | { |
DDD(cout<<"--- JMPIProviderManager::" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleDeleteSubscriptionRequest: Removing provTab " |
"handleDeleteSubscriptionRequest: " |
<<providerName<<endl); |
"Removing %s from provTab.", |
|
(const char*)providerName.getCString())); |
| |
provTab.remove (providerName); | provTab.remove (providerName); |
| |
|
|
| |
AutoMutex lock (mutexSelxTab); | AutoMutex lock (mutexSelxTab); |
| |
DDD(cout<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest:" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" Removing selxTab "<<sPathString<<endl); |
"handleDeleteSubscriptionRequest: " |
|
"Removing %s from selxTab.", |
|
(const char*)sPathString.getCString())); |
| |
if (!selxTab.lookup (sPathString, srec)) | if (!selxTab.lookup (sPathString, srec)) |
{ | { |
PEGASUS_ASSERT(0); | PEGASUS_ASSERT(0); |
} | } |
| |
DDD(cout<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest:" |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
" For selxTab "<<sPathString<<", srec = " |
"handleDeleteSubscriptionRequest: " |
<<hex<<(long)srec<<dec<<", qContext = "<<hex |
"For selxTab %s , srec = %X, qContext = %X", |
<<(long)srec->qContext<<dec<<endl); |
(const char*)sPathString.getCString(), |
|
(long)srec,(long)srec->qContext)); |
| |
selxTab.remove (sPathString); | selxTab.remove (sPathString); |
} | } |
| |
PEG_TRACE_STRING( |
PEG_TRACE((TRC_PROVIDERMANAGER,Tracer::LEVEL3, |
TRC_PROVIDERMANAGER, |
"handleDeleteSubscriptionRequest: " |
Tracer::LEVEL4, |
"Calling provider: %s", |
"Calling provider.deleteSubscriptionRequest: " + pr.getName()); |
(const char*)pr.getName().getCString())); |
|
|
DDD(cout<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest: " |
|
"Calling provider deleteSubscriptionRequest: " |
|
<<pr.getName()<<endl); |
|
| |
JvmVector *jv = 0; | JvmVector *jv = 0; |
| |
|
|
| |
if (!env) | if (!env) |
{ | { |
|
PEG_TRACE_CSTRING( TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
|
"handleDeleteSubscriptionRequest: " |
|
"Could not initialize the JVM (Java Virtual Machine) " |
|
"runtime environment."); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.INIT_JVM_FAILED", |
"ProviderManager.JMPI.JMPIProviderManager.INIT_JVM_FAILED", |
"Could not initialize the JVM (Java Virtual Machine) " | "Could not initialize the JVM (Java Virtual Machine) " |
"runtime environment.")); | "runtime environment.")); |
} | } |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_EVENTPROVIDER; | eMethodFound = METHOD_EVENTPROVIDER; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleDeleteSubscriptionRequest: found " |
"handleDeleteSubscriptionRequest: " |
"METHOD_EVENTPROVIDER."<<endl); |
"Found METHOD_EVENTPROVIDER."); |
} | } |
} | } |
else if (interfaceType == "JMPIExperimental") | else if (interfaceType == "JMPIExperimental") |
|
|
if (id != NULL) | if (id != NULL) |
{ | { |
eMethodFound = METHOD_EVENTPROVIDER2; | eMethodFound = METHOD_EVENTPROVIDER2; |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"handleDeleteSubscriptionRequest: found " |
"handleDeleteSubscriptionRequest: " |
"METHOD_EVENTPROVIDER2."<<endl); |
"Found METHOD_EVENTPROVIDER2."); |
} | } |
} | } |
| |
if (id == NULL) | if (id == NULL) |
{ | { |
DDD (cout<<"--- JMPIProviderManager::handleDeleteSubscriptionRequest" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
": No method found!"<<endl); |
"handleDeleteSubscriptionRequest: No method provider found!"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
throw PEGASUS_CIM_EXCEPTION_L( | throw PEGASUS_CIM_EXCEPTION_L( |
CIM_ERR_FAILED, | CIM_ERR_FAILED, |
MessageLoaderParms( | MessageLoaderParms( |
"ProviderManager.JMPI.METHOD_NOT_FOUND", |
"ProviderManager.JMPI.JMPIProviderManager.METHOD_NOT_FOUND", |
"Could not find a method for the provider based on" | "Could not find a method for the provider based on" |
" InterfaceType.")); | " InterfaceType.")); |
} | } |
|
|
| |
case METHOD_UNKNOWN: | case METHOD_UNKNOWN: |
{ | { |
DDD (cout<<"--- JMPIProviderManager::" |
PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, |
"handleDeleteSubscriptionRequest: should not be here!" |
"handleDeleteSubscriptionRequest: Unknown method provider!"); |
<<endl); |
|
break; | break; |
} | } |
} | } |
|
|
| |
Uint32 numProviders = enableProviders.size (); | Uint32 numProviders = enableProviders.size (); |
| |
DDD(cout<<"--- JMPIProviderManager::handleSubscriptionInitCompleteRequest: " |
PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"numProviders = "<<numProviders<<endl); |
"handleSubscriptionInitCompleteRequest: numProviders = %d ", |
|
numProviders)); |
| |
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
return (response); | return (response); |