Please imagine that this sentence is really full of expletives. SOLUTION: Rename glassfish-resources.xml to payara-resources.xml
It does not matter what its called when deploy manually to the server. But when it is being deployed from NetBeans to Payara using the Run command it now deploys instantly rather than take 50 seconds. How did I find this solution. I didn't but I did find this page https://docs.payara.fish/documentation/payara-server/app-deployment/deployment-descriptors.html that showed that some config files have an alternate name. So I tried the alternate name without any expectation of success. I am unhappy that its taken a few weeks to discover this. I don't regret the time I spent on my plan B (https://www.omnijava.com/2020/02/05/build-deploy-and-run-in-a-browser-a-web-app-with-maven/) but I can't believe that this requirement is not more prominent. Please imagine that this last sentence is really full of expletives. From: Kenneth Fogel <[email protected]> Sent: February 7, 2020 7:06 PM To: [email protected] Subject: Projects with glassfish-resources.xml slow to deploy to Payara Using Payara 5.194, Java 11, MySQL 8 and NetBeans 11.2, all running on the same PC, I have encountered a deployment issue with JSF 2.3 apps that use EclipseLink. For non-JPA apps deployment and bringing up the browser takes seconds. Once I have a glassfish-resources.xml file deployment it takes a minimum of 50 seconds. Arquillian testing that uses glassfish-resources.xml completes in 25 seconds which is reasonable though I suspect it could be faster, these are small sample programs. It's the 50 seconds with a message Deploying that I don't understand. If I deploy the war file manually or by using the Maven Cargo plugin its up and running almost instantly. If I drop the glassfish-resources.xml file into an app that does not have any JPA code it takes 50 seconds. Before I file a bug report I thought I'd ask if anyone else has encountered this. The server log tells me that the app is deployed in under 2 seconds but NetBeans still shows deploying until we hit 50 seconds. Is it the built in Payara support or is this a Java 11 gotcha. I could ignore NetBeans' deploy and just use Maven but then my students loose the functionality you have when Payara is working out of the target folder. I have using this setup for a few years all the way back to NB 8 without this problem. I did write up how I got Maven to do the deploy at https://www.omnijava.com/2020/02/05/build-deploy-and-run-in-a-browser-a-web-app-with-maven/ if anyone is interested. Thanks, Ken Fogel
