continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1412760 - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/configuration/ continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/ continuum-commons/src/main/java/org/apache/maven/contin...
Date Fri, 23 Nov 2012 06:28:57 GMT
Author: brett
Date: Fri Nov 23 06:28:56 2012
New Revision: 1412760

URL: http://svn.apache.org/viewvc?rev=1412760&view=rev
Log:
[CONTINUUM-2694] no need to persist configuration changes to database

Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
    continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
    continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java?rev=1412760&r1=1412759&r2=1412760&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
Fri Nov 23 06:28:56 2012
@@ -31,6 +31,8 @@ import java.util.List;
  */
 public class GeneralConfiguration
 {
+    private boolean initialized = false;
+
     private File workingDirectory;
 
     private File buildOutputDirectory;
@@ -173,4 +175,14 @@ public class GeneralConfiguration
     {
         return sharedSecretPassword;
     }
+
+    public boolean isInitialized()
+    {
+        return initialized;
+    }
+
+    public void setInitialized( boolean initialized )
+    {
+        this.initialized = initialized;
+    }
 }

Modified: continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java?rev=1412760&r1=1412759&r2=1412760&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
(original)
+++ continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
Fri Nov 23 06:28:56 2012
@@ -164,6 +164,8 @@ public class DefaultContinuumConfigurati
             // set the configuration for diistributedBuildEnabled
             this.generalConfiguration.setDistributedBuildEnabled( configuration.isDistributedBuildEnabled()
);
 
+            this.generalConfiguration.setInitialized( configuration.isInitialized() );
+
             if ( configuration.getBuildAgents() != null )
             {
                 List<BuildAgentConfiguration> buildAgents = new ArrayList<BuildAgentConfiguration>();
@@ -273,6 +275,8 @@ public class DefaultContinuumConfigurati
             // set configuration for distributedBuildEnabled.
             configurationModel.setDistributedBuildEnabled( this.generalConfiguration.isDistributedBuildEnabled()
);
 
+            configurationModel.setInitialized( this.generalConfiguration.isInitialized()
);
+
             if ( this.generalConfiguration.getBuildAgents() != null )
             {
                 List<org.apache.continuum.configuration.model.BuildAgentConfiguration>
buildAgents =

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=1412760&r1=1412759&r2=1412760&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Fri Nov 23 06:28:56 2012
@@ -143,12 +143,12 @@ public class DefaultConfigurationService
 
     public void setInitialized( boolean initialized )
     {
-        systemConf.setInitialized( initialized );
+        generalConfiguration.setInitialized( initialized );
     }
 
     public boolean isInitialized()
     {
-        return systemConf.isInitialized();
+        return systemConf.isInitialized() || generalConfiguration.isInitialized();
     }
 
     public String getUrl()
@@ -365,7 +365,6 @@ public class DefaultConfigurationService
 
     public void setDistributedBuildEnabled( boolean distributedBuildEnabled )
     {
-        systemConf.setDistributedBuildEnabled( distributedBuildEnabled );
         generalConfiguration.setDistributedBuildEnabled( distributedBuildEnabled );
     }
 
@@ -750,14 +749,6 @@ public class DefaultConfigurationService
         configuration.setGeneralConfiguration( generalConfiguration );
 
         configuration.save();
-        try
-        {
-            getSystemConfigurationDao().updateSystemConfiguration( systemConf );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw new ConfigurationStoringException( "Error writting configuration to database.",
e );
-        }
     }
 
     public Schedule getDefaultSchedule()



Mime
View raw message