Dump services webrev
Alan Bateman
Alan.Bateman at oracle.com
Fri May 25 03:35:38 PDT 2012
On 25/05/2012 09:45, Paul Sandoz wrote:
> Hi,
>
> See the following for a webrev to dump the services configuration:
>
> http://cr.openjdk.java.net/~psandoz/jigsaw/dump-services/webrev/
>
> There is also some other minor stuff sneaking into this web rev related to services in general.
>
> Paul.
The update to the dump-config to print the services configurations looks
fine to me, and very useful.
I don't know if you wanted comments on the "minor stuff" that sneaked in
but here goes ...
The change to jdk.depconfig is the beginnings of allowing jconsole have
plugins installed as modules but there is more to do, as per the
comments you've added to JConsole. My take on this is that -pluginpath
isn't really compatible with modules and as jconsole is close to
retirement (my words, but it is essentially replaced by VisualVM) then
maybe the right thing is to just have jconsole run in -Xmode:legacy
mode. Mandy?
The change to HttpServerProvider.java is fine but it reminds me that it
we have many places in the JDK where you can set a property to select
the provider, and if not set then it fallbacks to looking for a service
provider. It's come up on discussions here before too. Clearly setting
the property to some implementation type that is not visible isn't going
to work. However as the service providers will be installed as modules
then the property mechanism could potentially be used to choose the
provider. So in this case if com.sun.net.httpserver.HttpServerProvider
is set to the name of a provider then we could use ServiceLoader to
iterate through the providers to fine one with this name.
We should check with Phil Race about the sun.java2d.renderer property
but I suspect these rendering engines will all be in the desktop module
anyway. This is what is in jdk.desktop's module-info now:
requires optional service sun.java2d.pipe.RenderingEngine;
provides service sun.java2d.pipe.RenderingEngine with
sun.java2d.jules.JulesRenderingEngine;
provides service sun.java2d.pipe.RenderingEngine with
sun.java2d.pisces.PiscesRenderingEngine;
Like the HttpServerProvider example it may be that the property is just
used to select the service implementation.
-Alan.
More information about the jigsaw-dev
mailing list