You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Forge <fo...@neonics.com> on 2001/03/04 19:14:16 UTC

'destructor' for generateContent()

Hi there,

in my pages I need to get a databaseconnection from a pool
and then release it at the end of the page.

Since I don't want to put a final tag on every page that includes
code to release the connection to the pool,
I tried this in my main xsp taglib:

<xsl:template match="xsp:page">
  <xsp:struct.../>
  <xsp:logic>
    // get connection from pool

    // some more code

  </xsp:logic>

  <xsl:apply-templates/>

<!-- new code: -->

  <xsp:logic>
    // release connection
  </xsp:logic>

</xsl:template>


However, the 'release connection' code does not appear in the java source.

How can I make this happen?