<!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;">
    jboss client creates threads that are not closed during the shutdown of tomcat
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="https://community.jboss.org/people/ckar">ckar</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/docs/DOC-47431">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I am developing an application that runs on Jboss AS7 and its front end, is developed on a tomcat that makes remote ejb calls to the jboss.</p><p>In tomcat i use spring and the configuration is the following</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160; &lt;bean id="jndiProperties"</p><p>&#160;&#160;&#160;&#160;&#160; class="org.springframework.beans.factory.config.PropertiesFactoryBean"&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;property name="properties"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;map&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entry key="java.naming.factory.url.pkgs" value="org.jboss.ejb.client.naming" /&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/map&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/property&gt;</p><p>&#160;&#160; &lt;/bean&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160; &lt;jee:remote-slsb id="documentService"</p><p>&#160;&#160;&#160;&#160;&#160; business-interface="document.DocumentServiceInterface"</p><p>&#160;&#160;&#160;&#160;&#160; jndi-name="${document.jndi.name}" </p><p>&#160;&#160;&#160;&#160;&#160; environment-ref="jndiProperties" /&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>in jboss-esb-client.properties i have the following properties</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>endpoint.name=client-endpoint</p><p>remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>remote.connections=master</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>remote.connection.master.host=localhost</p><p>remote.connection.master.port=4447</p><p>remote.connection.master.username=ejb</p><p>remote.connection.master.password=whatever</p><p>remote.connection.master.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Everything works fine till i try to shutdown tomcat, where i get a lot of errors regarding memory leakage like the following</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.jboss.remoting3.remote.ProtocolUtils$1] (value [org.jboss.remoting3.remote.ProtocolUtils$1@1ca9271]) and a value of type [java.util.Random] (value [java.util.Random@1194685]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.jboss.marshalling.UTFUtils.BytesHolder] (value [org.jboss.marshalling.UTFUtils$BytesHolder@195fb28]) and a value of type [byte[]] (value [[B@19c2afd]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.jboss.marshalling.UTFUtils.BytesHolder] (value [org.jboss.marshalling.UTFUtils$BytesHolder@195fb28]) and a value of type [byte[]] (value [[B@1241146]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.xnio.Xnio$1] (value [org.xnio.Xnio$1@ea1895]) and a value of type [java.lang.Boolean] (value [true]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.jboss.remoting3.remote.ProtocolUtils$1] (value [org.jboss.remoting3.remote.ProtocolUtils$1@1ca9271]) and a value of type [java.util.Random] (value [java.util.Random@f40ddb]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.jboss.remoting3.remote.ProtocolUtils$1] (value [org.jboss.remoting3.remote.ProtocolUtils$1@1ca9271]) and a value of type [java.util.Random] (value [java.util.Random@1aad8e4]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.jboss.marshalling.UTFUtils.BytesHolder] (value [org.jboss.marshalling.UTFUtils$BytesHolder@195fb28]) and a value of type [byte[]] (value [[B@1858371]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p>SEVERE: The web application [/module] created a ThreadLocal with key of type [org.xnio.Xnio$1] (value [org.xnio.Xnio$1@ea1895]) and a value of type [java.lang.Boolean] (value [true]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.</p><p>21-Sep-2012 11:44:43 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Is it something that i am missing from the configuration or is it sth else?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-47431">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>