version 1.118.2.1, 2007/11/09 19:05:07
|
version 1.118.2.2, 2008/01/09 05:44:50
|
|
|
CMPIProvider & pr=ph.GetProvider(); | CMPIProvider & pr=ph.GetProvider(); |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
// If normalization is enabled, then the normalizer will take care of |
|
// any EmbeddedInstance / EmbeddedObject mismatches, and we don't need |
|
// to add a NormalizerContextContainer. The presence of an |
|
// ObjectNormalizer is determined by the presence of the |
|
// CachedClassDefinitionContainer |
|
if (request->operationContext.contains( |
|
CachedClassDefinitionContainer::NAME)) |
|
{ |
|
request->operationContext.get(CachedClassDefinitionContainer::NAME); |
|
} |
|
else |
|
#endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
{ |
|
// If a mechanism is needed to correct mismatches between the |
|
// EmbeddedInstance and EmbeddedObject types, then insert |
|
// containers for the class definition and a NormalizerContext. |
|
AutoPtr<NormalizerContext> tmpNormalizerContext( | AutoPtr<NormalizerContext> tmpNormalizerContext( |
new CIMOMHandleContext(*pr._cimom_handle)); | new CIMOMHandleContext(*pr._cimom_handle)); |
CIMClass classDef(_getClass( |
|
request->nameSpace, request->className)); |
|
request->operationContext.insert( |
|
CachedClassDefinitionContainer(classDef)); |
|
request->operationContext.insert( | request->operationContext.insert( |
NormalizerContextContainer(tmpNormalizerContext)); | NormalizerContextContainer(tmpNormalizerContext)); |
} |
#endif |
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
| |
PEG_TRACE_STRING( | PEG_TRACE_STRING( |
TRC_PROVIDERMANAGER, | TRC_PROVIDERMANAGER, |
|
|
CMPIProvider & pr=ph.GetProvider(); | CMPIProvider & pr=ph.GetProvider(); |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
// If normalization is enabled, then the normalizer will take care of |
|
// any EmbeddedInstance / EmbeddedObject mismatches, and we don't need |
|
// to add a NormalizerContextContainer. The presence of an |
|
// ObjectNormalizer is determined by the presence of the |
|
// CachedClassDefinitionContainer |
|
if (request->operationContext.contains( |
|
CachedClassDefinitionContainer::NAME)) |
|
{ |
|
request->operationContext.get( |
|
CachedClassDefinitionContainer::NAME); |
|
} |
|
else |
|
#endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
{ |
|
// If a mechanism is needed to correct mismatches between the |
|
// EmbeddedInstance and EmbeddedObject types, then insert |
|
// containers for the class definition and a NormalizerContext. |
|
AutoPtr<NormalizerContext> tmpNormalizerContext( | AutoPtr<NormalizerContext> tmpNormalizerContext( |
new CIMOMHandleContext(*pr._cimom_handle)); | new CIMOMHandleContext(*pr._cimom_handle)); |
CIMClass classDef(_getClass( |
|
request->nameSpace, request->className)); |
|
request->operationContext.insert( |
|
CachedClassDefinitionContainer(classDef)); |
|
request->operationContext.insert( | request->operationContext.insert( |
NormalizerContextContainer(tmpNormalizerContext)); | NormalizerContextContainer(tmpNormalizerContext)); |
} |
#endif |
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
| |
PEG_TRACE_STRING( | PEG_TRACE_STRING( |
TRC_PROVIDERMANAGER, | TRC_PROVIDERMANAGER, |
|
|
CMPIProvider & pr=ph.GetProvider(); | CMPIProvider & pr=ph.GetProvider(); |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
// If normalization is enabled, then the normalizer will take care of |
|
// any EmbeddedInstance / EmbeddedObject mismatches, and we don't need |
|
// to add a NormalizerContextContainer. The presence of an |
|
// ObjectNormalizer is determined by the presence of the |
|
// CachedClassDefinitionContainer |
|
if (request->operationContext.contains( |
|
CachedClassDefinitionContainer::NAME)) |
|
{ |
|
request->operationContext.get( |
|
CachedClassDefinitionContainer::NAME); |
|
} |
|
else |
|
#endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
{ |
|
// If a mechanism is needed to correct mismatches between the |
|
// EmbeddedInstance and EmbeddedObject types, then insert |
|
// containers for the class definition and a NormalizerContext. |
|
AutoPtr<NormalizerContext> tmpNormalizerContext( | AutoPtr<NormalizerContext> tmpNormalizerContext( |
new CIMOMHandleContext(*pr._cimom_handle)); | new CIMOMHandleContext(*pr._cimom_handle)); |
CIMClass classDef(_getClass( |
|
request->nameSpace, request->className)); |
|
request->operationContext.insert( |
|
CachedClassDefinitionContainer(classDef)); |
|
request->operationContext.insert( | request->operationContext.insert( |
NormalizerContextContainer(tmpNormalizerContext)); | NormalizerContextContainer(tmpNormalizerContext)); |
} |
#endif |
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
| |
PEG_TRACE_STRING( | PEG_TRACE_STRING( |
TRC_PROVIDERMANAGER, | TRC_PROVIDERMANAGER, |
|
|
CMPIProvider & pr=ph.GetProvider(); | CMPIProvider & pr=ph.GetProvider(); |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
// If normalization is enabled, then the normalizer will take care of |
|
// any EmbeddedInstance / EmbeddedObject mismatches, and we don't need |
|
// to add a NormalizerContextContainer. The presence of an |
|
// ObjectNormalizer is determined by the presence of the |
|
// CachedClassDefinitionContainer |
|
if (request->operationContext.contains( |
|
CachedClassDefinitionContainer::NAME)) |
|
{ |
|
request->operationContext.get( |
|
CachedClassDefinitionContainer::NAME); |
|
} |
|
else |
|
#endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
{ |
|
// If a mechanism is needed to correct mismatches between the |
|
// EmbeddedInstance and EmbeddedObject types, then insert |
|
// containers for the class definition and a NormalizerContext. |
|
AutoPtr<NormalizerContext> tmpNormalizerContext( | AutoPtr<NormalizerContext> tmpNormalizerContext( |
new CIMOMHandleContext(*pr._cimom_handle)); | new CIMOMHandleContext(*pr._cimom_handle)); |
CIMClass classDef(_getClass( |
|
request->nameSpace, request->className)); |
|
request->operationContext.insert( |
|
CachedClassDefinitionContainer(classDef)); |
|
request->operationContext.insert( | request->operationContext.insert( |
NormalizerContextContainer(tmpNormalizerContext)); | NormalizerContextContainer(tmpNormalizerContext)); |
} |
#endif |
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
| |
PEG_TRACE_STRING( | PEG_TRACE_STRING( |
TRC_PROVIDERMANAGER, | TRC_PROVIDERMANAGER, |
|
|
CMPIProvider & pr=ph.GetProvider(); | CMPIProvider & pr=ph.GetProvider(); |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
bool externalNormalizationEnabled = false; |
|
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
// If normalization is enabled, then the normalizer will take care of |
|
// any EmbeddedInstance / EmbeddedObject mismatches, and we don't need |
|
// to add a NormalizerContextContainer. The presence of an |
|
// ObjectNormalizer is determined by the presence of the |
|
// CachedClassDefinitionContainer |
|
if (request->operationContext.contains( |
|
CachedClassDefinitionContainer::NAME)) |
|
{ |
|
request->operationContext.get( |
|
CachedClassDefinitionContainer::NAME); |
|
externalNormalizationEnabled = true; |
|
} |
|
else |
|
#endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
{ |
|
// If a mechanism is needed to correct mismatches between the |
|
// EmbeddedInstance and EmbeddedObject types, then insert |
|
// containers for the class definition and a NormalizerContext. |
|
AutoPtr<NormalizerContext> tmpNormalizerContext( | AutoPtr<NormalizerContext> tmpNormalizerContext( |
new CIMOMHandleContext(*pr._cimom_handle)); | new CIMOMHandleContext(*pr._cimom_handle)); |
CIMClass classDef(_getClass( |
|
request->nameSpace, request->className)); |
|
request->operationContext.insert( |
|
CachedClassDefinitionContainer(classDef)); |
|
request->operationContext.insert( | request->operationContext.insert( |
NormalizerContextContainer(tmpNormalizerContext)); | NormalizerContextContainer(tmpNormalizerContext)); |
} |
#endif |
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
| |
PEG_TRACE_STRING( | PEG_TRACE_STRING( |
TRC_PROVIDERMANAGER, | TRC_PROVIDERMANAGER, |
|
|
} | } |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
if (!externalNormalizationEnabled) |
// Even if external normalization is enabled we don't normalize the |
|
// Embedded instances present in output args. Normalize them here. |
{ | { |
// There is no try catch here because if there is no external | // There is no try catch here because if there is no external |
// normalization, then these containers were added by this method. | // normalization, then these containers were added by this method. |
|
|
CMPIProvider & pr=ph.GetProvider(); | CMPIProvider & pr=ph.GetProvider(); |
| |
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
// If normalization is enabled, then the normalizer will take care of |
|
// any EmbeddedInstance / EmbeddedObject mismatches, and we don't need |
|
// to add a NormalizerContextContainer. The presence of an |
|
// ObjectNormalizer is determined by the presence of the |
|
// CachedClassDefinitionContainer |
|
if (request->operationContext.contains( |
|
CachedClassDefinitionContainer::NAME)) |
|
{ |
|
request->operationContext.get( |
|
CachedClassDefinitionContainer::NAME); |
|
} |
|
else |
|
#endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
{ |
|
// If a mechanism is needed to correct mismatches between the |
|
// EmbeddedInstance and EmbeddedObject types, then insert |
|
// containers for the class definition and a NormalizerContext. |
|
AutoPtr<NormalizerContext> tmpNormalizerContext( | AutoPtr<NormalizerContext> tmpNormalizerContext( |
new CIMOMHandleContext(*pr._cimom_handle)); | new CIMOMHandleContext(*pr._cimom_handle)); |
CIMClass classDef(_getClass( |
|
request->nameSpace, request->className)); |
|
request->operationContext.insert( |
|
CachedClassDefinitionContainer(classDef)); |
|
request->operationContext.insert( | request->operationContext.insert( |
NormalizerContextContainer(tmpNormalizerContext)); | NormalizerContextContainer(tmpNormalizerContext)); |
} |
#endif |
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
| |
PEG_TRACE_STRING( | PEG_TRACE_STRING( |
TRC_PROVIDERMANAGER, | TRC_PROVIDERMANAGER, |
|
|
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
} | } |
| |
CIMClass CMPIProviderManager::_getClass(CIMNamespaceName &nameSpace, |
|
CIMName &className) |
|
{ |
|
PEG_METHOD_ENTER( |
|
TRC_PROVIDERMANAGER, |
|
"CMPIProviderManager::_getClass()"); |
|
|
|
#ifdef PEGASUS_OS_ZOS |
|
CIMOMHandle _handle; |
|
#else |
|
AutoMutex mtx(_classMutex); |
|
#endif |
|
|
|
CIMClass clsDef = _handle.getClass (OperationContext(), nameSpace, |
|
className, false, true, true, CIMPropertyList()); |
|
|
|
PEG_METHOD_EXIT (); |
|
return clsDef; |
|
} |
|
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |