We have a weblogic server (11g), hosting a web application. This is a clustered environment of 4 managed server nodes (2 per machine). Whenever the server is restarted, it is done in pairs (2 nodes first and then the next 2 nodes), in order to ensure business continuity. However the load balancer (external) redirects the requests fine till the server is turned to RUNNING state. Immediately after this state change of server, the LB addresses the requests to the server. However until the webapplication is loaded completely, the server is incapable of servicing requests. This results in a lot of failure scenarios. The reason is the server turns to RUNNING state even before the web application is completely loaded?
We tried to update the state of the server programmatically through ServerRuntime MBean inside the servlet. (ADMIN/STANDBY mode at the start of the servlet and at the end change it to RUNNING mode). But once the servlet is changed to ADMIN mode, further processing of the servlet stopped. Hence the state cannot be changed back to RUNNING state.
Does anyone have an alternative solution to this issue?
Note: We are starting the weblogic server using command prompt.