I have a webapp that runs on two balanced tomcat load balanced servers. What is the best way for an application to determine which server it is running on?
So far, I can tell with sessionid which server it is running on (how .jvm1 and .jvm2 are added), how can I get similar information in a background task (scheduled using Spring @Scheduled annotations)?
source
share