Iceglaze
Iceglaze

Reputation: 349

Could we use EventObject to communicate among different JVMs?

Is it possible to register Event in one JVM and let the application in another JVM to consume it?

Upvotes: 1

Views: 37

Answers (1)

Rajeev Sampath
Rajeev Sampath

Reputation: 2747

No. The reason is, each JVM instance is a separate process, hence there is no sharing of the stacks, heaps etc which in turn means the events (objects) can not be shared. So the events fired by one application will not be visible to another application running in another JVM.

So you may need to use one of the commonly used ways of inter-process communication (to make the two JVMs talk to each other) to implement your requirement. Some popular approaches are described in this query.

Upvotes: 1

Related Questions