continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <wsm...@gmail.com>
Subject Re: svn commit: r788260 - in /continuum/branches/continuum-1.3.x: continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-store/src/main/java/org/apache/c
Date Wed, 01 Jul 2009 14:19:05 GMT
Is this related to the recent profiling/performance discussions?  If
so I can link it up to CONTINUUM-2284. Thanks, -Wendy

On Wed, Jun 24, 2009 at 10:02 PM, <evenisse@apache.org> wrote:
> Author: evenisse
> Date: Thu Jun 25 05:02:07 2009
> New Revision: 788260
>
> URL: http://svn.apache.org/viewvc?rev=788260&view=rev
> Log:
> - Use the right project dao method to check project dependencies so we use less SQL requests\n
> - Remove duplicated code
>
> Modified:
>    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
>    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
>    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
>    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
>    continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
>
> Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
> URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=788260&r1=788259&r2=788260&view=diff
> ==============================================================================
> --- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
> +++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Thu Jun 25 05:02:07 2009
> @@ -84,11 +84,6 @@
>     /**
>      * @plexus.requirement
>      */
> -    private ProjectGroupDao projectGroupDao;
> -
> -    /**
> -     * @plexus.requirement
> -     */
>     private ProjectScmRootDao projectScmRootDao;
>
>     /**
> @@ -602,7 +597,7 @@
>
>         try
>         {
> -            Project project = projectDao.getProjectWithAllDetails( context.getProject().getId()
);
> +            Project project = projectDao.getProjectWithDependencies( context.getProject().getId()
);
>             List<ProjectDependency> dependencies = project.getDependencies();
>
>             if ( dependencies == null )
>
> Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
> URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java?rev=788260&r1=788259&r2=788260&view=diff
> ==============================================================================
> --- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
(original)
> +++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
Thu Jun 25 05:02:07 2009
> @@ -55,7 +55,6 @@
>
>                 project.addBuildDefinition( buildDefinition );
>
> -                projectDao.updateProject( project );
>                 if ( buildDefinition.isDefaultForProject() )
>                 {
>                     AbstractContinuumAction.setBuildDefinition( context, buildDefinition
);
> @@ -69,9 +68,10 @@
>
>             project.addBuildDefinition( buildDefinition );
>
> -            projectDao.updateProject( project );
>             AbstractContinuumAction.setBuildDefinition( context, buildDefinition
);
>         }
>
> +        // Save the project
> +        projectDao.updateProject( project );
>     }
>  }
>
> Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
> URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java?rev=788260&r1=788259&r2=788260&view=diff
> ==============================================================================
> --- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
(original)
> +++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
Thu Jun 25 05:02:07 2009
> @@ -57,8 +57,6 @@
>                 resolveDefaultBuildDefinitionsForProjectGroup( buildDefinition,
projectGroup );
>
>                 projectGroup.addBuildDefinition( buildDefinition );
> -
> -                projectGroupDao.updateProjectGroup( projectGroup );
>             }
>         }
>         else
> @@ -68,9 +66,11 @@
>             resolveDefaultBuildDefinitionsForProjectGroup( buildDefinition, projectGroup
);
>
>             projectGroup.addBuildDefinition( buildDefinition );
> -
> -            projectGroupDao.updateProjectGroup( projectGroup );
>         }
> +
> +        // Save the project group
> +        projectGroupDao.updateProjectGroup( projectGroup );
> +
>         //map.put( AbstractContinuumAction.KEY_BUILD_DEFINITION, buildDefinition
);
>     }
>  }
>
> Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
> URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java?rev=788260&r1=788259&r2=788260&view=diff
> ==============================================================================
> --- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
(original)
> +++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
Thu Jun 25 05:02:07 2009
> @@ -101,23 +101,14 @@
>                     }
>                     else
>                     {
> -                        project.setOldState( project.getState() );
> -
>                         project.setState( ContinuumProjectState.ERROR );
> -
> -                        projectDao.updateProject( project );
> -
> -                        project = projectDao.getProject( project.getId()
);
>                     }
>                 }
> -                else
> -                {
> -                    project.setOldState( project.getState() );
> +                project.setOldState( project.getState() );
>
> -                    projectDao.updateProject( project );
> +                projectDao.updateProject( project );
>
> -                    project = projectDao.getProject( project.getId() );
> -                }
> +                project = projectDao.getProject( project.getId() );
>
>                 projectsToBeBuilt.add( project );
>             }
> @@ -128,7 +119,7 @@
>             }
>         }
>
> -        parallelBuildsManager.buildProjects( projectsToBeBuilt, projectsBuildDefinitionsMap,
> -                                             trigger, scmResultMap,
projectGroupId );
> +        parallelBuildsManager.buildProjects( projectsToBeBuilt, projectsBuildDefinitionsMap,
trigger, scmResultMap,
> +                                             projectGroupId );
>     }
>  }
>
> Modified: continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
> URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java?rev=788260&r1=788259&r2=788260&view=diff
> ==============================================================================
> --- continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
(original)
> +++ continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
Thu Jun 25 05:02:07 2009
> @@ -71,6 +71,7 @@
>
>             project.setState( build.getState() );
>
> +            //TODO: Use projectDao
>             pm.makePersistent( project );
>
>             tx.commit();
> @@ -142,7 +143,7 @@
>
>             if ( result != null && !result.isEmpty() )
>             {
> -                return (BuildResult) result.get( 0 );
> +                return result.get( 0 );
>             }
>         }
>         finally
>
>
>

Mime
View raw message