# How to use java agent in Jboss for specific application

**URL:** <https://discuss.elastic.co/t/how-to-use-java-agent-in-jboss-for-specific-application/177281>\
**Category:** APM\
**Created:** [April 17, 2019, 11:18am UTC](https://discuss.elastic.co/t/how-to-use-java-agent-in-jboss-for-specific-application/177281 "2019-04-17T11:18:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kishore\_Raj\_vj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kishore_raj_vj/32/44324_2.png) [@Kishore\_Raj\_vj](https://discuss.elastic.co/u/Kishore_Raj_vj)\
**Post date:** [April 17, 2019, 11:18am UTC](https://discuss.elastic.co/t/how-to-use-java-agent-in-jboss-for-specific-application/177281/1 "2019-04-17T11:18:27Z")

</div>

Hello,

Can anyone clarify using of java agent for specific application. so far it is providing monitoring for all the application which is deployed.

I have used the following in bin/standalone.conf for Jboss.

export JAVA\_OPTS="$JAVA\_OPTS -javaagent:/path/to/elastic-apm-agent-\<version\>.jar"  
export JAVA\_OPTS="$JAVA\_OPTS -Delastic.apm.service\_name=my-cool-service"  
export JAVA\_OPTS="$JAVA\_OPTS -Delastic.apm.application\_packages=org.example,org.another.example"  
export JAVA\_OPTS="$JAVA\_OPTS -Delastic.apm.server\_urls=http://localhost:8200"

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [April 17, 2019, 11:56am UTC](https://discuss.elastic.co/t/how-to-use-java-agent-in-jboss-for-specific-application/177281/2 "2019-04-17T11:56:23Z")

</div>

Hi and thanks for your question.

you could use the [`ignore_urls`](https://www.elastic.co/guide/en/apm/agent/java/current/config-http.html#config-ignore-urls) option to ignore all urls which are mapped to the applications you don't want to monitor. For example if you have two applications which are mapped to `/foo` and `/bar` and you don't want to monitor the `bar` application, you can set `ignore_urls=/bar*`.

I hope this helps,  
Felix

---

<div class="post-metadata">

**Author:** ![Kishore\_Raj\_vj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kishore_raj_vj/32/44324_2.png) [@Kishore\_Raj\_vj](https://discuss.elastic.co/u/Kishore_Raj_vj)\
**Post date:** [April 17, 2019, 1:40pm UTC](https://discuss.elastic.co/t/how-to-use-java-agent-in-jboss-for-specific-application/177281/3 "2019-04-17T13:40:56Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2019, 9:40am UTC](https://discuss.elastic.co/t/how-to-use-java-agent-in-jboss-for-specific-application/177281/4 "2019-05-08T09:40:57Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
