Le 15 avr. 04, � 18:01, [EMAIL PROTECTED] a �crit :

...BTW you could just create the Sql object with a DataSource which is-a JDBC connection pool, then the Sql object takes care of all the pooling for you. Is there support for DataSource in Cocoon or some kinda adapter between DataSource and ConnectionProvider?...

Dunno about javax.sql.DataSource support, I'll have to check.


ConnectionProvider does not exist yet, I just made it up with the following idea:

public class ConnectionProvider {
  // Groovy scripts which need a Connection will use this to get
  // it from the Cocoon pool
  public Connection getConnection(String connectionName);

// then, once the Groovy script has been executed, ScriptGenerator
// calls this to return all connections provided by getConnection to the pool
public void releaseConnections()
}


In this way, the Groovy script can access any Connections that are configured, and does not have to care about releasing them. It's easy to implement in case we don't have DataSource support.

-Bertrand



Reply via email to