JNDI学习

JNDI学习

版权申明:本文为原创文章,转载请注明原文出处

原文链接:http://example.com/post/eb02829d.html

JNDI学习

What is JNDI

JNDI(Java Naming and Directory Interface)是一个API,它允许Java应用程序发现和查找基于名称的资源。JNDI的设计目的是提供一种通用的方式来访问各种命名和目录服务。

主要功能:

  • 命名Naming:通过名称来查找和绑定Java对象。命名服务的典型用途包括查找数据库连接、Java RMI对象、EJB(Enterprise JavaBeans)等。

  • 目录Directory:除了命名功能,JNDI还支持访问目录服务,允许在对象中存储和检索属性。目录服务使得可以对命名对象进行更复杂的查询和操作。目录服务 = 命名服务 + 包含属性的对象

EXAMPLE(RMI + JNDI)

step 1: 创建InitialContext()初始化上下文

step 2: 将远程服务对象绑定到指定url

Author

yyyyyyxnp

Posted on

2024-06-22

Updated on

2024-09-29

Licensed under

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.