I’m using java RMI to implement a distributed bank system where each server represents a branch with it data stored on its own database
when closing a server/branch , the accounts stored in its database should be transferred to another server/branch
how to execute the code of this task just before the server is closed
any help is appreciated and thanks in advance
I’m using java RMI to implement a distributed bank system where each server represents
Share
Maybe shutdownHook will be good for you.
Example code: