Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API
A word to the wise: distributed programming is inherently more difficult than standalone programming. However, the Java Enterprise APIs give Java programmers tools to ease the burden of producing robust, efficient applications. This column will help you get production-level, industrial-strength applications out the door, on time and on target.
When it comes to distributed computing, no area is getting more interest today from programmers than the Remote Method Invocation (RMI) API. Programmers love it, Microsoft hates it, and vendors want to make money off of it. EJB, Jini, and JavaSpaces all have their roots in RMI. So what better subject to kick off this column.
As an instructor, no Java Enterprise API is more rewarding to teach than RMI. It always works the same way:
The student reactions follow the modules:
Object serialization and RMI puts a smile on programmers' faces because they witness the subtle strength of RMI: the ability to transport true objects between processes.
What excites students is an example that demonstrates behavior objects. A behavior object is an instance that implements an interface, where the interface declares a remote method parameter type. For example, consider the following interfaces:
public interface ScribbleShape {
public void draw(java.awt.Graphics g);
}
import java.rmi.*;
public interface ScribblePad extends Remote {
public void addShape(ScribbleShape s) throws RemoteException;
}
The ScribblePad.addShape() method parameter represents a behavior object because the parameter instance must support the ScribbleShape interface, the ScribbleShape interface doesn't extend Remote, and the parameter will be passed between processes using serialization. From the ScribblePad implementation's perspective, the addShape() method is invoked by a Java object running in a process across the network and delivers a serialized version of the ScribbleShape instance that existed in the client process. The ScribblePad implementation can store the parameter value in a Vector, invoke methods on the object, serialize it to a file, or pass to yet another RMI object on a different machine.
Free Download - 5 Minute Product Review. When slow equals Off: Manage the complexity of Web applications - Symphoniq
![]()
Free Download - 5 Minute Product Review. Realize the benefits of real user monitoring in less than an hour. - Symphoniq