[
https://issues.apache.org/jira/browse/FELIX-3502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287433#comment-13287433
]
Vishwa Sourabh Sahay commented on FELIX-3502:
---------------------------------------------
I have gone through the solutions purposed. I have a few points to suggest in
this regard : -
1. I think it would be good to leverage advantage of ThreadMbeans in case of
Java 1.5 and 1.6 In general, when we talk of reflection, I do not see any
particular advantage of calling java.lang.Thread by reflection as they would be
available in 1.4 anyways (am i mssing something?)
2.Using ThreadMBeans would mean that we can get info like whether thread is
suspended or not, is native or not, blocked count and the lock if any.
3. I think it is a good idea to add java.lang.Thread.State to the output
beside other parameters.
4. It will be great if we can output summary information in thread printer like
in other tabs listing threads per state. In 1.5 onwards, we can list out the
threads in deadlock state, in this summary information
5. In general, thread dump can be made to look TDA compliant.
6. Check out the possibility of using MbeanServer 's objectName syntax to make
calls on ThreadMxBean. This may be an alternative to reflection
7.In Unix systems, it may be possible to get process Ids if executed through
shell scripts. If we can pass kill command on the process id obtained thus, it
might lead to useful thread dumps on pre 1.5 JVMs on Unix.
Let me know your thoughts on this.
Sourabh
> Improve Threads web console printer
> -----------------------------------
>
> Key: FELIX-3502
> URL: https://issues.apache.org/jira/browse/FELIX-3502
> Project: Felix
> Issue Type: Improvement
> Components: Web Console
> Affects Versions: webconsole-4.0.0
> Reporter: Valentin Valchev
> Assignee: Valentin Valchev
> Priority: Minor
> Fix For: webconsole-4.0.0
>
>
> We can improve the Thread printer in a number of ways:
> - it should be based on Sling thread printer :
> http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/threaddump/src/main/java/org/apache/sling/extensions/threaddump/internal/
> - it should call the Java 5+ methods via reflection, so it will work also in
> older JVMs
> - it should keeps sorting of the thread groups and threads by name
> - It should be mode aware printer.
> - In ZIP mode, the printer should also include thread dumps and class loader
> information
> - There will be a separate ThreadDumper class, that contains all logic for
> printing threads/groups. It should be independent from the Web Console API so
> it can be included by other projects.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira