Binding RMI Objects into a Directory Server

The registry that is provided with RMI is fairly simple and limited. It was not intended for production use. It is possible and recommended that the remote objects (the remote object stubs) for a production application be bound into any JNDI naming service where they can then be retrieved by client applications. The following code fragment demonstrates this process.

In this example, a Data Access Object (DAO), an intelligent object for accessing databases, is exposed as a service. This particular DAO has been developed to handle general queries and to store the aggregated results of those queries (similar to the javax.sql.RowSet class but without the JDBC syntax for accessing the results).

To bind the ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.