Bug 1277294 - [GSS](6.4.z) Reconnect handlers leaking channels, need to unregister the ejb receiver
Summary: [GSS](6.4.z) Reconnect handlers leaking channels, need to unregister the ejb ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.12
Assignee: Radovan STANCEL
QA Contact: Jan Martiska
URL:
Whiteboard:
Depends On:
Blocks: eap6412-payload 1377318 1398692
TreeView+ depends on / blocked
 
Reported: 2015-11-03 00:08 UTC by Brad Maxwell
Modified: 2019-08-15 05:46 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1398692 (view as bug list)
Environment:
Last Closed: 2016-11-25 15:35:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EJBCLIENT-146 0 Major Pull Request Sent Reconnect handlers leaking channels, need to unregister the ejb receiver 2018-03-01 13:07:11 UTC
Red Hat Issue Tracker JBEAP-6177 0 Critical Verified [GSS](7.0.z) Reconnect handlers leaking channels, need to unregister the ejb receiver 2018-03-01 13:07:11 UTC
Red Hat Issue Tracker JBEAP-6554 0 Critical Closed [GSS](7.1.0) Reconnect handlers leaking channels, need to unregister the ejb receiver 2018-03-01 13:07:11 UTC

Description Brad Maxwell 2015-11-03 00:08:35 UTC
Reconnect handlers in their reconnect() method should call unregisterEJBReceiver on the ejb context before registering a new one, otherwise it will leak a channel

org.jboss.ejb.client.remoting.ClusterContextConnectionReconnectHandler
org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler

Comment 6 Jiří Bílek 2016-11-25 13:55:16 UTC
Reopened because
1) when EJB client detects that the Remoting channel is broken, unregister is already called from [1] so after this fix, unregister is performed twice (is there some case where [1] is not executed after the connection is broken?)
2) if in some case when unregister is not called from [1] and it is the first reconnect, it will not unregister the receiver, because this.ejbReceiver is always null at line [2] during the first reconnect, and is only initialized after the first reconnect (on line [3])

[1] https://github.com/jbossas/jboss-ejb-client/blob/2.1.4.Final/src/main/java/org/jboss/ejb/client/EJBReceiverContext.java#L57
[2] https://github.com/jbossas/jboss-ejb-client/blob/2.1.7.Final/src/main/java/org/jboss/ejb/client/remoting/EJBClientContextConnectionReconnectHandler.java#L64
[3] https://github.com/jbossas/jboss-ejb-client/blob/2.1.7.Final/src/main/java/org/jboss/ejb/client/remoting/EJBClientContextConnectionReconnectHandler.java#L69


Note You need to log in before you can comment on or make changes to this bug.