From: Bill H. <bi...@lo...> - 2003-12-22 17:51:35
|
Hi Kiran, On Mon, 2003-12-22 at 17:22, Kiran T wrote: > I have been trying to make use of ConnectionListener events and I somehow > feel that the events are not comprehensive. Just for an example, I was > trying to make use of onDeath() to send out emails whenever connection gets > "killed" but I didn't want to send emails when these connections were > terminated naturally( ie after 4 hours of being in the pool). I suppose we could send a code that described why the connection was being destroyed. Off the top of my head, a connection can be killed because: a) it has reached its maximum lifetime (default 4 hours) b) it has failed its house keeping test c) it has thrown a fatal SQL exception There might be some other cases too. > Also, I figured out that the java.sql.Connection parameter passed to the > onDeath() is not the Proxool Connection but the native java.sql Connection. > Was there any reason to not pass proxool's connection? I normally put the > connection in the map while getting the connection and pop out during > onDeath() call. Because it was not a proxool connection I had to use > ProxoolFacade.getDelegateConnection() and then use it. Hmm, I can't think of any reason not to set the Proxool connection. I think the only reason you get a connection (in that method) is so that you can perform a resource clean up. And I don't see why you can't do that with a Proxool Connection. I'll have a think about the implications of this. > I remember an earlier discussion on splitting onExecute() to > onExecuteStart() and onExecuteEnd(). Thats a great idea. Would it be > possible to integrate in 0.9.0? That means a change to the API and is not something we do lightly. However, we are pre-1.0 and that is something that we are prepared to change if there is a good reason. Your suggestions sound good to me. Anybody going to argue against them? Thanks for your constructive comments, Kiran. Cheers, Bill |