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/processor/xsp/library/sql esql.xsl
Date Wed, 17 Jan 2001 20:16:59 GMT
balld       01/01/17 12:16:58

  Modified:    src/org/apache/cocoon/processor/xsp/library/sql esql.xsl
  Log:
  moved the pool singleton inside the c1 section, merged berin's patch from c2
  
  Revision  Changes    Path
  1.50      +9 -4      xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql/esql.xsl,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- esql.xsl	2001/01/17 17:07:37	1.49
  +++ esql.xsl	2001/01/17 20:16:56	1.50
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!-- $Id: esql.xsl,v 1.49 2001/01/17 17:07:37 greenrd Exp $-->
  +<!-- $Id: esql.xsl,v 1.50 2001/01/17 20:16:56 balld Exp $-->
   <!--
   
    ============================================================================
  @@ -202,10 +202,10 @@
             }
           </xsl:when>
         </xsl:choose>
  -      static PoolBrokerService _esql_pool = PoolBrokerService.getInstance();
         class EsqlConnection {
           <xsl:choose>
             <xsl:when test="$environment = 'cocoon1'">
  +            static PoolBrokerService _esql_pool = PoolBrokerService.getInstance();
               DBConnection db_connection = null;
             </xsl:when>
             <xsl:when test="$environment = 'cocoon2'">
  @@ -268,8 +268,13 @@
             _esql_connection.connection = _esql_connection.db_connection.getConnection();
           </xsl:when>
           <xsl:when test="esql:pool and $environment = 'cocoon2'">
  -          _esql_connection.datasource = (DataSourceComponent) _esql_selector.select(String.valueOf(<xsl:copy-of
select="$pool"/>));
  -          _esql_connection.connection = _esql_connection.datasource.getConnection();
  +          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(.)"/>)
{
  +            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>
           <xsl:otherwise>
             <xsl:if test="esql:driver">
  
  
  

Mime
View raw message