org.openoss.opennms.spring.dao
Class OssDaoOpenNMSImplSingleton

java.lang.Object
  extended by org.openoss.opennms.spring.dao.OssDaoOpenNMSImpl
      extended by org.openoss.opennms.spring.dao.OssDaoOpenNMSImplSingleton

public class OssDaoOpenNMSImplSingleton
extends OssDaoOpenNMSImpl

Wrapper class for OssDaoOpenNMSImpl which makes it onto a singleton which can be shared between Qosd and QoSDrx when either one or or both applications are running. This is needed because Qosd and QoSDrx have different local application contexts but need to share access to the OssDao which provides the synchronized alarm cache for both applications. Either Qosd or QoSDrx can initialise the class. The first call to getInstance() causes the class to be created. All subsiquent calls return the same instance. Note it is expected thet the Spring application context has already set up the opennms DAO's before the first call to getInstance(). This means that you must ensure that the application contexts for Qosd and QosDrx set the same values for these DAO's otherwise there will be unpredictable results


Field Summary
 
Fields inherited from class org.openoss.opennms.spring.dao.OssDaoOpenNMSImpl
_alarmDao, _assetRecordDao, _dataSource, _nodeDao, transTemplate
 
Method Summary
static OssDaoOpenNMSImplSingleton getInstance()
           
 
Methods inherited from class org.openoss.opennms.spring.dao.OssDaoOpenNMSImpl
addCurrentAlarmForUniqueKey, alarmToString, alarmToStringBrief, findNodeByID, findNodeByInstanceAndType, findNodeByLabel, getAlarmCache, getCurrentAlarmForUniqueKey, init, setalarmDao, setassetRecordDao, setdataSource, setnodeDao, setQoSD, setTransTemplate, updateAlarmCache, updateAlarmCacheAndSendAlarms, updateCurrentAlarmForUniqueKey, updateNodeCaches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static OssDaoOpenNMSImplSingleton getInstance()


Copyright ? 2006-2008. All Rights Reserved.