This content has been marked as final.
Show 1 reply
-
1. Re: Memory leak when using @WebServiceRef
egelke Mar 30, 2012 4:58 AM (in response to egelke)I investigated furtur and it seems that the @WebServiceRef isn't the issue, it is just the largest object in the StatelessBeanContext. JBoss keeps the context in a thread local pool, because HornetQ uses a cached thread pool of JavaSE, it creates new threads all the time which increases the ammount of contexes unil there is an out of memory exception.
There is a workaround and this is to set the UseGlobalPools to false and set a ThreadPoolMaxSize in the ra.xml file of HornetQ. That way HornetQ will use a fixed thread pool of JavaSE, it isn't as good as using a thread pool of JBoss but at least the memory leak should be gone.
Currently I running a basic example to verify, when it fails, I'll greate a JIRA ticket with HornetQ.