I am using Jelastic to easily deploy a cluster of Glassfish servers. As load balancer, a NGINX server is also placed front of this cluster. Basically, each request goes first to the NGINX server that chooses to which Glassfish server to send the request.
Now I've deployed a simple application with a remote EJB on the cluster by following this tutorial. It works fine. Everytime I launch the application, I get an instance of the EJB from a different machine. However, all calls to this EJB will always be processed by the same machine until I restart the application.
What I would like is, everytime I call a method from the remote EJB, it is processed by a different machine in the cluster. What I did is:
- Remove the sticky option in the NGINX conf file;
- Add <per-request-load-balancing>true</per-request-load-balancing> to the glassfish-ejb-jar.xml
Unfortunately, problem is still remaining... Someone would have any clue why? Thank you