I am trying to find out the interprocess communication mechanism used by the Java Attach API on the main operating systems, but I can't seem to find much reference to the underlying mechanism.
The only mention I found was here where it refers to the DOORS interprocess communication mechanism developed some time ago by Sun. But I doubt this is used on Windows or Mac. Most of the articles describe the Java Attach API and how shared libraries / DLLs are loaded, but stop short of stating how communication between say jvisualvm and a local JVM process actually works.
Here there is a mention that tools.jar
and libattach.so
(on Unix systems) or attach.dll
(on Windows) are responsible to support the Attach API, but I couldn't find much details of how they work internally.
So how does the interprocess communication for the Java Attach API work on each of the mainstream operating systems? That is, Windows, Mac OSX and Linux.
Seems this is implemented on top of the Java Platform Debugger Architecture (JPDA) (as Elliott Frisch indicated).
On Windows OS, a Shared Memory transport is used.
On Linux based systems, a Socket transport is used.
More details can be found here.