2 Replies Latest reply on Aug 14, 2011 10:04 PM by fjjiaboming

    Java Process Pool

    nawkboy

      Does anyone know of a convenient way to create a Java process pool. A thread pool won't work as I am trying to pool some JNI code wrapping a C library that isn't thread safe.

      I would rather not have to create my own pooling mechanism.

      If I must create my own pooling mechanism, what is the best way to perform interprocess communication between processes on the same machine? Should I use RMI, something in the NIO package, etc?

        • 1. Re: Java Process Pool

          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.

          Regards,
          Adrian

          • 2. Re: Java Process Pool
            fjjiaboming

            Have more information about Java Process Pool .?

             

            I have some code to handle JNI code that causes the JVM exits.