<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Remoting threads never get closed
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/kieselhorst">Dennis Kieselhorst</a> in <i>JBoss Remoting</i> - <a href="https://community.jboss.org/message/797283#797283">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm using a standalone remote client as <a class="jive-link-external-small" href="https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI">described in the wiki</a> in combination with a <span style="font-family: courier new,courier;">ConfigBasedEJBClientContextSelector</span>. Several worker threads named <span style="font-family: courier new,courier;">Remoting "endpoint name" read-1</span>, <span style="font-family: courier new,courier;">write-1</span>, <span style="font-family: courier new,courier;">task-1</span>, <span style="font-family: courier new,courier;">task-2</span>, <span style="font-family: courier new,courier;">task-3</span> and <span style="font-family: courier new,courier;">task-4</span> are created and never get destroyed. The <span style="font-family: courier new,courier;">read-1</span> and <span style="font-family: courier new,courier;">write-1</span> threads are in state <span style="font-family: courier new,courier;">RUNNABLE</span>:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-noformat-content">
Stack trace:
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:273)
sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:255)
sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:136)
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
   - locked sun.nio.ch.Util$2@478f67d0
   - locked java.util.Collections$UnmodifiableSet@17e8ad64
   - locked sun.nio.ch.WindowsSelectorImpl@7c9aff86
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:84)
org.xnio.nio.WorkerThread.run(WorkerThread.java:153)
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The <span style="font-family: courier new,courier;">task-*</span> threads are in state <span style="font-family: courier new,courier;">WAITING</span>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Is it possible to create an idle timeout?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Current properties supplied in a <span style="font-family: courier new,courier;">PropertiesBasedEJBClientConfiguration</span>:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-java">Properties p = <font color="navy"><b>new</b></font> Properties();
p.put(<font color="red">"endpoint.name"</font>, <font color="red">"client-endpoint-for-"</font>+userName);
p.put(<font color="red">"remote.connectionprovider.create.options.org.xnio.Options."</font>+org.xnio.Options.SSL_ENABLED.getName(), <font color="red">"false"</font>);
p.put(<font color="red">"remote.connections"</font>, <font color="red">"default"</font>);
p.put(<font color="red">"remote.connection.default.port"</font>, String.valueOf(port));
p.put(<font color="red">"remote.connection.default.host"</font>, host);
p.put(<font color="red">"remote.connection.default.username"</font>, userName);
p.put(<font color="red">"remote.connection.default.password"</font>, password);
p.put(<font color="red">"remote.connection.default.connect.options.org.xnio.Options."</font>+org.xnio.Options.SASL_POLICY_NOANONYMOUS.getName(), <font color="red">"false"</font>);
p.put(<font color="red">"remote.connection.default.connect.options.org.xnio.Options."</font>+org.xnio.Options.SASL_POLICY_NOPLAINTEXT.getName(), <font color="red">"false"</font>);
p.put(<font color="red">"remote.connection.default.connect.options.org.xnio.Options."</font>+org.xnio.Options.SASL_DISALLOWED_MECHANISMS.getName(), <font color="red">"JBOSS-LOCAL-USER"</font>);
p.put(<font color="red">"remote.connection.default.connect.options.org.xnio.Options."</font>+org.xnio.Options.KEEP_ALIVE.getName(), <font color="red">"true"</font>);
p.put(<font color="red">"remote.connection.default.connect.options.org.jboss.remoting3."</font>+RemotingOptions.HEARTBEAT_INTERVAL, String.valueOf(heartbeatInterval));
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks in advance!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Regards</p><p>Dennis</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/797283#797283">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Remoting at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2050">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>