Rhino versions 2.4 and above allow configuration of the activation order of SLEE components. This ordering is controlled separately for activating and deactivating components.
In Rhino 2.3.1 and older, RAs and services started in effectively random order. The startup order was based on the indexing hash order in the system.
The priority system added in Rhino 2.4 allows operator control of this order.
Priorities are values between -128 and 127. If a component (service or resource adaptor entity), X, has a numerically higher priority value than another component, Y, then X will be started before Y. Components with the same priority may be started in an arbitrary order, or may be started concurrently. The same rule applies for component stopping priorities; i.e., highest priority stops first.
If you have assigned startup priorities to; RAs A=100, B=20, C=10; and service S=15, they will start up in the following order:
activate RA entity A
activate RA entity B
activate service S
activate RA entity C
Note that a service can still potentially receive an event from an RA before it receives a ServiceStartedEvent on the ServiceActivity. That’s a completely different problem to activation ordering, and given the asynchronous nature of event delivery not something we can readily do anything about. A service that depends on the ServiceStartedEvent may be able to use the service activation callbacks in Rhino 2.4 instead. You may notice that services of the same priority level as RA entities start before the RA entities and stop after them. This ordering is not part of the priority system definition. It is possible that they will be started concurrently in the future, so always use different priorities if you need a specific order.
For example, using
[Rhino@localhost:2199 (#0)] setservicestartingpriority name=MyService,vendor=OpenCloud,version=1.0 10 Service ServiceID[name=MyService,vendor=OpenCloud,version=1.0] activation priority set to 10
For example, using
[Rhino@localhost:2199 (#0)] setraentitystartingpriority sipra 80 Resource adaptor entity sipra activation priority set to 80
You get a full combined listing using the
liststoppingpriorities commands in
[Rhino@localhost:2199 (#0)] liststartingpriorities Starting priorities of installed services and resource adaptor entities: 80 : resource adaptor entity sipra 20 : ServiceID[name=SIP Presence Service,vendor=OpenCloud,version=1.1] 10 : ServiceID[name=SIP Proxy Service,vendor=OpenCloud,version=1.8] 0 : ServiceID[name=SIP Notification Service,vendor=OpenCloud,version=1.1] ServiceID[name=SIP Profile Location Service,vendor=OpenCloud,version=1.0] ServiceID[name=SIP Publish Service,vendor=OpenCloud,version=1.0] -5 : ServiceID[name=SIP Registrar Service,vendor=OpenCloud,version=1.8] Note: Components with the same priority may be started in any order