cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <obill...@rennes.jouve.fr>
Subject Use of a connection in an avalon component
Date Wed, 08 Oct 2003 12:38:22 GMT
Hi all !

I wonder how to use a DataSourceComponent and its connection in a custom cocoon avalon 
component, that is ThreadSafe, to use all performance and connection pool used in Cocoon.

Should I :
  - get a connection via datasource.getConnection() and close() it for each public method

call,
  - get a connection in the initialize() method from the interface Initializable, close()

it on the dispose() method from Disposable interface, and only create a Statement for each

public method call ?
  - implement another avalon interface, like Runnable, to get/relase the Connection ?

I looked for exemples in the databases block, but the helpers are not Components.

Thank you,

-- 
Olivier BILLARD



Mime
View raw message