Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

OSGi prioritisation mechanism

Avatar

Level 3

For example there are several services. One of services is very resource-intensive (makes high CPU load, IO). Respectively the service has big influence on the performance of other services. That is not acceptable because while resource-intensive background processing is taking place frontend-related services are very slow (users are waiting for pages).  

Is it possible to prioritise a bundle or a service in Felix context? 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

from my experience trying to specify the order for bundles to start is very problematic.

The only time I attempted to do this was when one bundle was dependent on another bundle performing an action/updating content. Unfortunately the client did not have time to rewrite everything, so I added checks in bundle B to see if Bundle A had completed all it's activities, before allowing bundle B to start.

Another approach, if there are no dependencies between the bundles, would be to kick off a job for the bundle that takes a long time to start, this job would then run in a separate thread and run the initialization of the services, in this way the other bundles/service would be free to start quicker.

Regards,

Opkar

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Hi,

from my experience trying to specify the order for bundles to start is very problematic.

The only time I attempted to do this was when one bundle was dependent on another bundle performing an action/updating content. Unfortunately the client did not have time to rewrite everything, so I added checks in bundle B to see if Bundle A had completed all it's activities, before allowing bundle B to start.

Another approach, if there are no dependencies between the bundles, would be to kick off a job for the bundle that takes a long time to start, this job would then run in a separate thread and run the initialization of the services, in this way the other bundles/service would be free to start quicker.

Regards,

Opkar