my glassfish instance it's mixing the responses(some times send the response of one client to another).
Oracle certified JPA Developer (1Z0-898),Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
Oracle certified JPA Developer (1Z0-898),Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
when clients try to use some Web Service funtcion instead of get an SOAP response they get and Javascript/Jquery code
Abhay Agarwal wrote:Sorry for coming back with another query [ I really wanted to know/solve why this error is happening] -
Do you use any web server infront of Glassfish server for your applications ? Are you using Load balancing stuff/feature for application deployed in Glassfish ? if yes.. how Load balancer is configured ? using mod_proxy ? mod_JK ? any other way ? Are you using singleLoadbalancer for all these 3 Applications ? if yes.. how Load balancer is configured ? using mod_proxy ? mod_JK ? any other way ?
Problem may lie in your Web Server than in Glassfish server.
Please reply
Abhay Agarwal wrote:I do not see any cookie settings.
Try adding cookie settings in HA Proxy configuration
a. Add cookie SERVERID insert indirect nocache line , just after balance roundrobin line in HAProxy.
This line tells HAProxy to setup a cookie called SERVERID only if the user did not come with such cookie. It is going to append a “Cache-Control: nocache” as well, since this type of traffic is supposed to be personnal and we don’t want any shared cache on the internet to cache it
b. Add cookie string in two server lines
server server1 10.0.0.121:8080 check cookie server1
server server2 10.0.0.122:8080 check cookie server2
cookie server1 or cookie server2 provides the value of the cookie inserted by HAProxy. When the client comes back, then HAProxy knows directly which server to choose for this client.
If you want to use application specific cookie , you can add JSESSIONID. Just replace cookie SERVERID insert indirect nocache with cookie JSESSIONID insert indirect nocache.
More details around Cookie usage can be found http://blog.exceliance.fr/2012/03/29/load-balancing-affinity-persistence-sticky-sessions-what-you-need-to-know/
Try adding this cookie persistence to see whether it solves your issue.
Thanks