Use global pools with in vm connector/acceptor ?
adryen31 Feb 7, 2013 4:38 AMHello all,
I have a HornetQ server which start during startup of my webapp (is an embedded HornetQ)
I use the following configuration:
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
<paging-directory>C:\Java\Workspaces\Indigo\res\hornetq\paging</paging-directory>
<bindings-directory>C:\Java\Workspaces\Indigo\res\hornetq\bindings</bindings-directory>
<journal-directory>C:\Java\Workspaces\Indigo\res\hornetq\journal</journal-directory>
<large-messages-directory>C:\Java\Workspaces\Indigo\res\hornetq\large-messages</large-messages-directory>
<journal-min-files>10</journal-min-files>
<connectors>
<connector name="webapp-connector">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
<param key="server-id" value="${hornetq.server-id:0}"/>
</connector>
</connectors>
<acceptors>
<acceptor name="webapp-acceptor">
<factory-class>
org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory
</factory-class>
<param key="server-id" value="0"/>
</acceptor>
</acceptors>
<security-enabled>false</security-enabled>
<persistence-enabled>false</persistence-enabled>
<shared-store>false</shared-store>
</configuration>
My problem is, when I stop my webapp in tomcat server, following line is loggued:
6 févr. 2013 19:10:40 org.hornetq.core.logging.impl.JULLogDelegate info
INFO: HornetQ Server version 2.2.14.Final (HQ_2_2_14_FINAL, 122) [f7adea47-6ba2-11e2-b4e0-8df5c7f2c714] stopped
Consequently HornetQ is correctly stopped with my webapp, but below following trace appears:
6 févr. 2013 19:10:40 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: The web application [/mywebapp] appears to have started a thread named [Thread-1 (HornetQ-client-global-threads-15529480)] but has failed to stop it. This is very likely to create a memory leak.
6 févr. 2013 19:10:40 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: The web application [/mywebapp] appears to have started a thread named [Thread-0 (HornetQ-client-global-scheduled-threads-17614142)] but has failed to stop it. This is very likely to create a memory leak.
I check a heap.dump and I see all HornetQ thread is in zombis status "WAIT" status like:
[Thread-3 (HornetQ-scheduled-threads-18439316)]
[Thread-29 (HornetQ-server-HornetQServerImpl::serverUUID=ca2cb5b6-6bb0-11e2-baed-4332c050da13-68103)]
[Thread-0 (HornetQ-remoting-threads-HornetQServerImpl::serverUUID=ca2cb5b6-6bb0-11e2-baed-4332c050da13-2167514-22853821)]
[Thread-1 (HornetQ-client-global-threads-20868998)]
[Thread-0 (HornetQ-client-global-scheduled-threads-783145)]
I think maybe threads that may be attached to the pool of Tomcat no ? I found use-global-pools property which can take false but event
with documentation I don't know if it can resolve my problem, and I think it's an option only for JMS connectors no ?
Great thank and best regards,
Adrien