java increase xmx dynamically at runtime
- by Tomer
Hi,
I have a jvm server in my machine, now I want to have 2 apservers of mine sitting in same machine, however I want the standby one to have a really low amount of memory allocated with xmx because its passive, one the main server (active) goes down I want to allocate more memory to my passive server which is already up without restarting it (I have have them both having too much xmx - note they would consume memory at startup and I cant allow possibility of outOfMemory).
So I want passive - low xmx
once active goes down I want my passive to receive much more xmx.
is there a way for me to achieve that.
Thanks