cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: GroovyMarkup syntax works!
Date Thu, 15 Apr 2004 16:16:17 GMT
Le 15 avr. 04, à 18:01, jastrachan@mac.com 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


Mime
View raw message