Bug 1277294 - [GSS](6.4.z) Reconnect handlers leaking channels, need to unregister the ejb receiver
[GSS](6.4.z) Reconnect handlers leaking channels, need to unregister the ejb ...
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB (Show other bugs)
6.4.4
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.4.12
Assigned To: Radovan STANCEL
Jan Martiska
:
Depends On:
Blocks: eap6412-payload 1377318 1398692
  Show dependency treegraph
 
Reported: 2015-11-02 19:08 EST by Brad Maxwell
Modified: 2016-11-29 10:33 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1398692 (view as bug list)
Environment:
Last Closed: 2016-11-25 10:35:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker EJBCLIENT-146 Major Pull Request Sent Reconnect handlers leaking channels, need to unregister the ejb receiver 2017-05-31 15:14 EDT
JBoss Issue Tracker JBEAP-6177 Critical Verified [GSS](7.0.z) Reconnect handlers leaking channels, need to unregister the ejb receiver 2017-05-31 15:14 EDT
JBoss Issue Tracker JBEAP-6554 Critical Pull Request Sent [GSS](7.1.0) Reconnect handlers leaking channels, need to unregister the ejb receiver 2017-05-31 15:14 EDT

  None (edit)
Description Brad Maxwell 2015-11-02 19:08:35 EST
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 08:55:16 EST
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.