JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
enhancement_small.png
CLOSED  Enhancement JPPF-69  -  Minimize usage of static fields/instances in JPPF
Posted Sep 19, 2012 - updated Dec 27, 2014
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Enhancement
  • Status
     
    Closed
  • Assigned to
     jandam
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     jandam
  • Owned by
    Not owned by anyone
  • Category
    Other
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPPF 3.3
Issue description
JPPF uses lot of calls of JPPFConfiguration.getProperties(), JPPFDriver.getInstance() and others. These calls and static fields for mutable JPPF instances should be eliminated. Main reason is to support independent configurations for every JPPFClient instance. Current implenetation initializes some parameters during creating first instance of JPPFClient. So when client is closed and then created with new configuration parameters some stay unchanged from old instance.

#3
Comment posted by
 jandam
Sep 19, 13:29
There is 148 occurrences of JPPFConfiguration.getProperties(). 18x JPPFDriver.getInstance(), ...
#4
Comment posted by
 jandam
Sep 19, 14:38
Total unique 12 places that call JPPFConfiguration.getProperties(). 24 standard, 2 broadcast jobs. Configuration: C-D1-N1
       1 - org.jppf.client.JPPFClient.<init>(JPPFClient.java:76)
       1 - org.jppf.client.BaseJPPFClientConnection.<clinit>(BaseJPPFClientConnection.java:64)
       1 - org.jppf.client.BaseJPPFClientConnection.<init>(BaseJPPFClientConnection.java:100)
       1 - org.jppf.server.scheduler.bundle.spi.JPPFBundlerFactory.createBundlerFromJPPFConfiguration(JPPFBundlerFactory.java:109)
       2 - org.jppf.client.AbstractClientConnectionHandler.<init>(AbstractClientConnectionHandler.java:95)
       2 - org.jppf.comm.socket.SocketInitializerImpl.initializeSocket(SocketInitializerImpl.java:98)
       1 - org.jppf.serialization.JPPFObjectStreamFactory.initializeBuilder(JPPFObjectStreamFactory.java:72)
    2307 - org.jppf.data.transform.JPPFDataTransformFactory.createInstance(JPPFDataTransformFactory.java:53)
       1 - org.jppf.io.IOHelper.<clinit>(IOHelper.java:51)
      29 - org.jppf.utils.SerializationHelperImpl.<init>(SerializationHelperImpl.java:41)
      26 - org.jppf.classloader.ResourceProvider.getResourceAsBytes(ResourceProvider.java:82)
      22 - org.jppf.classloader.ResourceProvider.getMultipleResourcesAsBytes(ResourceProvider.java:219)