geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r616532 - in /geronimo/server/trunk/framework: configs/client-system/src/main/plan/plan.xml modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
Date Tue, 29 Jan 2008 21:57:02 GMT
Author: djencks
Date: Tue Jan 29 13:56:57 2008
New Revision: 616532

URL: http://svn.apache.org/viewvc?rev=616532&view=rev
Log:
GERONIMO-3729 Prevent client from modifying the attribute store

Modified:
    geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java

Modified: geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml?rev=616532&r1=616531&r2=616532&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml Tue Jan 29
13:56:57 2008
@@ -43,6 +43,7 @@
         <reference name="ServerInfo">
             <name>ServerInfo</name>
         </reference>
+        <attribute name="readOnly">true</attribute>
         <attribute name="configFile">var/config/config.xml</attribute>
         <attribute name="substitutionsFile">var/config/config-substitutions.properties</attribute>
         <attribute name="substitutionPrefix">org.apache.geronimo.config.substitution.</attribute>

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java?rev=616532&r1=616531&r2=616532&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
Tue Jan 29 13:56:57 2008
@@ -428,6 +428,9 @@
     }
 
     public void startConfiguration(Artifact configurationName) {
+        if (readOnly) {
+            return;
+        }
         ConfigurationOverride configuration = serverOverride.getConfiguration(configurationName,
false);
         if (configuration == null) {
             return;
@@ -437,6 +440,9 @@
     }
 
     public synchronized void addConfiguration(Artifact configurationName) {
+        if (readOnly) {
+            return;
+        }
         // Check whether we have it already
         ConfigurationOverride configuration = serverOverride.getConfiguration(configurationName,
false);
         // If not, initialize it
@@ -448,6 +454,9 @@
     }
 
     public synchronized void removeConfiguration(Artifact configName) {
+        if (readOnly) {
+            return;
+        }
         ConfigurationOverride configuration = serverOverride.getConfiguration(configName);
         if (configuration == null) {
             return;
@@ -461,6 +470,9 @@
     }
 
     public void stopConfiguration(Artifact configName) {
+        if (readOnly) {
+            return;
+        }
         ConfigurationOverride configuration = serverOverride.getConfiguration(configName);
         if (configuration == null) {
             return;
@@ -470,6 +482,9 @@
     }
 
     public void migrateConfiguration(Artifact oldName, Artifact newName, Configuration configuration)
{
+        if (readOnly) {
+            return;
+        }
         ConfigurationOverride configInfo = serverOverride.getConfiguration(oldName);
         if (configInfo == null) {
             throw new IllegalArgumentException("Trying to migrate unknown configuration:
" + oldName);



Mime
View raw message