You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Fang Huang <fh...@csee.umbc.edu> on 2001/06/06 20:32:03 UTC

use connection pool in esql

Hi, I was trying to use connection pool in esql, but I still got error:
java.lang.RuntimeException: Could not open pooled connection: mypool

In cocoon.properties, I add mypool definition as follows:
processor.xsp.pool.database.mypool.driver=oracle.jdbc.driver.OracleDriver
processor.xsp.pool.database.mypool.url=jdbc:oracle:thin:@oracle.gl.umbc.edu:1521:GL
processor.xsp.pool.database.mypool.username=user
processor.xsp.pool.database.mypool.password=user
processor.xsp.pool.database.mypool.maxConnections=3
processor.xsp.pool.database.mypool.expiryTime=3600000

And in my xsp file, I use:
<esql:connection>
  <esql:pool>mypool</esql:pool>
  <esql:execute-query>
  ...

I can get the correct results when I use
<esql:connection>
  <esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
  <esql:dburl>jdbc:oracle:thin:@oracle.gl.umbc.edu:1521:GL</esql:dburl>
  <esql:username>user</esql:username>
  <esql:password>user</esql:password>
  <esql:execute-query>

What's wrong with the connection pool? Thanks.

Fang


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>