JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net

The open source
grid computing

 Home   About   Features   Download   Documentation   Forums 
October 20, 2019, 12:38:11 AM *
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: JPPF + JPDA  (Read 413 times)


  • JPPF Padawan
  • *
  • Posts: 3
« on: November 22, 2017, 12:49:37 AM »

We have hit a stumbling block in a project that combines JPPF and JPDA.  In essence, we run a  Java program P over and over with different inputs.  As P executes, we monitor it and record its behaviour.  To do this, we use JPDA: a LaunchingConnector starts a separate JVM which our application monitors using the JVM's built-in debugging support.

We want to use JPPF to distribute this task (running P over and over).  It works a treat for our monitoring application, but the VM spawned by JPDA use the usual class loader and tries to load P from the nodes' local disks, instead of from the server.  Is there an existing solution to this use-case?  In other words, is there (a hopefully easy) way to start a VM with a JPPFClassLoader without starting a new node?


  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
« Reply #1 on: November 22, 2017, 06:51:18 PM »


Unfortunately, you can only use the JPPF distributed class loader from within a node.
However, I believe it is still possible to accomplish what you need, by submitting a task that wraps the process to monitor (calling its main() method), from the task that does the monitoring - that means submitting a job from a task executing in a node.

The idea is to start a slave node exclusively for this task, using the provisioning facilty and then submit the task with a job execution policy to ensure it can only execute in that node.

Basically, the flow is as follows:
- this client appilcation submits a MonitorTask to the JPPF client
- the MonitorTask starts a slave node using the provisioning faciltiy, with all appropriate JVM options
- it also starts a new thread which performs the monitoring
- it then submits a task wrapping the process to monitor and ensures that it can only execute on the slave node
- when the task is completed it stops the monitoring thread and returns the result back to the client application

I implemented a small sample which does what is described above and attached it to this post for your convenience. I hope the code and comments are sufficiently clear. If not, please do not hesitate to get back to us.



  • JPPF Padawan
  • *
  • Posts: 3
« Reply #2 on: November 23, 2017, 05:57:29 AM »

Thank you very much!  This is very kind of you.  I shall have a good look at the code.
Pages: [1]   Go Up
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at Fast, secure and Free Open Source software downloads