> I open in my own producer a database connection. I extends AbstractProducer
> and in the constructor I initialize a database connection. But I can not
> close it - it would give no methods like destroy().
>
> -Conny-
>
I would suggest using something like bitmechanic's ConnectionPool and
initialize it in a separate servlet which only has an init() and destroy()
method. This will not only allow you to close all your connections at the
correct time, but also give you a huge performance increase. It's very
easy to set up and use as well.
http://www.bitmechanic.com
Other than that, I don't think there is any way to tell your producer that
things are shutting down without hacking the Cocoon source itself.
Anyone?
mike
|