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 FileSystemPAM.java
Date Fri, 16 Jan 2004 19:45:12 GMT
weaver      2004/01/16 11:45:12

  Modified:    portal/src/java/org/apache/jetspeed/tools/pamanager
                        FileSystemPAM.java
  Log:
  PortletApplicationExcpetions are just rethrown as themselves as opposed
  to wrapping them in another  PAE.  This was the cause of the java.lang.Verify
  error being thrown in Tomcat.
  
  changed some exception handling
  
  Revision  Changes    Path
  1.15      +18 -15    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java
  
  Index: FileSystemPAM.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FileSystemPAM.java	15 Jan 2004 23:42:47 -0000	1.14
  +++ FileSystemPAM.java	16 Jan 2004 19:45:12 -0000	1.15
  @@ -88,17 +88,16 @@
   
       private String deploymentDbAlias;
       private static final Log log = LogFactory.getLog("deployment");
  -    
  +
       public FileSystemPAM()
       {
  -    	super();
  +        super();
       }
  -    
  +
       public FileSystemPAM(String deploymentDbAlias)
       {
  -    	this.deploymentDbAlias = deploymentDbAlias;
  +        this.deploymentDbAlias = deploymentDbAlias;
       }
  -    
   
       /**
        * <p>
  @@ -146,7 +145,7 @@
        * 0 deploy war - 1 Update Web XML - 2 Update Regsitry
        * @throws PortletApplicationException
        */
  -    public void deploy(String webAppsDir, String warFile, String paName, String deploymentDbAlias,
int startState) 
  +    public void deploy(String webAppsDir, String warFile, String paName, String deploymentDbAlias,
int startState)
           throws PortletApplicationException
       {
           this.deploymentDbAlias = deploymentDbAlias;
  @@ -243,25 +242,28 @@
                       + " attempting rollback...",
                   pae);
               rollback(nState, webAppsDir, paName, app);
  -            throw new PortletApplicationException(pae.getMessage());
  +            throw pae;
           }
           catch (RegistryException re)
           {
  -            log.error(
  -                "RegistryException encountered deploying portlet application: " + re.toString()
+ " attempting rollback...",
  -                re);
  +            String msg =
  +                "RegistryException encountered deploying portlet application: " + re.toString()
+ " attempting rollback...";
  +            log.error(msg, re);
               rollback(nState, webAppsDir, paName, app);
  -            throw new PortletApplicationException(re.getMessage());
  +            throw new PortletApplicationException(msg, re);
           }
           catch (IOException e)
           {
  -            log.error("IOException encountered deploying portlet application: " + e.toString()
+ " attempting rollback...", e);
  +            String msg = "IOException encountered deploying portlet application: " + e.toString()
+ " attempting rollback...";
  +            log.error(msg, e);
               rollback(nState, webAppsDir, paName, app);
  -            throw new PortletApplicationException(e.getMessage());
  +            throw new PortletApplicationException(msg, e);
           }
           catch (Throwable t)
           {
  -            log.error("Unexpected exception deploying portlet application: " + t.toString()
+ " attempting rollback...", t);
  +            String msg = "Unexpected exception deploying portlet application: " + t.toString()
+ " attempting rollback...";
  +            log.error(msg, t);
  +            throw new PortletApplicationException(msg, t);
   
           }
   
  @@ -502,4 +504,5 @@
               log.error("Error removing file system deployment artifacts: " + e.toString(),
e);
           }
       }
  +
   }
  
  
  

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