Java client usage when having 2 web apps


I have 2 web applications deployed on the same jvm. One is the admin that
creates indexes and the other one is the public site for searching. When
using the java API and this syntax. I would like to have ES woking as an
embeded server without having to use TransportClient

Node node = nodeBuilder().local(true).node();
Client client = node.client();

The first web app that will invoke the client will get a an instance of the
client. As soon as i invoke the client from the second web application, ES
starts in an infinite loop. I dont have any logs for now but is it something
you already experienced ?