How to increase JBoss starting time

1 minute read

dist files

Photo by Agê Barros en Unsplash

In the last project that I had to work on, we had to figure out a way to deploy an app into Google cloud platform (GCP) that had to connect to an Oracle database that was On-premise outside of GCP.

This makes that all the queries to the database increased the execution time by 3ms for a total of 6ms if we consider the round trip.

Another thing to consider is that the app loads a lot of data into memory caches to avoid doing queries to the database (as the app has to do a lot of reads and few writes into the database it was a good candidate to use cache)

Considering the number of queries done by the app the amount of time needed to boot the app surpassed the maximum 300 seconds defined in the JBoss startup configuration. When we started the app we had the following stacktrace:

{"@timestamp":"2022-06-09T12:40:42.487Z","message":"JBWEB000287: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener","thread_name":"ServerService Thread Pool -- 64","level":"ERROR","logger_name":"org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/visit-engine]","ndc":"","type":"standard","logname":"server.log","exception":{"class":"java.lang.IllegalArgumentException","message":"JBAS011857: NamingStore is null","stacktrace":"java.lang.IllegalArgumentException: JBAS011857: NamingStore is null\n\tat<init>(\n\tat<init>(\n\tat$DefaultInitialContext.<init>(\n\tat\n\tat\n\tat javax.naming.InitialContext.lookup(\n\tat javax.naming.InitialContext.lookup(\n\tat com.sun.faces.config.WebConfiguration.processJndiEntries(\n\tat com.sun.faces.config.WebConfiguration.<init>(\n\tat com.sun.faces.config.WebConfiguration.getInstance(\n\tat com.sun.faces.config.ConfigureListener.contextInitialized(\n\tat org.apache.catalina.core.StandardContext.contextListenerStart(\n\tat org.apache.catalina.core.StandardContext.start(\n\tat\n\tat$000(\n\tat$\n\tat java.util.concurrent.Executors$\n\tat\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(\n\tat java.util.concurrent.ThreadPoolExecutor$\n\tat\n\tat\n"}}

An option could have been reducing the number of queries that were accessing the database but to do that we needed to use joins and other optimizations that would have been risky and we wanted to find a good solution for this temporary problem.

Taking into consideration that the Oracle database will be in the cloud at some moment this extra time of 3ms will disappear in a near future.

Then finally we decided to fix the issue we changed the commands.cli file and we added the following lines:

connect localhost:12345


Configuring in JBoss EAP 6/7 :

How to increase default timeout of 300 seconds : “”

JBoss enterprise application app documentation


In this post, we have seen how to increase the blocking timeout of JBoss from 300 seconds which is the default one to 600 seconds. We needed to use this workaround to be able to connect to an On-premise database from GCP.

I won't give your address to anyone else, won't send you any spam, and you can unsubscribe at any time.
Disclaimer: Opinions are my own and not the views of my employer