perfsonar-dev - perfsonar: r5307 - in branches/new-structure-with-base2/ps-mdm-ls: . src/main/java/org/perfsonar/service/lookupservice/summarization
Subject: perfsonar development work
List archive
perfsonar: r5307 - in branches/new-structure-with-base2/ps-mdm-ls: . src/main/java/org/perfsonar/service/lookupservice/summarization
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5307 - in branches/new-structure-with-base2/ps-mdm-ls: . src/main/java/org/perfsonar/service/lookupservice/summarization
- Date: Tue, 13 Oct 2009 10:05:15 -0400
Author: trzaszcz
Date: 2009-10-13 10:05:15 -0400 (Tue, 13 Oct 2009)
New Revision: 5307
Modified:
branches/new-structure-with-base2/ps-mdm-ls/pom.xml
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/summarization/LSSummarySynchronizationAction.java
Log:
refactoring
Modified: branches/new-structure-with-base2/ps-mdm-ls/pom.xml
===================================================================
--- branches/new-structure-with-base2/ps-mdm-ls/pom.xml 2009-10-12 10:49:32
UTC (rev 5306)
+++ branches/new-structure-with-base2/ps-mdm-ls/pom.xml 2009-10-13 14:05:15
UTC (rev 5307)
@@ -172,7 +172,7 @@
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
- <version>1.7</version>
+ <version>2.0</version>
</dependency>
<!-- taken from axis2 sources -->
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/summarization/LSSummarySynchronizationAction.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/summarization/LSSummarySynchronizationAction.java
2009-10-12 10:49:32 UTC (rev 5306)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/summarization/LSSummarySynchronizationAction.java
2009-10-13 14:05:15 UTC (rev 5307)
@@ -29,36 +29,49 @@
private int NR_OF_ITERATIONS;
private int iteration = 0;
private boolean firstIteration=true;
+ private boolean initialized=false;
private ISummarizationDAO summarizationDao;
private SummarizationBuilder builder;
+ private ModificationCounterComponent component;
public LSSummarySynchronizationAction() throws PerfSONARException {
super();
}
- @Override
- public void runAction() {
+ private void initializeElement(){
try {
summarizationDao =
LookupServiceDAOFactory.getSumarizationDAO();
builder = new SummarizationBuilder(summarizationDao);
} catch (PerfSONARException e) {
e.printStackTrace();
}
-
- int nrOfChanges = 0;
- ModificationCounterComponent component = null;
+
try {
ConfigurationManager cm =
ConfigurationManager.getInstance();
component = (ModificationCounterComponent)
cm.getConfiguration()
.getAuxiliaryComponent("modificationCounterComponent");
- nrOfChanges = component.getCounter();
} catch (PerfSONARException e) {
e.printStackTrace();
}
NR_OF_MODIFICATIONS =
getOption("nrOfModifications").getValueAsInteger();
NR_OF_ITERATIONS =
getOption("nrOfIterations").getValueAsInteger();
+ }
+
+ @Override
+ public void runAction() {
+
+ int nrOfChanges = 0;
+
+ if(!initialized){
+
+ initializeElement();
+ nrOfChanges=component.getCounter();
+ initialized=true;
+
+ }
+
try {
if (firstIteration) {
- perfsonar: r5307 - in branches/new-structure-with-base2/ps-mdm-ls: . src/main/java/org/perfsonar/service/lookupservice/summarization, svnlog, 10/13/2009
Archive powered by MHonArc 2.6.16.