# Deploy in Jboss

**URL:** <https://discuss.elastic.co/t/deploy-in-jboss/16286>\
**Category:** Elasticsearch\
**Created:** [March 11, 2014, 11:41am UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286 "2014-03-11T11:41:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Graham](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Craig\_Graham](https://discuss.elastic.co/u/Craig_Graham)\
**Post date:** [March 11, 2014, 11:41am UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/1 "2014-03-11T11:41:50Z")

</div>

I have just started working with ElasticSearch while creating a POC search  
application at work. I was wondering if anyone had experimented with  
running ElasticSearch in JBoss and could provide some direction as to how  
to accomplish this?

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30d03aed-0289-479b-8206-e79ea2fb3977%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30d03aed-0289-479b-8206-e79ea2fb3977%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 11, 2014, 11:46am UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/2 "2014-03-11T11:46:51Z")

</div>

I did some years ago.  
I found that using a Transport Client was easier for me.

If it's for a POC, I would probably go for a an embedded Node in the web application.  
This is what we did in [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/) project but I did not test it on JBoss, only tomcat.

Easy to start: just deploy a war and that is.

May be you have more detailed questions or issues so far?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 11 mars 2014 à 12:41:53, Craig Graham ([grahamcr.gvsu@gmail.com](mailto:grahamcr.gvsu@gmail.com)) a écrit:

I have just started working with ElasticSearch while creating a POC search application at work. I was wondering if anyone had experimented with running ElasticSearch in JBoss and could provide some direction as to how to accomplish this?

## Thanks!

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30d03aed-0289-479b-8206-e79ea2fb3977%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30d03aed-0289-479b-8206-e79ea2fb3977%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.531ef7ab.257130a3.b095%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.531ef7ab.257130a3.b095%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Craig\_Graham](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Craig\_Graham](https://discuss.elastic.co/u/Craig_Graham)\
**Post date:** [March 11, 2014, 12:01pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/3 "2014-03-11T12:01:44Z")

</div>

Hi David,

Thanks for the quick response. For the purposes of this POC we need to  
mock an environment where ElasticSearch is running similar to how it does  
"out of the box" in Jetty, except use JBoss instead. We would like to have  
an instance of JBoss which we can deploy ElasticSearch to and interact with  
it using the Java API. I have been looking around for any information about  
the possibility of deploying ElasticSearch in JBoss and how to do so if it  
is possible, but so far I haven't found much.

Thanks Again!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ef0e74e3-7c17-461f-9772-83e3188e48b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ef0e74e3-7c17-461f-9772-83e3188e48b5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [March 11, 2014, 12:08pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/4 "2014-03-11T12:08:05Z")

</div>

Craig,

out of curiosity, what is the advantage of such deployment? Why you want to  
run JBoss server (or EAP) for each Elasticsearch node?

Regards,  
Lukáš

On Tue, Mar 11, 2014 at 1:01 PM, Craig Graham [grahamcr.gvsu@gmail.com](mailto:grahamcr.gvsu@gmail.com)wrote:

> Hi David,
> 
> Thanks for the quick response. For the purposes of this POC we need to  
> mock an environment where Elasticsearch is running similar to how it does  
> "out of the box" in Jetty, except use JBoss instead. We would like to have  
> an instance of JBoss which we can deploy Elasticsearch to and interact with  
> it using the Java API. I have been looking around for any information about  
> the possibility of deploying Elasticsearch in JBoss and how to do so if it  
> is possible, but so far I haven't found much.
> 
> Thanks Again!
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ef0e74e3-7c17-461f-9772-83e3188e48b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ef0e74e3-7c17-461f-9772-83e3188e48b5%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/ef0e74e3-7c17-461f-9772-83e3188e48b5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ef0e74e3-7c17-461f-9772-83e3188e48b5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAO9cvUYRp2HUA3t%3DCghq%3DcwH9Pwr3V\_ivZBnSbXCQo52mkJfvA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO9cvUYRp2HUA3t%3DCghq%3DcwH9Pwr3V_ivZBnSbXCQo52mkJfvA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Craig\_Graham](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Craig\_Graham](https://discuss.elastic.co/u/Craig_Graham)\
**Post date:** [March 11, 2014, 12:18pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/5 "2014-03-11T12:18:56Z")

</div>

Hi Lukáš,

Thanks for your reply. I don't think there is really any advantage. The  
company I work for likes to run everything on JBoss, therefore in order to  
make them happy we always have to explore JBoss as an option. The web  
application I am working on as a POC will run on JBoss and I am hoping to  
find a way to use ElasticSearch with it. I guess the better question I  
should have asked to be begin with is if anyone had any thoughts on what  
the best setup to have when developing a Java-Based web application running  
on JBoss?

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9ebff1ca-6c64-46f0-8205-c0fffe9ea3ff%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9ebff1ca-6c64-46f0-8205-c0fffe9ea3ff%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 11, 2014, 12:19pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/6 "2014-03-11T12:19:22Z")

</div>

Craig, for a POC, you can deploy a WAR into Wildfly (JBoss) with a  
TransportClient as a singleton, for example in a ServletContextListener, it  
works perfectly for me.

You should not depend Wildfly instances on ES nodes. If frontend is not  
dependent on backend, you can scale out both independently, Wildfly and ES.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGKv7RXAoAuUoBp4QoOYoWhCqTa7eWOVSsgq9i841iQEw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGKv7RXAoAuUoBp4QoOYoWhCqTa7eWOVSsgq9i841iQEw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Craig\_Graham](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Craig\_Graham](https://discuss.elastic.co/u/Craig_Graham)\
**Post date:** [March 11, 2014, 12:26pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/7 "2014-03-11T12:26:38Z")

</div>

Hi Jörg,

> Thanks for the suggestion. I don't think I will be able to speak at the  
> same level of understanding that you have in regards to this issue. Are you  
> suggesting using an approach such  
> as [GitHub - elastic/elasticsearch-transport-wares: Servlet transport for Elasticsearch](https://github.com/elasticsearch/elasticsearch-transport-wares) to  
> include ES in the same .war file as my Java web application?

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b6db63a3-1805-452a-89ae-16d682e38d05%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b6db63a3-1805-452a-89ae-16d682e38d05%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [March 11, 2014, 12:31pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/8 "2014-03-11T12:31:20Z")

</div>

Craig,

if you want you can also check how we do it for EAP6,  
[GitHub - searchisko/searchisko: Secure REST service to index, search, retrieve and aggregate content from heterogeneous sources.](https://github.com/searchisko/searchisko) (we use CDI)  
What we do is similar to what David already mentioned, we use embedded Node  
for development (works also on OpenShift) and TransportClient for  
production where Elasticsearch cluster can be scaled independently.

Regards,  
Lukáš

On Tue, Mar 11, 2014 at 1:26 PM, Craig Graham [grahamcr.gvsu@gmail.com](mailto:grahamcr.gvsu@gmail.com)wrote:

> Hi Jörg,
> 
> > Thanks for the suggestion. I don't think I will be able to speak at the  
> > same level of understanding that you have in regards to this issue. Are you  
> > suggesting using an approach such as  
> > [GitHub - elastic/elasticsearch-transport-wares: Servlet transport for Elasticsearch](https://github.com/elasticsearch/elasticsearch-transport-wares) to  
> > include ES in the same .war file as my Java web application?
> 
> Thanks!
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/b6db63a3-1805-452a-89ae-16d682e38d05%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b6db63a3-1805-452a-89ae-16d682e38d05%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/b6db63a3-1805-452a-89ae-16d682e38d05%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b6db63a3-1805-452a-89ae-16d682e38d05%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAO9cvUazz\_CXwgvt7L8ntY4%2BxxfVxpsZ63hRTw%3DAT3qV666qKg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO9cvUazz_CXwgvt7L8ntY4%2BxxfVxpsZ63hRTw%3DAT3qV666qKg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 11, 2014, 12:32pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/9 "2014-03-11T12:32:01Z")

</div>

Craig, the war-es plugin uses a similar servlet-based approach. It is a  
disguised client node, not a TransportClient. The plugin is not ready for  
deployment as a WAR. You have to fix some of the code by yourself, maybe  
this helps:

> <https://github.com/elastic/elasticsearch-transport-wares/pull/8>

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoESjas%3DaoBzyVwi0Xb6SUBY%2B3LPmpkGyWGFqZrWiSQFzQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoESjas%3DaoBzyVwi0Xb6SUBY%2B3LPmpkGyWGFqZrWiSQFzQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Craig\_Graham](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Craig\_Graham](https://discuss.elastic.co/u/Craig_Graham)\
**Post date:** [March 11, 2014, 12:50pm UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/10 "2014-03-11T12:50:00Z")

</div>

> Jörg and Lukáš,

Thank you both for your suggestions, they are very helpful. Looks like I  
have more research to do!

Thanks Again!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6a0d1bbc-5b1b-4c80-a239-a1a28e4c357f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6a0d1bbc-5b1b-4c80-a239-a1a28e4c357f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:44am UTC](https://discuss.elastic.co/t/deploy-in-jboss/16286/11 "2017-07-06T01:44:13Z")

</div>


