version 1.18, 2003/03/11 21:26:54
|
version 1.19, 2003/04/02 20:15:59
|
|
|
// | // |
// Author: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) | // Author: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) |
// | // |
// Modified By: |
// Modified By: Dave Rosckes (rosckes@us.ibm.com) |
// | // |
//%//////////////////////////////////////////////////////////////////////////// | //%//////////////////////////////////////////////////////////////////////////// |
| |
|
|
// | // |
_cimserver->setState(CIMServerState::TERMINATING); | _cimserver->setState(CIMServerState::TERMINATING); |
| |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::shutdown - CIM server state set to CIMServerState::TERMINATING"); |
|
|
// | // |
// Tell the CIMServer to stop accepting new client connection requests. | // Tell the CIMServer to stop accepting new client connection requests. |
// | // |
_cimserver->stopClientConnection(); | _cimserver->stopClientConnection(); |
| |
|
|
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::shutdown - No longer accepting new client connection requests."); |
|
|
// | // |
// Determine if there are any outstanding CIM operation requests | // Determine if there are any outstanding CIM operation requests |
// (take into account that one of the request is the shutdown request). | // (take into account that one of the request is the shutdown request). |
|
|
| |
if (requestCount > (requestPending ? 1 : 0)) | if (requestCount > (requestPending ? 1 : 0)) |
{ | { |
|
|
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::shutdown - Waiting for outstanding CIM operations to complete. Request count: $0", |
|
requestCount); |
noMoreRequests = _waitUntilNoMoreRequests(requestPending); | noMoreRequests = _waitUntilNoMoreRequests(requestPending); |
} | } |
else | else |
|
|
noMoreRequests = true; | noMoreRequests = true; |
} | } |
| |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::shutdown - All outstanding CIM operations complete"); |
|
|
// | // |
// proceed to shutdown the CIMServer | // proceed to shutdown the CIMServer |
// | // |
|
|
// | // |
_shutdownProviders(); | _shutdownProviders(); |
| |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::_shutdownCIMServer - CIM server provider shutdown complete"); |
|
|
// | // |
// Shutdown the Cimom services | // Shutdown the Cimom services |
// | // |
_shutdownCimomServices(); | _shutdownCimomServices(); |
| |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::_shutdownCIMServer - Cimom services shutdown complete"); |
|
|
// | // |
// Tell CIMServer to shutdown completely. | // Tell CIMServer to shutdown completely. |
// | // |
_cimserver->shutdown(); | _cimserver->shutdown(); |
| |
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"ShutdownService::_shutdownCIMServer - CIM Server shutdown complete"); |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return; | return; |
} | } |
|
|
| |
if (response->cimException.getCode() != CIM_ERR_SUCCESS) | if (response->cimException.getCode() != CIM_ERR_SUCCESS) |
{ | { |
|
Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
|
"ShutdownService::_shutdownProviders - CIM provider shutdown exception has occurred."); |
CIMException e = response->cimException; | CIMException e = response->cimException; |
delete stopRequest; | delete stopRequest; |
delete asyncRequest; | delete asyncRequest; |