How can we guarantee that in a clustered environment there is one instance of the class

How can we guarantee that in a clustered environment there is one instance of the class? Class Serializable.

+3
source share
3 answers

You need to correctly implement the readResolve method of your singleton class.

I think terracotta will help.

This link has additional help http://forums.terracotta.org/forums/posts/list/771.page

+2
source

Use a container that provides cloud single point applications, for example. Seam, Spring, etc.

+2
source
  • , .
  • , RemoteFactory, .
0
source

Source: https://habr.com/ru/post/1755292/


All Articles