It is my assumption that even if you get uncaught exceptions during the active lifetime of a component, cocoon still recycle()'s the component.
Another idea is to implement the interfaces Initializable and Recyclable and creating in method initialize() the connection and returning it back to the pool in recycle(). What do you think about that?
But there is one problem: What happens if an exception occures which was not catched? Like a ParameterException or a NullPointer? How to return the connection clear back to the pool?
You can try this out by throwing a runtime exception in your setup() method and put a logging statement in recycle(). (ofcourse this is usually the point where someone says "yep done that and recycle is not called")
Is there a best practice way?
Thank you!
Regards Stephan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
