Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r5230 - in branches/new-structure-with-base2/ps-mdm-ls: conf src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/storage

Subject: perfsonar development work

List archive

perfsonar: r5230 - in branches/new-structure-with-base2/ps-mdm-ls: conf src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/storage


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r5230 - in branches/new-structure-with-base2/ps-mdm-ls: conf src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/storage
  • Date: Thu, 23 Jul 2009 06:35:09 -0400

Author: trzaszcz
Date: 2009-07-23 06:35:08 -0400 (Thu, 23 Jul 2009)
New Revision: 5230

Removed:
branches/new-structure-with-base2/ps-mdm-ls/conf/configuration-ls.xml
branches/new-structure-with-base2/ps-mdm-ls/conf/configuration.xml-example
Modified:
branches/new-structure-with-base2/ps-mdm-ls/conf/configuration.xml

branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryAction.java

branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java

branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/LookupServiceDAOFactory.java
Log:
read-only permission added

Deleted: branches/new-structure-with-base2/ps-mdm-ls/conf/configuration-ls.xml

Modified: branches/new-structure-with-base2/ps-mdm-ls/conf/configuration.xml
===================================================================
--- branches/new-structure-with-base2/ps-mdm-ls/conf/configuration.xml
2009-07-22 11:46:23 UTC (rev 5229)
+++ branches/new-structure-with-base2/ps-mdm-ls/conf/configuration.xml
2009-07-23 10:35:08 UTC (rev 5230)
@@ -90,13 +90,31 @@
<option name="uri"
value="http://localhost:8080/exist/rest/db/ls"/>
<option name="username" value="lookupservice"/>
<option name="password" value="sonar"/>
- </component>
+ </component>
+
+
+ <!-- exist configuration with read-only permission -->
+ <component name="exist-ro"
+
className="org.perfsonar.base2.service.storage.xml.XMLDBComponent">
+ <option name="dataStorageClassName"
+
value="org.perfsonar.base2.service.storage.xml.exist.ExistHTTPDataStorage"/>
+ <option name="uri"
value="http://localhost:8080/exist/rest/db/ls"/>
+ <option name="username" value="guest"/>
+ <option name="password" value="guest"/>
+ </component>
+

<!-- Lookup Service DAO -->
<component name="lsdao"

className="org.perfsonar.service.lookupservice.storage.exist.XQueryExistDAOImpl">
<option name="exist-config" value="exist"/> <!-- reference to eXist
DB XML config-->
- </component>
+ </component>
+
+ <!-- Lookup Service DAO with read-only permission. It is used in
LSQueryRequest -->
+ <component name="lsdao-ro"
+
className="org.perfsonar.service.lookupservice.storage.exist.XQueryExistDAOImpl">
+ <option name="exist-config" value="exist-ro"/> <!-- reference to
eXist DB XML config-->
+ </component>

<!-- Scheduler -->
<component name="scheduling"

Deleted:
branches/new-structure-with-base2/ps-mdm-ls/conf/configuration.xml-example

Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryAction.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryAction.java
2009-07-22 11:46:23 UTC (rev 5229)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryAction.java
2009-07-23 10:35:08 UTC (rev 5230)
@@ -22,9 +22,7 @@
private LookupServiceDAO dao;

public LSQueryAction(LookupServiceDAO dao) {
-
this.dao = dao;
-
}

public void performQuery(

Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
2009-07-22 11:46:23 UTC (rev 5229)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
2009-07-23 10:35:08 UTC (rev 5230)
@@ -15,7 +15,7 @@
*
*/
public class LSQueryServiceEngine
- extends GenericLSServiceEngine {
+ extends GenericLSServiceROEngine {

// --------------------------------------------------------------
Constants


Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/LookupServiceDAOFactory.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/LookupServiceDAOFactory.java
2009-07-22 11:46:23 UTC (rev 5229)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/LookupServiceDAOFactory.java
2009-07-23 10:35:08 UTC (rev 5230)
@@ -3,23 +3,44 @@
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.exceptions.PerfSONARException;

-
public class LookupServiceDAOFactory {

- private static LookupServiceDAO dao = null;
+ private static LookupServiceDAO dao = null;
+ private static LookupServiceDAO daoRO = null;
+ private final static String LS_DAO = "lsdao";
+ private final static String LS_DAO_RO = "lsdao-ro";

-
- public static LookupServiceDAO getDAO() throws PerfSONARException {
+ public static LookupServiceDAO getDAO() throws PerfSONARException {

-
- if (dao != null) return dao;
- try {
- dao = (LookupServiceDAO)ConfigurationManager.getInstance().
- getConfiguration().getAuxiliaryComponent("lsdao");
- return dao;
- } catch (Exception ex) {
- throw new PerfSONARException("no_ls_dao", "Cannot find 'lsdao'
component"); }
- }
-
-
-} //LookupServiceDAOFactory
+ if (dao != null) {
+ return dao;
+ } else {
+ try {
+ dao = (LookupServiceDAO)
ConfigurationManager.getInstance()
+
.getConfiguration().getAuxiliaryComponent(LS_DAO);
+ return dao;
+ } catch (Exception ex) {
+ throw new PerfSONARException("no_ls_dao",
+ "Cannot find 'lsdao'
component");
+ }
+ }
+ }
+
+ public static LookupServiceDAO getRODAO() throws PerfSONARException {
+
+ if (daoRO != null) {
+ return daoRO;
+ } else {
+ try {
+ daoRO = (LookupServiceDAO)
ConfigurationManager.getInstance()
+
.getConfiguration().getAuxiliaryComponent(LS_DAO_RO);
+ return daoRO;
+ } catch (Exception ex) {
+ throw new PerfSONARException("no_ls_dao",
+ "Cannot find 'lsdao'
component");
+ }
+
+ }
+ }
+
+} // LookupServiceDAOFactory



  • perfsonar: r5230 - in branches/new-structure-with-base2/ps-mdm-ls: conf src/main/java/org/perfsonar/service/lookupservice src/main/java/org/perfsonar/service/lookupservice/storage, svnlog, 07/23/2009

Archive powered by MHonArc 2.6.16.

Top of Page