avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jo JoSevak.java
Date Sun, 12 Jan 2003 14:17:40 GMT
hammant     2003/01/12 06:17:40

  Modified:    sevak/src/java/org/apache/avalon/apps/sevak Sevak.java
               sevak/src/java/org/apache/avalon/apps/sevak/blocks/catalina
                        CatalinaSevakBootstrap.java
               sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty
                        JettySevak.java
               sevak/src/java/org/apache/avalon/apps/sevak/blocks/jo
                        JoSevak.java
  Log:
  Second way to deploy Serviceable webapps.
  
  Revision  Changes    Path
  1.4       +12 -0     jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/Sevak.java
  
  Index: Sevak.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/Sevak.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Sevak.java	30 Sep 2002 22:03:12 -0000	1.3
  +++ Sevak.java	12 Jan 2003 14:17:40 -0000	1.4
  @@ -7,6 +7,8 @@
    */
   package org.apache.avalon.apps.sevak;
   
  +import org.apache.avalon.framework.service.ServiceManager;
  +
   import java.io.File;
   
   /**
  @@ -26,6 +28,16 @@
        * @throws SevakException Thrown when context already exists
        */
       void deploy(String context, File pathToWebAppFolder) throws SevakException;
  +
  +    /**
  +     * Deploy the given Web Application
  +     * @param context Context for the the webapp
  +     * @param pathToWebAppFolder path can be a war-archive or exploded directory
  +     * @param serviceManager The service manager to use for (optional) Serviceable servlets.
  +     * @throws SevakException Thrown when context already exists
  +     */
  +    void deploy(String context, File pathToWebAppFolder, ServiceManager serviceManager)
throws SevakException;
  +
   
       /**
        * Undeploy the given WebApp
  
  
  
  1.3       +6 -0      jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/catalina/CatalinaSevakBootstrap.java
  
  Index: CatalinaSevakBootstrap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/catalina/CatalinaSevakBootstrap.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CatalinaSevakBootstrap.java	30 Sep 2002 22:03:12 -0000	1.2
  +++ CatalinaSevakBootstrap.java	12 Jan 2003 14:17:40 -0000	1.3
  @@ -21,6 +21,7 @@
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.phoenix.BlockContext;
   
   import java.io.File;
  @@ -195,6 +196,11 @@
           } catch( Exception e ) {
               throw new SevakException( "Unable to deploy", e );
           }
  +    }
  +
  +    public void deploy(String context, File pathToWebAppFolder, ServiceManager serviceManager)
throws SevakException
  +    {
  +        throw new UnsupportedOperationException();
       }
   
       public void undeploy( String host, String context ) throws SevakException {
  
  
  
  1.12      +13 -2     jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java
  
  Index: JettySevak.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JettySevak.java	12 Jan 2003 09:38:15 -0000	1.11
  +++ JettySevak.java	12 Jan 2003 14:17:40 -0000	1.12
  @@ -155,7 +155,18 @@
        */
       public void deploy(String context, File pathToWebAppFolder) throws SevakException
       {
  +        deploy(context, pathToWebAppFolder, m_serviceManager);
  +    }
   
  +    /**
  +     * Deploy a webapp
  +     * @param context the contxct for the webapp
  +     * @param pathToWebAppFolder the path to it
  +     * @param serviceManager The service manager to use for (optional) Serviceable servlets.
  +     * @throws SevakException if a problem
  +     */
  +    public void deploy(String context, File pathToWebAppFolder, ServiceManager serviceManager)
throws SevakException
  +    {
           String webAppURL = null;
   
           try
  @@ -164,13 +175,13 @@
               // This still does not work.
   
               WebApplicationContext ctx =
  -                new SevakWebApplicationContext(m_serviceManager, m_sarRootDir, webAppURL);
  +                new SevakWebApplicationContext(serviceManager, m_sarRootDir, webAppURL);
               ctx.setContextPath(context);
               m_server.addContext(m_hostName,ctx);
   
               System.out.println("deploying context=" + context + ", webapp=" + webAppURL
                   + " to host=" + ( m_hostName == null ? "(All Hosts)" : m_hostName ) );
  -                
  +
               ctx.setExtractWAR(true);
               m_webapps.put(context, ctx);
               ctx.start();
  
  
  
  1.4       +6 -0      jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jo/JoSevak.java
  
  Index: JoSevak.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jo/JoSevak.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JoSevak.java	29 Sep 2002 11:38:43 -0000	1.3
  +++ JoSevak.java	12 Jan 2003 14:17:40 -0000	1.4
  @@ -15,6 +15,7 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.phoenix.BlockContext;
   import org.apache.avalon.apps.sevak.Sevak;
   import org.apache.avalon.apps.sevak.SevakException;
  @@ -210,6 +211,11 @@
               m_log.log(mufe, C_Log.ERROR);
               throw new SevakException("Jo could not build deployment : " + mufe.getMessage());
           }
  +    }
  +
  +    public void deploy(String context, File pathToWebAppFolder, ServiceManager serviceManager)
throws SevakException
  +    {
  +        throw new UnsupportedOperationException();
       }
   
       /**
  
  
  

--
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