> Wicket doesn't do anything with databases, but i do use Glassfish
> connection pooling. However, as far as i'm aware, i still need to
> "close" pooled connections to return them to the pool. Please correct
> me if i'm wrong!

You're right, that's how it's done. The close() method is intercepted
by the J2EE container.

> Thanks. Could you also test whether the JDBC connection is still
> connected and call provideFor() when the connection isn't?

That might work. On the other hand, I don't feel the opened/closed
state of a Connection should be in jOOQ's responsibility (I'm not even
sure whether isClosed() is implemented in all JDBC drivers). As an
alternative, check out line 69 in
http://jooq.svn.sourceforge.net/viewvc/jooq/jOOQ/src/main/java/org/jooq/impl/AbstractQuery.java?revision=908&view=markup

What about if jOOQ just always calls provideFor() before every query
execution, so you can run those (and additional) checks yourself? You
(client code) know more about what's a good Connection and what is
not. If I get a new Configuration through provideFor(), I'll use that.
Otherwise, the existing Configuration will have to do. And we'll leave
the original calls to provideFor() on deserialisation of a Connection.
I somehow feel, this will be the cleanest solution. What do you think?

Lukas

Reply via email to