Ah, now I can see you wrote you use DI and I asked that question. Sorry
about that.

Regards,
Witold Szczerba
8 gru 2014 16:52 "Garret Wilson" <[email protected]> napisaƂ(a):

> Witold, thanks for the update. I haven't yet talked to our main database
> developer, but on first glance it looks like ULTM would be great for us!!
> Let me clarify a few things.
>
> Our code has an application that creates a jOOQ Configuration from a data
> source:
>
>       final org.jooq.Configuration jooqConfiguration = new
> DefaultConfiguration()
>           .set(datasource).set(SQLDialect.POSTGRES).set(new
> Settings().withExecuteLogging(true));
>
> We store this jOOQ Configuration in e.g. some DI container. In all the
> manager layer, we access jOOQ like this:
>
>     return DSL.using(getConfiguration());
>
> We therefore have one jOOQ Configuration (created from a single data
> source) for the entire application, and when we need to do database access
> we create a DSLContext on the fly from the configuration. I frankly don't
> know the details of how jOOQ then creates JDBC connections under the hood;
> this is not my area of expertise.
>
> So with ULTM, would we create one TxManager (also from the data source) at
> the same level as the jOOQ Configuration, and make it available via the DI
> container? If we create multiple jOOQ DSLContexts on the fly from the jOOQ
> Configuration, how does that interact with ULTM?
>
> Let's further suppose that I have a CarManager and a WheelManager. Storing
> a Car using CarManager.storeCar() would I assume use TxManager to wrap the
> logic in a transaction. But inside that logic it calls
> WheelManager.storeWheel() four times. Does WheelManager simply do its work
> without worrying about transactions? Do I need to pass the TxManager to
> WheelManager? Will the DSLContext create a new connection that isn't part
> of the same transaction? Do I need to pass the DSLContext to WheelManager?
> Do I need to pass the JDBC connection to WheelManager? Or is TXManager
> somehow managing all this under the hood?
>
> I'm sure if I had more SQL expertise the answers to some of these
> questions might be obvious. Thanks in advance for your help.
>
> Garret
>
> On 12/7/2014 1:10 AM, Witold Szczerba wrote:
>
>> The ULTM v.1.0 is released and published (Maven Central and jCenter at
>> Bintray).
>> Project page is here:
>> https://github.com/witoldsz/ultm
>>
>> Thank you,
>> Witold Szczerba
>>
>
> --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to