You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/configure-language-java-deploy-run.md
+31-28Lines changed: 31 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,15 @@ ms.author: cephalin
14
14
15
15
# Deploy and configure a Java SE, Tomcat, or JBoss EAP app in Azure App Service
16
16
17
-
This article shows you the most common deployment and runtime configuration for Java apps in App Service. If it's your first time using Azure App Service, you should first read through the [Java quickstart](quickstart-java.md). You can find the answers to general questions about using App Service that aren't specific to Java development in the [App Service FAQ](faq-configuration-and-management.yml).
17
+
This article shows you the most common deployment and runtime configuration for Java apps in Azure App Service. If it's your first time using Azure App Service, you should first read through the [Java quickstart](quickstart-java.md). You can find the answers to general questions about using App Service that aren't specific to Java development in the [App Service FAQ](faq-configuration-and-management.yml).
This command adds an `azure-webapp-maven-plugin` plugin and the related configuration by prompting you to select an existing Azure Web App or to create a new one. During configuration, it attempts to detect whether your application should be deployed to Java SE, Tomcat, or (Linux only) JBoss Enterprise Application Platform (EAP). Then you can deploy your Java app to Azure by using the following command:
106
+
This command adds an `azure-webapp-maven-plugin` plugin and the related configuration by prompting you to select an existing Azure Web App or to create a new one. During configuration, it attempts to detect whether your application should be deployed to Java SE, Tomcat, or (Linux only) JBoss EAP. Then you can deploy your Java app to Azure by using the following command:
107
107
108
108
```shell
109
109
mvn package azure-webapp:deploy
@@ -144,7 +144,7 @@ Here's a sample configuration in `pom.xml`:
144
144
145
145
#### Gradle
146
146
147
-
1. Set up the [Gradle Plugin for Azure Web Apps](https://github.com/microsoft/azure-gradle-plugins/tree/master/azure-webapp-gradle-plugin) by adding the plugin to your `build.gradle`:
147
+
1. Set up the [Gradle Plugin for Azure Web Apps](https://github.com/microsoft/azure-gradle-plugins/tree/master/azure-webapp-gradle-plugin) by adding the plugin to `build.gradle`:
148
148
149
149
```groovy
150
150
plugins {
@@ -271,7 +271,7 @@ All Java runtimes on App Service come with the Java Flight Recorder. You can use
271
271
272
272
# [Linux](#tab/linux)
273
273
274
-
SSH into your App Service and run the `jcmd` command to see a list of all the Java processes running. In addition to `jcmd` itself, you should see your Java application running with a process ID (PID) number.
274
+
SSH into App Service and run the `jcmd` command to see a list of all the Java processes running. In addition to `jcmd` itself, you should see your Java application running with a process ID (PID) number.
275
275
276
276
```shell
277
277
078990bbcd11:/home# jcmd
@@ -324,7 +324,7 @@ Use [FTPS](deploy-ftp.md) to download your JFR file to your local machine. To an
324
324
325
325
# [Linux](#tab/linux)
326
326
327
-
To configure App Service to write your application's standard console output and standard console error streams to the local file system or Azure Blob Storage, do the following. Enable [application logging](troubleshoot-diagnostic-logs.md#enable-application-logging-linuxcontainer) through the Azure portal or in the [Azure CLI](/cli/azure/webapp/log#az-webapp-log-config). If you need longer retention, configure the application to write output to a Blob storage container.
327
+
To configure App Service to write your application's standard console output and standard console error streams to the local file system or Azure Blob Storage, do the following. Enable [application logging](troubleshoot-diagnostic-logs.md#enable-application-logging-linuxcontainer) through the Azure portal or in the [Azure CLI](/cli/azure/webapp/log#az-webapp-log-config). If you need longer retention, configure the application to write output to a Blob Storage container.
328
328
329
329
::: zone pivot="java-javase,java-tomcat"
330
330
@@ -336,7 +336,7 @@ Azure Blob Storage logging for Linux-based apps can be configured only by using
336
336
337
337
# [Windows](#tab/windows)
338
338
339
-
To configure App Service to write your application's standard console output and standard console error streams to the local file system or Azure Blob Storage, do the following. Enable [application logging](troubleshoot-diagnostic-logs.md#enable-application-logging-windows) through the Azure portal or in the [Azure CLI](/cli/azure/webapp/log#az-webapp-log-config). Twelve hours after you enable application logging, logging to the local App Service file system instance is disabled. If you need longer retention, configure the application to write output to a Blob storage container.
339
+
To configure App Service to write your application's standard console output and standard console error streams to the local file system or Azure Blob Storage, do the following. Enable [application logging](troubleshoot-diagnostic-logs.md#enable-application-logging-windows) through the Azure portal or in the [Azure CLI](/cli/azure/webapp/log#az-webapp-log-config). Twelve hours after you enable application logging, logging to the local App Service file system instance is disabled. If you need longer retention, configure the application to write output to a Blob Storage container.
340
340
341
341
::: zone pivot="java-javase,java-tomcat"
342
342
@@ -512,11 +512,11 @@ When clustering is enabled, the JBoss EAP instances use the `FILE_PING` JGroups
512
512
> [!Note]
513
513
> You can avoid JBoss EAP clustering timeouts by [cleaning up obsolete discovery files during your app startup](https://github.com/Azure/app-service-linux-docs/blob/master/HowTo/JBOSS/avoid_timeouts_obsolete_nodes.md).
514
514
515
-
The Premium V3 and Isolated V2 App Service Plan types can optionally be distributed across Availability Zones to improve resiliency and reliability for your business-critical workloads. This architecture is also known as [zone redundancy](../reliability/migrate-app-service.md). The JBoss EAP clustering feature is compatible with the zone redundancy feature.
515
+
The Premium V3 and Isolated V2 App Service Plan types can optionally be distributed across availability zones to improve resiliency and reliability for your business-critical workloads. This architecture is also known as [zone redundancy](../reliability/migrate-app-service.md). The JBoss EAP clustering feature is compatible with the zone redundancy feature.
516
516
517
-
### Autoscale Rules
517
+
### Autoscale rules
518
518
519
-
When configuring autoscale rules for horizontal scaling, it's important to remove instances incrementally (one at a time) to ensure that each removed instance can transfer its activity (such as handling a database transaction) to another member of the cluster. When configuring your autoscale rules in the portal to scale down, use the following options:
519
+
When you're configuring autoscale rules for horizontal scaling, it's important to remove instances incrementally (one at a time) to ensure that each removed instance can transfer its activity (such as handling a database transaction) to another member of the cluster. When you're configuring your autoscale rules in the portal to scale down, use the following options:
520
520
521
521
-**Operation**: "Decrease count by"
522
522
-**Cool down**: "5 minutes" or greater
@@ -532,13 +532,13 @@ JBoss EAP is available in the following pricing tiers: F1, P0v3, P1mv3, P2mv3, P
532
532
533
533
## JBoss EAP server lifecycle
534
534
535
-
A JBoss EAP app in App Service goes through five distinct phases before launching the server.
535
+
A JBoss EAP app in App Service goes through five distinct phases before launching the server:
See the following sections for details and opportunities to customize (such as through [app settings](configure-common.md)).
544
544
@@ -579,6 +579,10 @@ See the following sections for details and opportunities to customize (such as t
579
579
- If there are JAR files deployed to the `/home/site/libs` directory, a new global module is created with all of these JAR files.
580
580
- At the end of the phase, App Service runs the custom startup script, if one exists. The search logic for the custom startup script is defined as follows:
581
581
582
+
- If you configured a startup command (for example, through the Azure portal or the Azure CLI), run it; otherwise,
583
+
- If the path `/home/site/scripts/startup.sh` exists, use it; otherwise,
584
+
- If the path `/home/startup.sh` exists, use it.
585
+
582
586
The custom startup command or script runs as the root user (no need for `sudo`), so they can install Linux packages or launch the JBoss CLI to perform more JBoss EAP install/customization commands like creating data sources and installing resource adapters. For information on Ubuntu package management commands, see the [Ubuntu Server documentation](https://documentation.ubuntu.com/server/how-to/software/package-management/). For JBoss CLI commands, see the [JBoss Management CLI Guide](https://docs.redhat.com/en/documentation/red_hat_jboss_enterprise_application_platform/7.4/html-single/management_cli_guide/index#how_to_cli).
583
587
584
588
### 4. App deployment phase
@@ -597,7 +601,7 @@ The startup script deploys apps to JBoss EAP by looking in the following locatio
597
601
- After the deployment steps are complete, the JBoss EAP server is reloaded to apply any changes that require a server reload.
598
602
- After the server reloads, the applications deployed to the JBoss EAP server should be ready to respond to requests.
599
603
- The server runs until the App Service app is stopped or restarted. You can manually stop or restart the App Service app, or you trigger a restart when you deploy files or make configuration changes to the App Service app.
600
-
- If the JBoss EAP server exits abnormally in the `clustering` configuration, a final function called `emit_alert_tx_store_not_empty` is executed. The function checks if the JBoss EAP process left a nonempty transaction store file in disk; if so, an error is logged in the console: `Error: finishing server with non-empty store for node XXXX`. When a new server instance is started, it looks for these nonempty transaction store files to resume the work (see [2. Server launch phase](#2-server-launch-phase)).
604
+
- If the JBoss EAP server exits abnormally in the `clustering` configuration, a final function called `emit_alert_tx_store_not_empty` is executed. The function checks if the JBoss EAP process left a nonempty transaction store file in disk. If so, an error is logged in the console: `Error: finishing server with non-empty store for node XXXX`. When a new server instance is started, it looks for these nonempty transaction store files to resume the work (see [2. Server launch phase](#2-server-launch-phase)).
601
605
602
606
::: zone-end
603
607
@@ -615,7 +619,7 @@ Java developers can customize the server settings, troubleshoot issues, and depl
615
619
* Troubleshooting Tomcat issues: Inevitably, Java developers encounter issues with their Tomcat server, such as performance problems or configuration errors. When you understand the server.xml file and Tomcat's configuration details, developers can quickly diagnose and troubleshoot these issues, which can save time and effort.
616
620
* Deploying applications to Tomcat: To deploy a Java web application to Tomcat, developers need to know how to configure the server.xml file and other Tomcat settings. You need to understand these details to deploy applications successfully and ensure that they run smoothly on the server.
617
621
618
-
When you create an app with built-in Tomcat to host your Java workload (a WAR file or a JAR file), there are certain settings that you get out of the box for Tomcat configuration. You can refer to the [Official Apache Tomcat Documentation](https://tomcat.apache.org/) for detailed information, including the default configuration for Tomcat Web Server.
622
+
When you create an app with built-in Tomcat to host your Java workload (a WAR file or a JAR file), there are certain settings that you get out of the box for Tomcat configuration. You can refer to the [official Apache Tomcat documentation](https://tomcat.apache.org/) for detailed information, including the default configuration for Tomcat Web Server.
619
623
620
624
Additionally, there are certain transformations that are applied on top of the server.xml for Tomcat distribution upon start. These transformations include changes to the **Connector**, **Host**, and **Valve** settings.
621
625
@@ -626,11 +630,11 @@ The latest versions of Tomcat have server.xml (8.5.58 and 9.0.38 onward). Older
Copy file name to clipboardExpand all lines: articles/app-service/includes/configure-language-java/java-variants.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,6 @@ ms.date: 03/27/2025
7
7
8
8
Azure App Service runs Java web applications on a fully managed service in three variants:
9
9
10
-
* Java Standard Edition (SE) - Can run an app deployed as a Java Archive (JAR) package that contains an embedded server (such as Spring Boot, Quarkus, Dropwizard, or an app with an embedded Tomcat or Jetty server).
11
-
* Tomcat - The built-in Tomcat server can run an app deployed as a web application archive (WAR) package.
12
-
* JBoss Enterprise Application Platform (EAP) - The built-in JBoss EAP server can run an app deployed as a WAR or enterprise archive (EAR) package. Supported for Linux apps in a set of pricing tiers which includes Free, Premium v3, and Isolated v2.gti
10
+
* Java Standard Edition (SE): Can run an app deployed as a Java Archive (JAR) package that contains an embedded server (such as Spring Boot, Quarkus, Dropwizard, or an app with an embedded Tomcat or Jetty server).
11
+
* Tomcat: The built-in Tomcat server can run an app deployed as a web application archive (WAR) package.
12
+
* JBoss Enterprise Application Platform (EAP): The built-in JBoss EAP server can run an app deployed as a WAR or enterprise archive (EAR) package. Supported for Linux apps in a set of pricing tiers which includes Free, Premium v3, and Isolated v2.gti
0 commit comments