cziegeler    02/02/05 04:11:07

  Modified:    .        changes.xml
               src/java/org/apache/cocoon/components/deli DeliImpl.java
               src/java/org/apache/cocoon/transformation
                        SQLTransformer.java
  Log:
  SQL Transformer did enter Infinite Loop. This is fixed now.
  PR: #6242
  
  Revision  Changes    Path
  1.102     +4 -1      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- changes.xml       5 Feb 2002 11:39:29 -0000       1.101
  +++ changes.xml       5 Feb 2002 12:11:07 -0000       1.102
  @@ -4,7 +4,7 @@
   
   <!--
     History of Cocoon changes
  -  $Id: changes.xml,v 1.101 2002/02/05 11:39:29 cziegeler Exp $
  +  $Id: changes.xml,v 1.102 2002/02/05 12:11:07 cziegeler Exp $
   -->
   
   <changes title="History of Changes">
  @@ -31,6 +31,9 @@
    </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="CZ" type="fix" fixes-bug="6242">
  +   SQL Transformer did enter Infinite Loop. This is fixed now.
  +  </action>
     <action dev="CZ" type="update">
       Minor rewrite of the LogTransformer. The logfile is now resolved using
       the standard source resolver. The component is now recycled properly.
  
  
  
  1.14      +37 -37    
xml-cocoon2/src/java/org/apache/cocoon/components/deli/DeliImpl.java
  
  Index: DeliImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/deli/DeliImpl.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DeliImpl.java     5 Feb 2002 10:10:45 -0000       1.13
  +++ DeliImpl.java     5 Feb 2002 12:11:07 -0000       1.14
  @@ -1,4 +1,4 @@
  -*
  +/*
    * The Apache Software License, Version 1.1
    *
    *
  @@ -114,7 +114,7 @@
    * A Delivery Context Library for CC/PP and UAProf</a>.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Mark H. Butler</a>
  - * @version CVS $ $ $Date: 2002/02/05 10:10:45 $
  + * @version CVS $ $ $Date: 2002/02/05 12:11:07 $
    */
   
   public final class DeliImpl
  @@ -148,32 +148,32 @@
       /** Contextualize this class */
       public void contextualize(Context context)
       throws ContextException {
  -     try {
  -             org.apache.cocoon.environment.Context ctx = 
(org.apache.cocoon.environment.Context) 
context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
  -             this.servletContext = new CocoonServletContext(ctx);
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -     }
  +    try {
  +            org.apache.cocoon.environment.Context ctx = 
(org.apache.cocoon.environment.Context) 
context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
  +            this.servletContext = new CocoonServletContext(ctx);
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +    }
       }
   
       /** Compose this class */
       public void compose(ComponentManager manager)
       throws ComponentException {
  -     try {
  -             this.manager = manager;
  -             this.parser = (Parser)this.manager.lookup(Parser.ROLE);
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -     }       
  +    try {
  +            this.manager = manager;
  +            this.parser = (Parser)this.manager.lookup(Parser.ROLE);
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +    }
       }
   
        /** Configure this class */
        public void parameterize(Parameters params) {
  -     try {
  +    try {
            this.deliConfig = params.getParameter("deli-config-file", this.deliConfig);
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -     }
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +    }
        }
   
       /**
  @@ -181,11 +181,11 @@
        */
       public void initialize()
       throws Exception {
  -     try {
  +    try {
            this.workspace = new Workspace(this.servletContext, this.deliConfig);
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -     }
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +    }
       }
   
       /** Dispose of this class */
  @@ -208,14 +208,14 @@
        */
       public Profile getProfile(Request theRequest)
       throws IOException, ServletException, Exception {
  -     try {
  +    try {
            CocoonServletRequest servletRequest = new CocoonServletRequest(theRequest);
            Profile theProfile = new Profile(this.workspace, (HttpServletRequest) 
servletRequest);
            return theProfile;
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -             return null;
  -     }
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +        return null;
  +    }
       }
   
       /** Convert a profile stored as a vector of profile attributes
  @@ -225,7 +225,7 @@
        *@return        The DOM tree.
        */
       public Document getUACapabilities(Profile theProfile) {
  -     try {
  +    try {
           Document document;
           Element rootElement;
           Element attributeNode;
  @@ -260,20 +260,20 @@
               }
           }
           return document;
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -             return null;
  -     }
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +        return null;
  +    }
       }
   
       public Document getUACapabilities(Request theRequest)
       throws IOException, Exception {
  -     try {
  +    try {
             return this.getUACapabilities(this.getProfile(theRequest));
  -     } catch (Exception e) {
  -             getLogger().error("DELI Exception: ", e);
  -             return null;
  -     }
  +    } catch (Exception e) {
  +        getLogger().error("DELI Exception: ", e);
  +        return null;
  +    }
       }
   
       /**
  
  
  
  1.6       +2 -2      
xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SQLTransformer.java       5 Feb 2002 11:12:13 -0000       1.5
  +++ SQLTransformer.java       5 Feb 2002 12:11:07 -0000       1.6
  @@ -83,7 +83,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
    *         (PWR Organisation & Entwicklung)
    * @author <a href="mailto:[EMAIL PROTECTED]";>Sven Beauprez</a>
  - * @version CVS $Id: SQLTransformer.java,v 1.5 2002/02/05 11:12:13 cziegeler Exp $
  + * @version CVS $Id: SQLTransformer.java,v 1.6 2002/02/05 12:11:07 cziegeler Exp $
    */
   
   public class SQLTransformer
  @@ -955,7 +955,7 @@
                                   try {
                                       result = datasource.getConnection();
                                   } catch ( Exception e ) {
  -                                    long waittime = 5000 * (long) Math.random();
  +                                    final long waittime = 5000;
                                       getTheLogger().debug( "SQLTransformer$Query: 
could not acquire a Connection -- waiting " + waittime + " ms to try again." );
                                       try {
                                           Thread.sleep( waittime );
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to