X Tutup
Skip to content

Loading of custom DockerCmdExecFactory#83

Merged
marcuslinke merged 1 commit intodocker-java:masterfrom
sabre1041:custom-exec-factory
Oct 28, 2014
Merged

Loading of custom DockerCmdExecFactory#83
marcuslinke merged 1 commit intodocker-java:masterfrom
sabre1041:custom-exec-factory

Conversation

@sabre1041
Copy link
Copy Markdown
Contributor

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

marcuslinke added a commit that referenced this pull request Oct 28, 2014
Loading of custom DockerCmdExecFactory
@marcuslinke marcuslinke merged commit a7a1b91 into docker-java:master Oct 28, 2014
@marcuslinke
Copy link
Copy Markdown
Contributor

@sabre1041 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup