Write a jca adaptor. This is the prefered mechanism
for writing portable legacy integration.
The application is responsible for the pool implementation.
The usual mechanism for IPC is sockets (local sockets should be optimized) you can use NIO if you understand
it only works with java1.4
e.g. This is how databases are integrated into jboss.
Have more information about Java Process Pool .?
I have some code to handle JNI code that causes the JVM exits.