How can two JVM communicate?

Hi, a shared DB. If simply want two JVMs to be communicated, RMI is the best option. Another high level communication approach is JMS Java Message Service...