I'll just point out that the code as-is works fine in other connection pools and datasources. The code in question is a bit touchy though, so I'll take a look.