org.openoss.opennms.spring.dao
Class OssDaoOpenNMSImplSingleton

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

public class OssDaoOpenNMSImplSingleton
extends Object

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 subsequent calls return the same instance. Note it is expected that 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

Version:
$Id: $
Author:
ranger

Constructor Summary
OssDaoOpenNMSImplSingleton()
           
 
Method Summary
static OssDao getInstance()
          Getter for the field instance.
 void setAlarmDao(AlarmDao alarmDao)
          Setter for the field alarmDao.
 void setAssetRecordDao(AssetRecordDao assetRecordDao)
          Setter for the field assetRecordDao.
 void setDataSource(DataSource dataSource)
          Setter for the field dataSource.
 void setNodeDao(NodeDao nodeDao)
          Setter for the field nodeDao.
 void setTransTemplate(org.springframework.transaction.support.TransactionTemplate transTemplate)
          Setter for the field transTemplate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OssDaoOpenNMSImplSingleton

public OssDaoOpenNMSImplSingleton()
Method Detail

getInstance

public static OssDao getInstance()

Getter for the field instance.

Returns:
a OssDao object.

setAlarmDao

public void setAlarmDao(AlarmDao alarmDao)

Setter for the field alarmDao.

Parameters:
alarmDao - a AlarmDao object.

setAssetRecordDao

public void setAssetRecordDao(AssetRecordDao assetRecordDao)

Setter for the field assetRecordDao.

Parameters:
assetRecordDao - a AssetRecordDao object.

setDataSource

public void setDataSource(DataSource dataSource)

Setter for the field dataSource.

Parameters:
dataSource - a DataSource object.

setNodeDao

public void setNodeDao(NodeDao nodeDao)

Setter for the field nodeDao.

Parameters:
nodeDao - a NodeDao object.

setTransTemplate

public void setTransTemplate(org.springframework.transaction.support.TransactionTemplate transTemplate)

Setter for the field transTemplate.

Parameters:
transTemplate - a TransactionTemplate object.


Copyright © 2011. All Rights Reserved.