Micro Payara configuration in effect

Hi everyeone

Recently I got into a situation where I have micro payara started on a docker container with option --maxhttpthreads 100 but then I found out that there is another configuration for HTTP Thread inside domain.xml file of that micro payara container, for example 200.

So I just wonder which one will be taking into effect or there is any way for us to check without pushing the limit?


Regarding to the fish.payara.micro.impl.PayaraMicroImpl.java[1] line 1856 and 1860 as the following: -

    private void configureThreads() {
        if (this.maxHttpThreads != Integer.MIN_VALUE) {
            preBootCommands.add(new BootCommand("set", "configs.config.server-config.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=" + maxHttpThreads));

        if (this.minHttpThreads != Integer.MIN_VALUE) {
            preBootCommands.add(new BootCommand("set", "configs.config.server-config.thread-pools.thread-pool.http-thread-pool.min-thread-pool-size=" + minHttpThreads));

We found that the maxHttpThreads and minHttpThreads arguments passed via the Payara Micro Command Line Options will be appended to the preboot command file. This, within the Payara Micro, will help us to modify the domain.xml on-the-fly during it starting up. (We will not touch the domain.xml directly and let the preboot to do that for us.)

Moreover other arguments passed via the Payara Micro Command Line Options, .e.g. --port <http-port-number>, --sslport <ssl-port-number> and so on, also do the same thing within the fish.payara.micro.impl.PayaraMicroImpl.java.

Furthermore we are also able to create our customized preboot and postboot[2] as the same as we usually use via asadmin command as well. Anyhow most of asadmin command are applicable within prebootand postboot, but not all ! We should consult the documentation case by case.

[1] fish.payara.micro.impl.PayaraMicroImpl.java line 1856 and 1860
[2] Running asadmin commands using Preboot and Postboot Scripts

1 Like

Thanks for clearing it for me.