Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(issue#912, management) Fixed a memory leak by altering CollectOnlyMa… #841

Merged
merged 5 commits into from
Jan 7, 2017

Conversation

cmebarrow
Copy link
Contributor

…nagementSessionStrategy.soSessionClosed to call doSessionClosedListeners on the sessionBean.

This should hopefully address the memory leak noted in ticket 912: the gateway is accumulating SessionMXBeanImpl instances.

…nagementSessionStrategy.soSessionClosed to call doSessionClosedListeners on the sessionBean.
@danibusu
Copy link
Contributor

danibusu commented Jan 5, 2017

The PR looks good and seems to fix the problem. I didn't merge because I thought of adding an integration test.

@cmebarrow
Copy link
Contributor Author

@danibusu Any ideas for how to do the integration test? I thought it might be possible to do one by using a test service so it can examine the MX bean on the session. I am not sure it's possible though. The unit test does confirm the code change.

Chris Barrow added 2 commits January 5, 2017 10:54
Added integration test JmxSessionIT to check for MX session bean leak
…and verify there are none (otherwise the test was passing without the fix for kaazing#912).
@cmebarrow
Copy link
Contributor Author

@dpwspoon Please merge this once the build completes. @danibusu has reviewed the changes and did an IT which I have added (JmxSessionIT).

@cmebarrow
Copy link
Contributor Author

Build failed twice in http.proxy service (ProxyServiceTest), filed as #846

@cmebarrow
Copy link
Contributor Author

@danibusu @dpwspoon Please merge this now build has passed.


mbeanNames = mbeanServerConn.queryNames(
ObjectName.getInstance("*:serviceType=echo,name=sessions,*"), null);
for (ObjectName name : mbeanNames) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a for statement? The test will stop running after the first failure. Maybe check that the set size is zero?

@dpwspoon dpwspoon merged commit 3a6efc9 into kaazing:develop Jan 7, 2017
@cmebarrow cmebarrow deleted the issue_912_sessionbean_leak branch January 11, 2017 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants