cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java esql.xsl
Date Mon, 22 Jan 2001 23:48:05 GMT
balld       01/01/22 15:48:05

  Modified:    src/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: xml-cocoon2 esql.xsl
  Log:
  better error reporting for c1 pools
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.36  +11 -4     xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/esql.xsl,v
  retrieving revision 1.1.2.35
  retrieving revision 1.1.2.36
  diff -u -r1.1.2.35 -r1.1.2.36
  --- esql.xsl	2001/01/22 21:56:37	1.1.2.35
  +++ esql.xsl	2001/01/22 23:48:03	1.1.2.36
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!-- $Id: esql.xsl,v 1.1.2.35 2001/01/22 21:56:37 bloritsch Exp $-->
  +<!-- $Id: esql.xsl,v 1.1.2.36 2001/01/22 23:48:03 balld Exp $-->
   <!--
   
    ============================================================================
  @@ -266,15 +266,22 @@
       try {
         <xsl:choose>
           <xsl:when test="esql:pool and $environment = 'cocoon1'">
  -          _esql_connection.db_connection = _esql_pool.getConnection(String.valueOf(<xsl:copy-of
select="$pool"/>));
  -          _esql_connection.connection = _esql_connection.db_connection.getConnection();
  +          try {
  +            _esql_connection.db_connection = _esql_pool.getConnection(String.valueOf(<xsl:copy-of
select="$pool"/>));
  +            _esql_connection.connection = _esql_connection.db_connection.getConnection();
  +          } catch (Exception _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  +            throw new RuntimeException("Error opening pooled connection: "+String.valueOf(<xsl:copy-of
select="$pool"/>)+": "+_esql_exception_<xsl:value-of select="generate-id(.)"/>.getMessage());
  +          }
  +          if (_esql_connection.connection == null) {
  +            throw new RuntimeException("Could not open pooled connection: "+String.valueOf(<xsl:copy-of
select="$pool"/>));
  +          }
           </xsl:when>
           <xsl:when test="esql:pool and $environment = 'cocoon2'">
             try {
               _esql_connection.datasource = (DataSourceComponent) _esql_selector.select(String.valueOf(<xsl:copy-of
select="$pool"/>));
               _esql_connection.connection = _esql_connection.datasource.getConnection();
             } catch (Exception _esql_exception_<xsl:value-of select="generate-id(.)"/>)
{
  -            log.error("Could not get the datasource",_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  +            cocoonLogger.error("Could not get the datasource",_esql_exception_<xsl:value-of
select="generate-id(.)"/>);
               throw new RuntimeException("Could not get the datasource "+_esql_exception_<xsl:value-of
select="generate-id(.)"/>);
             }
           </xsl:when>
  
  
  

Mime
View raw message