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-apm.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,15 +69,22 @@ To enable via the Azure CLI, you need to create an Application Insights resource
69
69
70
70
# [Linux](#tab/linux)
71
71
72
+
::: zone pivot="java-jboss"
73
+
74
+
> [!NOTE]
75
+
> The latest [New Relic documentation](https://docs.newrelic.com/install/java/?deployment=appServer&framework=jboss) lists JBoss EAP support up to 7.x. JBoss EAP 8.x is not yet supported.
76
+
77
+
::: zone-end
78
+
72
79
1. Create a NewRelic account at [NewRelic.com](https://newrelic.com/signup)
73
-
2. Download the Java agent from NewRelic. It has a file name similar to *newrelic-java-x.x.x.zip*.
80
+
2. [Download the Java agent from NewRelic](https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip).
74
81
3. Copy your license key, you need it to configure the agent later.
75
82
4. [SSH into your App Service instance](configure-linux-open-ssh-session.md) and create a new directory */home/site/wwwroot/apm*.
76
83
5. Upload the unpacked NewRelic Java agent files into a directory under */home/site/wwwroot/apm*. The files for your agent should be in */home/site/wwwroot/apm/newrelic*.
77
84
6. Modify the YAML file at */home/site/wwwroot/apm/newrelic/newrelic.yml* and replace the placeholder license value with your own license key.
78
85
7. In the Azure portal, browse to your application in App Service and create a new Application Setting.
79
86
80
-
::: zone pivot="java-javase"
87
+
::: zone pivot="java-javase,java-jboss"
81
88
82
89
Create an environment variable named `JAVA_OPTS` with the value `-javaagent:/home/site/wwwroot/apm/newrelic/newrelic.jar`.
83
90
@@ -89,12 +96,6 @@ To enable via the Azure CLI, you need to create an Application Insights resource
89
96
90
97
::: zone-end
91
98
92
-
::: zone pivot="java-jboss"
93
-
94
-
For **JBoss EAP**, `[TODO]`.
95
-
96
-
::: zone-end
97
-
98
99
# [Windows](#tab/windows)
99
100
100
101
1. Create a NewRelic account at [NewRelic.com](https://newrelic.com/signup)
@@ -117,16 +118,21 @@ To enable via the Azure CLI, you need to create an Application Insights resource
117
118
118
119
::: zone-end
119
120
120
-
::: zone pivot="java-jboss"
121
+
---
121
122
122
-
For **JBoss EAP**, `[TODO]`.
123
+
::: zone pivot="java-javase,java-jboss"
123
124
124
-
::: zone-end
125
+
> [!NOTE]
126
+
> If you already have an environment variable for `JAVA_OPTS`, append the `-javaagent:/...` option to the end of the current value.
125
127
126
-
---
128
+
::: zone-end
129
+
130
+
::: zone pivot="java-tomcat"
127
131
128
132
> [!NOTE]
129
-
> If you already have an environment variable for `JAVA_OPTS` or `CATALINA_OPTS`, append the `-javaagent:/...` option to the end of the current value.
133
+
> If you already have an environment variable for `CATALINA_OPTS`, append the `-javaagent:/...` option to the end of the current value.
134
+
135
+
::: zone-end
130
136
131
137
## Configure AppDynamics
132
138
@@ -152,7 +158,7 @@ To enable via the Azure CLI, you need to create an Application Insights resource
152
158
153
159
::: zone pivot="java-jboss"
154
160
155
-
For **JBoss EAP**, `[TODO]`.
161
+
<!-- For **JBoss EAP**, `[TODO]`. -->
156
162
157
163
::: zone-end
158
164
@@ -176,31 +182,25 @@ To enable via the Azure CLI, you need to create an Application Insights resource
176
182
177
183
::: zone-end
178
184
179
-
::: zone pivot="java-jboss"
180
-
181
-
For **JBoss EAP**, `[TODO]`.
182
-
183
-
::: zone-end
184
-
185
185
---
186
186
187
187
## Configure Datadog
188
188
189
189
# [Linux](#tab/linux)
190
-
* The configuration options are different depending on which Datadog site your organization is using. See the official [Datadog Integration for Azure Documentation](https://docs.datadoghq.com/integrations/azure/)
190
+
The configuration options are different depending on which Datadog site your organization is using. See the official [Datadog Integration for Azure Documentation](https://docs.datadoghq.com/integrations/azure/)
191
191
192
192
# [Windows](#tab/windows)
193
-
* The configuration options are different depending on which Datadog site your organization is using. See the official [Datadog Integration for Azure Documentation](https://docs.datadoghq.com/integrations/azure/)
193
+
The configuration options are different depending on which Datadog site your organization is using. See the official [Datadog Integration for Azure Documentation](https://docs.datadoghq.com/integrations/azure/)
194
194
195
195
---
196
196
197
197
## Configure Dynatrace
198
198
199
199
# [Linux](#tab/linux)
200
-
* Dynatrace provides an [Azure Native Dynatrace Service](https://www.dynatrace.com/monitoring/technologies/azure-monitoring/). To monitor Azure App Services using Dynatrace, see the official [Dynatrace for Azure documentation](https://docs.datadoghq.com/integrations/azure/)
200
+
Dynatrace provides an [Azure Native Dynatrace Service](https://www.dynatrace.com/monitoring/technologies/azure-monitoring/). To monitor Azure App Services using Dynatrace, see the official [Dynatrace for Azure documentation](https://docs.datadoghq.com/integrations/azure/)
201
201
202
202
# [Windows](#tab/windows)
203
-
* Dynatrace provides an [Azure Native Dynatrace Service](https://www.dynatrace.com/monitoring/technologies/azure-monitoring/). To monitor Azure App Services using Dynatrace, see the official [Dynatrace for Azure documentation](https://docs.datadoghq.com/integrations/azure/)
203
+
Dynatrace provides an [Azure Native Dynatrace Service](https://www.dynatrace.com/monitoring/technologies/azure-monitoring/). To monitor Azure App Services using Dynatrace, see the official [Dynatrace for Azure documentation](https://docs.datadoghq.com/integrations/azure/)
Copy file name to clipboardExpand all lines: articles/app-service/configure-language-java-data-sources.md
+15-31Lines changed: 15 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ For more information, see the [Spring Boot documentation on data access](https:/
41
41
::: zone pivot="java-tomcat"
42
42
43
43
> [!TIP]
44
-
> By default, the Linux Tomcat containers can automatically configure shared data sources for you in the Tomcat server. The only thing for you to do is add an app setting that contains a valid JDBC connection string to an Oracle, SQL Server, PostgreSQL, or MySQL database (including the connection credentials), and App Service automatically adds the cooresponding shared database to */usr/local/tomcat/conf/context.xml* for you, using an appropriate driver available in the container. For an end-to-end scenario using this approach, see [Tutorial: Build a Tomcat web app with Azure App Service on Linux and MySQL](tutorial-java-tomcat-mysql-app.md).
44
+
> By default, the Linux Tomcat containers can automatically configure shared data sources for you in the Tomcat server. The only thing for you to do is add an app setting that contains a valid JDBC connection string to an Oracle, SQL Server, PostgreSQL, or MySQL database (including the connection credentials), and App Service automatically adds the corresponding shared database to */usr/local/tomcat/conf/context.xml*, using an appropriate driver available in the container. For an end-to-end scenario using this approach, see [Tutorial: Build a Tomcat web app with Azure App Service on Linux and MySQL](tutorial-java-tomcat-mysql-app.md).
45
45
46
46
These instructions apply to all database connections. You need to fill placeholders with your chosen database's driver class name and JAR file. Provided is a table with class names and driver downloads for common databases.
There are three core steps when [registering a data source with JBoss EAP](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/datasource_management): uploading the JDBC driver, adding the JDBC driver as a module, and registering the module. App Service is a stateless hosting service, so the configuration commands for adding and registering the data source module must be scripted and applied as the container starts.
380
+
> [!TIP]
381
+
> By default, the Linux JBoss containers can automatically configure shared data sources for you in the JBoss server. The only thing for you to do is add an app setting that contains a valid JDBC connection string to an Oracle, SQL Server, PostgreSQL, or MySQL database (including the connection credentials), and App Service automatically adds the corresponding shared data source, using an appropriate driver available in the container. For an end-to-end scenario using this approach, see [Tutorial: Build a JBoss web app with Azure App Service on Linux and MySQL](tutorial-java-jboss-mysql-app.md).
381
382
382
-
1. Obtain your database's JDBC driver.
383
-
2. Create an XML module definition file for the JDBC driver. The following example shows a module definition for PostgreSQL.
383
+
There are three core steps when [registering a data source with JBoss EAP](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/datasource_management):
1. Put your JBoss CLI commands into a file named `jboss-cli-commands.cli`. The JBoss commands must add the module and register it as a data source. The following example shows the JBoss CLI commands for PostgreSQL.
389
+
App Service is a stateless hosting service, so you must put these steps into a startup script and run it each time the JBoss container starts. Using PostgreSQL, MySQL, and SQL Database as an examples:
1. Create a startup script, `startup_script.sh` that calls the JBoss CLI commands. The following example shows how to call your `jboss-cli-commands.cli`. Later, you'll configure App Service to run this script when the container starts.
1. Using an FTP client of your choice, upload your JDBC driver, `jboss-cli-commands.cli`, `startup_script.sh`, and the module definition to `/site/deployments/tools/`.
417
-
2. Configure your site to run `startup_script.sh` when the container starts. In the Azure portal, navigate to **Configuration** > **General Settings** > **Startup Command**. Set the startup command field to `/home/site/deployments/tools/startup_script.sh`. **Save** your changes.
To confirm that the datasource was added to the JBoss server, SSH into your webapp and run `$JBOSS_HOME/bin/jboss-cli.sh --connect`. Once you're connected to JBoss, run the `/subsystem=datasources:read-resource` to print a list of the data sources.
0 commit comments