continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r820145 - /continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Date Wed, 30 Sep 2009 01:40:26 GMT
Author: ctan
Date: Wed Sep 30 01:40:26 2009
New Revision: 820145

URL: http://svn.apache.org/viewvc?rev=820145&view=rev
Log:
[CONTINUUM-2377] store configuration changes of build agent in continuum.xml
merge -r 820143:820144 of 1.3.x branch

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=820145&r1=820144&r2=820145&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Wed Sep 30 01:40:26 2009
@@ -167,6 +167,7 @@
                     agent.setEnabled( buildAgent.isEnabled() );
 
                     configuration.updateBuildAgent( agent );
+                    configuration.store();
                     found = true;
                 }
             }
@@ -179,6 +180,7 @@
         if ( !found )
         {
             configuration.addBuildAgent( buildAgent );
+            configuration.store();
             event.setAction( AuditLogConstants.ADD_BUILD_AGENT );
         }
         else
@@ -209,10 +211,6 @@
             message = getText( "buildAgent.error.delete.busy" );
             return ERROR;
         }
-        else
-        {
-            getContinuum().getDistributedBuildManager().removeDistributedBuildQueueOfAgent(
buildAgent.getUrl() );
-        }
 
         ConfigurationService configuration = getContinuum().getConfiguration();
 
@@ -234,13 +232,17 @@
             {
                 if ( buildAgent.getUrl().equals( agent.getUrl() ) )
                 {
+                    getContinuum().getDistributedBuildManager().removeDistributedBuildQueueOfAgent(
buildAgent.getUrl() );
                     configuration.removeBuildAgent( agent );
+                    configuration.store();
 
                     AuditLog event = new AuditLog( "Build Agent URL=" + agent.getUrl(), AuditLogConstants.REMOVE_BUILD_AGENT
);
                     event.setCategory( AuditLogConstants.BUILD_AGENT );
                     event.setCurrentUser( getPrincipal() );
                     event.log();
 
+                    getContinuum().getDistributedBuildManager().reload();
+
                     return SUCCESS;
                 }
             }



Mime
View raw message