Hi Miroslav,

I haven't looked in all details, but this text in JAXBContext.java looks
odd to me - it seems that the bullet is repeated twice (or if they
differ - the diff must be subtle):

lines 241-257 seem identical to lines 259-275

 241  * <li>
242 * Look for resource <tt>/META-INF/services/javax.xml.bind.JAXBContext</tt> using provided class loader. 243 * Methods without class loader parameter use {@code Thread.currentThread().getContextClassLoader()}. 244 * If such a resource exists, its content is assumed to be the provider factory class and must supply
 245  * an implementation class containing the following method signatures:
 246  *
 247  * <pre>
 248  *
 249  * public static JAXBContext createContext(
 250  *                                      String contextPath,
 251  *                                      ClassLoader classLoader,
252 * Map&lt;String,Object&gt; properties throws JAXBException
 253  *
 254  * public static JAXBContext createContext(
 255  *                                      Class[] classes,
256 * Map&lt;String,Object&gt; properties ) throws JAXBException
 257  * </pre>
 258  *
 259  * <li>
260 * Look for resource <tt>/META-INF/services/javax.xml.bind.JAXBContext</tt> using provided class loader. 261 * Methods without class loader parameter use {@code Thread.currentThread().getContextClassLoader()}. 262 * If such a resource exists, its content is assumed to be the provider factory class and must supply
 263  * an implementation class containing the following method signatures:
 264  *
 265  * <pre>
 266  *
 267  * public static JAXBContext createContext(
 268  *                                      String contextPath,
 269  *                                      ClassLoader classLoader,
270 * Map&lt;String,Object&gt; properties throws JAXBException
 271  *
 272  * public static JAXBContext createContext(
 273  *                                      Class[] classes,
274 * Map&lt;String,Object&gt; properties ) throws JAXBException
 275  * </pre>

So if I understand well - this is somewhat similar to what
ServiceLoader does in terms of lookup, except that the
mechanism defined here does not use an instance of the
declared class, nor require that the class declared in
/META-INF/services/javax.xml.bind.JAXBContext
is a subclass of JAXBContext - but simply that it defines
the appropriate static factory methods...

Maybe the fact that this step is deprecated should be noted more
prominently in the bullet itself.

best regards,

-- daniel

On 15/05/15 17:13, Miroslav Kos wrote:
Hi everybody,

this is review request for: 8072839: JAX-B Plugability Layer: using
java.util.ServiceLoader
The JAX-B API changed a little bit - proprietary ServiceLoader-like code
has been replaced by java.util.ServiceLoader. This change is required by
Jigsaw, old configuration way still supported.

JBS:https://bugs.openjdk.java.net/browse/JDK-8072839
webrev: http://cr.openjdk.java.net/~mkos/8072839/jaxws.02/index.html
CCC: http://ccc.us.oracle.com/8072839

Testing: JAX-WS (standalone) unit tests, no, jtreg tests available now,
TCK/JCK tests will require new tests.

Thanks
Miran


Reply via email to