taylor      02/05/10 11:29:19

  Modified:    src/java/org/apache/jetspeed/services/psmlmanager
                        PsmlImporter.java
  Log:
  patch from Marcus Mosttler to better handle exceptions in PSML Importer
  
  Revision  Changes    Path
  1.8       +14 -5     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/PsmlImporter.java
  
  Index: PsmlImporter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/PsmlImporter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PsmlImporter.java 25 Feb 2002 04:51:24 -0000      1.7
  +++ PsmlImporter.java 10 May 2002 18:29:19 -0000      1.8
  @@ -84,7 +84,7 @@
    * Reads all PSML files from the file system and imports them into PSML DB
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>David Sean Taylor</a>
  - * @version $Id: PsmlImporter.java,v 1.7 2002/02/25 04:51:24 taylor Exp $
  + * @version $Id: PsmlImporter.java,v 1.8 2002/05/10 18:29:19 taylor Exp $
    */
   public class PsmlImporter
   {   
  @@ -101,9 +101,19 @@
              if (alreadyImported())
                   return; 
   
  -            PsmlManagerService fileService = 
(PsmlManagerService)TurbineServices.getInstance().getService("PsmlImportManager");     
  -            if (null == fileService)
  -                return;
  +            PsmlManagerService fileService = null;
  +                     try
  +                     {
  +                             fileService = (PsmlManagerService)
  +                TurbineServices.getInstance().getService("PsmlImportManager");
  +                 if (null == fileService)
  +                     return;
  +                     }
  +            catch(org.apache.turbine.services.InstantiationException ie)
  +                     {
  +                             Log.info("PSMLImporter disabled");
  +                             return;
  +                     }
   
               msg = "Running PSMLImporter...";
               System.out.println(msg);
  @@ -122,7 +132,6 @@
           System.out.println(msg);
           Log.info(msg);
       }
  -
   
       private void dumpProfile(Profile profile)
       {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to