> I start to see where the problem is. You have a lot of places where you
> extend AbstractConfiguration instead of delegating to a single Configuration
> instance.

See my previous mail about organic growth.

> It's not hard to fix but I'm wondering about the life cycle of the
> data in the config.
>
> For example, what is the life time of the map in the config? Is that global
> data or should it be per thread or per factor or per execution?

Agreed, that is not quite clear. I'll clarify the Configuration
Javadoc in the next release. Tracked as #1532:
https://sourceforge.net/apps/trac/jooq/ticket/1532

Essentially, the lifecycle of all objects in Configuration is the
same. It corresponds to the lifecycle of a single Query and its
rendering, variable binding, execution, and data fetching phases. This
is also reflected in the fact that ExecuteListeners are re-created
every time you execute a Query (see other threads).

However, you may reuse a Configuration / Factory for several
consecutive queries in a single thread, if your Connection /
DataSource allows you to and if you can guarantee that you can live
with the possibility of stale state in Configuration.getData(), for
instance.

Reply via email to