Creating a networked application is easy using Java's Remote Method Invocation. However, taking a non-networked class and jazzing it up for the network is definitely not the way to go. This will just lead to mess -- slow, hard to read, and difficult to maintain. Author Dan Becker demonstrates the proper way to adapt a local Java class for use over a network using the Adapter design pattern. This design technique creates an easy-to-maintain application that works extremely well. (2,500 words)
2. Write high-performance RMI servers and Swing clients
Learn how to supercharge your RMI servers by reducing the use of thread synchronization and implementing asynchronous callbacks via a configurable thread pool. Andy also demonstrates how to implement an efficient asynchronous logging facility and how to handle RMI callbacks to a Swing-based client application. (4,200 words)
3. Revolutionary RMI: Dynamic class loading and behavior objects
Behavior objects are among the most powerful, least known, and most underutilized RMI features. They represent the revolutionary capability to effortlessly pass true objects (data and code) between virtual machines without having to distribute the supporting class files. RMI makes this possible through dynamic class loading. This article examines RMI's built-in capability to dynamically load class files from remote machines to support passing behavior objects as RMI method parameters. Along the way, we'll develop a distributed Swing-based application that uses dynamic class loading to implement a distributed, multiuser drawing program. (4,000 words)
4. How to eliminate debugging problems for RMI-based applications
Debugging RMI-based programs -- a painful chore -- can be made vastly easier through the use of an in-process server mechanism that allows us to use any JDK 1.1-compatible debugger to develop RMI-based client/server code. This tip shows you how! (2,500 words)
Partitioning an existing application so it is distributed across multiple CPUs is easy using Java's Remote Method Invocation (RMI). However, RMI must be carefully introduced into existing source code. In this article, Gregg Sporar demonstrates proper use of the Adapter design pattern when modifying client source code to access an object via RMI. This design technique minimizes source-code changes and can create a more flexible application. (1,400 words)
Using the tool in this tip, you can make objects written with local semantics remote. The tool creates remote interfaces that have roughly the same method signatures as the local interfaces. These generated interfaces form a layer between the application server interfaces and the RMI runtime. Client-side translation from the generated interfaces to the application server interfaces is performed via runtime-generated proxy objects. You may also use the tool to "RMI-retrofit" existing interfaces, even those for which no source code is available. (1,500 words)
Transparent Remote Method Invocation (TRMI) extends RMI to simplify the creation of distributed applications by allowing centralized RemoteException handling and by allowing any interface to be used remotely. In this article, Guy Gur-Ari covers the motivation for TRMI development, demonstrates the library's usage with an example, and tours TRMI's inner workings. (2,100 words; August 9, 2002)
Remote Method Invocation (RMI) has become a standard communication mechanism between remote Java objects. In spite of that popularity, the lack of a robust security framework has hindered RMI's acceptance for wide-area distributed computing. The latest RMI framework, Jini Extensible Remote Invocation (JERI), introduced as part of the Jini 2.0 release, features a powerful, highly configurable RMI security mechanism. This article presents an extensible RMI overview and demonstrates JERI's configuration features. (3,000 words; December 19, 2003)
Partitioning an existing application so it is distributed across multiple CPUs is easy using Java's Remote Method Invocation (RMI). However, RMI must be carefully introduced into existing source code. In this article, Gregg Sporar demonstrates proper use of the Adapter design pattern when modifying client source code to access an object via RMI. This design technique minimizes source-code changes and can create a more flexible application. (1,400 words)
EJBGen is a free command-line tool that limits your code editing to just one file, the bean class. Step-by-step, this article shows you how to use EJBGen to speed your Enterprise JavaBeans (EJB) 2.0 development, especially for entity bean container-managed persistence (CMP). The article uses an example from the EJB 2.0 specification to illustrate the relationships and local interface concepts in the EJB 2.0 CMP model, and shows how easily EJBGen generates all the interfaces and XML deployment descriptors for you. (2,700 words; February 22, 2002)