jeudi 26 mars 2015

Java : Run a new JVM and send all new requests for a particular jar to that JVM

So I have a jar, say "A.jar". I have a Spring MVC project from whose controller I will be calling this jar to execute a piece of code based on some parameters.


I wanted the jar call to be "out of process" so that it has ample amount of resources and even in case of failure of the first JVM, this keeps on running.


Currently, I am using a ProcessBuilder and the controller generates a new process for each request. My requirement is that I want one separate process/JVM for the jar execution, to which I can pass parameters. In case of multiple requests, they should line up as a queue and processing should be done accordingly.


P.S. Still in college, first question on stackoverflow.


Aucun commentaire:

Enregistrer un commentaire