An ActivationGroup represents a group of activatable objects that are to run within the same Java VM. The ActivationGroup serves as a go-between for the ActivationMonitor and the activatable objects, forwarding messages about the active state of objects in its group. The activeObject() methods are used to forward a message to the activation system about a newly activated object in the group, and the inactiveObject() method does the same for deactivated objects.

You can explicitly create your own ActivationGroups using the createGroup() method. If you don’t specify a group id when you create an ActivationDesc for your activatable object, then it will be assigned to a default group. When you create an ActivationGroup, you provide an ActivationGroupDesc object that describes how the group is to be created (e.g, from what class the group object should be constructed, what Properties should be set for the group, etc.).

The ActivationGroup class is abstract, so concrete implementations must be provided in order to create groups. In addition to satisfying the interface defined in ActivationGroup, the subclass must also provide a constructor that takes an ActivationGroupID and a MarshalledObject as arguments. This constructor will be invoked by the createGroup() method. In addition, a concrete subclass of ActivationGroup must implement the newInstance() method inherited from ActivationInstantiator.

public abstract class ActivationGroup extends java.rmi.server.UnicastRemoteObject ...

Get Java Enterprise in a Nutshell, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.