Instance pooling allows a single component instance to service multiple clients. The component lifecycle contains activation and deactivation steps: Activation binds an instance to an individual client; deactivation indicates that the instance is unbound.
Instance pooling eliminates resource drain from repeated allocation of component instances.
Instance pooling eliminates resource drain caused by repeated allocation of new component instances.
For Java components, you can implement a lifecycle-control interface to control whether the component instances are pooled.
These interfaces also provide activate and deactivate methods that are called to indicate state transitions in a component instanceâs lifetime.
For more information on these interfaces, see the following sections:
Java components can implement the interface
jaguar.beans.enterprise.ServerBean.
To support instance pooling, code that responds to activation events must restore the component to its initial state (that is, as if it were newly created). The Java interface has methods that allow an instance to selectively refuse pooling: canReuse in Java.
When the component Pooling option is set in EJB Server, the Java canReuse method is not called, even if the component implements the ServerBean Java interface.