Hi Sergey, > In this case it can be used from different threads concurrently (be a > singleton).
Let me ask you this question: What is the intent of a factory being thread-safe, after all? Why wouldn't you want to create new factories? 2011/11/7 Sergey Epik <[email protected]>: > Hi Lukas, > > I've found that Oracle JDBC driver supports statement pooling. And mysql > jdbc driver also supports. > c3p0 data source ( http://sourceforge.net/projects/c3p0/) supports prepared > statement pooling. > So I am not sure that's a jook concern. > > I proposed to configure Factory with DataSource instance instead of > Connection instance. > Or, may be, better introduce separate class that implements > FactoryOperations and is > configured with DataSource, SQLDialect and SchemaMapping (without ant spring > dependencies). > In this case it can be used from different threads concurrently (be a > singleton). > It's not related directly to transaction management, because transaction > manager is behind DataSource. > > -- > Best regards, > > > On Mon, Nov 7, 2011 at 10:55 AM, Lukas Eder <[email protected]> wrote: >> >> By the way, Sergey, >> >> Do you think the idea of a session would help you more? I imagine that >> when the concept of a session is introduced in jOOQ, it'll be easier >> to abstract transaction handling and dealing with data sources. >> >> I could imagine that the Factory will continue to operate on >> connections directly, whereas a Session could also provide connections >> to executed queries using the existing Attachable API. If that is >> done, then a Session could manage the connection it gets from a data >> source. Read more in this thread: >> >> https://groups.google.com/forum/#!topic/jooq-user/s6Bqgz_81Yw >> >> Cheers >> Lukas > >
