There is an application that will need to have something like a look up table. This application can be started many times with different configurations. Is there a way to share a datastructure across JVMs. static
would be valid within a JVM. Having a database would solve the issue. However, is there something simpler and fast?
You might use a file
. Write the object to a file. There is no such thing as an object shared within JVMs because the life cycle of an Object is defined for and within a JVM.
File IO is usually faster than DB operations and simpler as well. But on the downside, ACID
properties are not guaranteed by files and there could be inconsistencies if multiple processes try to read / write on the same file.