version 1.138, 2008/06/19 17:57:01
|
version 1.143, 2008/09/16 18:37:03
|
|
|
"Common.MessageQueueService.UNABLE_TO_REGISTER", | "Common.MessageQueueService.UNABLE_TO_REGISTER", |
"CIM base message queue service is unable to register with the " | "CIM base message queue service is unable to register with the " |
"CIMOM dispatcher."); | "CIMOM dispatcher."); |
throw BindFailedException(parms); |
throw Exception(parms); |
} | } |
| |
_get_polling_list()->insert_back(this); | _get_polling_list()->insert_back(this); |
|
|
msg->op->_request.reset(msg); | msg->op->_request.reset(msg); |
try | try |
{ | { |
_incoming.enqueue_wait(msg->op); |
_incoming.enqueue(msg->op); |
_polling_sem.signal(); | _polling_sem.signal(); |
} | } |
catch (const ListClosed&) | catch (const ListClosed&) |
|
|
// processed. | // processed. |
delete msg; | delete msg; |
} | } |
catch (const Permission&) |
|
{ |
|
delete msg; |
|
} |
|
} | } |
| |
| |
|
|
void MessageQueueService::enqueue(Message* msg) | void MessageQueueService::enqueue(Message* msg) |
{ | { |
PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE, "MessageQueueService::enqueue()"); | PEG_METHOD_ENTER(TRC_MESSAGEQUEUESERVICE, "MessageQueueService::enqueue()"); |
|
|
} | } |
catch (const Exception& e) | catch (const Exception& e) |
{ | { |
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL1, |
PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1, |
String("Caught exception: \"") + e.getMessage() + |
"Caught exception: \"%s\". Exiting _req_proc.", |
"\". Exiting _req_proc."); |
(const char*)e.getMessage().getCString())); |
} | } |
catch (...) | catch (...) |
{ | { |
|
|
if ((rq != 0 && (true == messageOK(rq))) || | if ((rq != 0 && (true == messageOK(rq))) || |
(rp != 0 && (true == messageOK(rp))) && _die.get() == 0) | (rp != 0 && (true == messageOK(rp))) && _die.get() == 0) |
{ | { |
_incoming.enqueue_wait(op); |
_incoming.enqueue(op); |
_polling_sem.signal(); | _polling_sem.signal(); |
return true; | return true; |
} | } |
|
|
// empty out the queue | // empty out the queue |
while (1) | while (1) |
{ | { |
AsyncOpNode *operation; |
AsyncOpNode* operation = 0; |
try | try |
{ | { |
operation = service->_incoming.dequeue(); | operation = service->_incoming.dequeue(); |
} | } |
catch (IPCException&) |
catch (...) |
{ | { |
break; | break; |
} | } |