Creating new packages in the world of modules
Alan.Bateman at Sun.COM
Mon Mar 29 11:07:38 PDT 2010
Weijun Wang wrote:
> Hi Alan
> I'm planning to add two RFEs to OpenJDK:
> 1. A SASL mechanism called NTLM, which includes two new packages:
> a. com.sun.security.sasl.ntlm: The SASL provider
> b. com.sun.security.ntlm: The raw NTLM API
> Here I've created an NTLM API which I hope can also be used by sun/net/www/protocol/http/ntlm/NTLMAuthentication.java.
> 2. Keytool and Jarsigner as JSR 199 Tools, which include interfaces in a new package com.sun.security.tools, implementations in sun.security.tools and new META-INF/services/com.sun.security.tools.* entries.
> I know you have spent a lot of time recently to make sure classes to be distributed in different modules and their dependencies carefully maintained. If I want to add the new packages above, what do I need to take care of most? Any configuration files to modify? Is there a latest map showing the content of current existing modules?
> BTW, what is the fate of ServiceLoader in modules? Will META-INF/services entries spread into different modules and ServiceLoader tries to get a union of them for each service class?
It might be best to start with a "ntlm" module (the name will change in
time). It could be grouped into a coarser grain module later. The NTLM
authentication implementation for the http protocol handler is currently
buried in the "net-compat" module. There isn't anything directly
dependent on it so moving it to ntlm should be OK. Once thing to mention
is that the module configurations have changed a bit in the jigsaw
forest and there will probably be more changes before it is pushed to
jdk7. It might be easier to just ignore the module configuration for now
and we can fix it before the big push into jdk7.
I assume ServiceLoader will need to be updated. Mark is the best person
to answer that.
More information about the jigsaw-dev