docker-java/docker-java — pull request #83 by sabre1041 (2014-10-27 22:13:15+00:00)
Title: Loading of custom DockerCmdExecFactory

The DockerCmdExecFactory is accessed through the Java ServiceLoader. However, there are situations especially in an OSGi environment where the default implementation may not be available due to different classpath architectures.

The DockerClientBuilder does allow for a custom DockerCmdExecFactory to be specified, but only after attempting to load the default. An exception is thrown if the default is not found, otherwise the factory is set and initiated.

If a custom implementation is specified, initialization occurs twice (once for the default and subsequently for the custom implementation). This PR initiates the DockerCmdExecFactory in the DockerClient once at build time