[JBoss Remoting] - Possible bug in "org.jboss.ejb.client.EjbClientContext"

Sunil Dixit <[email protected]> Thu, 22 Aug 2013 08:10:17 -0400
Newsgroups gmane.comp.java.jboss.user
Message-ID <[email protected]>
------=_Part_648323_1763027485.1377173417670
Content-Type: multipart/alternative; 
	boundary="----=_Part_648322_1608896866.1377173417670"

------=_Part_648322_1608896866.1377173417670
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Sunil Dixit [https://community.jboss.org/people/sunil_dixit] created the di=
scussion

"Possible bug in "org.jboss.ejb.client.EjbClientContext""

To view the discussion, visit: https://community.jboss.org/message/833533#8=
33533

--------------------------------------------------------------
jboss-ejb-client (*Version 1.0.18.Final and above*) has one bug (garbage co=
llection related) in "*public void unregisterEJBReceiver(final EJBReceiver =
receiver)*" API.

This API uses "ExecutorService" to send close notification to registered li=
steners (if any) asynchronously.=20
Now if your InitialContext is eligible for garbage collection then it JVM c=
alls RemoteContext.finalize() method which internally result into calling "=
*org.jboss.ejb.client.EJBReceiverContext.close()*" which triggers
"*org.jboss.ejb.client.EJBClientContext.unregisterEJBReceiver()*" .

Before "*org.jboss.ejb.client.EJBClientContext.unregisterEJBReceiver() "* g=
ets executed "*org.jboss.ejb.client.EJBClientContext.ejbClientContextTasksE=
xecutorService*" state is changed from RUNNING to TERMINATED i.e. ( runStat=
e is being set to 3) which result into "java.util.concurrent.RejectedExecut=
ionException".=20


T*hreadPoolExecutor.addIfUnderMaximumPoolSize() API will always return fals=
e as " if (poolSize < maximumPoolSize && runState =3D=3D RUNNING)" prevents=
 to create new thread*.


Finally caller APIs gets following exception


java.util.concurrent.RejectedExecutionException
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPo=
olExecutor$AbortPolicy.rejectedExecution(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPo=
olExecutor.reject(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.concurrent.ThreadPo=
olExecutor.execute(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.concurrent.Abstract=
ExecutorService.submit(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.ejb.client.EJBClien=
tContext.unregisterEJBReceiver(EJBClientContext.java:432)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.ejb.client.EJBRecei=
verContext.close(EJBReceiverContext.java:59)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.ejb.client.remoting=
.ChannelAssociation.notifyBrokenChannel(ChannelAssociation.java:404)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.ejb.client.remoting=
.ChannelAssociation.access$100(ChannelAssociation.java:59)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.ejb.client.remoting=
.ChannelAssociation$1.handleClose(ChannelAssociation.java:118)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.ejb.client.remoting=
.ChannelAssociation$1.handleClose(ChannelAssociation.java:110)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.SpiUt=
ils.safeHandleClose(SpiUtils.java:54)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.Abstr=
actHandleableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.jav=
a:501)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.Abstr=
actHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:406)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.Abstr=
actHandleableCloseable.closeComplete(AbstractHandleableCloseable.java:277)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.remote.Re=
moteConnectionChannel.closeAction(RemoteConnectionChannel.java:515)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.Abstr=
actHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.remote.Re=
moteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:390)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.remote.Re=
moteConnectionHandler.sendCloseRequest(RemoteConnectionHandler.java:231)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.remote.Re=
moteConnectionHandler.closeAction(RemoteConnectionHandler.java:376)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.Abstr=
actHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.Connectio=
nImpl.closeAction(ConnectionImpl.java:52)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.remoting3.spi.Abstr=
actHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.naming.remote.clien=
t.HaRemoteNamingStore.closeAsync(HaRemoteNamingStore.java:385)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.naming.remote.clien=
t.NamingStoreCache.release(NamingStoreCache.java:113)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.naming.remote.clien=
t.NamingStoreCache$1.close(NamingStoreCache.java:98)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.jboss.naming.remote.clien=
t.RemoteContext.finalize(RemoteContext.java:199)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.ref.Finalizer.invok=
eFinalizeMethod(Native Method)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.ref.Finalizer.runFi=
nalizer(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.ref.Finalizer.acces=
s$100(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.ref.Finalizer$Final=
izerThread.run(Unknown Source)




=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Below code in "org.j=
boss.ejb.client.EJBClientContext" is added into new versions and causing th=
is problem


=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 // we *don't* want to send these notification to listeners =
synchronously since the listeners can be any arbitrary
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 // application code and can potential block for a long time=
. So invoke the listeners asynchronously via our ExecutorService
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 final Collection<EJBClientContextListener> listeners =3D ne=
w ArrayList<EJBClientContextListener>(this.ejbClientContextListeners);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 for (final EJBClientContextListener listener : listeners) {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 this.ejbClientContextTasksExecutorS=
ervice.submit(new Runnable() {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 @Override
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 public void=
 run() {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 try {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 listener.receiverUnRegistered(receiver=
Context);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 } catch (Throwable t) {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // log and ignore
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logger.debug("Exception trying to invo=
ke EJBClientContextListener " + listener + " for EJB client context " + EJB=
ClientContext.this + " on un-registertation of EJBReceiver " + receiver, t)=
;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 }
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 });
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 }
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833533#833533]

Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=3D1&co=
ntainerType=3D14&container=3D2050]


------=_Part_648322_1608896866.1377173417670
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link=3D"#355491" alink=3D"#4262a1" vlink=3D"#355491" style=3D"backgro=
und: #e2e2e2; margin: 0; padding: 20px;">

<div>
=09<table cellpadding=3D"0" bgcolor=3D"#FFFFFF" border=3D"0" cellspacing=3D=
"0" style=3D"border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -=
moz-border-radius: 6px; -webkit-border-radius: 6px;">
=09=09<tbody>
=09=09=09<tr>

=09=09=09=09<td>

=09=09=09=09=09<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" bgco=
lor=3D"#FFFFFF" style=3D"border: solid 2px #ccc; background: #dadada; width=
: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
=09=09=09=09=09=09<tbody>
=09=09=09=09=09=09=09<tr>
=09=09=09=09=09=09=09=09<td bgcolor=3D"#000000" valign=3D"middle" height=3D=
"58px" style=3D"border-bottom: 1px solid #ccc; padding: 20px; -moz-border-r=
adius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-ri=
ght-radius: 5px; -webkit-border-top-left-radius: 5px;">
=09=09=09=09=09=09=09=09=09<h1 style=3D"color: #333333; font: bold 22px Ari=
al, Helvetica, sans-serif; margin: 0; display: block !important;">
=09=09=09=09=09=09=09=09=09<!-- To have a header image/logo replace the nam=
e below with your img tag -->
=09=09=09=09=09=09=09=09=09<!-- Email clients will render the images when t=
he message is read so any image -->
=09=09=09=09=09=09=09=09=09<!-- must be made available on a public server, =
so that all recipients can load the image. -->
=09=09=09=09=09=09=09=09=09<a href=3D"https://community.jboss.org/index.jsp=
a" style=3D"text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
=09=09=09=09=09=09=09=09</td>

=09=09=09=09=09=09=09</tr>
=09=09=09=09=09=09=09<tr>
=09=09=09=09=09=09=09=09<td bgcolor=3D"#FFFFFF" style=3D"font: normal 12px =
Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-ra=
dius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-b=
ottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style=
=3D"margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Possible bug in "org.jboss.ejb.client.EjbClientContext"
</h3>
<span style=3D"margin-bottom: 10px;">
    created by <a href=3D"https://community.jboss.org/people/sunil_dixit">S=
unil Dixit</a> in <i>JBoss Remoting</i> - <a href=3D"https://community.jbos=
s.org/message/833533#833533">View the full discussion</a>
</span>
<hr style=3D"margin: 20px 0; border: none; background-color: #dadada; heigh=
t: 1px;">

<div class=3D"jive-rendered-content"><p>jboss-ejb-client (<span style=3D"te=
xt-decoration: underline;"><strong>Version 1.0.18.Final and above</strong><=
/span>) has one bug (garbage collection related) in "<span style=3D"font-si=
ze: 12pt;"><strong>public void unregisterEJBReceiver(final EJBReceiver rece=
iver)</strong></span>" API.</p><p style=3D"min-height: 8pt; height: 8pt; pa=
dding: 0px;">&#160;</p><p>This API uses "ExecutorService" to send close not=
ification to registered listeners (if any) asynchronously. </p><p>Now if yo=
ur InitialContext is eligible for garbage collection then it JVM calls Remo=
teContext.finalize() method which internally result into calling "<span sty=
le=3D"font-size: 12pt;"><strong>org.jboss.ejb.client.EJBReceiverContext.clo=
se()</strong></span>" which triggers</p><p>"<span style=3D"font-size: 12pt;=
"><strong>org.jboss.ejb.client.EJBClientContext.unregisterEJBReceiver()</st=
rong></span>" .</p><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;"=
>&#160;</p><p>Before "<span style=3D"font-size: 12pt;"><strong>org.jboss.ej=
b.client.EJBClientContext.unregisterEJBReceiver() " </strong></span>gets ex=
ecuted "<span style=3D"font-size: 12pt;"><strong>org.jboss.ejb.client.EJBCl=
ientContext.<span style=3D"color: #0000ff;">ejbClientContextTasksExecutorSe=
rvice</span></strong></span>" state is changed from RUNNING to TERMINATED i=
.e. ( runState is being set to 3) which result into "<span style=3D"font-si=
ze: 12pt;">java.util.concurrent.RejectedExecutionException</span>". </p><p =
style=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style=3D=
"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style=3D"c=
olor: #333333;"><span style=3D"font-size: 12pt;">T<strong>hreadPoolExecutor=
.addIfUnderMaximumPoolSize() API will always return false as " if (poolSize=
 &lt; maximumPoolSize &amp;&amp; runState =3D=3D RUNNING)" prevents to crea=
te new thread</strong></span>.</span></p><p style=3D"min-height: 8pt; heigh=
t: 8pt; padding: 0px;">&#160;</p><p style=3D"min-height: 8pt; height: 8pt; =
padding: 0px;">&#160;</p><p>Finally caller APIs gets following exception</p=
><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p styl=
e=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java.util.co=
ncurrent.RejectedExecutionException</p><p>&#160;&#160;&#160;&#160;&#160;&#1=
60;&#160; at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedEx=
ecution(Unknown Source)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at=
 java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)</p><p>&#160=
;&#160;&#160;&#160;&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExe=
cutor.execute(Unknown Source)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#1=
60; at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)<=
/p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.client.EJ=
BClientContext.unregisterEJBReceiver(EJBClientContext.java:432)</p><p>&#160=
;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb.client.EJBReceiverCo=
ntext.close(EJBReceiverContext.java:59)</p><p>&#160;&#160;&#160;&#160;&#160=
;&#160;&#160; at org.jboss.ejb.client.remoting.ChannelAssociation.notifyBro=
kenChannel(ChannelAssociation.java:404)</p><p>&#160;&#160;&#160;&#160;&#160=
;&#160;&#160; at org.jboss.ejb.client.remoting.ChannelAssociation.access$10=
0(ChannelAssociation.java:59)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#1=
60; at org.jboss.ejb.client.remoting.ChannelAssociation$1.handleClose(Chann=
elAssociation.java:118)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at=
 org.jboss.ejb.client.remoting.ChannelAssociation$1.handleClose(ChannelAsso=
ciation.java:110)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.j=
boss.remoting3.spi.SpiUtils.safeHandleClose(SpiUtils.java:54)</p><p>&#160;&=
#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.remoting3.spi.AbstractHand=
leableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.java:501)<=
/p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.remoting3.spi=
.AbstractHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:=
406)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.remoting=
3.spi.AbstractHandleableCloseable.closeComplete(AbstractHandleableCloseable=
.java:277)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.re=
moting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.=
java:515)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.rem=
oting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseab=
le.java:359)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.=
remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionH=
andler.java:390)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jb=
oss.remoting3.remote.RemoteConnectionHandler.sendCloseRequest(RemoteConnect=
ionHandler.java:231)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at or=
g.jboss.remoting3.remote.RemoteConnectionHandler.closeAction(RemoteConnecti=
onHandler.java:376)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org=
.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandlea=
bleCloseable.java:359)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at =
org.jboss.remoting3.ConnectionImpl.closeAction(ConnectionImpl.java:52)</p><=
p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.remoting3.spi.Abs=
tractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)</=
p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.naming.remote.=
client.HaRemoteNamingStore.closeAsync(HaRemoteNamingStore.java:385)</p><p>&=
#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.naming.remote.client=
.NamingStoreCache.release(NamingStoreCache.java:113)</p><p>&#160;&#160;&#16=
0;&#160;&#160;&#160;&#160; at org.jboss.naming.remote.client.NamingStoreCac=
he$1.close(NamingStoreCache.java:98)</p><p>&#160;&#160;&#160;&#160;&#160;&#=
160;&#160; at org.jboss.naming.remote.client.RemoteContext.finalize(RemoteC=
ontext.java:199)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.l=
ang.ref.Finalizer.invokeFinalizeMethod(Native Method)</p><p>&#160;&#160;&#1=
60;&#160;&#160;&#160;&#160; at java.lang.ref.Finalizer.runFinalizer(Unknown=
 Source)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.ref.=
Finalizer.access$100(Unknown Source)</p><p>&#160;&#160;&#160;&#160;&#160;&#=
160;&#160; at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)</=
p><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p sty=
le=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style=3D"mi=
n-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style=3D"min-height=
: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160; &#=
160;&#160;&#160;&#160;&#160;Below code in "org.jboss.ejb.client.EJBClientCo=
ntext" is added into new versions and causing this problem</p><p style=3D"m=
in-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style=3D"min-heigh=
t: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // we *don=
't* want to send these notification to listeners synchronously since the li=
steners can be any arbitrary</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#16=
0;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // application code and =
can potential block for a long time. So invoke the listeners asynchronously=
 via our ExecutorService</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; final Collection&lt;EJBClien=
tContextListener&gt; listeners =3D new ArrayList&lt;EJBClientContextListene=
r&gt;(this.ejbClientContextListeners);</p><p>&#160;&#160;&#160;&#160;&#160;=
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (final EJB=
ClientContextListener listener : listeners) {</p><p>&#160;&#160;&#160;&#160=
;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160; this.ejbClientContextTasksExecutorService.submit(new Runna=
ble() {</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&=
#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16=
0; @Override</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160=
;&#160; public void run() {</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160=
;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {</p><p>&#160;&#160;&#16=
0;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&=
#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16=
0;&#160;&#160;&#160; listener.receiverUnRegistered(receiverContext);</p><p>=
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#1=
60;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;=
&#160;&#160; } catch (Throwable t) {</p><p>&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160=
;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#=
160; // log and ignore</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16=
0;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&=
#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.de=
bug("Exception trying to invoke EJBClientContextListener " + listener + " f=
or EJB client context " + EJBClientContext.this + " on un-registertation of=
 EJBReceiver " + receiver, t);</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160=
;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p><p>&#160;&#160;&#160=
;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p><p>&#160;&#160;&#160;&#=
160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160=
;&#160;&#160;&#160; });</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#1=
60;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p><p>&#160;&#160;&#160;&#1=
60;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p></div>

<div style=3D"background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style=3D"margin: 0;">Reply to this message by <a href=3D"https://com=
munity.jboss.org/message/833533#833533">going to Community</a></p>
=09<p style=3D"margin: 0;">Start a new discussion in JBoss Remoting at <a h=
ref=3D"https://community.jboss.org/choose-container!input.jspa?contentType=
=3D1&containerType=3D14&container=3D2050">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>
------=_Part_648322_1608896866.1377173417670--

------=_Part_648323_1763027485.1377173417670
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
------=_Part_648323_1763027485.1377173417670--