eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
381 stars 143 forks source link

Default application configuration lost after undeploy and deploy back #24710

Open samsonsouley opened 9 months ago

samsonsouley commented 9 months ago

Environment Details


Problem Description

When i undeploy and and deploy back an application which was set earlier as default application i have to go back and set the application back as default

Steps to reproduce

Impact of Issue

After deploying back the application you will not be able to access the application if you do not precise the context name

OndroMih commented 9 months ago

This is actually a feature in GlassFish - if an application is undeployed, it's removed as the default web module: https://github.com/eclipse-ee4j/glassfish/blob/d322a5705f498a16210ceee9e6b7762a9cfa739c/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/DeploymentHandler.java#L296

One way to implement support for keeping the default web module config between undeploy and deploy is to:

Another option would be to keep the value of the default web module even if the application is undeployed. We would need to check whether this would break anything if there's a default web module set to a non-existing module (while the app is undeployed).