cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java esql.xsl
Date Thu, 16 May 2002 16:10:07 GMT
haul        02/05/16 09:10:07

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp/java
                        esql.xsl
  Log:
  forgot to actually remove some code...
  
  Revision  Changes    Path
  1.22      +3 -31     xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- esql.xsl	16 May 2002 16:01:54 -0000	1.21
  +++ esql.xsl	16 May 2002 16:10:07 -0000	1.22
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<!-- $Id: esql.xsl,v 1.21 2002/05/16 16:01:54 haul Exp $-->
  +<!-- $Id: esql.xsl,v 1.22 2002/05/16 16:10:07 haul Exp $-->
   <!--
   
    ============================================================================
  @@ -56,7 +56,7 @@
    * ESQL Logicsheet
    *
    * @author ?
  - * @version CVS $Revision: 1.21 $ $Date: 2002/05/16 16:01:54 $
  + * @version CVS $Revision: 1.22 $ $Date: 2002/05/16 16:10:07 $
   -->
   
   <xsl:stylesheet version="1.0"
  @@ -376,7 +376,6 @@
   
   <xspdoc:desc> internal. set one parameter of a callable statement </xspdoc:desc>
   <xsl:template name="set-call-parameter">
  -  //try {
     <xsl:if test="@direction='out' or @direction='inout'">
       <xsl:text>_esql_query.getCallableStatement().</xsl:text>
       registerOutParameter(<xsl:value-of select="position()"/>, Types.<xsl:call-template
name="get-Sql-Type"><xsl:with-param name="type"><xsl:value-of select="@type"/></xsl:with-param></xsl:call-template><xsl:if
test="@typename">, <xsl:value-of select="@typename"/> </xsl:if>);
  @@ -385,21 +384,14 @@
       <xsl:text>_esql_query.getCallableStatement().</xsl:text>
       <xsl:call-template name="set-query-parameter"/>
     </xsl:if>
  -  //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -  //  throw new RuntimeException("Error setting parameter on statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  -  //}
   </xsl:template>
   
   
   
   <xspdoc:desc> internal. set one parameter of a prepared statement </xspdoc:desc>
   <xsl:template name="set-parameter">
  -  //try {
     <xsl:text>_esql_query.getPreparedStatement().</xsl:text>
     <xsl:call-template name="set-query-parameter"/>
  -  //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -  //   throw new RuntimeException("Error setting parameter on statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  -  //}
   </xsl:template>
   
   
  @@ -430,46 +422,26 @@
       try {
         <xsl:choose>
           <xsl:when test="esql:call">
  -          //try {
               _esql_query.prepareCall();
  -          //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -          //  throw new RuntimeException("Error preparing statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>.getMessage());
  -          //}
             <xsl:for-each select="esql:call//esql:parameter">
               <xsl:call-template name="set-call-parameter"/>
             </xsl:for-each>
  -          //try {
             <xsl:choose>
               <xsl:when test="esql:call[@needs-query='true' or @needs-query='yes']">_esql_query.execute(true);</xsl:when>
               <xsl:when test="esql:call[@resultset-from-object]">_esql_query.execute(<xsl:copy-of
select="esql:call[@resultset-from-object]"/>);</xsl:when>
               <xsl:otherwise>_esql_query.execute();</xsl:otherwise>
             </xsl:choose>
  -          //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -          //  throw new RuntimeException("Error executing prepared statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  -          //}
           </xsl:when>
           <xsl:when test="esql:query//esql:parameter">
  -          //try {
               _esql_query.prepareStatement();
  -          //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -          //  throw new RuntimeException("Error preparing statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>.getMessage());
  -          //}
             <xsl:for-each select="esql:query//esql:parameter">
               <xsl:call-template name="set-parameter"/>
             </xsl:for-each>
  -          //try {
               _esql_query.execute();
  -          //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -          //  throw new RuntimeException("Error executing prepared statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  -          //}
           </xsl:when>
           <xsl:otherwise>
             _esql_query.createStatement();
  -          //try {
  -            _esql_query.execute();
  -          //} catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -          //  throw new RuntimeException("Error executing statement: " + _esql_query.getQueryString()
+ ": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  -          //}
  +          _esql_query.execute();
           </xsl:otherwise>
         </xsl:choose>
         getLogger().debug("esql query: " + _esql_query.getQueryString());
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message