I have searched the Internet but failed to find a satisfactory answer. What is the threading model present in an OSGi container? Does it simply spawn a new thread to each regist
When you start a bundle, code in activator is executed in one thread, similar to the 'main' thread. When the main thread completes its execution, bundle is changed from the 'Starting' state to 'Active' state. So it is better to execute time consuming code in another thread and starting another thread from the main thread.
When service method gets called from service consumer. At that time, the code written in the service method get executed in service consumer's thread.
I didn't find any difference between static variables and local variable in the service method.