continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r725646 - in /continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport: ./ continuum-distributed-build-transport-common/ continuum-distributed-build-transport-common/src/main/java/org...
Date Thu, 11 Dec 2008 10:40:25 GMT
Author: ctan
Date: Thu Dec 11 02:40:23 2008
New Revision: 725646

URL: http://svn.apache.org/viewvc?rev=725646&view=rev
Log:
- refactored service methods to use xmlrpc spec return types.
- added test modules
- used atlassian's xmlrpc

Submitted By: Napoleon Esmundo C. Ramirez

Added:
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java   (with props)
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java   (with props)
Modified:
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/MasterBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/SlaveBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/DefaultMasterBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/ProxySlaveAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/DefaultSlaveBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/ProxyMasterAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/pom.xml

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/pom.xml?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/pom.xml (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/pom.xml Thu Dec 11 02:40:23 2008
@@ -29,24 +29,19 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.xmlrpc</groupId>
-      <artifactId>xmlrpc-common</artifactId>
-      <version>3.0</version>
+      <groupId>com.atlassian.xmlrpc</groupId>
+      <artifactId>atlassian-xmlrpc-binder</artifactId>
+      <version>0.8.2</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.xmlrpc</groupId>
-      <artifactId>xmlrpc-server</artifactId>
-      <version>3.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xmlrpc</groupId>
-      <artifactId>xmlrpc-client</artifactId>
-      <version>3.0</version>
+      <groupId>com.atlassian.xmlrpc</groupId>
+      <artifactId>atlassian-xmlrpc-binder-server-spring</artifactId>
+      <version>0.8.2</version>
     </dependency>
     <dependency>
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-buildagent</artifactId>
-      <version>1.3-SNAPSHOT</version>
+      <version>1.3.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/MasterBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/MasterBuildAgentTransportService.java?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/MasterBuildAgentTransportService.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/MasterBuildAgentTransportService.java Thu Dec 11 02:40:23 2008
@@ -2,6 +2,8 @@
 
 import java.util.Map;
 
+import com.atlassian.xmlrpc.ServiceObject;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,11 +26,12 @@
 /**
  * MasterBuildAgentTransportService
  */
+@ServiceObject( "MasterBuildAgentTransportService" )
 public interface MasterBuildAgentTransportService
 {
-    void returnBuildResult( Map buildResult ) throws Exception;
+    public Boolean returnBuildResult( Map buildResult ) throws Exception;
     
-    void returnScmResult( Map scmResult ) throws Exception;
+    public Boolean returnScmResult( Map scmResult ) throws Exception;
     
-    boolean ping() throws Exception;
+    public Boolean ping() throws Exception;
 }

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/SlaveBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/SlaveBuildAgentTransportService.java?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/SlaveBuildAgentTransportService.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/SlaveBuildAgentTransportService.java Thu Dec 11 02:40:23 2008
@@ -5,6 +5,8 @@
 
 import org.apache.continuum.buildagent.model.Installation;
 
+import com.atlassian.xmlrpc.ServiceObject;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -27,17 +29,18 @@
 /**
  * SlaveBuildAgentTransportService
  */
+@ServiceObject( "SlaveBuildAgentTransportService" )
 public interface SlaveBuildAgentTransportService
 {
-    void buildProjects( List<Map> projectsBuildContext ) throws Exception;
+    public Boolean buildProjects( List<Map> projectsBuildContext ) throws Exception;
     
-    Map getBuildResult( int projectId ) throws Exception;
+    public Map getBuildResult( int projectId ) throws Exception;
     
-    int getProjectCurrentlyBuilding() throws Exception;
+    public Integer getProjectCurrentlyBuilding() throws Exception;
     
-    List<Installation> getAvailableInstallations() throws Exception;
+    public List<Installation> getAvailableInstallations() throws Exception;
     
-    boolean isBusy() throws Exception;
+    public Boolean isBusy() throws Exception;
     
-    boolean ping() throws Exception;
+    public Boolean ping() throws Exception;
 }

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/pom.xml?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/pom.xml (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/pom.xml Thu Dec 11 02:40:23 2008
@@ -33,29 +33,4 @@
       <artifactId>continuum-distributed-build-transport-common</artifactId>
     </dependency>
   </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.1</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <executable>java</executable>
-          <mainClass>org.apache.continuum.distributed.transport.master.SampleClient</mainClass>
-          <arguments>
-            <argument>http://localhost:9191/xmlrpc</argument>
-            <argument>login</argument>
-            <argument>password</argument>
-          </arguments>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/DefaultMasterBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/DefaultMasterBuildAgentTransportService.java?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/DefaultMasterBuildAgentTransportService.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/DefaultMasterBuildAgentTransportService.java Thu Dec 11 02:40:23 2008
@@ -33,23 +33,27 @@
 {
     private Logger log = LoggerFactory.getLogger( this.getClass() );
 
-    public void returnBuildResult( Map buildResult )
+    public Boolean returnBuildResult( Map buildResult )
         throws Exception
     {
         log.info( "Build result returned." );
+        
+        return Boolean.TRUE;
     }
 
-    public void returnScmResult( Map scmResult )
+    public Boolean returnScmResult( Map scmResult )
         throws Exception
     {
         log.info( "SCM result returned." );
+        
+        return Boolean.TRUE;
     }
 
-    public boolean ping()
+    public Boolean ping()
         throws Exception
     {
-        log.info( "Ping" );
+        log.info( "Ping ok" );
         
-        return true;
+        return Boolean.TRUE;
     }
 }

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/ProxySlaveAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/ProxySlaveAgentTransportService.java?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/ProxySlaveAgentTransportService.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/ProxySlaveAgentTransportService.java Thu Dec 11 02:40:23 2008
@@ -25,12 +25,14 @@
 
 import org.apache.continuum.buildagent.model.Installation;
 import org.apache.continuum.distributed.transport.SlaveBuildAgentTransportService;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
-import org.apache.xmlrpc.client.util.ClientFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.atlassian.xmlrpc.AuthenticationInfo;
+import com.atlassian.xmlrpc.Binder;
+import com.atlassian.xmlrpc.BindingException;
+import com.atlassian.xmlrpc.DefaultBinder;
+
 /**
  * ProxySlaveAgentTransportService
  */
@@ -41,51 +43,46 @@
     
     private SlaveBuildAgentTransportService slave;
     
-    private XmlRpcClient client;
-    
     public ProxySlaveAgentTransportService( URL serviceUrl )
+        throws Exception
     {
         this( serviceUrl, null, null );
     }
 
     public ProxySlaveAgentTransportService( URL serviceUrl, String login, String password )
+        throws Exception
     {
-        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl()
+        Binder binder = new DefaultBinder();
+        AuthenticationInfo authnInfo = new AuthenticationInfo( login, password );
+        
+        try
         {
-            public boolean isEnabledForExtensions()
-            {
-                return true;
-            }
-        };
-
-        if ( login != null && !"".equals( login ) )
+            slave = binder.bind( SlaveBuildAgentTransportService.class, serviceUrl, authnInfo );
+        }
+        catch ( BindingException e )
         {
-            config.setBasicUserName( login );
-            config.setBasicPassword( password );
+            log.error( "Can't bind service interface " + SlaveBuildAgentTransportService.class.getName() + " to " + serviceUrl.toExternalForm() + " using " + authnInfo.getUsername() + ", " + authnInfo.getPassword(), e );
+            throw new Exception( "Can't bind service interface " + SlaveBuildAgentTransportService.class.getName() + " to " + serviceUrl.toExternalForm() + " using " + authnInfo.getUsername() + ", " + authnInfo.getPassword(), e);
         }
-        config.setServerURL( serviceUrl );
-
-        client = new XmlRpcClient();
-        client.setConfig( config );
-        ClientFactory factory = new ClientFactory( client );
-        slave = (SlaveBuildAgentTransportService) factory.newInstance( SlaveBuildAgentTransportService.class );
     }
 
-    public void buildProjects( List<Map> projectsBuildContext )
+    public Boolean buildProjects( List<Map> projectsBuildContext )
         throws Exception
     {
+        Boolean result = null;
+        
         try
         {
-            //slave.buildProjects( projectsBuildContext );
+            result = slave.buildProjects( projectsBuildContext );
             log.info( "Building projects." );
-            Thread.sleep( 2000000 );
-            log.info( "Build finished" );
         }
         catch ( Exception e )
         {
             log.error( "Failed to build projects.", e );
             throw new Exception( "Failed to build projects.", e );
         }
+        
+        return result;
     }
 
     public List<Installation> getAvailableInstallations()
@@ -114,7 +111,7 @@
         
         try
         {
-            slave.getBuildResult( projectId );
+            buildResult = slave.getBuildResult( projectId );
             log.info( "Build result for project " + projectId + " acquired." );
         }
         catch ( Exception e )
@@ -126,33 +123,59 @@
         return buildResult;
     }
 
-    public int getProjectCurrentlyBuilding()
+    public Integer getProjectCurrentlyBuilding()
         throws Exception
     {
-        int projectId = slave.getProjectCurrentlyBuilding();
+        Integer projectId = null;
         
-        log.info( "Currently building project " + projectId );
+        try
+        {
+            projectId = slave.getProjectCurrentlyBuilding();
+            log.info( "Currently building project " + projectId );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to get the currently building project", e );
+            throw new Exception( "Failed to get the currently building project", e );
+        }
         
         return projectId;
     }
 
-    public boolean isBusy()
+    public Boolean isBusy()
         throws Exception
     {
-        boolean busy = slave.isBusy();
+        Boolean busy = null;
         
-        log.info( "Build agent is " + ( busy ? "" : "not" ) + " busy." );
+        try
+        {
+            busy = slave.isBusy();
+            log.info( "Build agent is " + ( busy.booleanValue() ? "" : "not" ) + " busy." );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to determine if the build agent is busy.", e );
+            throw new Exception( "Failed to determine if the build agent is busy.", e );
+        }
         
         return busy;
     }
 
-    public boolean ping()
+    public Boolean ping()
         throws Exception
     {
-        //boolean result = slave.ping();
-        boolean result = true;
-
-        log.info( "Ping " + (result ? "ok" : "failed") );
+        Boolean result = null;
+        
+        try
+        {
+            result = slave.ping();
+            log.info( "Ping " + ( result.booleanValue() ? "ok" : "failed" ) );
+        }
+        catch ( Exception e )
+        {
+            log.info( "Ping error" );
+            throw new Exception( "Ping error", e );
+        }
         
         return result;
     }

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/DefaultSlaveBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/DefaultSlaveBuildAgentTransportService.java?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/DefaultSlaveBuildAgentTransportService.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/DefaultSlaveBuildAgentTransportService.java Thu Dec 11 02:40:23 2008
@@ -37,25 +37,31 @@
 {
     private Logger log = LoggerFactory.getLogger( this.getClass() );
     
-    private ContinuumBuildAgentService buildAgentService;
+    private ContinuumBuildAgentService continuumBuildAgentService;
     
-    public DefaultSlaveBuildAgentTransportService()
+    public DefaultSlaveBuildAgentTransportService( ContinuumBuildAgentService continuumBuildAgentService )
     {
-        log.info( "asdfasdfasdfasdf" );
+        this.continuumBuildAgentService = continuumBuildAgentService;
     }
     
-    public void buildProjects( List<Map> projectsBuildContext )
+    public Boolean buildProjects( List<Map> projectsBuildContext )
         throws Exception
     {
+        Boolean result = Boolean.FALSE;
+        
         try
         {
-            buildAgentService.buildProjects( projectsBuildContext );
+            continuumBuildAgentService.buildProjects( projectsBuildContext );
+            result = Boolean.TRUE;
+            
             log.info( "Building projects." );
         }
         catch ( ContinuumBuildAgentException e )
         {
             log.error( "Failed to build projects.", e );
         }
+        
+        return result;
     }
 
     public List<Installation> getAvailableInstallations()
@@ -65,7 +71,7 @@
         
         try
         {
-            installations = buildAgentService.getAvailableInstallations();
+            installations = continuumBuildAgentService.getAvailableInstallations();
             log.info( "Available installations: " + installations.size() );
         }
         catch ( ContinuumBuildAgentException e )
@@ -83,7 +89,7 @@
         
         try
         {
-            buildAgentService.getBuildResult( projectId );
+            continuumBuildAgentService.getBuildResult( projectId );
             log.info( "Build result for project " + projectId + " acquired." );
         }
         catch ( ContinuumBuildAgentException e )
@@ -94,41 +100,38 @@
         return buildResult;
     }
 
-    public int getProjectCurrentlyBuilding()
+    public Integer getProjectCurrentlyBuilding()
         throws Exception
     {
-        int projectId = buildAgentService.getProjectCurrentlyBuilding();
+        Integer projectId = new Integer( continuumBuildAgentService.getProjectCurrentlyBuilding() );
         
-        log.info( "Currently building project " + projectId );
+        log.info( "Currently building project " + projectId.intValue() );
         
         return projectId;
     }
 
-    public boolean isBusy()
+    public Boolean isBusy()
         throws Exception
     {
-        boolean busy = buildAgentService.isBusy();
-        
-        log.info( "Build agent is " + ( busy ? "" : "not" ) + " busy." );
+        Boolean busy = null;
+        try
+        {
+            busy = new Boolean( continuumBuildAgentService.isBusy() );
+            log.info( "Build agent is " + ( busy ? "" : "not" ) + " busy." );
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to determine if master is busy.", e );
+        }
         
         return busy;
     }
 
-    public boolean ping()
+    public Boolean ping()
         throws Exception
     {
         log.info( "Ping ok" );
         
-        return true;
-    }
-
-    public ContinuumBuildAgentService getBuildAgentService()
-    {
-        return buildAgentService;
-    }
-
-    public void setBuildAgentService( ContinuumBuildAgentService buildAgentService )
-    {
-        this.buildAgentService = buildAgentService;
+        return Boolean.TRUE;
     }
 }

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/ProxyMasterAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/ProxyMasterAgentTransportService.java?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/ProxyMasterAgentTransportService.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/ProxyMasterAgentTransportService.java Thu Dec 11 02:40:23 2008
@@ -23,12 +23,14 @@
 import java.util.Map;
 
 import org.apache.continuum.distributed.transport.MasterBuildAgentTransportService;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
-import org.apache.xmlrpc.client.util.ClientFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.atlassian.xmlrpc.AuthenticationInfo;
+import com.atlassian.xmlrpc.Binder;
+import com.atlassian.xmlrpc.BindingException;
+import com.atlassian.xmlrpc.DefaultBinder;
+
 /**
  * ProxyMasterAgentTransportService
  */
@@ -40,53 +42,81 @@
     MasterBuildAgentTransportService master;
     
     public ProxyMasterAgentTransportService( URL serviceUrl )
+        throws Exception
     {
         this( serviceUrl, null, null );
     }
 
     public ProxyMasterAgentTransportService( URL serviceUrl, String login, String password )
+        throws Exception
     {
-        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl()
+        Binder binder = new DefaultBinder();
+        AuthenticationInfo authnInfo = new AuthenticationInfo( login, password );
+        
+        try
         {
-            public boolean isEnabledForExtensions()
-            {
-                return true;
-            }
-        };
-
-        if ( login != null && !"".equals( login ) )
+            master = binder.bind( MasterBuildAgentTransportService.class, serviceUrl, authnInfo );
+        }
+        catch ( BindingException e )
         {
-            config.setBasicUserName( login );
-            config.setBasicPassword( password );
+            log.error( "Can't bind service interface " + MasterBuildAgentTransportService.class.getName() + " to " + serviceUrl.toExternalForm() + " using " + authnInfo.getUsername() + ", " + authnInfo.getPassword(), e );
+            throw new Exception( "Can't bind service interface " + MasterBuildAgentTransportService.class.getName() + " to " + serviceUrl.toExternalForm() + " using " + authnInfo.getUsername() + ", " + authnInfo.getPassword(), e);
         }
-        config.setServerURL( serviceUrl );
-
-        XmlRpcClient client = new XmlRpcClient();
-        client.setConfig( config );
-        ClientFactory factory = new ClientFactory( client );
-        master = (MasterBuildAgentTransportService) factory.newInstance( MasterBuildAgentTransportService.class );
     }
 
-    public void returnBuildResult( Map buildResult )
+    public Boolean returnBuildResult( Map buildResult )
         throws Exception
     {
-        master.returnBuildResult( buildResult );
-        log.info( "Returning the build result." );
+        Boolean result = null;
+        
+        try
+        {
+            result = master.returnBuildResult( buildResult );
+            log.info( "Returning the build result." );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to return the build result.", e );
+            throw new Exception( "Failed to return the build result", e);
+        }
+        
+        return result;
     }
 
-    public void returnScmResult( Map scmResult )
+    public Boolean returnScmResult( Map scmResult )
         throws Exception
     {
-        master.returnScmResult( scmResult );
-        log.info( "Returning the scm result." );
+        Boolean result = null;
+        
+        try
+        {
+            result = master.returnScmResult( scmResult );
+            log.info( "Returning the scm result." );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to return the SCM result.", e );
+            throw new Exception( "Failed to return the SCM result", e);
+        }
+        
+        return result;
     }
     
-    public boolean ping()
+    public Boolean ping()
         throws Exception
     {
-        boolean result = master.ping();
+        Boolean result = null;
         
-        log.info( "Ping " + (result ? "ok" : "failed") );
+        try
+        {
+            result = master.ping();
+            log.info( "Ping " + ( result.booleanValue() ? "ok" : "failed" ) );
+        }
+        catch ( Exception e )
+        {
+            log.info( "Ping error" );
+            throw new Exception( "Ping error", e );
+        }
         
         return result;
     }

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml Thu Dec 11 02:40:23 2008
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+    -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>continuum-distributed-build-transport</artifactId>
+    <groupId>org.apache.continuum</groupId>
+    <version>1.3.1-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.continuum</groupId>
+  <artifactId>continuum-distributed-build-transport-tests</artifactId>
+  <packaging>war</packaging>
+  <name>Continuum :: Distributed Build :: Transport :: Tests</name>
+  <url>http://continuum.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-distributed-build-transport-slave</artifactId>
+      <version>1.3.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-distributed-build-transport-master</artifactId>
+      <version>1.3.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>2.5.4</version>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <testSourceDirectory>src/test/it</testSourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>6.1.11</version>
+        <configuration>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <contextPath>/</contextPath>
+          <stopKey>stopkey</stopKey>
+          <stopPort>9192</stopPort>
+          <jettyEnvXml>${basedir}/src/jetty-env.xml</jettyEnvXml>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>9191</port>
+              <maxIdleTime>60000</maxIdleTime>
+            </connector>
+          </connectors>
+        </configuration>
+        <executions>
+          <execution>
+            <id>start-jetty</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <scanIntervalSeconds>0</scanIntervalSeconds>
+              <daemon>true</daemon>
+            </configuration>
+          </execution>
+          <execution>
+            <id>stop-jetty</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.4.3</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-tests</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>false</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml Thu Dec 11 02:40:23 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<Configure class="org.mortbay.jetty.webapp.WebAppContext" />

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/jetty-env.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml Thu Dec 11 02:40:23 2008
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+  <bean id="masterBuildAgentTransportService" class="org.apache.continuum.distributed.transport.master.DefaultMasterBuildAgentTransportService"/>
+  
+  <bean id="slaveBuildAgentTransportService" class="org.apache.continuum.distributed.transport.slave.DefaultSlaveBuildAgentTransportService">
+    <constructor-arg ref="continuumBuildAgentService"/>
+  </bean>
+  
+  <bean id="continuumBuildAgentService" class="org.apache.continuum.buildagent.ContinuumBuildAgentServiceImpl">
+    <property name="configurationService" ref="configurationService"/>
+  </bean>
+  
+  <bean id="configurationService" class="org.apache.continuum.buildagent.configuration.DefaultConfigurationService">
+    <property name="configuration" ref="continuumConfiguration" />
+  </bean>
+  
+  <bean id="continuumConfiguration" class="org.apache.continuum.buildagent.configuration.DefaultContinuumConfiguration">
+    <property name="configurationFile" value="file:${appserver.base}/conf/continuum.xml" />
+  </bean>
+  
+  <bean name="xmlrpcServicesList" class="java.util.ArrayList">
+    <constructor-arg>
+      <list>
+        <ref bean="slaveBuildAgentTransportService"/>
+        <ref bean="masterBuildAgentTransportService"/>
+      </list>
+    </constructor-arg>
+  </bean>
+  
+</beans>

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/applicationContext.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml Thu Dec 11 02:40:23 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+  <appender name="console" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out"/>
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="[%p] %-30c{1} - %m%n"/>
+    </layout>
+  </appender>
+  <logger name="org.apache.continuum.distributed">
+    <level value="info"/>
+  </logger>
+  <logger name="org.springframework">
+    <level value="error"/>
+  </logger>
+  <root>
+    <priority value ="info" />
+    <appender-ref ref="console" />
+  </root>
+</log4j:configuration>

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/resources/log4j.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml Thu Dec 11 02:40:23 2008
@@ -0,0 +1,61 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+  <display-name>Continuum Distributed Build Transport Tests</display-name>
+  
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+  
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+      classpath*:/META-INF/spring-context.xml
+      classpath*:/applicationContext.xml
+    </param-value>
+  </context-param>
+  
+  <servlet>
+    <servlet-name>MasterXmlRpcServlet</servlet-name>
+    <servlet-class>
+      com.atlassian.xmlrpc.spring.BinderSpringXmlRpcServlet
+    </servlet-class>
+    <init-param>
+      <param-name>serviceListBeanName</param-name>
+      <param-value>xmlrpcServicesList</param-value>
+    </init-param>
+    <init-param>
+      <param-name>enabledForExtensions</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+  
+  <servlet>
+    <servlet-name>SlaveXmlRpcServlet</servlet-name>
+    <servlet-class>
+      com.atlassian.xmlrpc.spring.BinderSpringXmlRpcServlet
+    </servlet-class>
+    <init-param>
+      <param-name>serviceListBeanName</param-name>
+      <param-value>xmlrpcServicesList</param-value>
+    </init-param>
+    <init-param>
+      <param-name>enabledForExtensions</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+  
+  <servlet-mapping>
+    <servlet-name>MasterXmlRpcServlet</servlet-name>
+    <url-pattern>/master-xmlrpc</url-pattern>
+  </servlet-mapping>
+  
+  <servlet-mapping>
+    <servlet-name>SlaveXmlRpcServlet</servlet-name>
+    <url-pattern>/slave-xmlrpc</url-pattern>
+  </servlet-mapping>
+</web-app>

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp Thu Dec 11 02:40:23 2008
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java Thu Dec 11 02:40:23 2008
@@ -0,0 +1,86 @@
+package org.apache.continuum.distributed.transport.tests;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.URL;
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+import org.apache.continuum.distributed.transport.MasterBuildAgentTransportService;
+import org.apache.continuum.distributed.transport.slave.ProxyMasterAgentTransportService;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanFactory;
+import org.springframework.core.io.ClassPathResource;
+
+/**
+ * MasterBuildAgentTransportServiceTest
+ */
+public class MasterBuildAgentTransportServiceTest
+    extends TestCase
+{
+    private MasterBuildAgentTransportService masterProxy;
+    
+    private BeanFactory beanFactory = new XmlBeanFactory( new ClassPathResource( "applicationContext.xml" ) );
+    
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        
+        masterProxy = new ProxyMasterAgentTransportService( new URL( "http://localhost:9191/master-xmlrpc"), null , null );
+    }
+    
+    public void testReturnBuildResult()
+    {
+        try
+        {
+            masterProxy.returnBuildResult( new HashMap() );
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+    
+    public void testReturnScmResult()
+    {
+        try
+        {
+            masterProxy.returnScmResult( new HashMap() );
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+
+    public void testPing()
+    {
+        try
+        {
+            masterProxy.ping();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+}

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/MasterBuildAgentTransportServiceTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java?rev=725646&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java Thu Dec 11 02:40:23 2008
@@ -0,0 +1,122 @@
+package org.apache.continuum.distributed.transport.tests;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.URL;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+
+import org.apache.continuum.distributed.transport.SlaveBuildAgentTransportService;
+import org.apache.continuum.distributed.transport.master.ProxySlaveAgentTransportService;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanFactory;
+import org.springframework.core.io.ClassPathResource;
+
+/**
+ * SlaveBuildAgentTransportServiceTest
+ */
+public class SlaveBuildAgentTransportServiceTest
+    extends TestCase
+{
+    private SlaveBuildAgentTransportService slaveProxy;
+    
+    private BeanFactory beanFactory = new XmlBeanFactory( new ClassPathResource( "applicationContext.xml" ) );
+    
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        
+        slaveProxy = new ProxySlaveAgentTransportService( new URL( "http://localhost:9191/slave-xmlrpc"), null , null );
+    }
+
+    public void testBuildProjects()
+    {
+        try
+        {
+            slaveProxy.buildProjects( Collections.EMPTY_LIST );
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+
+    public void testGetAvailableInstallations()
+    {
+        try
+        {
+            slaveProxy.getAvailableInstallations();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+
+    public void testGetBuildResult()
+    {
+        try
+        {
+            slaveProxy.getBuildResult( 0 );
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+
+    public void testGetProjectCurrentlyBuilding()
+    {
+        try
+        {
+            slaveProxy.getProjectCurrentlyBuilding();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+
+    public void testIsBusy()
+    {
+        try
+        {
+            slaveProxy.isBusy().booleanValue();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+
+    public void testPing()
+    {
+        try
+        {
+            slaveProxy.ping();
+        }
+        catch ( Exception e )
+        {
+            fail( e.getMessage() );
+        }
+    }
+}

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/src/test/it/org/apache/continuum/distributed/transport/tests/SlaveBuildAgentTransportServiceTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/pom.xml?rev=725646&r1=725645&r2=725646&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/pom.xml (original)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/pom.xml Thu Dec 11 02:40:23 2008
@@ -30,6 +30,7 @@
     <module>continuum-distributed-build-transport-common</module>
     <module>continuum-distributed-build-transport-master</module>
     <module>continuum-distributed-build-transport-slave</module>
+    <module>continuum-distributed-build-transport-tests</module>
   </modules>
   <dependencies>
     <dependency>



Mime
View raw message