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

相关文章
|
SQL 关系型数据库 调度
pgpool-recovery扩展分析
Pgpool-II的故障转移功能需要用到pgpool-recovery扩展,提供了pgpool_recovery、pgpool_remote_start、pgpool_pgctl、pgpool_switch_xlog等几个用C语言实现的自定义函数,用于辅助online recovery工作。
|
10月前
|
Java API
如何在 Java 中动态地添加字符编码支持
本文介绍了在Java中动态添加字符编码支持的方法,通过使用 Charset 和 CharsetProvider 类,可以扩展 Java 的字符编码能力,实现对更多字符集的支持。
218 6
|
10月前
|
Java Maven C++
如何在 Java 中添加新的字符编码支持
在Java中添加新的字符编码支持,可以通过实现java.nio.charset.Charset和CharsetProvider接口来完成。自定义字符集编码后,注册到JVM中即可使用。适用于特定业务场景下的特殊字符集需求。
193 6
|
11月前
|
存储 关系型数据库 MySQL
Mysql的LSN是什么?
LSN(Log Sequence Number,日志序列号)是一种用于标识事务日志中每个操作的递增数字。它有助于记录日志位置、支持崩溃恢复及检查点机制。通过 `SHOW ENGINE INNODB STATUS;` 可查看LSN,其作用包括记录日志位置、支持崩溃恢复、更新检查点以及追踪数据文件状态。
590 1
Mysql的LSN是什么?
|
Python
告别死记硬背:掌握Python正则表达式re模块的高效应用&[面向百度编程]
Python中正则表达式的高效应用,通过内置的`re`模块,讲解了如何匹配、提取和替换字符串,并提供了相关示例代码,同时提倡通过实践来掌握正则表达式的使用,而不是仅仅依赖网络搜索。
126 1
|
iOS开发
iPad适配
iPad适配
198 0
|
数据采集 存储 异构计算
LabVIEW编程LabVIEW开发高级数据采集技术 模拟波形的生成 例程与相关资料
LabVIEW编程LabVIEW开发高级数据采集技术 模拟波形的生成 例程与相关资料
109 9
|
网络协议 安全 fastjson
Fastjson姿势技巧集合 1
Fastjson姿势技巧集合
433 0
flask确定已经按照,日志报错no module named 'flask',成功解决
我的问题在于python版本的问题,更换版本即可,具体原因我也很懵
flask确定已经按照,日志报错no module named 'flask',成功解决
|
存储 运维 安全
【IPD流程学习 三】模板详述
【IPD流程学习 三】模板详述
611 0