This functionality was provided by creating a constructor which exported the object by calling the static method UnicastRemoteObject.exportObject. The exportObject method accepts as an argument an object that implements an interface that extends from java.rmi.Remote . The RMI daemon, rmid , provides a JVM from which other JVM instances may be spawned. As in the UnicastRemoteObject.exportObject case, activatable objects may be exported using a static method, Activatable.exportObject , and these objects must implement a remote interface. The reason for this omission, is that the client code for activatable objects is no different than the RMI client code for accessing non-activatable remote objects.
Activation is strictly a server-side implementation decision.
For this example, the remote interface will be examples.activation.AnotherRemoteInterface . There are three steps to create a remote interface. For this example, the implementation class will be examples.activation.MyClass . For this example, the setup class will be examples.activation.Setup3 . Do not use this policy file in a production environment .