JPPF Issue Tracker
Please log in to bookmark issues
CLOSED  Bug report JPPF-166  -  Alternate configuration source incorrectly handled
Posted Jul 10, 2013 - updated Dec 27, 2014
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Category
  • Resolution
  • Priority
  • Reproducability
  • Severity
  • Targetted for
    icon_milestones.png JPPF 3.3.x
Issue description
When specifying an alternate configuration source via the system property -Djppf.config.plugin=mypackage.MyConfigSource, the specified configuration source is not taken into account by the driver or node.

This is caused by the way we launch the drivers and nodes. In effect, each driver or node is launched as 2 processes, such that the 1st process launches the other and is able to restart it when it terminates with exit code 2. The problem here is that the first process reads the configuration and handles it properly, but, when launching the 2nd process, it does not add the -Djppf.config.plugin= system property to its command line, which means that the real driver/node isn't aware of the alternate configuration source.

A workaround is to have the configuration source implementation add the following: jppf.jvm.options = -Djppf.config.plugin=mypackage.MyConfigSource
Steps to reproduce this issue
  • use the following configuration source implementation:
package test;
import org.jppf.utils.JPPFConfiguration.ConfigurationSource;
public class MyConfigurationSource implements ConfigurationSource {
  public InputStream getPropertyStream() throws IOException {
    e.printStackTrace(new Exception("getting the configuration source"));
    StringBuilder sb = new StringBuilder();
    sb.append("jppf.server.port = 11111\n");
    sb.append(" = 11198\n");
    sb.append("jppf.discovery.enabled = false\n");
    // ... add other properties ...
    return new ByteArrayInputStream(sb.toString().getBytes());
  • in the script that launches the driver add the classpath to this implementation, then launch the driver
  • You will see the following trace:
java.lang.Exception: getting the configuration source
  at test.MyConfigurationSource.getPropertyStream(
  at org.jppf.utils.JPPFConfiguration.getConfigurationStream(
  at org.jppf.utils.JPPFConfiguration.getStream(
  at org.jppf.utils.JPPFConfiguration.loadProperties(
  at org.jppf.utils.JPPFConfiguration.getProperties(
  at org.jppf.server.DriverLauncher.main(
  • we can see that the main class is org.jppf.server.DriverLauncher: this is the class which launches the 2nd process (which is the actual JPPF driver), whose main class is org.jppf.server.JPPFDriver

Comment posted by
Jul 10, 08:39
Fixed. Changes committed to SVN:

The issue was updated with the following change(s):
  • This issue has been closed
  • The status has been updated, from Confirmed to Closed.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.
  • Information about the user working on this issue has been changed, from lolo4j to Not being worked on.