class STConfig : public ShibTargetConfig
{
public:
- STConfig() : m_tranLog(NULL), m_tranLogLock(NULL) {}
+ STConfig() : m_tranLog(NULL), m_tranLogLock(NULL), m_rpcpool(NULL) {}
~STConfig() {}
bool init(const char* schemadir, const char* config);
void shutdown();
- RPCHandlePool& getRPCHandlePool() {return m_rpcpool;}
+ RPCHandlePool& getRPCHandlePool() {return *m_rpcpool;}
log4cpp::Category& getTransactionLog() { m_tranLogLock->lock(); return *m_tranLog; }
void releaseTransactionLog() { m_tranLogLock->unlock();}
private:
- RPCHandlePool m_rpcpool;
+ RPCHandlePool* m_rpcpool;
log4cpp::FixedContextCategory* m_tranLog;
shibboleth::Mutex* m_tranLogLock;
static IConfig* ShibTargetConfigFactory(const DOMElement* e);
m_tranLog=new FixedContextCategory(SHIBTRAN_LOGCAT);
m_tranLog->info("opened transaction log");
m_tranLogLock = Mutex::create();
+
+ m_rpcpool = new RPCHandlePool;
}
catch (...) {
log.fatal("caught exception while loading/initializing configuration");
delete m_ini;
+ delete m_rpcpool;
shibConf.term();
samlConf.term();
return false;
saml::NDC ndc("shutdown");
Category& log = Category::getInstance("shibtarget.STConfig");
log.info("shutting down the library");
+ delete m_rpcpool;
+ m_rpcpool = NULL;
delete m_tranLogLock;
m_tranLogLock = NULL;
//delete m_tranLog; // This is crashing for some reason, but we're shutting down anyway.