portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager ApplicationServerPAM.java
Date Tue, 01 Feb 2005 16:55:28 GMT
weaver      2005/02/01 08:55:28

  Modified:    portal/src/java/org/apache/jetspeed/tools/pamanager
                        ApplicationServerPAM.java
  Log:
  - Added specific deployment exceptions.
  - If app is already deployed, it is restarted.
  
  Revision  Changes    Path
  1.11      +21 -3     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/ApplicationServerPAM.java
  
  Index: ApplicationServerPAM.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/ApplicationServerPAM.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ApplicationServerPAM.java	29 Oct 2004 14:19:37 -0000	1.10
  +++ ApplicationServerPAM.java	1 Feb 2005 16:55:28 -0000	1.11
  @@ -89,6 +89,18 @@
           {
               throw pe;
           }
  +        catch(ApplicationAlreadyDeployedException de)
  +        {
  +            stopPortletApplication(paWar.getPortletApplicationName());
  +            try
  +            {
  +                Thread.sleep(3000);
  +            }
  +            catch (InterruptedException e1)
  +            {
  +            }
  +            startPortletApplication(paWar.getPortletApplicationName());
  +        }
           catch (Exception e)
           {
               throw new PortletApplicationException(e);
  @@ -210,8 +222,9 @@
        * 
        * @param response
        * @throws PortletApplicationException
  +     * @throws DeploymentException
        */
  -    private void checkResponse( String response ) throws PortletApplicationException
  +    private void checkResponse( String response ) throws PortletApplicationException, DeploymentException
       {
           if (response == null
                   || (!response.startsWith("OK") && response.indexOf("Application
already exists at path") == -1)
  @@ -224,6 +237,10 @@
   
               throw new PortletApplicationException("Catalina container action failed, \""
+ response + "\"");
           }
  +        else if(response.indexOf("Application already exists at path") > -1)
  +        {
  +            throw new ApplicationAlreadyDeployedException(response);
  +        }
           else
           {
               log.info("Catalina deployment response: " + response);
  @@ -240,7 +257,7 @@
        */
       public void stop()
       {
  -
  +       
       }
   
       private boolean isServerAvailable()
  @@ -260,6 +277,7 @@
       {
           try
           {
  +            stopPortletApplication(paWar.getPortletApplicationName());
               super.redeploy(paWar);
               String paName = paWar.getPortletApplicationName();
               if(isServerAvailable())
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message