Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAYARA-3994 HotDeploy initial support in deploy/redeploy asadmin command #4220

Merged
merged 5 commits into from Oct 21, 2019

Conversation

@jGauravGupta
Copy link
Contributor

jGauravGupta commented Sep 16, 2019

New -hotDeploy flag added to deploy/redeploy asadmin command intended for machine-to-machine communication (IDE, build tools etc).

Currently, HotDeploy features are:

  • Skips un-deployment of existing application
  • Skips writing application properties to domain.xml
  • Reuse existing Module to deploy the application

Apache NetBeans IDE client:
apache/netbeans#1562

How to enable and test HotReload in the NetBeans IDE:

  • Build the IDE: ant -Dcluster.config=enterprise
  • Run the IDE: ant tryme
  • Add the Payara Server in IDE.
  • Open the properties of Payara Server and enable the Hot Reload checkbox.HotReload
  • Create a new Maven web application and deploy it to the Payara Server.
  • Create or modify any Servlet and refresh the browser to test.
@jGauravGupta jGauravGupta force-pushed the jGauravGupta:PAYARA-3994 branch from ab3725f to 0493165 Sep 21, 2019
@jGauravGupta jGauravGupta requested review from MattGill98, pdudits and Pandrex247 and removed request for MattGill98 Oct 1, 2019
@MattGill98

This comment has been minimized.

Copy link
Member

MattGill98 commented Oct 1, 2019

Not sure if I'm doing something wrong, but when using a metrics application I get:

Error invoking ServletContainerInitializer fish.payara.microprofile.metrics.rest.MetricsServletContainerInitializer
java.lang.IllegalStateException: Wrapper already initialized with servlet instance, class, or name
	at org.apache.catalina.core.StandardWrapper.setServletClass(StandardWrapper.java:719)
@jGauravGupta jGauravGupta requested a review from MattGill98 Oct 4, 2019
@jGauravGupta

This comment has been minimized.

Copy link
Contributor Author

jGauravGupta commented Oct 4, 2019

Thanks @MattGill98, Fixed the dynamically registered Servlet/Filter(s).

Copy link
Member

MattGill98 left a comment

Nice, looks good!

@pdudits

This comment has been minimized.

Copy link
Contributor

pdudits commented Oct 4, 2019

On Windows I'm constantly hitting .jar file locks when redeploying, which might be caused by skipping undeployment step -- there is no file locking issue without --hotdeploy.

I also think that --hotDeploy should imply --force because it doesn't make sense to hotdeploy non-existing application.

@jGauravGupta

This comment has been minimized.

Copy link
Contributor Author

jGauravGupta commented Oct 4, 2019

Hi @pdudits,

I am also developing on Windows but not found the locking issue tested war via manual asadmin command and exploded war via NetBeans IDE plugin.

The -force flag is by default enabled on the invocation of redeploy asadmin command.

Copy link
Member

Pandrex247 left a comment

I'm not sure if it's an issue with my build or not, but the hotDeploy parameter doesn't seem to be getting picked up as valid for the deploy command.

asadmin deploy --hotDeploy /path/to/file.war
Invalid option: --hotDeploy

Also it would be nice if the parameter had an alias so that it's not case sensitive :)

@Pandrex247

This comment has been minimized.

Copy link
Member

Pandrex247 commented Oct 14, 2019

It was just my build :) Works after a rebuild.

@jGauravGupta

This comment has been minimized.

Copy link
Contributor Author

jGauravGupta commented Oct 15, 2019

jenkins test please

@MeroRai

This comment has been minimized.

Copy link
Contributor

MeroRai commented Oct 17, 2019

@jGauravGupta and @pdudits, I have tested it on Windows and have not encountered the file locking issue.

@MeroRai MeroRai requested review from MattGill98 and Pandrex247 Oct 17, 2019
@MarkWareham MarkWareham merged commit b69f71b into payara:master Oct 21, 2019
58 checks passed
58 checks passed
Payara Quick Build and Test Quick build and test passed!
Details
security/snyk - api/payara-api/pom.xml (payara-ci) No new issues
Details
security/snyk - api/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admingui/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ant-tasks/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/appclient/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/batch/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/common/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/concurrent/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/connectors/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/core/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ejb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/extras/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/featuresets/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ha/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/installer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jdbc/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/load-balancer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/orb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/payara-appserver-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/persistence/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/registration/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/security/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/transaction/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/web/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/webservices/pom.xml (payara-ci) No new issues
Details
security/snyk - copyright/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/cluster/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/common/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/core/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/diagnostics/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/hk2/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/payara-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources-l10n/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/security/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/test-utils/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - pom.xml (payara-ci) No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.