version 1.70, 2003/04/09 16:28:55
|
version 1.71, 2003/07/31 14:33:14
|
|
|
| |
#include "MessageQueueService.h" | #include "MessageQueueService.h" |
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
|
#include <Pegasus/Common/MessageLoader.h> //l10n |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
| |
void MessageQueueService::force_shutdown(void) | void MessageQueueService::force_shutdown(void) |
{ | { |
PEGASUS_STD(cout) << "Forcing shutdown of CIMOM Message Router" << PEGASUS_STD(endl); |
//l10n |
|
//PEGASUS_STD(cout) << "Forcing shutdown of CIMOM Message Router" << PEGASUS_STD(endl); |
|
MessageLoaderParms parms("Common.MessageQueueService.FORCING_SHUTDOWN", |
|
"Forcing shutdown of $0", |
|
"CIMOM Message Router"); |
|
PEGASUS_STD(cout) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl); |
MessageQueueService::_stop_polling = 1; | MessageQueueService::_stop_polling = 1; |
MessageQueueService *svc; | MessageQueueService *svc; |
| |
_polling_list.lock(); | _polling_list.lock(); |
svc = _polling_list.next(0); | svc = _polling_list.next(0); |
|
|
while(svc != 0) | while(svc != 0) |
{ | { |
PEGASUS_STD(cout) << "Stopping " << svc->getQueueName() << PEGASUS_STD(endl); |
//l10n - reuse same MessageLoaderParms to avoid multiple creates |
|
//PEGASUS_STD(cout) << "Stopping " << svc->getQueueName() << PEGASUS_STD(endl); |
|
parms.msg_id = "Common.MessageQueueService.STOPPING_SERVICE"; |
|
parms.default_msg = "Stopping $0"; |
|
parms.arg0 = svc->getQueueName(); |
|
PEGASUS_STD(cout) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl); |
|
|
_polling_sem.signal(); | _polling_sem.signal(); |
svc->_shutdown_incoming_queue(); | svc->_shutdown_incoming_queue(); |
_polling_sem.signal(); | _polling_sem.signal(); |
|
|
if( false == register_service(name, _capabilities, _mask) ) | if( false == register_service(name, _capabilities, _mask) ) |
{ | { |
_meta_dispatcher_mutex.unlock(); | _meta_dispatcher_mutex.unlock(); |
throw BindFailedException("MessageQueueService Base Unable to register with Meta Dispatcher"); |
//l10n |
|
//throw BindFailedException("MessageQueueService Base Unable to register with Meta Dispatcher"); |
|
MessageLoaderParms parms("Common.MessageQueueService.UNABLE_TO_REGISTER", |
|
"$0 Unable to register with $1", |
|
"MessageQueueService Base", |
|
"Meta Dispatcher"); |
|
|
|
throw BindFailedException(parms); |
} | } |
| |
_polling_list.insert_last(this); | _polling_list.insert_last(this); |