geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r344300 - in /geronimo/trunk/modules: assembly/src/plan/ system/src/java/org/apache/geronimo/system/configuration/ system/src/java/org/apache/geronimo/system/repository/
Date Tue, 15 Nov 2005 03:48:02 GMT
Author: djencks
Date: Mon Nov 14 19:47:57 2005
New Revision: 344300

URL: http://svn.apache.org/viewcvs?rev=344300&view=rev
Log:
Make FileSystemRepository and LocalConfigStore more flexible, remove unused Reference from
LocalConfigStore

Modified:
    geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml
    geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml
    geronimo/trunk/modules/assembly/src/plan/system-plan.xml
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java

Modified: geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml?rev=344300&r1=344299&r2=344300&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml Mon Nov 14 19:47:57 2005
@@ -66,9 +66,6 @@
         <reference name="ServerInfo">
             <name>ServerInfo</name>
         </reference>
-        <reference name="AttributeStore">
-            <name>AttributeManager</name>
-        </reference>
     </gbean>
 
     <!-- Repository -->

Modified: geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml?rev=344300&r1=344299&r2=344300&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml Mon Nov 14 19:47:57
2005
@@ -62,9 +62,6 @@
         <reference name="ServerInfo">
             <name>ServerInfo</name>
         </reference>
-        <reference name="AttributeStore">
-            <name>AttributeManager</name>
-        </reference>
     </gbean>
 
     <!-- Repository -->

Modified: geronimo/trunk/modules/assembly/src/plan/system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/system-plan.xml?rev=344300&r1=344299&r2=344300&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/system-plan.xml Mon Nov 14 19:47:57 2005
@@ -64,18 +64,7 @@
         <reference name="ServerInfo">
             <name>ServerInfo</name>
         </reference>
-        <reference name="AttributeStore">
-            <name>AttributeManager</name>
-        </reference>
     </gbean>
-
-    <!-- Persistent List of running Configurations service -->
-<!--    <gbean name="Default" class="org.apache.geronimo.system.configuration.KernelMonitoringConfigurationList">-->
-<!--        <reference name="Delegate">-->
-<!--            <type>AttributeStore</type>-->
-<!--            <name>AttributeManager</name>-->
-<!--        </reference>-->
-<!--    </gbean>-->
 
     <!-- Repository -->
     <gbean name="Repository" class="org.apache.geronimo.system.repository.FileSystemRepository">

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java?rev=344300&r1=344299&r2=344300&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
Mon Nov 14 19:47:57 2005
@@ -68,7 +68,6 @@
     private final Kernel kernel;
     private final ObjectName objectName;
     private final URI root;
-    private final ManageableAttributeStore attributeStore;
     private final ServerInfo serverInfo;
     private final Properties index = new Properties();
     private final Log log;
@@ -83,17 +82,15 @@
         objectName = null;
         serverInfo = null;
         this.root = null;
-        this.attributeStore = null;
         this.rootDir = rootDir;
         log = LogFactory.getLog("LocalConfigStore:"+rootDir.getName());
     }
 
-    public LocalConfigStore(Kernel kernel, String objectName, URI root, ServerInfo serverInfo,
ManageableAttributeStore attributeStore) throws MalformedObjectNameException {
+    public LocalConfigStore(Kernel kernel, String objectName, URI root, ServerInfo serverInfo)
throws MalformedObjectNameException {
         this.kernel = kernel;
         this.objectName = new ObjectName(objectName);
         this.root = root;
         this.serverInfo = serverInfo;
-        this.attributeStore = attributeStore;
         log = LogFactory.getLog("LocalConfigStore:"+root.toString());
     }
 
@@ -176,6 +173,10 @@
     }
 
     public URI install(URL source) throws IOException, InvalidConfigException {
+        return (URI) install2(source).getAttribute("id");
+    }
+
+    public GBeanData install2(URL source) throws IOException, InvalidConfigException {
         File configurationDir = createNewConfigurationDir();
 
         InputStream is = source.openStream();
@@ -189,8 +190,9 @@
         }
 
         URI configId;
+        GBeanData config;
         try {
-            GBeanData config = loadConfig(configurationDir);
+            config = loadConfig(configurationDir);
             configId = (URI) config.getAttribute("id");
             index.setProperty(configId.toString(), configurationDir.getName());
         } catch (Exception e) {
@@ -203,7 +205,7 @@
         }
 
         log.info("Installed configuration (URL) " + configId + " in location " + configurationDir.getName());
-        return configId;
+        return config;
     }
 
     public void install(ConfigurationData configurationData, File source) throws IOException,
InvalidConfigException {
@@ -421,10 +423,9 @@
         infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addAttribute("root", URI.class, true);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
-        infoFactory.addReference("AttributeStore", ManageableAttributeStore.class, "AttributeStore");
         infoFactory.addInterface(ConfigurationStore.class);
 
-        infoFactory.setConstructor(new String[]{"kernel", "objectName", "root", "ServerInfo",
"AttributeStore"});
+        infoFactory.setConstructor(new String[]{"kernel", "objectName", "root", "ServerInfo"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java?rev=344300&r1=344299&r2=344300&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
Mon Nov 14 19:47:57 2005
@@ -164,7 +164,11 @@
 
     public void doStart() throws Exception {
         if (rootURI == null) {
-            rootURI = serverInfo.resolve(root);
+            if (serverInfo != null) {
+                rootURI = serverInfo.resolve(root);
+            } else {
+                rootURI = root;
+            }
             if(!rootURI.getScheme().equals("file")) {
                 throw new IllegalStateException("FileSystemRepository must have a root that's
a local directory (not "+rootURI+")");
             }



Mime
View raw message