Hello,

jOOQ will not dictate the way you manage transactions, sessions,
connections and other similar entities in your software. With other words,
you're completely free to design your application and connection lifecycle
any way you want. By default, jOOQ records are "attached" to their creating
Configuration. A Configuration can then delegate the actual Connection
lifecycle to your custom ConnectionProvider implementation. Some details
can be seen here:
http://www.jooq.org/doc/3.1/manual/sql-building/dsl-context/connection-vs-datasource/

A working example integration with Spring:
http://www.jooq.org/doc/3.1/manual/getting-started/tutorials/jooq-with-spring/

In other words, your current design may work perfectly, if you use an
appropriate ConnectionProvider and appropriate transaction handling.

Cheers,
Lukas


2013/9/2 Вячеслав Бойко <[email protected]>

> Hi!
>
> I implement applied classes over jOOQ generated. And I preffer to use code
> like this one:
>
> public classe Player {
>      PlayersRecord m_data;
>      private Player() {}
>      public static load(/*some params*/) {
>           DSLContext create = ...;
>           Player player = new Player();
>           player.m_data = (PlayersRecord)
> create.select().from(...).fetchOne();
>      }
>      public void save() {
>           m_data.store();
>      }
> }
>
> That's I store jOOQ Record instanse in local variable for my class.
> It means that this record is living during the whole lifecycle of an
> instanse of my applied class.
> Is it normally to save this data as described above? Just calling
> m_data.store(). Ar maybe I must to create new connection, attach my data to
> it and then call m_data.store?
>
> What is the right way to save data deffered?
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to