Stream: containers

Topic: JVM options


view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 15:29):

@Leo Andreev just stopped by and asked about something he observed that I can't easily answer. He used the Payara admin GUI to set some JVM options. He stopped the container and started it again. The JVM options were preserved. But where are they stored?

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 15:31):

We both agree there's no domain.xml in the data directory (data rather than docker-dev-volumes for the demo tutorial). And in the past when I exec into the dataverse container, I haven't been able to find domain.xml.

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 15:37):

You're looking for ${DOMAIN_DIR}/config/domain.xml

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 15:38):

Changes to that file will be written into the overlayfs, which is usually sth you want to avoid

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 15:42):

Hmm, I think I've heard of this overlayfs...

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 15:48):

Is https://jvns.ca/images/overlay.jpeg more or less accurate?

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 16:03):

Yeah that describes the concept well

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 16:04):

Please note this kind of writing into a container is a _very_ bad idea when on K8s. (I can elaborate if necessary)

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 16:06):

Ok. Thanks!

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 16:07):

Also, I found domain.xml, with your help:

$ docker exec -it dataverse-1 bash
payara@dataverse:~$
payara@dataverse:~$ echo $DOMAIN_DIR
/opt/payara/appserver/glassfish/domains/domain1
payara@dataverse:~$
payara@dataverse:~$ ls -l $DOMAIN_DIR/config/domain.xml
-rw-r--r-- 1 payara payara 44474 Feb  9 16:03 /opt/payara/appserver/glassfish/domains/domain1/config/domain.xml
payara@dataverse:~$

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 16:07):

For setting system properties, you really should not use the admin UI

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 16:08):

I mean, fine for a oneshot thing to test sth

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 16:08):

But aside from that: bad idea

view this post on Zulip Oliver Bertuch (Feb 09 2024 at 16:08):

Either go JVM_ARGS or use the special handler to convert env vars

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 09 2024 at 17:37):

Right, that's what I documented at https://preview.guides.gdcc.io/en/develop/container/running/demo.html#jvm-options-microprofile-config


Last updated: Oct 30 2025 at 05:14 UTC