Guten Tag Lukas Eder,
am Sonntag, 2. Juni 2019 um 20:03 schrieben Sie:

> Thank you very much for your thorough analysis. As if we needed another
> reason for getting rid of JAXB :)

I have been too early to blame jOOQ for my problems, sorry for that:

After reading your answer, I had another look at how I'm configuring
jOOQ and that's the place where I use JAXB on my own. I still had in
mind that jOOQ is configuring itself automatically, but I changed that
in the past to place the "jooq-settings.xml" into some other directory
not in the classpath. I'm doing something along the lines of the
official docs:

> Settings settings = JAXB.unmarshal(new File("/path/to/settings.xml"), 
> Settings.class);

https://www.jooq.org/doc/3.11/manual/sql-building/dsl-context/custom-settings/

Only slightly different to be able to add a better error handler and
some logging and stuff. In the end, I'm calling the following myself:

> JAXBContext.newInstance(String contextPath,
>                         ClassLoader classLoader)

https://docs.oracle.com/javaee/7/api/javax/xml/bind/JAXBContext.html#newInstance-java.lang.String-java.lang.ClassLoader-

Providing a class loader is important because of a special
Axis2-environment. So it seems I'm introducing the problem on my own
and should be able to implement one of the SO-workarounds for the same
reason.

I had a look at your #7734 introducing MiniJAXB and you write the
following there:

> Settings (hardly used as XML)

https://github.com/jOOQ/jOOQ/issues/7734

How do I need to understand that sentence? What are the alternatives
to using JAXB to load the settings from a file? Are other formats
supported as well and I missed those in the docs? Or are file-based
settings at all simply not very common with jOOQ?

I'm asking because with my usage of JAXB I'm going to run into
problems with JDK 9 and 11 like you did already anyway.

Am I supposed to use MiniJAXB to load the settings with jOOQ 3.12? If
I did use that for loading settings while JAXB is still available,
that might result in the same problems I have right now.

> Working around the problem directly using a workaround like the
> above linked one seems more desireable for 3.11

That's what I had in mind only anyway.

> I'm quite convinced that a lot of people use jOOQ in long-running
> JVMs. Given that this particular issue has not popped up on this
> list, stack overflow, or github yet, I think this might just not be
> such a frequent issue. What jOOQ/JAXB feature are you using at
> runtime?

I'm somewhat sure to only load settings from the XML-file and leave
everything else to jOOQ. Can't see any usage of "InformationSchema" as
XML like mentioned in #7734. The code generator uses XML-config as
well, but that isn't a long running process anyway, so can be ignored.
My "jooq-settings.xml" is pretty small as well:

> <?xml version="1.0" encoding="UTF-8"?>
> <settings xmlns="http://www.jooq.org/xsd/jooq-runtime-3.11.2.xsd";>
>         <executeLogging>true</executeLogging>
>         <renderFormatted>true</renderFormatted>
>         <renderKeywordStyle>UPPER</renderKeywordStyle>
>         <renderSchema>false</renderSchema>
> </settings>

I had situations in the past where it made debugging easier being able
to change those settings, but can't remember the details anymore.
Maybe I should considering hard-coding those things and get rid of
JAXB this way.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: [email protected]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

-- 
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/1775354546.20190603103429%40am-soft.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to