My last blog “Build, Deploy and Run in a Browser a Web App with Maven” came out of a problem running web apps on Payara 5.194 from NetBeans 11.2 using Java 11 and MySQL 8 on Windows 10. Go to the blog to see the details.
Yesterday I discovered that the problem was caused by the glassfish-resources.xml file. If I copied this file into a project that did not do any JDBC or JPA then it also took 50 seconds to deploy.
Today I came across this page from Payara’s documentation https://docs.payara.fish/documentation/payara-server/app-deployment/deployment-descriptors.html This page pointed out that some of the glassfish configuration files had alternate names. One of those alternate names was payara-resources.xml.
How could changing the name make a difference? When deploying manually or with the Maven Cargo plugin the time for displaying the page in the browser was near instantaneous. It was using the NetBeans Run command to deploy that took 50 seconds until the web page came up in the browser.
Without any expectation of success I renamed glassfish-resources.xml to payara-resources.xml and used Run in NetBeans. It came up instantaneously. My non-database app that deployed slowly with glassfish-resources.xml now started up instantaneously when I renamed it.
I can’t imagine how this was missed. Was it like the time I had Arquillian issues and then discovered that the Arquillian team did not have any Windows machines in their office?
Whatever the reason I have vented on social media and filed a bug report with Payara. I’d like to know if this is an issue just on Windows or do Mac and Linux users also have slow deployments when using glassfish-resources.xml and the NetBeans Run command. I have never observed this when I used earlier versions of Payara and NetBeans with Java 8. I have calmed down and I’m a happy camper, more or less, again.