version 1.29, 2005/02/05 23:00:26
|
version 1.37, 2006/08/04 19:05:59
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
#include <Pegasus/Common/CIMMessage.h> | #include <Pegasus/Common/CIMMessage.h> |
#include <Pegasus/Common/OperationContextInternal.h> | #include <Pegasus/Common/OperationContextInternal.h> |
#include <Pegasus/Common/AutoPtr.h> | #include <Pegasus/Common/AutoPtr.h> |
|
#include <Pegasus/Common/List.h> |
|
#include <Pegasus/Common/Mutex.h> |
#include <Pegasus/Repository/CIMRepository.h> | #include <Pegasus/Repository/CIMRepository.h> |
#include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h> | #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h> |
| |
#include <Pegasus/ProviderManager2/SafeQueue.h> |
|
#include <Pegasus/ProviderManager2/ProviderManagerRouter.h> | #include <Pegasus/ProviderManager2/ProviderManagerRouter.h> |
| |
#include <Pegasus/ProviderManager2/Linkage.h> | #include <Pegasus/ProviderManager2/Linkage.h> |
| |
|
#ifdef PEGASUS_ZOS_SECURITY |
|
// This include file will not be provided in the OpenGroup CVS for now. |
|
// Do NOT try to include it in your compile |
|
#include <Pegasus/ProviderManager2/ProviderManagerzOS_inline.h> |
|
#endif |
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
#define IDLE_LIMIT 300 | #define IDLE_LIMIT 300 |
|
|
public: | public: |
ProviderManagerService( | ProviderManagerService( |
ProviderRegistrationManager* providerRegistrationManager, | ProviderRegistrationManager* providerRegistrationManager, |
CIMRepository* repository); |
CIMRepository* repository, |
|
ProviderManager* (*createDefaultProviderManagerCallback)()); |
| |
virtual ~ProviderManagerService(); | virtual ~ProviderManagerService(); |
| |
void unloadIdleProviders(); | void unloadIdleProviders(); |
| |
static void indicationCallback(CIMProcessIndicationRequestMessage* request); | static void indicationCallback(CIMProcessIndicationRequestMessage* request); |
static void handleCimResponse( |
static void responseChunkCallback( |
CIMRequestMessage& request, CIMResponseMessage& response); |
CIMRequestMessage* request, CIMResponseMessage* response); |
|
|
|
/** |
|
Callback function to be called upon detection of failure of a |
|
provider module. |
|
*/ |
|
static void providerModuleFailureCallback (const String & moduleName, |
|
const String & userName, Uint16); |
| |
private: | private: |
ProviderManagerService(); | ProviderManagerService(); |
|
|
| |
void _updateProviderModuleStatus( | void _updateProviderModuleStatus( |
CIMInstance& providerModule, | CIMInstance& providerModule, |
Uint16 fromStatus, |
const Array<Uint16>& removeStatus, |
Uint16 toStatus); |
const Array<Uint16>& appendStatus); |
| |
static ProviderManagerService* providerManagerService; | static ProviderManagerService* providerManagerService; |
| |
CIMRepository* _repository; | CIMRepository* _repository; |
| |
SafeQueue<AsyncOpNode *> _incomingQueue; |
List<AsyncOpNode,Mutex> _incomingQueue; |
SafeQueue<AsyncOpNode *> _outgoingQueue; |
List<AsyncOpNode,Mutex> _outgoingQueue; |
| |
ProviderManagerRouter* _basicProviderManagerRouter; | ProviderManagerRouter* _basicProviderManagerRouter; |
ProviderManagerRouter* _oopProviderManagerRouter; | ProviderManagerRouter* _oopProviderManagerRouter; |
|
|
*/ | */ |
AtomicInt _unloadIdleProvidersBusy; | AtomicInt _unloadIdleProvidersBusy; |
| |
friend class CMPIProviderManager; |
|
| |
}; | }; |
| |
|
// Auto class to encapsulate enabling and disabling |
|
// of the pthread_security on z/OS |
|
// For all other platforms this should be an empty class |
|
// Targets: avoid ifdefs and keep code readable(clean) |
|
#ifndef PEGASUS_ZOS_THREADLEVEL_SECURITY |
|
// not z/OS == empty class |
|
class PEGASUS_PPM_LINKAGE AutoPThreadSecurity |
|
{ |
|
public: |
|
AutoPThreadSecurity(const OperationContext& context) {}; |
|
}; |
|
#else |
|
|
|
class PEGASUS_PPM_LINKAGE AutoPThreadSecurity |
|
{ |
|
public: |
|
AutoPThreadSecurity(const OperationContext& context) |
|
{ |
|
int err_num=enablePThreadSecurity(context); |
|
if (err_num!=0) |
|
{ |
|
// need a new CIMException for this |
|
throw CIMException(CIM_ERR_ACCESS_DENIED,String(strerror(err_num))); |
|
} |
|
}; |
|
|
|
~AutoPThreadSecurity() |
|
{ |
|
disablePThreadSecurity(); |
|
}; |
|
}; |
|
|
|
#endif |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif | #endif |