Java

本类阅读TOP10

·使用MyEclipse开发Struts框架的Hello World!(录像1)
·hibernate配置笔记
·AOP编程入门--Java篇
·linux下Tomcat 5.0.20 与 Apache 2 安装/集成/配置
·在win2003下整合了整合Tomcat5.5+ apache_2.0.53+ mod_jk_2.0.47.dll
·构建Linux下IDE环境--Eclipse篇
·Jsp 连接 mySQL、Oracle 数据库备忘(Windows平台)
·ASP、JSP、PHP 三种技术比较
·Tomcat5.5.9的安装配置
·AWT GUI 设计笔记(二)

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
About Name Directory Service (in English)

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

About Name Directory Service

This article is contributed by Wang HaiLong.

Introduction

It seems that all the C/S based systems have similar architectures and work according to similar rules:

1. There are usually 3 parts - client, server, name directory service.

2. Server registers itself in a name directory.

3. Client locates server in a name directory.

 

This article lists such scenarios from aspects of Middle Ware and Network.

Middle Ware

COM+

A component registers itself in the registry table, while clients locate it from registry table.

An active component registers itself with a Moniker in ROT (Running Object Table), while a client uses the Moniker to find the active component from ROT.

CORBA

Clients can ask services from Interface Repository.

 

The following code is extracted from <<Core Java 2 Volume II: Advanced Features>>.

ORB orb = ORB.init(args, NULL);

String [] Services = orb.list_initial_services();

org.omg.CORBA.Object object = orb.resolve_initial_references("NameService");

NamingContext namingContext = NamingContexthelper.narrow(objcet);

EJB

JNDI.

rmiregistry for RMI.

The following code is extracted from <<Core Java 2 Volume II: Advanced Features>>.

String url = getCodeBase().getHost();

url = "rmi://" + url;

centralWarehouse = (Warehouse)Naming.lookup(url + "/central_warehouse");

Network

Socket

A server needs to bind itself to port number before a client can connect it.

Name Registration and Resolution

Network programming concerns Address Families, Name Registration and Resolution.

The following table is from << Network Programming for Microsoft Windows >>.

Name Space Description Type

NS_SAP Service Advertising Protocol (SAP) name space; used on IPX networks Dynamic

NS_NDS NetWare Directory Services (NDS) name space; also used on IPX networks Persistent

NS_DNS Domain Name System (DNS) name space; most commonly found on TCP/IP networks and on the Internet Static

ND_NTDS Windows NT domain space; protocol-independent name space found on Windows 2000

Reference

<<Core Java 2 Volume II: Advanced Features>>

<<Network Programming for Microsoft Windows>>

 




相关文章

相关软件