!--a11y-->
Components References 
If component A has notify reference to component B, then A will receive all events that refer to a change in the state of B.
Throughout the life cycle of a component, a notify reference means:
· There is no requirement that component B is loaded for component A to be resolved.
· If component B exists, a reference from the class loader of A is set to the class loader of B.
|
Reference to |
Interface |
Library |
Service |
|
Reference from |
|||
|
Interface |
No |
No |
No |
|
Library |
No |
No |
No |
|
Service |
Yes |
Yes |
Yes |

Only service components can define notify references, since only services can be registered as listeners.
Component A sets weak reference to component B if it needs to use classes of B.
Throughout the life cycle of a component, a weak reference means:
If component B exists, a reference from the class loader of A is set to the class loader of B.
Component B must be resolved for component A to be resolved.
All events that refer to a change of state of component B are sent to component A.
If the system has to unload component B, it must first unload component A.
|
Reference to |
Interface |
Library |
Service |
|
Reference from |
|||
|
Interface |
Yes |
No |
No |
|
Library |
Yes |
Yes |
No |
|
Service |
Yes |
Yes |
Yes |

Even though it is possible to set weak reference from a library to an interface, it is not common practice. Therefore, if you encounter such a situation, you can double-check the design of your library before you set the link.
Component A sets strong reference to component B if it needs to use classes and runtime objects that B provides.
Throughout the life cycle of a component, a strong reference means:
· If component B exists, a reference from the class loader of A is set to the class loader of B.
· Component B must be resolved for component A to be resolved.
· All events that refer to a change of state of component B are sent to component A.
· Component B must be started for component A to be started.
· If the system has to stop component B, it must first stop component A.
· If the system has to unload component B, it must first unload component A.
· If component A has strong reference to component B, then B cannot have strong reference to A.
|
Reference to |
Interface |
Library |
Service |
|
Reference from |
|||
|
Interface |
No |
No |
No |
|
Library |
No |
No |
No |
|
Service |
Yes |
No |
Yes |

In the case of a service component with a strong reference to an interface, the referencing service will be started only if there is another service that implements the referenced interface and this service is started.
For more information, see Components Life Cycle.
