continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r388203 - in /maven/continuum/branches/continuum-1.0.x: continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-store/src/main/java/org/apache/maven/continuum/store/
Date Thu, 23 Mar 2006 16:38:31 GMT
Author: evenisse
Date: Thu Mar 23 08:38:28 2006
New Revision: 388203

URL: http://svn.apache.org/viewcvs?rev=388203&view=rev
Log:
Add a check in continuum startup for bad notifiers and remove them

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=388203&r1=388202&r2=388203&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Thu Mar 23 08:38:28 2006
@@ -76,6 +76,8 @@
 
     List getAllProjectsByName();
 
+    List getAllProjectsByNameWithBuildDetails();
+
     List getAllSchedulesByName();
 
     Schedule addSchedule( Schedule schedule );

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=388203&r1=388202&r2=388203&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Thu Mar 23 08:38:28 2006
@@ -1876,10 +1876,27 @@
 
         getLogger().info( "Showing all projects: " );
 
-        for ( Iterator it = store.getAllProjectsByName().iterator(); it.hasNext(); )
+        for ( Iterator it = store.getAllProjectsByNameWithBuildDetails().iterator(); it.hasNext();
)
         {
             Project project = (Project) it.next();
 
+            for ( Iterator notifierIt = project.getNotifiers().iterator(); notifierIt.hasNext();
)
+            {
+                ProjectNotifier notifier = (ProjectNotifier) notifierIt.next();
+
+                if ( StringUtils.isEmpty( notifier.getType() ) )
+                {
+                    try
+                    {
+                        removeNotifier( project.getId(), notifier.getId() );
+                    }
+                    catch ( ContinuumException e )
+                    {
+                        throw new InitializationException( "Database is corrupted.", e );
+                    }
+                }
+            }
+
             if ( project.getState() != ContinuumProjectState.NEW &&
                 project.getState() != ContinuumProjectState.CHECKEDOUT &&
                 project.getState() != ContinuumProjectState.OK && project.getState()
!= ContinuumProjectState.FAILED &&
@@ -1899,7 +1916,8 @@
                 }
             }
 
-            getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getVersion()
+ ":" + project.getExecutorId() );
+            getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getVersion()
+ ":" +
+                project.getExecutorId() );
         }
     }
 

Modified: maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=388203&r1=388202&r2=388203&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Thu Mar 23 08:38:28 2006
@@ -747,6 +747,11 @@
         return getAllObjectsDetached( Project.class, "name ascending", null );
     }
 
+    public List getAllProjectsByNameWithBuildDetails()
+    {
+        return getAllObjectsDetached( Project.class, "name ascending", PROJECT_BUILD_DETAILS_FETCH_GROUP
);
+    }
+
     public List getAllSchedulesByName()
     {
         return getAllObjectsDetached( Schedule.class, "name ascending", null );



Mime
View raw message