Hi
I'm doing some work in OSGi in an attempt to add better resource
monitoring to osgi applications. My objective is to isolate the cpu
consumption across the different bundles. To implement this my strategy
is to group the different threads in ThreadGroups, where there is a
different ThreadGroup for each bundle.
In the "Felix.startBundle(BundleImpl bundle, boolean record)" method i
create a new thread and a new thread group to call the
"SecureAction.startActivator(BundleActivator activator, BundleContext
context)" method. i start this new thread and wait for it to die. The
problem is i get a deadlock because the startlevel thread is waiting and
holding the lock, and the new thread is trying acquire the lock to
register services (in this case the shell bundle is registering the
shell service). In the actual Felix implementation the register service
method can acquire the lock because its the same thread.
I would like some help so i dont break the framework. What would be the
best solution to my problem? Release the lock before starting the new
thread and this new thread acquire the lock? Modify the
bundle.isLockable() method to allow other threads to lock?
Thanks in advance
João Ferreira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]