JDKとJAXBの対応

1728 ワード

This table captures the history of the JAXB RI integration into JDK.
This is for information purposes only. In particular, the JAXB RI in JDK is
package renamed to avoid any conflict with the stand-alone JAXB RI  distribution
or with the jaxb2- reflection library.  You can use any version of these with any version of JDK without worrying about implementation conflicts. JDK6 first release - JDK6 u3    JAXB RI 2.0.3 JDK6 u4                                 JAXB RI 2.1.3 JDK6 u14                                JAXB RI 2.1.10 JDK7 first release                    JAXB RI 2.2.4-1例えばcom.sun.xml.internal.bind.v 2.ContextFactoryはcom.sun.xml.bind.v 2.ContextFactory package renamedである.
では、彼らのロード順序はどのようなものですか?
The algorithm used to locate the provider subclass to use consists of the following steps:
  •   If the $java.home/lib/jaxb.properties file exists and it is readable by   the java.util.Properties.load(InputStream) method and it contains   an entry whose key is javax.xml.bind.context.factory then the value of   that entry is used as the name of the implementation class.
  •   If a system property with the name javax.xml.bind.context.factory   is defined, then its value is used as the name of the implementation class.
  •   If a resource with the name of   META-INF/services/ javax.xml.bind.context.factory   exists, then its first line, if present, is used as the UTF-8 encoded   name of the implementation class.
  •   Finally, a default implementation class name is used.

  • その後、JWS-RIのロード順がこれと1,3が逆になっていることに気づき、確認しませんでした.リンク先:
    http://docs.oracle.com/javaee/5/api/javax/xml/ws/spi/Provider.htmlああ、必要なのは自分で確認しましょう.