When multiple servers are involved in your application, the naming service allows you to specify logical server names rather than server addresses. For example, instead of connecting to your finance component server at host badger using port 9000, you can specify the initial naming context for that server, such as USA/MyCompany/FinanceServer. Components are identified by specifying an initial server name context plus the package and component name. For example:
USA/MyCompany/FinanceServer/FinancePackage/PayrollAdmin
This layer of abstraction allows you to move a server to another host without affecting deployed client applications. Naming does require that one EJB Server use a well-known, stable host and port. This server acts as the name server for other servers that participate in your application, and clients connect to that server to resolve name requests.
You have the option of using persistent or transient storage for the naming database. For transient storage, the EJB Server builds the name database in memory when it starts, based on the contents of the EJB Server configuration repository.
Naming configuration for a multi-server application is briefly summarized as follows:
Choose one EJB Server to act as name server for the application. You can configure this server to store names in memory (transient storage), or to store names in a third-party directory server (persistent storage).
Configure each of the remaining servers to connect to the designated EJB Server naming server to resolve names. Each server will also update the name space when packages and components are added or deleted in the Adaptive Server plug-in.
EJB Server provides industry standard client-side APIs for naming services. EJB Server also provides implementations of the CORBA standard CosNaming API and the Java Naming and Directory (JNDI) API.
See Chapter 7, “Creating Enterprise JavaBean Clients,” for more information.