cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Producer destructor
Date Wed, 28 Mar 2001 18:10:10 GMT
"Heiko Gierer" <gierer@rittershaus.de> wrote:
>can a cocoon producer has a destructor for e.g. closing db connection etc ?

Yes, if you are using Cocoon 1.8.1 or above this is supported.

import org.apache.framework.DestroyListener;

public class MyProducer implements DestroyListener {

...

  public void destroy () {
     myconnection.close ();
  }

}

But also you might want to read about the connection pooling and/or the esql 
taglib - if you used connection pooling you wouldn't need such a 
"destructor".




_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message