Topic Text   Topic Comments (0)   Topic Properties   Topic Information test@tes...
Topic title: test Wednesday April 21, 2010 15:24:25

Download topic text | View in variable-width font | Tab width set to 4 (change to 8)

Files in topic: (view all files)  
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/AlarmManager.java  6018   {+130,-0}
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/ejb/AlarmSessionBean.java  6018   {+160,-36}
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/resources/AlarmClassification.xml  0   {+27,-0}
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/resources/AlarmClassification.xsd  0   {+42,-0}
Fault.FaultManager/DVL/dvl-DefaultQueries.xml  6018   {+7,-9}
Fault.Publisher/src/com/dhyan/nms/server/fault/publisher/EmailPublisherImpl.java  6018   {+11,-0}
Perf.DataCollection/src/com/dhyan/nms/server/performance/datacollection/HistoricalProcessImpl.java  6018   {+1,-3}
Perf.DataCollection/src/com/dhyan/nms/server/performance/datacollection/PerformanceTaskCreator.java  6018   {+17,-8}
Perf.DataCollection/src/com/dhyan/nms/server/performance/datacollection/ejb/DataCollectionFacade.java  6018   {+1,-1}
Perf.PerformanceManager/src/com/dhyan/nms/server/performance/ejb/PerformanceFacade.java  6018   {+1,-0}
Web.BaseModule/WebContent/jsp/DNMSIndex.jsp  6018   {+4,-0}
Web.BaseModule/WebContent/jsp/LoadResourceBundle.jsp  6018   {+0,-1}
Web.BaseModule/WebContent/webresource/webcomponents/table/scripts/VerticalTable.js  6018   {+1,-1}
Web.Chart/WebContent/webresource/chart/flex/src/Linechart.mxml  6018   {+8,-5}
Web.ChassisView/WebContent/resources/conf/MultiChassisView.xml  6018   {+3,-3}
Web.ChassisView/WebContent/webresource/chassisview/scripts/ChassisView.js  6018   {+1,-1}
Web.ChassisView/src/com/dhyan/nms/client/webclient/chassisview/struts/resources/MultiChassisView.xsd  6018   {+6,-6}
Web.Fault/WebContent/WEB-INF/properties/AlarmDetailsAction.properties  6018   {+2,-1}
Web.Fault/WebContent/WEB-INF/struts/struts.xml  6018   {+4,-0}
Web.Fault/WebContent/webresource/fault/scripts/DNMSFault.js  6018   {+2,-2}
Web.Fault/WebContent/webresource/fault/scripts/FaultScriptController.js  6018   {+53,-28}
Web.Fault/WebContent/webresource/fault/scripts/FaultTabUtility.js  6018   {+19,-2}
Web.Fault/src/com/dhyan/nms/client/webclient/fault/struts/AlarmDetailsAction.java  6018   {+39,-3}
Web.Performance/WebContent/webresource/dashboard/scripts/DashboardConfigurator.js  6018   {+5,-5}
Web.Security/WebContent/webresource/security/scripts/SecurityUserManager.js  6018   {+1,-1}
Web.Topology/WebContent/WEB-INF/properties/resource.properties  6018   {+1,-1}
Web.Topology/WebContent/WEB-INF/properties/resourcegroup.properties  6018   {+1,-0}
Web.Topology/WebContent/webresource/topology/scripts/ResourceTreeManager.js  6018   {+11,-5}
Web.Topology/WebContent/webresource/topology/scripts/TopologyMapHelper.js  6018   {+8,-1}
dnms/resources/dbspecific/derby/schema/dnms_common.sql  6018   {+1,-1}
dnms/resources/dbspecific/derby/schema/dnms_default_records.sql  6018   {+1,-1}
dnms/resources/dbspecific/mysql/schema/dnms_common.sql  6018   {+1,-1}
dnms/resources/dbspecific/mysql/schema/dnms_default_records.sql  6018   {+1,-1}
dnms/resources/dbspecific/oracle/schema/dnms_common.sql  6018   {+1,-1}
dnms/resources/dbspecific/oracle/schema/dnms_default_records.sql  6018   {+1,-1}

[Add General Comment] to topic.

File Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/ejb/AlarmSessionBean.java (Revision 6018) [Add File Comment] [<<] [Top] [>>]
 
Line 28 | Parallel Line 28 | Parallel
28 28
29 import com.dhyan.component.audittrial.interfaces.AuditTrailFacadeLocal; 29 import com.dhyan.component.audittrial.interfaces.AuditTrailFacadeLocal;
30 import com.dhyan.component.dvl.core.DVLTableData; 30 import com.dhyan.component.dvl.core.DVLTableData;
31 import com.dhyan.component.dvl.exporter.DVLExportManager;
31 import com.dhyan.component.dvl.exporter.DVLExporterConstants; 32 import com.dhyan.component.dvl.exporter.DVLExporterConstants;
32 import com.dhyan.component.dvl.exporter.DVLExporterVO; 33 import com.dhyan.component.dvl.exporter.DVLExporterVO;
33 import com.dhyan.component.security.RoleConstants; 34 import com.dhyan.component.security.RoleConstants;
 
 
Line 81 | Parallel Line 82 | Parallel
81 private static final String SEVERITY_ID = "severityid"; 82 private static final String SEVERITY_ID = "severityid";
82 private static final String SEVERITY = "severity"; 83 private static final String SEVERITY = "severity";
83 private static final String SOURCE_MESSAGE = " Source:"; 84 private static final String SOURCE_MESSAGE = " Source:";
84 private static final String DELETE_COMMONQUERY = "DELETE FROM ALARM WHERE severityid = " + AlarmConstants.CLEARED_ID; 85 private static final String DELETE_COMMONQUERY =
85 private static final String ARCHIVE_WHERECONDITION = 86 "DELETE alm , evnt " + " FROM ALARM as alm , EVENTLOGS as evnt , EVENTALARMMAPPING as mapping" + " where alm.severityid = "
86 " WHERE a.severityid = s.severityid AND a.eventtypeid = e.eventtypeid AND" + " rd.resourceid = a.resourceid AND a.severityid = " 87 + AlarmConstants.CLEARED_ID + " AND alm.alarmid = mapping.alarmid" + " AND mapping.eventid = evnt.eventid ";
87 + AlarmConstants.CLEARED_ID;
88 private static final String ARCHIVE_SELECTQUERY =
89 "SELECT alarmid,e.eventtype as eventtype,s.severity as severity,source,rd.resourcename as resourcename,"
90 + "componentid,category,createdtime,updatedtime,owner,ackstatus,acktime,clearedtime,message,remedy,a.version as version "
91 + "FROM ALARM a,RESOURCEDETAILS rd,SEVERITY s, EVENTTYPE e";
92 private static final String ARCHIVE_COMMONQUERY = ARCHIVE_SELECTQUERY + ARCHIVE_WHERECONDITION;
93 88
89 private static final String ALARM_ARCHIVE_COMMONQUERY =
90 "SELECT alm.alarmid as alarmid, "
91 + " evntype.eventtype as eventtype, svty.severity as severity, alm.source as source, resource.resourcename as resourcename, "
92 + " alm.componentid as componentid, alm.category as category, alm.createdtime as createdtime, alm.updatedtime as updatedtime, "
93 + " alm.owner as owner, alm.ackstatus as ackstatus, alm.acktime as acktime, alm.clearedtime as clearedtime, "
94 + " alm.message as message, alm.remedy as remedy, alm.version as version "
95 + " FROM ALARM as alm , EVENTTYPE as evntype , RESOURCEDETAILS as resource ,SEVERITY as svty " + " where alm.severityid = "
96 + AlarmConstants.CLEARED_ID + " AND resource.resourceid = alm.resourceid " + " AND evntype.eventtypeid = alm.eventtypeid "
97 + " AND svty.severityid =alm.severityid ";
98
99 private static final String EVENTLOGS_ARCHIVE_COMMONQUERY =
100 "SELECT evnt.eventid as eventid, " + " evntype.eventtype as eventtype,svty.severity as severity,evnt.source,evnt.category, "
101 + " resource.resourcename as resourcename,evnt.componentid,evnt.eventtime as eventtime, "
102 + " evnt.message as message,evnt.remedy as remedy,evnt.version as version FROM "
103 + " EVENTLOGS evnt,ALARM as alm, EVENTALARMMAPPING as mapping,EVENTTYPE evntype, SEVERITY svty,RESOURCEDETAILS resource "
104 + " WHERE evnt.eventtypeid != 4 AND evntype.eventtypeid = evnt.eventtypeid "
105 + " AND evnt.severityid=svty.severityid AND resource.resourceid = evnt.resourceid " + " AND alm.alarmid = mapping.alarmid"
106 + " AND mapping.eventid = evnt.eventid " + " AND alm.severityid = " + AlarmConstants.CLEARED_ID;
107
94 private static final String GLOBAL = "global"; 108 private static final String GLOBAL = "global";
95 private static final String CLOSE_BRACKET = ")"; 109 private static final String CLOSE_BRACKET = ")";
96 private static final String ALARM_CLEARED_MESSAGE = "Alarm Updated : Cleared - Id:"; 110 private static final String ALARM_CLEARED_MESSAGE = "Alarm Updated : Cleared - Id:";
 
 
Line 1133 | Parallel Line 1147 | Parallel
1133 @RolesAllowed("DEFAULT_ROLE_FOR_SERVER") 1147 @RolesAllowed("DEFAULT_ROLE_FOR_SERVER")
1134 public final void purgeAllAlarms(final boolean cleared, final DVLExporterVO exporterVO) 1148 public final void purgeAllAlarms(final boolean cleared, final DVLExporterVO exporterVO)
1135 { 1149 {
1136 String deleteQuery; 1150 String deleteQuery = null;
1137 String archiveQuery; 1151 String alarmArchiveQuery = null;
1152 String eventLogsArchiveQuery = null;
1138 if (cleared) 1153 if (cleared)
1139 { 1154 {
1140 deleteQuery = DELETE_COMMONQUERY; 1155 deleteQuery = DELETE_COMMONQUERY;
1141 archiveQuery = ARCHIVE_COMMONQUERY; 1156 alarmArchiveQuery = ALARM_ARCHIVE_COMMONQUERY;
1157 eventLogsArchiveQuery = EVENTLOGS_ARCHIVE_COMMONQUERY;
1142 } 1158 }
1143 else 1159 // else
1160 // {
1161 // deleteQuery = "DELETE FROM ALARM";
1162 // archiveQuery = ARCHIVE_SELECTQUERY +
1163 // " WHERE a.severityid = s.severityid AND a.eventtypeid = e.eventtypeid AND rd.resourceid = a.resourceid";
1164 // }
1165 DVLExporterVO exporterVOLocal = exporterVO;
1166 if (exporterVOLocal == null)
1144 { 1167 {
1145 deleteQuery = "DELETE FROM ALARM"; 1168 exporterVOLocal = new DVLExporterVO();
1146 archiveQuery = ARCHIVE_SELECTQUERY + " WHERE a.severityid = s.severityid AND a.eventtypeid = e.eventtypeid AND rd.resourceid = a.resourceid"; 1169 exporterVOLocal.setExporterId(DVLExporterConstants.LOG_EXPORTER_ID);
1170 exporterVOLocal.setExportType(DVLExporterConstants.WHOLEVIEW);
1171 exporterVOLocal.setFileName(AlarmConstants.ALARM);
1172 exporterVOLocal.setFileType(Constants.CSV_EXPORT);
1173 exporterVOLocal.setDvlQuerryId(DVLExporterConstants.ARCHIVE_QUERY_ID);
1147 } 1174 }
1148 purge(deleteQuery, archiveQuery, -1, exporterVO); 1175 DVLExportManager.getInstance().exportData(eventLogsArchiveQuery, -1, exporterVOLocal);
1176 purge(deleteQuery, alarmArchiveQuery, -1, exporterVO, true);
1149 } 1177 }
1150 1178
1151 /** 1179 /**
 
 
Line 1157 | Parallel Line 1185 | Parallel
1157 @RolesAllowed("DEFAULT_ROLE_FOR_SERVER") 1185 @RolesAllowed("DEFAULT_ROLE_FOR_SERVER")
1158 public final void purgeAlarmsByInterval(final int filterId, final DVLExporterVO exporterVO, final long timeinterval) 1186 public final void purgeAlarmsByInterval(final int filterId, final DVLExporterVO exporterVO, final long timeinterval)
1159 { 1187 {
1160 String deleteQuery = DELETE_COMMONQUERY + " and updatedtime <= " + (System.currentTimeMillis() - timeinterval); 1188
1161 String archiveQuery = ARCHIVE_COMMONQUERY + " and updatedtime <= " + (System.currentTimeMillis() - timeinterval); 1189 String deleteQuery = DELETE_COMMONQUERY + " AND alm.updatedtime <= " + (System.currentTimeMillis() - timeinterval);
1162 purge(deleteQuery, archiveQuery, filterId, exporterVO); 1190 String alarmArchiveQuery = ALARM_ARCHIVE_COMMONQUERY + " AND alm.updatedtime <= " + (System.currentTimeMillis() - timeinterval);
1191 String eventLogsArchiveQuery = EVENTLOGS_ARCHIVE_COMMONQUERY + " AND alm.updatedtime <= " + (System.currentTimeMillis() - timeinterval);
1192 DVLExporterVO exporterVOLocal = exporterVO;
1193 if (exporterVOLocal == null)
1194 {
1195 exporterVOLocal = new DVLExporterVO();
1196 exporterVOLocal.setExporterId(DVLExporterConstants.LOG_EXPORTER_ID);
1197 exporterVOLocal.setExportType(DVLExporterConstants.WHOLEVIEW);
1198 exporterVOLocal.setFileName(AlarmConstants.ALARM);
1199 exporterVOLocal.setFileType(Constants.CSV_EXPORT);
1200 exporterVOLocal.setDvlQuerryId(DVLExporterConstants.ARCHIVE_QUERY_ID);
1163 } 1201 }
1202 DVLExportManager.getInstance().exportData(eventLogsArchiveQuery, -1, exporterVOLocal);
1203 purge(deleteQuery, alarmArchiveQuery, filterId, exporterVO, true);
1204 }
1164 1205
1165 /** 1206 /**
1166 * To purge the alarms by time interval, filter id and exporter. 1207 * To purge the alarms by time interval, filter id and exporter.
 
 
Line 1171 | Parallel Line 1212 | Parallel
1171 @RolesAllowed("DEFAULT_ROLE_FOR_SERVER") 1212 @RolesAllowed("DEFAULT_ROLE_FOR_SERVER")
1172 public final void purgeAlarmsByCount(final int filterId, final DVLExporterVO exporterVO, final long retainCount) 1213 public final void purgeAlarmsByCount(final int filterId, final DVLExporterVO exporterVO, final long retainCount)
1173 { 1214 {
1174 String commonQuery; 1215 try
1175 String deleteQuery = null; 1216 {
1176 String archiveQuery = null; 1217 StringBuilder deleteQuery = new StringBuilder();
1218 StringBuilder deleteQuery1 = new StringBuilder();
1219 StringBuilder alarmArchiveQuery = new StringBuilder();
1220 StringBuilder eventLogsArchiveQuery = new StringBuilder();
1177 long purgeCount = getAllAlarmsCount() - retainCount; 1221 long purgeCount = getAllAlarmsCount() - retainCount;
1178 if (purgeCount < 1) 1222 if (purgeCount < 1)
1179 { 1223 {
1180 return; 1224 return;
1181 } 1225 }
1182 commonQuery = " order by updatedtime ";
1183 if (ServerSettings.getDatabase() == ServerSettings.MYSQL) 1226 if (ServerSettings.getDatabase() == ServerSettings.MYSQL)
1184 { 1227 {
1185 deleteQuery = DELETE_COMMONQUERY + commonQuery + LIMIT + purgeCount; 1228 deleteQuery.append(" DELETE alm , evnt ");
1186 archiveQuery = ARCHIVE_COMMONQUERY + LIMIT + purgeCount; 1229 deleteQuery.append(" FROM ALARM as alm , ");
1230 deleteQuery.append("(SELECT alarmid from ALARM where severityid = " + AlarmConstants.CLEARED_ID + " ORDER BY updatedtime LIMIT "
1231 + purgeCount + " ) as limitedAlarm ,");
1232 deleteQuery.append(" EVENTLOGS as evnt , EVENTALARMMAPPING as mapping ");
1233 deleteQuery.append(" where alm.alarmid = limitedAlarm.alarmid ");
1234 deleteQuery.append(" AND alm.alarmid = mapping.alarmid");
1235 deleteQuery.append(" AND mapping.eventid = evnt.eventid");
1236
1237 alarmArchiveQuery.append("SELECT alm.alarmid as alarmid, ");
1238 alarmArchiveQuery
1239 .append(" evntype.eventtype as eventtype, svty.severity as severity, alm.source as source, resource.resourcename as resourcename, ");
1240 alarmArchiveQuery
1241 .append(" alm.componentid as componentid, alm.category as category, alm.createdtime as createdtime, alm.updatedtime as updatedtime, ");
1242 alarmArchiveQuery.append(" alm.owner as owner, alm.ackstatus as ackstatus, alm.acktime as acktime, alm.clearedtime as clearedtime, ");
1243 alarmArchiveQuery.append(" alm.message as message, alm.remedy as remedy, alm.version as version ");
1244 alarmArchiveQuery.append(" FROM ALARM as alm , EVENTTYPE as evntype , RESOURCEDETAILS as resource ,SEVERITY as svty, ");
1245 alarmArchiveQuery.append(" (SELECT alarmid from ALARM where severityid = " + AlarmConstants.CLEARED_ID + " ORDER BY updatedtime LIMIT "
1246 + purgeCount + " ) as limitedAlarm ");
1247 alarmArchiveQuery.append(" WHERE resource.resourceid = alm.resourceid ");
1248 alarmArchiveQuery.append(" AND evntype.eventtypeid = alm.eventtypeid ");
1249 alarmArchiveQuery.append(" AND svty.severityid =alm.severityid ");
1250 alarmArchiveQuery.append(" AND alm.alarmid = limitedAlarm.alarmid ");
1251
1252 eventLogsArchiveQuery.append("SELECT evnt.eventid as eventid, ");
1253 eventLogsArchiveQuery.append(" evntype.eventtype as eventtype,svty.severity as severity,evnt.source,evnt.category, ");
1254 eventLogsArchiveQuery.append(" resource.resourcename as resourcename,evnt.componentid,evnt.eventtime as eventtime, ");
1255 eventLogsArchiveQuery.append(" evnt.message as message,evnt.remedy as remedy,evnt.version as version FROM ");
1256 eventLogsArchiveQuery.append(" EVENTLOGS evnt, EVENTALARMMAPPING as mapping,EVENTTYPE evntype, SEVERITY svty,RESOURCEDETAILS resource, ");
1257 eventLogsArchiveQuery.append(" (SELECT alarmid from ALARM where severityid = " + AlarmConstants.CLEARED_ID + " ORDER BY updatedtime LIMIT "
1258 + purgeCount + " ) as limitedAlarm ");
1259 eventLogsArchiveQuery.append(" WHERE evnt.eventtypeid != 4 AND evntype.eventtypeid = evnt.eventtypeid ");
1260 eventLogsArchiveQuery.append(" AND evnt.severityid=svty.severityid AND resource.resourceid = evnt.resourceid ");
1261 eventLogsArchiveQuery.append(" AND limitedAlarm.alarmid = mapping.alarmid");
1262 eventLogsArchiveQuery.append(" AND mapping.eventid = evnt.eventid ");
1187 } 1263 }
1188 else if (ServerSettings.getDatabase() == ServerSettings.ORACLE) 1264 else if (ServerSettings.getDatabase() == ServerSettings.ORACLE)
1189 { 1265 {
1190 deleteQuery = 1266
1191 "DELETE FROM ALARM where alarmid IN (SELECT alarmid FROM (SELECT * FROM ALARM order by updatedtime ) WHERE rownum <= " + purgeCount 1267 deleteQuery.append(" DELETE FROM EVENTLOGS where eventid IN ");
1192 + CLOSE_BRACKET + " and severityid = " + AlarmConstants.CLEARED_ID; 1268 deleteQuery.append(" (SELECT evnt.eventid FROM ALARM alm , ");
1193 archiveQuery = 1269 deleteQuery.append("(SELECT alarmid from ALARM where severityid = " + AlarmConstants.CLEARED_ID + " AND rownum <= " + purgeCount
1194 ARCHIVE_SELECTQUERY + " where alarmid IN (SELECT alarmid FROM (SELECT * FROM ALARM order by updatedtime ) WHERE rownum <= " + purgeCount 1270 + " ORDER BY updatedtime) limitedAlarm ,");
1195 + CLOSE_BRACKET + " and a.severityid = " + AlarmConstants.CLEARED_ID 1271 deleteQuery.append(" EVENTLOGS evnt , EVENTALARMMAPPING mapping ");
1196 + " and a.severityid=s.severityid and a.eventtypeid = e.eventtypeid and a.resourceid = rd.resourceid"; 1272 deleteQuery.append(" where alm.alarmid = limitedAlarm.alarmid ");
1273 deleteQuery.append(" AND alm.alarmid = mapping.alarmid AND evnt.eventid=mapping.eventid)");
1274
1275 deleteQuery1.append("DELETE FROM ALARM where severityid = 1 AND rownum <= 2 ORDER BY updatedtime");
1276 alarmArchiveQuery.append(" SELECT alm.alarmid as alarmid, ");
1277 alarmArchiveQuery.append(" evntype.eventtype as eventtype, svty.severity as severity, alm.source as source, r.resourcename as resourcename, ");
1278 alarmArchiveQuery
1279 .append(" alm.componentid as componentid, alm.category as category, alm.createdtime as createdtime, alm.updatedtime as updatedtime, ");
1280 alarmArchiveQuery.append(" alm.owner as owner, alm.ackstatus as ackstatus, alm.acktime as acktime, alm.clearedtime as clearedtime, ");
1281 alarmArchiveQuery.append(" alm.message as message, alm.remedy as remedy, alm.version as version ");
1282 alarmArchiveQuery.append(" FROM ALARM alm , EVENTTYPE evntype , RESOURCEDETAILS r ,SEVERITY svty, ");
1283 alarmArchiveQuery.append(" (SELECT alarmid from ALARM where severityid = " + AlarmConstants.CLEARED_ID + " AND rownum <= " + purgeCount
1284 + " ORDER BY updatedtime) limitedAlarm ");
1285 alarmArchiveQuery.append(" WHERE r.resourceid = alm.resourceid ");
1286 alarmArchiveQuery.append(" AND evntype.eventtypeid = alm.eventtypeid ");
1287 alarmArchiveQuery.append(" AND svty.severityid =alm.severityid ");
1288 alarmArchiveQuery.append(" AND alm.alarmid = limitedAlarm.alarmid ");
1289
1290 eventLogsArchiveQuery.append("SELECT evnt.eventid as eventid, ");
1291 eventLogsArchiveQuery.append(" evntype.eventtype as eventtype,svty.severity as severity,evnt.source,evnt.category, ");
1292 eventLogsArchiveQuery.append(" r.resourcename as resourcename,evnt.componentid,evnt.eventtime as eventtime, ");
1293 eventLogsArchiveQuery.append(" evnt.message as message,evnt.remedy as remedy,evnt.version as version FROM ");
1294 eventLogsArchiveQuery.append(" EVENTLOGS evnt, EVENTALARMMAPPING mapping,EVENTTYPE evntype, SEVERITY svty,RESOURCEDETAILS r, ");
1295 eventLogsArchiveQuery.append(" (SELECT alarmid from ALARM where severityid ");
1296 eventLogsArchiveQuery.append(" = " + AlarmConstants.CLEARED_ID + " AND rownum <= " + purgeCount);
1297 eventLogsArchiveQuery.append(" ORDER BY updatedtime) limitedAlarm ");
1298 eventLogsArchiveQuery.append(" WHERE evnt.eventtypeid != 4 AND evntype.eventtypeid = evnt.eventtypeid ");
1299 eventLogsArchiveQuery.append(" AND evnt.severityid=svty.severityid AND r.resourceid = evnt.resourceid ");
1300 eventLogsArchiveQuery.append(" AND limitedAlarm.alarmid = mapping.alarmid");
1301 eventLogsArchiveQuery.append(" AND mapping.eventid = evnt.eventid ");
1197 } 1302 }
1198 purge(deleteQuery, archiveQuery, filterId, exporterVO); 1303 DVLExporterVO exporterVOLocal = exporterVO;
1304 if (exporterVOLocal == null)
1305 {
1306 exporterVOLocal = new DVLExporterVO();
1307 exporterVOLocal.setExporterId(DVLExporterConstants.LOG_EXPORTER_ID);
1308 exporterVOLocal.setExportType(DVLExporterConstants.WHOLEVIEW);
1309 exporterVOLocal.setFileName(AlarmConstants.ALARM);
1310 exporterVOLocal.setFileType(Constants.CSV_EXPORT);
1311 exporterVOLocal.setDvlQuerryId(DVLExporterConstants.ARCHIVE_QUERY_ID);
1199 } 1312 }
1313 DVLExportManager.getInstance().exportData(eventLogsArchiveQuery.toString(), -1, exporterVOLocal);
1314 purge(deleteQuery.toString(), alarmArchiveQuery.toString(), filterId, exporterVO, true);
1315 if (ServerSettings.getDatabase() == ServerSettings.ORACLE)
1316 {
1317 purge(deleteQuery1.toString(), alarmArchiveQuery.toString(), filterId, exporterVO, false);
1318 }
1319 }
1320 catch (Exception e)
1321 {
1322 LOG.error("ERROR in purgeAlarmsByCount due to , " + e.getMessage());
1323 }
1324 }
1200 1325
1201 /** 1326 /**
1202 * To fetch the alarm count 1327 * To fetch the alarm count
 
 
Line 1265 | Parallel Line 1390 | Parallel
1265 return false; 1390 return false;
1266 } 1391 }
1267 1392
1268 private void purge(final String purgingQuery, final String archivingQuery, final int filterId, final DVLExporterVO exporterVO) 1393 private void purge(final String purgingQuery, final String archivingQuery, final int filterId, final DVLExporterVO exporterVO, final boolean isArchive)
1269 { 1394 {
1270 DVLExporterVO exporterVOLocal = exporterVO; 1395 DVLExporterVO exporterVOLocal = exporterVO;
1271 1396
 
 
Line 1286 | Parallel Line 1411 | Parallel
1286 exporterVOLocal.setFileType(Constants.CSV_EXPORT); 1411 exporterVOLocal.setFileType(Constants.CSV_EXPORT);
1287 exporterVOLocal.setDvlQuerryId(DVLExporterConstants.ARCHIVE_QUERY_ID); 1412 exporterVOLocal.setDvlQuerryId(DVLExporterConstants.ARCHIVE_QUERY_ID);
1288 } 1413 }
1289
1290 messObject.setExporterVO(exporterVOLocal); 1414 messObject.setExporterVO(exporterVOLocal);
1291 Thread thread = new Thread(new PurgeAndArchiveOperation(messObject, true)); 1415 Thread thread = new Thread(new PurgeAndArchiveOperation(messObject, isArchive));
1292 thread.start(); 1416 thread.start();
1293 } 1417 }
1294 1418
 
File Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/ejb/AlarmSessionBean.java (Revision 6018) [Add File Comment] [<<] [Top] [>>]
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.