(file) Return to ConsumerManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / DynListener

Diff for /pegasus/src/Pegasus/DynListener/ConsumerManager.cpp between version 1.17 and 1.17.12.1

version 1.17, 2006/10/13 18:04:50 version 1.17.12.1, 2007/04/04 11:04:46
Line 84 
Line 84 
     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Consumer library directory: " + consumerDir);     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Consumer library directory: " + consumerDir);
     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Consumer configuration directory: " + consumerConfigDir);     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Consumer configuration directory: " + consumerConfigDir);
  
     Tracer::trace(__FILE__,__LINE__,TRC_LISTENER,Tracer::LEVEL4,      PEG_TRACE((__FILE__,__LINE__,TRC_LISTENER,Tracer::LEVEL4,
                   "Consumer unload enabled %d: idle timeout %d",                   "Consumer unload enabled %d: idle timeout %d",
                   enableConsumerUnload,                   enableConsumerUnload,
                   idleTimeout);                    idleTimeout));
  
  
     //ATTN: Bugzilla 3765 - Uncomment when OptionManager has a reset capability     //ATTN: Bugzilla 3765 - Uncomment when OptionManager has a reset capability
Line 116 
Line 116 
         delete consumer;         delete consumer;
     }     }
  
     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Deleted all consumers");      PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Deleted all consumers");
  
     ModuleTable::Iterator j = _modules.start();     ModuleTable::Iterator j = _modules.start();
     for (;j!=0;j++)     for (;j!=0;j++)
Line 125 
Line 125 
         delete module;         delete module;
     }     }
  
     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Deleted all modules");      PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Deleted all modules");
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 353 
Line 353 
         Logger::put(Logger::STANDARD_LOG, System::CIMLISTENER, Logger::TRACE,         Logger::put(Logger::STANDARD_LOG, System::CIMLISTENER, Logger::TRACE,
         "Not enough threads for consumer.");         "Not enough threads for consumer.");
  
         Tracer::trace(TRC_LISTENER, Tracer::LEVEL2,          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2,
         "Could not allocate thread for consumer.");         "Could not allocate thread for consumer.");
  
        consumer->setShutdownSemaphore(0);        consumer->setShutdownSemaphore(0);
Line 445 
Line 445 
     } catch (...)     } catch (...)
     {     {
         // Unexpected exception; do not assume that no providers are loaded         // Unexpected exception; do not assume that no providers are loaded
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "Unexpected Exception in hasActiveConsumers.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2, "Unexpected Exception in hasActiveConsumers.");
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return true;         return true;
     }     }
Line 479 
Line 479 
     } catch (...)     } catch (...)
     {     {
         // Unexpected exception; do not assume that no providers are loaded         // Unexpected exception; do not assume that no providers are loaded
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "Unexpected Exception in hasLoadedConsumers.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2, "Unexpected Exception in hasLoadedConsumers.");
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return true;         return true;
     }     }
Line 518 
Line 518 
  
     if (!_consumers.size())     if (!_consumers.size())
     {     {
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return;         return;
     }     }
Line 555 
Line 555 
  
         } catch (Exception&)         } catch (Exception&)
         {         {
             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Error unloading consumers.");              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Error unloading consumers.");
         }         }
     } else     } else
     {     {
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");
     }     }
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 575 
Line 575 
  
     if (!_consumers.size())     if (!_consumers.size())
     {     {
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return;         return;
     }     }
Line 602 
Line 602 
  
         } catch (Exception&)         } catch (Exception&)
         {         {
             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Error unloading consumers.");              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Error unloading consumers.");
         }         }
     } else     } else
     {     {
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "There are no consumers to unload.");
     }     }
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 642 
Line 642 
  
         } catch (Exception&)         } catch (Exception&)
         {         {
             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Error unloading consumers.");              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Error unloading consumers.");
         }         }
  
     } else     } else
Line 666 
Line 666 
         consumersToUnload[i]->sendShutdownSignal();         consumersToUnload[i]->sendShutdownSignal();
     }     }
  
     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "Sent shutdown signal to all consumers.");      PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Sent shutdown signal to all consumers.");
  
     //wait for all the consumer worker threads to complete     //wait for all the consumer worker threads to complete
     //since we can only shutdown after they are all complete, it does not matter if the first, fifth, or last     //since we can only shutdown after they are all complete, it does not matter if the first, fifth, or last
Line 687 
Line 687 
  
         } catch (TimeOut &)         } catch (TimeOut &)
         {         {
             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "Timed out while attempting to stop consumer thread.");              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2, "Timed out while attempting to stop consumer thread.");
         }         }
  
         PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "Terminating consumer.");          PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2, "Terminating consumer.");
  
         try         try
         {         {
Line 707 
Line 707 
             //reset the consumer             //reset the consumer
             consumersToUnload[i]->reset();             consumersToUnload[i]->reset();
  
             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL3, "Consumer library successfully unloaded.");              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL3, "Consumer library successfully unloaded.");
  
         } catch (Exception& e)         } catch (Exception& e)
         {         {
Line 746 
Line 746 
  
     } else     } else
     {     {
         Tracer::trace(__FILE__,__LINE__,TRC_LISTENER,Tracer::LEVEL3,          PEG_TRACE((__FILE__,__LINE__,TRC_LISTENER,Tracer::LEVEL3,
                       "Serializing %d outstanding requests for %s",                       "Serializing %d outstanding requests for %s",
                       indications.size(),                       indications.size(),
                       (const char*)consumerName.getCString());                        (const char*)consumerName.getCString()));
  
         //we have to put the array of instances under a valid root element or the parser complains         //we have to put the array of instances under a valid root element or the parser complains
         XmlWriter::append(buffer, "<IRETURNVALUE>\n");         XmlWriter::append(buffer, "<IRETURNVALUE>\n");
Line 826 
Line 826 
  
             XmlReader::expectEndTag(parser, "IRETURNVALUE");             XmlReader::expectEndTag(parser, "IRETURNVALUE");
  
             Tracer::trace(__FILE__,__LINE__,TRC_LISTENER,Tracer::LEVEL3,              PEG_TRACE((__FILE__,__LINE__,TRC_LISTENER,Tracer::LEVEL3,
                           "Consumer %s has %d outstanding indications",                           "Consumer %s has %d outstanding indications",
                           (const char*)consumerName.getCString(),                           (const char*)consumerName.getCString(),
                           indications.size());                            indications.size()));
  
             //delete the file             //delete the file
             FileSystem::removeFile(fileName);             FileSystem::removeFile(fileName);
Line 975 
Line 975 
                         //determine if we have hit the max retry count                         //determine if we have hit the max retry count
                         if (event->getRetries() >= DEFAULT_MAX_RETRY_COUNT)                         if (event->getRetries() >= DEFAULT_MAX_RETRY_COUNT)
                         {                         {
                             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2,                              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2,
                                              "Error: the maximum retry count has been exceeded.  Removing the event from the queue.");                                              "Error: the maximum retry count has been exceeded.  Removing the event from the queue.");
  
                             Logger::put(                             Logger::put(
Line 990 
Line 990 
  
                         } else                         } else
                         {                         {
                             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "_worker_routine::placing failed indication back in queue");                              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "_worker_routine::placing failed indication back in queue");
                             tmpEventQueue.insert_back(event);                             tmpEventQueue.insert_back(event);
                         }                         }
  
Line 1009 
Line 1009 
  
                 } catch (...)                 } catch (...)
                 {                 {
                     PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL2, "Error: consumeIndication() failed: Unknown exception.");                      PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL2, "Error: consumeIndication() failed: Unknown exception.");
                     delete event;                     delete event;
                     continue;                     continue;
                 } //end try                 } //end try
Line 1031 
Line 1031 
  
         } catch (TimeOut&)         } catch (TimeOut&)
         {         {
             PEG_TRACE_STRING(TRC_LISTENER, Tracer::LEVEL4, "_worker_routine::Time to retry any outstanding indications.");              PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "_worker_routine::Time to retry any outstanding indications.");
  
             //signal the queue in the same way we would if we received a new indication             //signal the queue in the same way we would if we received a new indication
             //this allows the thread to fall into the queue processing code             //this allows the thread to fall into the queue processing code


Legend:
Removed from v.1.17  
changed lines
  Added in v.1.17.12.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2