JNDI 体系结构:JNDI API、服务提供商、SPI?
JNDI Architecture: JNDI API, Service Provider, SPI?
我已使用此 link.
阅读了来自 Oracle 的 JNDI 在线教程
有下图:
对此,我有如下疑问:
1) JNDI API - 这只是作为 J2SE 一部分的规范/接口吗?也就是说,当我们调用这个 API 的某个方法时,它是真正起作用还是在内部调用第三方提供的其他方法?
2) 命名管理器 - 我根本没听懂,也没有提供任何解释?这是J2SE的一部分吗?是API吗?
3) JNDI SPI - 这是什么? JNDIAPI和JNDI SPI有什么关系? JNDI API 是否在内部调用 JNDI SPI 来完成实际工作?谁提供这些 JNDI SPI?
4)Service Provider是什么意思?
这个我看不懂,谁能简单的帮我理解一下?
1) JNDI API - Is this just a specifications / interfaces which comes as part of J2SE?
是的。
That is, when we call some method of this API, does this do the real work
没有
OR it internally calls someone else, provided by third party?
是的。
2) Naming Manager - I didn't get this at all, nor is there any explanation provided? Is this part of the J2SE? Is it API?
它是一种幕后粘合剂,通过为 JNDI 提供者做很多样板文件来帮助他们。不然不知道什么意思
3) JNDI SPI - What is this? What is the relationship between JNDI API and JNDI SPI?
见下文。
Do JNDI API call JNDI SPI internally for doing the real work?
是的。
Who provides these JNDI SPI?
容器,或者在某些情况下是 JRE,例如 RMI 提供程序、LDAP 提供程序、DNS 提供程序、COSNaming 提供程序。
4) What is the meaning of Service Provider?
提供服务的代码。我不认为这是一个谜。实现包含 API.
的接口的代码
我已使用此 link.
阅读了来自 Oracle 的 JNDI 在线教程有下图:
对此,我有如下疑问:
1) JNDI API - 这只是作为 J2SE 一部分的规范/接口吗?也就是说,当我们调用这个 API 的某个方法时,它是真正起作用还是在内部调用第三方提供的其他方法?
2) 命名管理器 - 我根本没听懂,也没有提供任何解释?这是J2SE的一部分吗?是API吗?
3) JNDI SPI - 这是什么? JNDIAPI和JNDI SPI有什么关系? JNDI API 是否在内部调用 JNDI SPI 来完成实际工作?谁提供这些 JNDI SPI?
4)Service Provider是什么意思?
这个我看不懂,谁能简单的帮我理解一下?
1) JNDI API - Is this just a specifications / interfaces which comes as part of J2SE?
是的。
That is, when we call some method of this API, does this do the real work
没有
OR it internally calls someone else, provided by third party?
是的。
2) Naming Manager - I didn't get this at all, nor is there any explanation provided? Is this part of the J2SE? Is it API?
它是一种幕后粘合剂,通过为 JNDI 提供者做很多样板文件来帮助他们。不然不知道什么意思
3) JNDI SPI - What is this? What is the relationship between JNDI API and JNDI SPI?
见下文。
Do JNDI API call JNDI SPI internally for doing the real work?
是的。
Who provides these JNDI SPI?
容器,或者在某些情况下是 JRE,例如 RMI 提供程序、LDAP 提供程序、DNS 提供程序、COSNaming 提供程序。
4) What is the meaning of Service Provider?
提供服务的代码。我不认为这是一个谜。实现包含 API.
的接口的代码