avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces DeployerMBean.java
Date Fri, 06 Sep 2002 07:03:58 GMT
colus       2002/09/06 00:03:58

  Modified:    .        build.xml
               src/java/org/apache/avalon/phoenix/components/deployer
                        DefaultDeployer.java
               src/java/org/apache/avalon/phoenix/interfaces
                        DeployerMBean.java
  Log:
  Add redeploy operation to DeployerMBean.
  
  Revision  Changes    Path
  1.159     +1 -1      jakarta-avalon-phoenix/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/build.xml,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -r1.158 -r1.159
  --- build.xml	3 Sep 2002 01:35:05 -0000	1.158
  +++ build.xml	6 Sep 2002 07:03:57 -0000	1.159
  @@ -251,7 +251,7 @@
                   <include name="**" />
               </fileset>
               <blockinfo/>
  -            <mxinfo/>
  +            <!--mxinfo/-->
           </phoenix-blocks>
   
       </target>
  
  
  
  1.53      +29 -8     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java
  
  Index: DefaultDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- DefaultDeployer.java	31 Aug 2002 05:00:16 -0000	1.52
  +++ DefaultDeployer.java	6 Sep 2002 07:03:58 -0000	1.53
  @@ -54,8 +54,6 @@
   /**
    * Deploy .sar files into a kernel using this class.
    *
  - * @phoenix:mx-topic name="Deployer"
  - *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    */
   public class DefaultDeployer
  @@ -184,10 +182,36 @@
       }
   
       /**
  -     * Undeploy an application.
  +     * Redeploy an application.
        *
  -     * @phoenix:mx-operation
  -     * @phoenix:mx-description Undeploy an application.
  +     * @param name the name of deployment
  +     * @throws DeploymentException if an error occurs
  +     */
  +    public void redeploy( final String name )
  +        throws DeploymentException
  +    {
  +        final Installation installation =
  +            (Installation)m_installations.get( name );
  +        if( null == installation )
  +        {
  +            final String message =
  +                REZ.getString( "deploy.no-deployment.error", name );
  +            throw new DeploymentException( message );
  +        }
  +        try
  +        {
  +            final URL location = installation.getSource().toURL();
  +            undeploy( name );
  +            deploy( name, location );
  +        }
  +        catch( final Exception e )
  +        {
  +            throw new DeploymentException( e.getMessage(), e );
  +        }
  +    }
  +
  +    /**
  +     * Undeploy an application.
        *
        * @param name the name of deployment
        * @throws DeploymentException if an error occurs
  @@ -227,9 +251,6 @@
   
       /**
        * Deploy an application from an installation.
  -     *
  -     * @phoenix:mx-operation
  -     * @phoenix:mx-description Deploy an application from an installation.
        *
        * @param name the name of application
        * @param sarURL the location to deploy from represented as String
  
  
  
  1.3       +19 -2     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/DeployerMBean.java
  
  Index: DeployerMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/interfaces/DeployerMBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeployerMBean.java	7 Aug 2002 02:57:15 -0000	1.2
  +++ DeployerMBean.java	6 Sep 2002 07:03:58 -0000	1.3
  @@ -24,7 +24,7 @@
   
       /**
        * Deploy an installation.
  -
  +     *
        * @phoenix:mx-operation
        *
        * @param name the name of deployment
  @@ -32,6 +32,7 @@
        * @throws DeploymentException if an error occurs
        * @see #deploy(String,String)
        * @see #undeploy(String)
  +     * @see #redeploy(String)
        */
       void deploy( String name, String sarURL )
           throws DeploymentException;
  @@ -44,12 +45,13 @@
        * @throws DeploymentException if an error occurs
        * @see #deploy(String,String)
        * @see #undeploy(String)
  +     * @see #redeploy(String)
        */
       void deploy( String name, URL location )
           throws DeploymentException;
   
       /**
  -     * Undeploy a resource from a location.
  +     * Undeploy an installation.
        *
        * @phoenix:mx-operation
        *
  @@ -57,7 +59,22 @@
        * @throws DeploymentException if an error occurs
        * @see #deploy(String,String)
        * @see #deploy(String,URL)
  +     * @see #redeploy(String)
        */
       void undeploy( String name )
  +        throws DeploymentException;
  +
  +    /**
  +     * Redeploy an installation.
  +     *
  +     * @phoenix:mx-operation
  +     *
  +     * @param name the name of deployment
  +     * @throws DeploymentException if an error occurs
  +     * @see #deploy(String,String)
  +     * @see #deploy(String,URL)
  +     * @see #undeploy(String)
  +     */
  +    void redeploy( String name )
           throws DeploymentException;
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message