The activator calls an instantiator's
newInstance method in order to recreate in that group an object with the activation identifier,
id, and descriptor,
desc. The instantiator is responsible for:
- determining the class for the object using the descriptor's
getClassName method,
- loading the class from the code location obtained from the descriptor (using the
getLocation method),
- creating an instance of the class by invoking the special "activation" constructor of the object's class that takes two arguments: the object's
ActivationID, and the MarshalledObject containing object specific initialization data, and
- returning a MarshalledObject containing the stub for the remote object it created.
In order for activation to be successful, one of the following requirements must be met, otherwise ActivationException is thrown:
- The class to be activated and the special activation constructor are both public, and the class resides in a package that is exported to at least the
java.rmi module; or
- The class to be activated resides in a package that is open to at least the
java.rmi module.