DPML
DPML Metro Activation Annotation
HomeUtilitiesStationMetro
Activation Annotation

The Activation annotation associates an activation policy with a component class. The activation policy is typically used to declare that a component should be commissioned on startup as opposed to the default on-demand commissioning strategy.

Attribute Table
value The activation policy value.
Sample Code

The following code declares an overriding activation policy of STARTUP to the component class EventMonitor.

import net.dpml.annotation.Activation;
    
import static net.dpml.annotation.ActivationPolicy.STARTUP;
        
@Activation( STARTUP )
public class EventMonitor
{
    ...
}
Technical Note

Generall speaking the default behaviour of DEMAND activation is sufficient and overriding the default value is rare.

The activation policy associated with a component (either via defaults or through an explicit annotation) may be overriden by a packaged or part-based component strategy using the activation attribute.