Hello again

I managed to do the isolation i pretended. The lock that was acquired was a BundleImpl lock that was associated with the thread that owned the lock. I just swaped that thread reference with my thread, waited for my thread to stop and swaped the thread reference back to the old thread.
Now running Felix with the following bundles:

ps
START LEVEL 1
  ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.5.0.SNAPSHOT)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.1.0.SNAPSHOT)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.1.0.SNAPSHOT)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.3.0.SNAPSHOT)
[   6] [Active     ] [    1] OPS4J Pax Web - Service (0.5.2)
[   7] [Resolved   ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[   8] [Active     ] [    1] Apache Felix Web Management Console (1.2.2)


the Thread/ThreadGroup structure is the following (u can see the cputime of each thread):

java.lang.ThreadGroup[name=system,maxpri=10]
Reference Handler CpuTime 0
Finalizer CpuTime 0
Signal Dispatcher CpuTime 0
java.lang.ThreadGroup[name=main,maxpri=10]
 main CpuTime 220000000
 FelixDispatchQueue CpuTime 0
 FelixStartLevel CpuTime 40000000
 FelixPackageAdmin CpuTime 0
 java.lang.ThreadGroup[name=org.apache.felix.shell,maxpri=10]
 java.lang.ThreadGroup[name=org.apache.felix.shell.tui,maxpri=10]
  Felix Shell TUI CpuTime 0
 java.lang.ThreadGroup[name=org.apache.felix.bundlerepository,maxpri=10]
 java.lang.ThreadGroup[name=org.ops4j.pax.web.service,maxpri=10]
  15668...@qtp0-0 CpuTime 0
14886...@qtp0-1 - Acceptor0 [email protected]:8080 CpuTime 0
 java.lang.ThreadGroup[name=org.apache.felix.webconsole,maxpri=10]
  Timer-0 CpuTime 0


My next step is to do a proper isolation of the bundles that use the http service since i want to monitor the cpu usage of the different web applications deployed in the web service bundle.

Richard u said that:
Of course, you are making an assumption that all thread creation happens in the activator, but it may not.
could u give me an example plz?

Thanks in advance
João Ferreira



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to