Hi Jim, Please use a different DSLContext (and backing Configuration) with a different Settings instance for each database as documented here: https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-render-mapping/
You can create derived configurations using Configuration.derive(Settings) for that purpose, but do note that each time you derive a Configuration, the internal caches (e.g. used for reflection of into(Class) calls) may be flushed. Chances are, you'll have separate JDBC connections, though, one per database, and with separate connections, you might have a separate beans (e.g. if you're using Spring), and you can inject the appropriate Settings once for each bean. I hope this helps, Lukas On Wed, Mar 17, 2021 at 8:31 PM Jim McGlaughlin < [email protected]> wrote: > Hello, > > I am using the same schemata for several databases using > 'outputSchemaToDefault'. > > At runtime I would like to get the specific database the DSLContext is > connected to. > > In a debugger I can see that info is stored in > > configuration.settings.renderMapping.schemata.0.output > > Is the a method of the DSLConext to retrieve this? I would like to avoid > having to pass this value through layers of code which are already carrying > the DSLContext. > > Thanks, > Jim > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jooq-user/2ba8d594-e59d-4e11-b130-177a41479b8fn%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/2ba8d594-e59d-4e11-b130-177a41479b8fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO7diw%2BJNQXGGwSC%2BpZiSnaHDBiKucNoXsHe6roggyR94A%40mail.gmail.com.
