Index: src/main/cpp/propertyconfigurator.cpp =================================================================== --- src/main/cpp/propertyconfigurator.cpp (revision 1557422) +++ src/main/cpp/propertyconfigurator.cpp (working copy) @@ -49,9 +49,12 @@ #if APR_HAS_THREADS #include -class PropertyWatchdog : public FileWatchdog +class PropertyWatchdog : public FileWatchdog, public virtual helpers::ObjectImpl { public: + BEGIN_LOG4CXX_CAST_MAP() + LOG4CXX_CAST_ENTRY(PropertyWatchdog) + END_LOG4CXX_CAST_MAP() PropertyWatchdog(const File& filename) : FileWatchdog(filename) { } @@ -134,9 +137,12 @@ void PropertyConfigurator::configureAndWatch( const File& configFilename, long delay) { - PropertyWatchdog * pdog = new PropertyWatchdog(configFilename); - pdog->setDelay(delay); - pdog->start(); + typedef helpers::ObjectPtrT PropertyWatchdogPtr; + static PropertyWatchdogPtr pdog(0); // Thread doing periodic check of the property config + + pdog = new PropertyWatchdog(configFilename); + pdog->setDelay(delay); + pdog->start(); } #endif