Community
Participate
Working Groups
It would be good to provide some queries to show Java EE-related data such as HTTP sessions, EJBs/Servlets and so on.
I have developed some of these queries, and will attach a patch shortly after I restructure it to fit into the main MAT source tree rather than an external one.
Created attachment 246295 [details] Initial implementation Attached is an initial version of some Java EE queries. It includes HTTP sessions and session attributes, Servlets and servlet requests and stateful EJBs with support for JBoss EAP 6 (AS7) and Wildfly 8. I have some other queries locally, but an still porting them to be in the main tree and tidying them up, and wanted to post what I had now to get feedback. Before (a future version of) this gets committed, I'd like to implement at least some of the extractors for Tomcat/WebSphere/WebLogic/etc to make sure I haven't the SPI JBoss-centric. Some obvious outstanding work is: * Handle messages and i18n properly * Review the error handling which is currently "write all SnapshotExceptions to the error log" * Review some of the utility methods and see if they better live elsewhere * Review package organisation * Think about adding tests * Add some documentation There is also a single report which just displays all the new queries. It's pretty simple but can be useful to see likely culprits at a quick glance. It would probably be better to integrate with Leak Suspects. I have BaseObjectQuery and SimpleObjectQuery as parent classes for the queries to reduce the boilerplate. The queries generally have a top-level "overview" row, optionally a second-level chikd row and then show outgoing references. Comments on those classes definitely welcome. They use a new GraftedResultTree class which grafts another set of results (usually outgoing references) onto child rows. I need to investigate the perforamnce issue with context objects when it's enabled, and fix up some of the text display to look more like normal outgoing references queries. The *Extractor SPIs are modelled off the extisting Collections ones. The methods aren't well throught out, and are just whatever I wanted to display as columns.
James, thanks a lot for the contribution! I am looking into the code and this will take me some more time. Meanwhile I found one issue with the patch - some of the files were not properly added: Index: plugins/org.eclipse.mat.javaee/.classpath =================================================================== Cannot display: file marked as a binary type. -- Index: plugins/org.eclipse.mat.javaee/.project =================================================================== Cannot display: file marked as a binary type. -- Index: plugins/org.eclipse.mat.javaee/plugin.xml =================================================================== Cannot display: file marked as a binary type. -- Index: plugins/org.eclipse.mat.javaee/pom.xml =================================================================== Cannot display: file marked as a binary type. I was able to create a new .project and .classpath files, and will be able to create the pom.xml. However, the plugin.xml is critical. It should contain all the extensions definitions I think. Can you please check this?
Created attachment 246585 [details] plugin.xml I'll rebuild the patch after fixing the svn mime-types when I'm at work tomorrow, but here's the plugin.xml
New Gerrit change created: https://git.eclipse.org/r/63237
This is an interesting patch, though sadly we haven't incorporated it yet. If we were to revive this one then I think we would need to do the following: 1. Confirm it is still relevant - would the queries still work with modern Java EE implementations? 2. Follow the Eclipse IP process a. Confirm with James that this is original code contributed under the EPL - I think that the license is implied by the headers in some, but not all files. James not longer works for the same employer, so we would need to find him. b. Confirm that he was authorised by his employer at the time to submit the code. c. Red Hat has signed the Member Committer and Contributor Agreement even if James has not: https://www.eclipse.org/projects/handbook/#resources-eca https://www.eclipse.org/membership/showMember.php?member_id=731 d. Follow the current Eclipse IP process for large contributions, as there are 4000+ lines.
This issue has been migrated to https://github.com/eclipse-mat/org.eclipse.mat/issues/22.