perfsonar-dev - perfsonar: r5292 - in branches/new-structure-with-base2/ps-mdm-ls: . ant conf src/main/java/org/perfsonar/service/lookupservice src/main/resources
Subject: perfsonar development work
List archive
perfsonar: r5292 - in branches/new-structure-with-base2/ps-mdm-ls: . ant conf src/main/java/org/perfsonar/service/lookupservice src/main/resources
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5292 - in branches/new-structure-with-base2/ps-mdm-ls: . ant conf src/main/java/org/perfsonar/service/lookupservice src/main/resources
- Date: Thu, 1 Oct 2009 06:47:11 -0400
Author: trzaszcz
Date: 2009-10-01 06:47:11 -0400 (Thu, 01 Oct 2009)
New Revision: 5292
Added:
branches/new-structure-with-base2/ps-mdm-ls/src/main/resources/log4j.properties
Removed:
branches/new-structure-with-base2/ps-mdm-ls/conf/log4j.properties
branches/new-structure-with-base2/ps-mdm-ls/conf/log4j.xml
Modified:
branches/new-structure-with-base2/ps-mdm-ls/ant/build.xml
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/LSDeregisterServiceEngine.java
Log:
refactoring, log4j logging enchancement
Modified: branches/new-structure-with-base2/ps-mdm-ls/ant/build.xml
===================================================================
--- branches/new-structure-with-base2/ps-mdm-ls/ant/build.xml 2009-09-30
08:36:54 UTC (rev 5291)
+++ branches/new-structure-with-base2/ps-mdm-ls/ant/build.xml 2009-10-01
10:47:11 UTC (rev 5292)
@@ -189,8 +189,7 @@
<copy file="${build.dir}/${jar.name}.aar"
todir="${temp}/WEB-INF/services" />
<copy
file="${basedir}/src/main/resources/perfsonar/conf/${config.file.name}"
tofile="${temp}/WEB-INF/classes/perfsonar/conf/configuration.xml" />
<copy
file="${basedir}/src/main/resources/perfsonar/conf/configuration-rules.xml"
todir="${temp}/WEB-INF/classes/perfsonar/conf" />
- <copy file="${basedir}/conf/log4j.properties"
todir="${temp}/WEB-INF/classes" />
- <copy file="${basedir}/conf/log4j.xml"
todir="${temp}/WEB-INF/classes" />
+ <copy file="${basedir}/src/main/resources/log4j.properties"
todir="${temp}/WEB-INF/classes" />
<path id="services.archives">
<fileset dir="${temp}/WEB-INF/services">
Deleted: branches/new-structure-with-base2/ps-mdm-ls/conf/log4j.properties
Deleted: branches/new-structure-with-base2/ps-mdm-ls/conf/log4j.xml
Modified: branches/new-structure-with-base2/ps-mdm-ls/pom.xml
===================================================================
--- branches/new-structure-with-base2/ps-mdm-ls/pom.xml 2009-09-30 08:36:54
UTC (rev 5291)
+++ branches/new-structure-with-base2/ps-mdm-ls/pom.xml 2009-10-01 10:47:11
UTC (rev 5292)
@@ -106,13 +106,6 @@
</includes>
<targetPath>WEB-INF/conf</targetPath>
</resource>
- <resource>
- <directory>${basedir}/conf</directory>
- <includes>
- <include>**/log4j.xml</include>
- </includes>
- <targetPath>WEB-INF/classes</targetPath>
- </resource>
</webResources>
<webXml>${basedir}/resources/${axis2Id}/webapp/WEB-INF/web.xml</webXml>
</configuration>
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
2009-09-30 08:36:54 UTC (rev 5291)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
2009-10-01 10:47:11 UTC (rev 5292)
@@ -64,29 +64,32 @@
logger.error(m);
throw new PerfSONARException("error/ls/no_key", m);
}
- logger.debug("!!! A"+dao);
int elementsRemoved = dao.removeLookupInfo(keyValue);
- //Return result code
- logger.debug("!!! B");
- if (elementsRemoved<1)
- throw new PerfSONARException("error/ls/key_not_found",
- "There were no metadata and data for key
["+keyValue+"]");
-
- //return success code
+ Message msg;
- // inform about changes Component !
- ConfigurationManager cm = ConfigurationManager.getInstance();
- ModificationCounterComponent component =
(ModificationCounterComponent) cm
- .getConfiguration().getAuxiliaryComponent(
-
"modificationCounterComponent");
- component.increaseCounter();
- logger.debug("!!! C");
- Message msg = ResultCodesUtil.generateResultMessage(null,
- "success/ls/deregister", "Removed total ["+
- elementsRemoved+"] metadata and data elements for key ["+
- keyValue+"]");
+ if (elementsRemoved<1){
+ //given key not found !
+
msg=ResultCodesUtil.generateResultMessage("error/ls/key_not_found", "There
were no metadata and data for key ["+keyValue+"]");
+ logger.debug("given key "+keyValue+" not found in DB");
+ }else{
+ //metadata with key existed - deregistration successful
+
+ // inform about changes Component !
+ ConfigurationManager cm = ConfigurationManager.getInstance();
+ ModificationCounterComponent component =
(ModificationCounterComponent) cm
+ .getConfiguration().getAuxiliaryComponent(
+
"modificationCounterComponent");
+ component.increaseCounter();
+
+ msg = ResultCodesUtil.generateResultMessage(null,
+ "success/ls/deregister", "Removed total ["+
+ elementsRemoved+"] metadata and data elements for key ["+
+ keyValue+"]");
+ }
+
+
serviceResponse.setElement(msg);
}
Added:
branches/new-structure-with-base2/ps-mdm-ls/src/main/resources/log4j.properties
Property changes on:
branches/new-structure-with-base2/ps-mdm-ls/src/main/resources/log4j.properties
___________________________________________________________________
Name: svn:executable
+ *
- perfsonar: r5292 - in branches/new-structure-with-base2/ps-mdm-ls: . ant conf src/main/java/org/perfsonar/service/lookupservice src/main/resources, svnlog, 10/01/2009
Archive powered by MHonArc 2.6.16.