JDK和JAXB的对应

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.v2.ContextFactory就是
com.sun.xml.bind.v2.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,需要的自已确认吧。


本文转自 anranran 51CTO博客,原文链接:http://blog.51cto.com/guojuanjun/1251384

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值